/* ═══════════════════════════════════════════════════════
   ZOREN CORPORATE LOADER — loader.css
   Cinematic, highly animated loading experience
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

/* ── Tokens ── */
:root {
  --navy:    #0A1628;
  --navy2:   #0D1E36;
  --navy3:   #12263F;
  --gold:    #E8792A;
  --gold2:   #F2A654;
  --gold-dk: #C45E18;
  --white:   #FFFFFF;
  --grad:    linear-gradient(135deg, #E8792A, #F2A654);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Loader active body lock ── */
body.loader-active {
  overflow: hidden !important;
}

/* ═══════════════════════════════════════════════════════
   OVERLAY
   ═══════════════════════════════════════════════════════ */
.loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  overflow: hidden;
}

/* ── Particle Canvas ── */
.particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════
   ANIMATED GRID BACKGROUND
   ═══════════════════════════════════════════════════════ */
.grid-bg {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.4;
}

.grid-line {
  position: absolute;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(232, 121, 42, 0.06) 50%,
    transparent 100%
  );
}

.gl-h {
  height: 1px;
  width: 100%;
  left: 0;
  animation: gridSlideH 8s linear infinite;
}

.gl-h1 { top: 25%; animation-delay: 0s; }
.gl-h2 { top: 50%; animation-delay: -2.5s; }
.gl-h3 { top: 75%; animation-delay: -5s; }

.gl-v {
  width: 1px;
  height: 100%;
  top: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(232, 121, 42, 0.06) 50%,
    transparent 100%
  );
  animation: gridSlideV 10s linear infinite;
}

.gl-v1 { left: 25%; animation-delay: 0s; }
.gl-v2 { left: 50%; animation-delay: -3s; }
.gl-v3 { left: 75%; animation-delay: -6s; }

@keyframes gridSlideH {
  0% { opacity: 0; transform: translateX(-60%); }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateX(60%); }
}

@keyframes gridSlideV {
  0% { opacity: 0; transform: translateY(-60%); }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(60%); }
}

/* ═══════════════════════════════════════════════════════
   AMBIENT GLOWS
   ═══════════════════════════════════════════════════════ */
.ambient {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 2;
  pointer-events: none;
}

.a1 {
  width: 400px;
  height: 400px;
  background: rgba(232, 121, 42, 0.07);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: ambientFloat 5s ease-in-out infinite;
}

.a2 {
  width: 250px;
  height: 250px;
  background: rgba(242, 166, 84, 0.05);
  top: 20%;
  right: 15%;
  animation: ambientFloat 7s ease-in-out infinite reverse;
}

.a3 {
  width: 300px;
  height: 300px;
  background: rgba(10, 22, 40, 0.5);
  bottom: 10%;
  left: 10%;
  animation: ambientFloat 6s ease-in-out infinite 1s;
}

@keyframes ambientFloat {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.5; }
}

/* ═══════════════════════════════════════════════════════
   LOADER CENTER (logo + orbits)
   ═══════════════════════════════════════════════════════ */
.loader-center {
  position: relative;
  width: 300px;
  height: 300px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: centerIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes centerIn {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

/* ── Morphing outer ring ── */
.morph-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(232, 121, 42, 0.08);
  animation: morphSpin 12s linear infinite, morphShape 8s ease-in-out infinite;
}

@keyframes morphSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes morphShape {
  0%, 100% { border-radius: 50%; }
  25% { border-radius: 45% 55% 50% 50%; }
  50% { border-radius: 50% 45% 55% 50%; }
  75% { border-radius: 55% 50% 45% 55%; }
}

/* ── Orbit Rings ── */
.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
}

.orbit.o1 {
  width: 150px;
  height: 150px;
  border: 1.5px solid rgba(232, 121, 42, 0.3);
  animation: orbitSpin 5s linear infinite;
  transform: translate(-50%, -50%);
}

.orbit.o2 {
  width: 210px;
  height: 210px;
  border: 1px solid rgba(232, 121, 42, 0.14);
  animation: orbitSpin 8s linear infinite reverse;
  transform: translate(-50%, -50%);
}

.orbit.o3 {
  width: 270px;
  height: 270px;
  border: 1px dashed rgba(255, 255, 255, 0.05);
  animation: orbitSpin 15s linear infinite;
  transform: translate(-50%, -50%);
}

@keyframes orbitSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ── Sparks on orbits ── */
.spark {
  position: absolute;
  border-radius: 50%;
  background: var(--gold);
}

