/* ============================================================
   AURORA — stylesheet
   Palette: deep space navy, aurora teal/violet, moonlight cream
   ============================================================ */

:root {
  --bg: #070918;
  --bg-raised: #0d1026;
  --ink: #e8eaf6;
  --ink-dim: #9aa0c3;
  --teal: #5eead4;
  --violet: #a78bfa;
  --pink: #f0abfc;
  --line: rgba(167, 139, 250, 0.18);
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection { background: var(--violet); color: var(--bg); }

h1, h2, h3 { font-weight: 500; line-height: 1.1; }
h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.02em;
}
h2 em, .footer__big {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  background: linear-gradient(100deg, var(--teal), var(--violet) 60%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.85em;
  color: var(--teal);
  background: rgba(94, 234, 212, 0.08);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

a { color: inherit; }

/* ---------- scroll progress ---------- */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 100;
  background: transparent;
}
.progress__bar {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--teal), var(--violet), var(--pink));
  transform-origin: left;
  transform: scaleX(0);
}

/* ---------- cursor glow ---------- */
.cursor-glow {
  position: fixed; left: 0; top: 0; z-index: 99;
  width: 480px; height: 480px;
  margin: -240px 0 0 -240px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.10), rgba(94, 234, 212, 0.05) 40%, transparent 70%);
  opacity: 0;
  transition: opacity 0.6s;
}
@media (pointer: fine) { .cursor-glow.is-on { opacity: 1; } }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  transition: background 0.4s, backdrop-filter 0.4s, box-shadow 0.4s, padding 0.4s;
}
.nav.is-scrolled {
  padding-block: 0.7rem;
  background: rgba(7, 9, 24, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav__logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 700; letter-spacing: 0.35em; font-size: 0.9rem;
  text-decoration: none; color: var(--ink);
}
.nav__logo svg { color: var(--teal); }
.nav__links { display: flex; gap: clamp(1rem, 3vw, 2.2rem); }
.nav__links a {
  font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-dim);
  transition: color 0.3s;
}
.nav__links a:hover { color: var(--teal); }
@media (max-width: 560px) { .nav__links { display: none; } }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.hero__sky { position: absolute; inset: 0; }

/* aurora ribbons */
.aurora {
  position: absolute;
  width: 70vmax; height: 70vmax;
  border-radius: 45% 55% 60% 40% / 50% 45% 55% 50%;
  filter: blur(70px);
  mix-blend-mode: screen;
  opacity: 0.5;
  animation: aurora-drift 26s var(--ease-out) infinite alternate;
}
.aurora--1 {
  top: -30vmax; left: -12vmax;
  background: radial-gradient(closest-side, rgba(94, 234, 212, 0.55), transparent 70%);
}
.aurora--2 {
  top: -26vmax; right: -18vmax;
  background: radial-gradient(closest-side, rgba(167, 139, 250, 0.5), transparent 70%);
  animation-duration: 32s; animation-delay: -8s;
}
.aurora--3 {
  top: -34vmax; left: 25vw;
  background: radial-gradient(closest-side, rgba(240, 171, 252, 0.32), transparent 70%);
  animation-duration: 22s; animation-delay: -15s;
}
@keyframes aurora-drift {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate(6vw, 4vh) rotate(40deg) scale(1.15); }
  100% { transform: translate(-5vw, 7vh) rotate(-30deg) scale(0.95); }
}

/* stars (spans injected by JS) */
.stars { position: absolute; inset: 0; }
.star {
  position: absolute;
  width: var(--s); height: var(--s);
  border-radius: 50%;
  background: #fff;
  opacity: var(--o);
  animation: twinkle var(--t) ease-in-out infinite alternate;
  animation-delay: var(--dl);
}
@keyframes twinkle {
  from { opacity: calc(var(--o) * 0.25); transform: scale(0.8); }
  to   { opacity: var(--o); transform: scale(1.15); }
}