.sp1 {
  width: 6px;
  height: 6px;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 12px rgba(232, 121, 42, 0.7), 0 0 4px var(--gold);
  animation: sparkPulse 1.5s ease-in-out infinite;
}

.sp2 {
  width: 4px;
  height: 4px;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold2);
  box-shadow: 0 0 10px rgba(242, 166, 84, 0.6);
  animation: sparkPulse 2s ease-in-out infinite 0.5s;
}

.sp3 {
  width: 7px;
  height: 7px;
  top: -3.5px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 14px rgba(232, 121, 42, 0.8), 0 0 6px var(--gold);
  animation: sparkPulse 1.2s ease-in-out infinite;
}

.sp4 {
  width: 5px;
  height: 5px;
  right: -2.5px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--gold2);
  box-shadow: 0 0 10px rgba(242, 166, 84, 0.5);
  animation: sparkPulse 1.8s ease-in-out infinite 0.3s;
}

.sp5 {
  width: 4px;
  height: 4px;
  bottom: 12px;
  left: -2px;
  background: var(--gold-dk);
  box-shadow: 0 0 8px rgba(196, 94, 24, 0.5);
  animation: sparkPulse 2.2s ease-in-out infinite 0.8s;
}

@keyframes sparkPulse {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(0.8); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.4); }
}

/* fix non-x-translated sparks */
.sp4, .sp5 {
  animation-name: sparkPulseAlt;
}

@keyframes sparkPulseAlt {
  0%, 100% { opacity: 0.5; scale: 0.8; }
  50% { opacity: 1; scale: 1.5; }
}

/* ── SVG Light Trail Arcs ── */
.trail-svg {
  position: absolute;
  width: 300px;
  height: 300px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: trailRotate 6s linear infinite;
}

.trail-arc {
  stroke-dasharray: 80 680;
  stroke-linecap: round;
}

.trail-arc.t1 {
  animation: trailDash 3s linear infinite;
}

.trail-arc.t2 {
  animation: trailDash 4s linear infinite reverse;
  stroke-dasharray: 60 540;
}

@keyframes trailRotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes trailDash {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -760; }
}

/* ═══════════════════════════════════════════════════════
   LOGO CORE
   ═══════════════════════════════════════════════════════ */
.logo-core {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(10, 22, 40, 0.6);
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  animation: logoFloat 4s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.logo-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 121, 42, 0.2) 0%, transparent 70%);
  animation: glowPulse 3s ease-in-out infinite;
  z-index: -1;
}

@keyframes glowPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.4; }
}

.logo-img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(232, 121, 42, 0.5));
  opacity: 0;
  animation: logoReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

@keyframes logoReveal {
  from { opacity: 0; transform: scale(0.4) rotate(-15deg); filter: drop-shadow(0 0 0px transparent); }
  to { opacity: 1; transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 12px rgba(232, 121, 42, 0.5)); }
}

/* ── Pulse rings from logo ── */
.logo-ring-pulse {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  opacity: 0;
  animation: ringExpand 3s ease-out infinite;
}

.logo-ring-pulse.rp2 { animation-delay: 1s; }
.logo-ring-pulse.rp3 { animation-delay: 2s; }

@keyframes ringExpand {
  0% { transform: scale(1); opacity: 0.6; border-width: 1.5px; }
  100% { transform: scale(3); opacity: 0; border-width: 0.5px; }
}

/* ═══════════════════════════════════════════════════════
   FLOATING DATA NODES
   ═══════════════════════════════════════════════════════ */
.data-node {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  animation: nodeFloat 4s ease-in-out infinite;
}

.data-node span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, rgba(232, 121, 42, 0.3), transparent);
  transform-origin: 0 50%;
}

.dn1 {
  top: 8%;
  left: 55%;
  width: 6px;
  height: 6px;
  animation-delay: 0s;
  box-shadow: 0 0 10px rgba(232, 121, 42, 0.5);
}

.dn1 span { transform: rotate(200deg); }

.dn2 {
  top: 30%;
  right: 5%;
  width: 5px;
  height: 5px;
  background: var(--gold2);
  animation-delay: 0.8s;
  box-shadow: 0 0 8px rgba(242, 166, 84, 0.4);
}

.dn2 span { transform: rotate(230deg); }

.dn3 {
  bottom: 25%;
  right: 8%;
  width: 7px;
  height: 7px;
  animation-delay: 1.5s;
  box-shadow: 0 0 12px rgba(232, 121, 42, 0.6);
}

.dn3 span { transform: rotate(160deg); }

.dn4 {
  bottom: 10%;
  left: 45%;
  width: 4px;
  height: 4px;
  background: var(--gold-dk);
  animation-delay: 2s;
  box-shadow: 0 0 6px rgba(196, 94, 24, 0.4);
}

.dn4 span { transform: rotate(30deg); }

.dn5 {
  bottom: 35%;
  left: 3%;
  width: 6px;
  height: 6px;
  background: var(--gold2);
  animation-delay: 0.5s;
  box-shadow: 0 0 10px rgba(242, 166, 84, 0.5);
}

.dn5 span { transform: rotate(-20deg); }

.dn6 {
  top: 20%;
  left: 8%;
  width: 5px;
  height: 5px;
  animation-delay: 1.2s;
  box-shadow: 0 0 8px rgba(232, 121, 42, 0.4);
}

.dn6 span { transform: rotate(340deg); }

@keyframes nodeFloat {
  0% { opacity: 0; transform: translateY(8px) scale(0.5); }
  20% { opacity: 0.8; }
  50% { transform: translateY(-6px) scale(1.2); opacity: 1; }
  80% { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(8px) scale(0.5); }
}

/* ═══════════════════════════════════════════════════════
   BRAND TEXT
   ═══════════════════════════════════════════════════════ */
.brand-row {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 24px;
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 12px;
}

.bl {
  font-family: 'Outfit', sans-serif;
  font-size: 30px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.1em;
  opacity: 0;
  animation: letterReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(0.6s + var(--i) * 0.1s);
  text-shadow: 0 0 20px rgba(232, 121, 42, 0.25);
}

@keyframes letterReveal {
  0% { opacity: 0; transform: translateY(24px) scale(0.7) rotateX(40deg); filter: blur(6px); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotateX(0deg); filter: blur(0); }
}

/* ── Tagline ── */
.tagline-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tl-word {
  font-family: 'Space Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  opacity: 0;
  animation: wordSlide 0.5s ease forwards;
}

.tw1 { animation-delay: 1.3s; }
.tw2 { animation-delay: 1.5s; }
.tw3 { animation-delay: 1.7s; }

.tl-dot {
  color: var(--gold);
  font-size: 14px;
  opacity: 0;
  animation: dotPop 0.3s ease forwards;
}

.tl-dot:nth-of-type(1) { animation-delay: 1.4s; }
.tl-dot:nth-of-type(2) { animation-delay: 1.6s; }

@keyframes wordSlide {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes dotPop {
  from { opacity: 0; transform: scale(0); }
  to { opacity: 1; transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════
   LOADER FADE OUT
   ═══════════════════════════════════════════════════════ */
.loader-overlay.fade-out {
  pointer-events: none !important;
  animation: overlayExit 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes overlayExit {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; }
  100% { opacity: 0; transform: scale(1.05); pointer-events: none; }
}

/* ═══════════════════════════════════════════════════════
   DEMO CONTENT
   ═══════════════════════════════════════════════════════ */
.demo-content {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  animation: demoIn 0.8s ease;
}

@keyframes demoIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.demo-hero {
  text-align: center;
  padding: 40px;
}

.demo-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 24px;
  filter: drop-shadow(0 4px 20px rgba(232, 121, 42, 0.4));
  animation: demoFloat 4s ease-in-out infinite;
}

@keyframes demoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.demo-hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.demo-hero h1 span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.demo-hero p {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 36px;
}

.replay-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  border-radius: 10px;
  border: 1.5px solid rgba(232, 121, 42, 0.3);
  background: rgba(232, 121, 42, 0.06);
  color: var(--gold);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.replay-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(232, 121, 42, 0.4);
}

.replay-btn:active {
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .loader-center {
    width: 240px;
    height: 240px;
  }

  .orbit.o1 { width: 120px; height: 120px; }
  .orbit.o2 { width: 170px; height: 170px; }
  .orbit.o3 { width: 220px; height: 220px; }
  .morph-ring { inset: -5px; }

  .trail-svg { width: 240px; height: 240px; }

  .logo-core { width: 72px; height: 72px; }
  .logo-img { width: 44px; height: 44px; }

  .bl { font-size: 24px; }
  .tl-word { font-size: 9px; }
  .tagline-row { gap: 8px; }

  .data-node { display: none; }
}