/* shooting stars */
.shooting-star {
  position: absolute;
  width: 130px; height: 1.5px;
  background: linear-gradient(90deg, #fff, transparent);
  border-radius: 2px;
  opacity: 0;
  transform: rotate(-30deg);
  animation: shoot 7s linear infinite;
}
.shooting-star--1 { top: 18%; left: 65%; }
.shooting-star--2 { top: 9%; left: 22%; animation-delay: 3.6s; animation-duration: 9s; }
@keyframes shoot {
  0%, 86% { opacity: 0; transform: rotate(-30deg) translateX(0); }
  88%     { opacity: 1; }
  96%, 100% { opacity: 0; transform: rotate(-30deg) translateX(-44vw); }
}

/* moon */
.moon-wrap { position: absolute; top: 12%; right: 14%; }
.moon {
  width: clamp(70px, 9vw, 130px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, #fdfbf3, #d9d4e8 58%, #a9a3c9);
  box-shadow:
    0 0 35px 8px rgba(253, 251, 243, 0.30),
    0 0 130px 45px rgba(167, 139, 250, 0.18);
}

/* parallax layers — JS drives transform on inner element via the wrapper */
.parallax { will-change: transform; }
.layer {
  position: absolute; inset: auto 0 0 0; height: 75%;
  pointer-events: none;
}
.layer svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* hero copy */
.hero__content {
  position: relative; z-index: 5;
  text-align: center;
  padding: 0 1.5rem;
}
.hero__eyebrow {
  font-size: 0.8rem; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--teal);
}
.hero__title {
  font-size: clamp(4rem, 16vw, 12.5rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  margin: 0.5rem 0 1rem;
  filter: drop-shadow(0 0 45px rgba(167, 139, 250, 0.45));
}
/* gradient lives on each span — clip-on-parent breaks when animated
   children get their own compositing layers (Chromium) */
.hero__title span {
  display: inline-block;
  background: linear-gradient(180deg, #fff 30%, rgba(167, 139, 250, 0.55));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: letter-rise 0.9s var(--ease-out) both;
  animation-delay: calc(0.25s + var(--i) * 0.07s);
}
@keyframes letter-rise {
  from { opacity: 0; transform: translateY(0.6em) rotate(6deg); }
  to   { opacity: 1; transform: none; }
}
.hero__sub { color: var(--ink-dim); font-size: clamp(0.95rem, 1.6vw, 1.15rem); }
.hero__cta {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.85rem 2.2rem;
  border: 1px solid rgba(94, 234, 212, 0.45);
  border-radius: 99px;
  font-size: 0.85rem; letter-spacing: 0.2em; text-transform: uppercase;
  text-decoration: none;
  color: var(--teal);
  background: rgba(94, 234, 212, 0.05);
  transition: background 0.35s, box-shadow 0.35s, transform 0.35s;
}
.hero__cta:hover {
  background: rgba(94, 234, 212, 0.14);
  box-shadow: 0 0 35px rgba(94, 234, 212, 0.25);
  transform: translateY(-2px);
}

.reveal-on-load { animation: fade-up 1s var(--ease-out) both; animation-delay: var(--d, 0s); }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

.hero__fog {
  position: absolute; inset: auto 0 0 0; height: 28%;
  background: linear-gradient(180deg, transparent, var(--bg) 85%);
  z-index: 6; pointer-events: none;
}

.scroll-cue {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  z-index: 7;
  display: grid; justify-items: center; gap: 0.5rem;
  color: var(--ink-dim);
  font-size: 0.7rem; letter-spacing: 0.35em; text-transform: uppercase;
  animation: fade-up 1s var(--ease-out) 1.6s both;
}
.scroll-cue__mouse {
  width: 24px; height: 38px;
  border: 1.5px solid var(--ink-dim);
  border-radius: 12px;
  display: flex; justify-content: center; padding-top: 7px;
}
.scroll-cue__wheel {
  width: 3px; height: 7px; border-radius: 2px;
  background: var(--teal);
  animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(11px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ============================================================
   SHARED SECTION CHROME
   ============================================================ */
.section-head {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  padding: 0 1.5rem;
}
.kicker {
  font-size: 0.78rem; letter-spacing: 0.45em; text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.9rem;
}
.lede { color: var(--ink-dim); margin-top: 1.2rem; }

/* scroll reveals */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: calc(var(--stagger, 0) * 90ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   JOURNEY — scroll-drawn path
   ============================================================ */
.journey { height: 320vh; position: relative; }
.journey__sticky {
  position: sticky; top: 0;
  height: 100svh; min-height: 600px;
  display: flex; flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  padding: 5.5rem 0 2rem;
  overflow: hidden;
}
.journey__stage {
  position: relative;
  flex: 1; min-height: 0;
  max-width: 1100px; width: 100%;
  margin: 0 auto;
}
.journey__svg { width: 100%; height: 100%; display: block; }
.journey__ghost {
  stroke: rgba(167, 139, 250, 0.12);
  stroke-width: 2;
  stroke-dasharray: 7 9;
}
.journey__path {
  stroke: var(--teal);
  stroke-width: 3.5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 7px rgba(94, 234, 212, 0.7));
}
.journey__node circle {
  fill: var(--bg);
  stroke: rgba(167, 139, 250, 0.4);
  stroke-width: 2;
  transition: stroke 0.5s, fill 0.5s;
}
.journey__node.is-lit circle {
  fill: var(--teal);
  stroke: rgba(94, 234, 212, 0.9);
  filter: drop-shadow(0 0 9px rgba(94, 234, 212, 0.8));
}
.journey__label {
  position: absolute;
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: 220px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  pointer-events: none;
}
.journey__label.is-lit { opacity: 1; }
.journey__label strong {
  display: block;
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
  font-weight: 500;
  color: var(--ink);
}
.journey__label small { font-size: 0.74rem; color: var(--ink-dim); letter-spacing: 0.04em; }

/* ============================================================
   CRAFT — tilt cards
   ============================================================ */
.craft { padding: clamp(5rem, 12vh, 9rem) clamp(1.2rem, 4vw, 3rem); }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.4rem;
  max-width: 1180px;
  margin: 3.5rem auto 0;
  perspective: 1200px;
}
.card {
  position: relative;
  overflow: hidden;
  padding: 2rem 1.8rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(167, 139, 250, 0.06), rgba(13, 16, 38, 0.7));
  transform-style: preserve-3d;
  transition: border-color 0.4s;
}
.card:hover { border-color: rgba(94, 234, 212, 0.4); }
.card.is-tilting {
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
  transition: border-color 0.4s; /* no transform transition while tracking */
}
.card__glare {
  position: absolute; inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(94, 234, 212, 0.10), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.card:hover .card__glare { opacity: 1; }
.card__icon { width: 34px; height: 34px; color: var(--teal); margin-bottom: 1.1rem; }
.card h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.card p { font-size: 0.92rem; color: var(--ink-dim); }

/* ============================================================
   SCENES — pinned horizontal scroll
   ============================================================ */
.scenes { height: 320vh; position: relative; }
.scenes__sticky {
  position: sticky; top: 0;
  height: 100svh; min-height: 600px;
  overflow: hidden;
  display: flex; align-items: center;
}
.scenes__track {
  display: flex;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: 0 clamp(1.5rem, 6vw, 6rem);
  will-change: transform;
}
.scene {
  flex: 0 0 auto;
  width: min(78vw, 640px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(150deg, rgba(13, 16, 38, 0.9), rgba(7, 9, 24, 0.6));
  padding: clamp(1.8rem, 4vw, 3.2rem);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto 1fr;
  gap: 0.6rem 2rem;
  position: relative;
  overflow: hidden;
}
.scene__num {
  grid-column: 1 / -1;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2.6rem, 6vw, 4rem);
  color: rgba(167, 139, 250, 0.35);
  line-height: 1;
}
.scene h3 { font-size: clamp(1.5rem, 3.4vw, 2.3rem); letter-spacing: -0.01em; }
.scene p { color: var(--ink-dim); font-size: 0.95rem; max-width: 42ch; align-self: start; grid-column: 1; }
.scene__art {
  grid-column: 2; grid-row: 2 / span 2;
  align-self: center;
  width: clamp(90px, 14vw, 150px);
  aspect-ratio: 1;
  position: relative;
}
@media (max-width: 640px) {
  .scene { grid-template-columns: 1fr; }
  .scene__art { display: none; }
}

/* scene art: orbits */
.scene__art--orbits i {
  position: absolute; inset: 0;
  border: 1px solid rgba(94, 234, 212, 0.5);
  border-radius: 50%;
  animation: orbit-spin 9s linear infinite;
}
.scene__art--orbits i:nth-child(2) { inset: 18%; animation-duration: 6s; animation-direction: reverse; border-color: rgba(167, 139, 250, 0.55); }
.scene__art--orbits i:nth-child(3) { inset: 36%; animation-duration: 4s; border-color: rgba(240, 171, 252, 0.5); }
.scene__art--orbits i::after {
  content: ""; position: absolute; top: -4px; left: 50%;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal);
}
@keyframes orbit-spin { to { transform: rotate(360deg); } }

/* scene art: bars */
.scene__art--bars { display: flex; align-items: flex-end; gap: 9%; }
.scene__art--bars i {
  flex: 1;
  background: linear-gradient(180deg, var(--violet), rgba(167, 139, 250, 0.15));
  border-radius: 4px;
  animation: bar-bounce 1.6s ease-in-out infinite alternate;
  animation-delay: calc(var(--n, 0) * 0.15s);
  height: 30%;
}
.scene__art--bars i:nth-child(1) { --n: 0; } .scene__art--bars i:nth-child(2) { --n: 1; }
.scene__art--bars i:nth-child(3) { --n: 2; } .scene__art--bars i:nth-child(4) { --n: 3; }
.scene__art--bars i:nth-child(5) { --n: 4; }
@keyframes bar-bounce { from { height: 25%; } to { height: 95%; } }

/* scene art: wave */
.scene__art--wave svg { width: 100%; height: 100%; }
.scene__art--wave path {
  stroke: var(--teal); stroke-width: 2.5;
  stroke-dasharray: 60 200;
  animation: wave-run 2.4s linear infinite;
}
@keyframes wave-run { to { stroke-dashoffset: -260; } }

/* scene art: globe */
.scene__art--globe svg { width: 100%; height: 100%; }
.scene__art--globe circle, .scene__art--globe ellipse, .scene__art--globe path {
  stroke: rgba(167, 139, 250, 0.7); stroke-width: 1.5;
}
.scene__art--globe { animation: globe-float 5s ease-in-out infinite alternate; }
@keyframes globe-float { from { transform: translateY(-6px); } to { transform: translateY(6px); } }

/* ============================================================
   NUMBERS
   ============================================================ */
.numbers { padding: clamp(5rem, 12vh, 9rem) clamp(1.2rem, 4vw, 3rem); }
.numbers__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.4rem;
  max-width: 1100px;
  margin: 3.5rem auto 0;
}
.stat {
  text-align: center;
  padding: 2.4rem 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(13, 16, 38, 0.5);
}
.stat__value {
  display: block;
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #fff, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat__value em { font-style: normal; font-size: 0.45em; }
.stat__label { color: var(--ink-dim); font-size: 0.85rem; letter-spacing: 0.06em; }

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 1.1rem 0;
  background: rgba(13, 16, 38, 0.4);
}
.marquee__inner {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee__inner span {
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  color: var(--ink-dim);
  white-space: nowrap;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { position: relative; padding-top: 8rem; }
.footer__waves { position: absolute; inset: 0 0 auto 0; height: 110px; }
.wave { position: absolute; inset: 0; width: 200%; height: 100%; }
.wave path { fill: rgba(167, 139, 250, 0.08); }
.wave--back { animation: wave-slide 16s linear infinite; }
.wave--front { animation: wave-slide 10s linear infinite reverse; }
.wave--front path { fill: rgba(94, 234, 212, 0.07); }
@keyframes wave-slide { to { transform: translateX(-50%); } }
.footer__inner {
  text-align: center;
  padding: 3rem 1.5rem 4rem;
}
.footer__big {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  line-height: 1.2;
  margin-bottom: 1.6rem;
}
.footer__small { color: var(--ink-dim); font-size: 0.82rem; letter-spacing: 0.08em; }

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-on-load, .journey__label { opacity: 1 !important; transform: none !important; }
  .journey__path { stroke-dashoffset: 0 !important; }
}
