:root {
  --bg: #04050a;
  --fg: #f2f0ea;
  --dim: rgba(242, 240, 234, .42);
  --line: rgba(242, 240, 234, .14);
  --accent: #f5b041;
  --ok: #7ee0a1;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
body {
  background: var(--bg); color: var(--fg);
  font-family: 'Archivo', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
.back { color: var(--dim); margin-right: 18px; }
.back:hover { color: var(--fg); }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .14em; font-size: 10px; }
a { color: inherit; text-decoration: none; }

#scene { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: 0; display: block; }
.vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0,0,0,.55) 100%); }
.grain { position: fixed; inset: -50%; z-index: 2; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0%{transform:translate(0,0)} 33%{transform:translate(-3%,2%)} 66%{transform:translate(2%,-3%)} 100%{transform:translate(0,0)} }

/* loader */
#loader { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: grid; place-items: center;
  transition: opacity .9s ease, visibility .9s; }
#loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { width: min(320px, 70vw); display: grid; gap: 14px; color: var(--dim); }
.loader-bar { height: 1px; background: var(--line); position: relative; overflow: hidden; }
#loader-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--fg); transition: width .2s; }

/* nav */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center;
  justify-content: space-between; padding: 26px 44px; }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: .08em; font-size: 14px; }
.logo-mark { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--accent);
  border-left-color: transparent; transform: rotate(-30deg); box-shadow: 0 0 14px rgba(245,176,65,.5); }
.nav-links { display: flex; gap: 38px; }
.nav-links a, .rail a, .ghost { color: var(--dim); transition: color .3s; }
.nav-links a:hover, .ghost:hover { color: var(--fg); }
.nav-cta { display: flex; gap: 22px; align-items: center; }
.pill { border: 1px solid var(--fg); border-radius: 99px; padding: 10px 18px; transition: background .3s, color .3s; }
.pill:hover { background: var(--fg); color: var(--bg); }

/* sound toggle */
.sound { display: flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--dim); cursor: pointer;
  font: inherit; letter-spacing: inherit; padding: 6px 2px; transition: color .3s; }
.sound:hover, .sound[aria-pressed="true"] { color: var(--fg); }
.sound .bars { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.sound .bars i { width: 2px; height: 3px; background: currentColor; border-radius: 1px; transition: height .3s; }
.sound[aria-pressed="true"] .bars i { animation: eq 1s ease-in-out infinite; }
.sound[aria-pressed="true"] .bars i:nth-child(2) { animation-delay: -.3s; }
.sound[aria-pressed="true"] .bars i:nth-child(3) { animation-delay: -.6s; }
.sound[aria-pressed="true"] .bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%,100% { height: 3px; } 50% { height: 12px; } }
.hero-actions { display: flex; align-items: center; gap: 28px; margin-top: 56px; flex-wrap: wrap; }
.hero-actions .scroll-cue { margin-top: 0; }
.sound-hint { background: rgba(4,5,10,.4); border: 1px solid var(--line); color: var(--fg); border-radius: 99px; padding: 10px 16px;
  cursor: pointer; font-family: 'JetBrains Mono', monospace; transition: border-color .3s, opacity .6s; }
.sound-hint:hover { border-color: var(--fg); }
.sound-hint.gone { opacity: 0; pointer-events: none; }

/* rail */
.rail { position: fixed; left: 44px; top: 50%; transform: translateY(-50%); z-index: 20; display: flex;
  flex-direction: column; gap: 14px; font-size: 9px; }
.rail a { position: relative; padding-left: 0; transition: color .3s, padding .3s; }
.rail a::before { content: ""; position: absolute; left: -14px; top: 50%; width: 0; height: 1px; background: var(--fg);
  transition: width .3s; }
.rail a.active { color: var(--fg); padding-left: 4px; }
.rail a.active::before { width: 10px; }

/* hud */
.hud { position: fixed; bottom: 22px; z-index: 20; color: var(--dim); font-size: 9px; line-height: 1.9; }
.hud-bl { left: 44px; }
.hud-br { right: 44px; text-align: right; }
.ok { color: var(--ok); }
.progress { position: fixed; right: 18px; top: 50%; transform: translateY(-50%); width: 1px; height: 160px;
  background: var(--line); z-index: 20; }
#progress-fill { position: absolute; left: 0; top: 0; width: 1px; height: 0; background: var(--fg); }

/* sections */
main { position: relative; z-index: 10; }
.sec { min-height: 100vh; padding: 16vh 12vw 14vh 14vw; display: flex; flex-direction: column; justify-content: center;
  position: relative; }
.sec + .sec { min-height: 130vh; }
.eyebrow { color: var(--dim); margin-bottom: 26px; }
h1 { font-size: clamp(48px, 8.4vw, 128px); line-height: .92; font-weight: 700; letter-spacing: -.035em; }
h1, h2, .lede { text-shadow: 0 2px 40px rgba(0,0,0,.55); }
h2 { font-size: clamp(34px, 5vw, 76px); line-height: .98; font-weight: 700; letter-spacing: -.03em; }
.lede { max-width: 440px; margin-top: 28px; font-size: 17px; line-height: 1.5; color: rgba(242,240,234,.72); }

.hero { justify-content: flex-end; padding-bottom: 15vh; }
.scroll-cue { margin-top: 56px; display: flex; align-items: center; gap: 14px; color: var(--dim); }
.scroll-cue span { width: 1px; height: 38px; background: linear-gradient(var(--fg), transparent);
  animation: cue 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0%{transform:scaleY(0)} 50%{transform:scaleY(1)} 100%{transform:scaleY(1);opacity:0} }

.left { align-items: flex-start; }
.left::before, .right::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.left::before { background: linear-gradient(90deg, rgba(4,5,10,.55), transparent 55%); }
.right::before { background: linear-gradient(270deg, rgba(4,5,10,.55), transparent 55%); }
.right { align-items: flex-end; text-align: right; }
.center-top { justify-content: flex-start; align-items: center; text-align: center; padding-top: 22vh; }
.statement { max-width: 620px; text-shadow: 0 2px 30px rgba(0,0,0,.65); font-size: clamp(24px, 2.5vw, 38px); line-height: 1.2; font-weight: 600; letter-spacing: -.012em; }
.statement .w { opacity: .16; transition: opacity .25s linear; }
.statement .w.on { opacity: 1; }

/* split-line reveal */
.split .line { display: block; overflow: hidden; }
.split .line > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s cubic-bezier(.19,1,.22,1); }
.sec.in .split .line > span { transform: none; }
.split .line:nth-child(2) > span { transition-delay: .08s; }
.split .line:nth-child(3) > span { transition-delay: .16s; }
.fade { opacity: 0; transform: translateY(18px); transition: opacity 1s ease .25s, transform 1s cubic-bezier(.19,1,.22,1) .25s; }
.sec.in .fade { opacity: 1; transform: none; }

.stats { display: flex; gap: 64px; margin-top: 44px; }
.stats div { display: grid; gap: 6px; }
.stats b { font-size: 54px; font-weight: 600; letter-spacing: -.03em; }
.stats span { font-size: 12px; color: var(--dim); }

.timeline { list-style: none; text-align: left; margin-top: 40px; display: grid; gap: 14px; color: rgba(242,240,234,.75); font-size: 11px; letter-spacing: .06em; }
.timeline i { font-style: normal; color: var(--accent); margin-right: 16px; }

.route { list-style: none; margin-top: 40px; display: grid; gap: 0; min-width: 360px; text-align: left; }
.route li { display: flex; justify-content: space-between; gap: 40px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 10px; }
.route li:last-child { border-bottom: 1px solid var(--line); }
.route em { font-style: normal; color: var(--dim); letter-spacing: .06em; }

.telemetry { margin-top: 40px; display: grid; grid-template-columns: repeat(2, 180px); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.telemetry div { background: rgba(4,5,10,.72); padding: 16px 18px; display: grid; gap: 8px; text-align: left; backdrop-filter: blur(6px); }
.telemetry span { color: var(--dim); font-size: 9px; }
.telemetry b { font-size: 18px; font-weight: 500; letter-spacing: .02em; }
.crosshair { position: absolute; left: 36vw; top: 50%; width: 34vh; height: 34vh; transform: translate(-50%,-50%);
  border: 1px solid rgba(242,240,234,.18); border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity 1s; }
.crosshair::before, .crosshair::after { content: ""; position: absolute; background: rgba(242,240,234,.3); }
.crosshair::before { left: 50%; top: -18px; bottom: -18px; width: 1px; }
.crosshair::after { top: 50%; left: -18px; right: -18px; height: 1px; }
.sec.in .crosshair { opacity: 1; animation: spin 24s linear infinite; }
@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }

.missions { align-items: center; text-align: center; justify-content: flex-start; padding-top: 18vh; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 260px)); gap: 18px; margin: 48px 0 40px; text-align: left; }
.cards article { border: 1px solid var(--line); background: rgba(8,10,18,.55); backdrop-filter: blur(10px);
  padding: 22px; border-radius: 14px; transition: border-color .3s, transform .4s cubic-bezier(.19,1,.22,1); }
.cards article:hover { border-color: rgba(242,240,234,.5); transform: translateY(-4px); }
.cards .tag { color: var(--accent); font-size: 9px; }
.cards h3 { font-size: 26px; margin: 14px 0 8px; letter-spacing: -.02em; }
.cards p { color: rgba(242,240,234,.65); font-size: 14px; line-height: 1.45; }
.pill.big { padding: 16px 30px; font-size: 11px; background: rgba(4,5,10,.6); backdrop-filter: blur(8px); }

@media (max-width: 1100px) { .nav-links { display: none; } }
@media (max-width: 820px) {
  .nav { padding: 18px 20px 26px; background: linear-gradient(180deg, rgba(4,5,10,.92) 55%, transparent); }
  .nav-links, .ghost, .rail, .progress { display: none; }
  .sec { padding: 14vh 22px 12vh; min-height: 100svh; }
  .sec + .sec { min-height: 125svh; }
  .right { align-items: flex-start; text-align: left; }
  .left::before, .right::before, .center-top::before, .missions::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(180deg, transparent 18%, rgba(4,5,10,.42) 36%, rgba(4,5,10,.42) 66%, transparent 86%); }
  .center-top { padding-top: 17svh; }
  .center-top::before { background: linear-gradient(180deg, rgba(4,5,10,.5), transparent 45%); }
  .hero { padding-bottom: 12svh; }
  .statement { font-size: 23px; }
  .lede { font-size: 15px; }
  .stats b { font-size: 34px; }
  .timeline { font-size: 10px; }
  .route li { gap: 16px; }
  .telemetry b { font-size: 15px; }
  .crosshair { display: none; }
  .cards { margin: 32px 0 28px; gap: 12px; }
  .cards article { padding: 16px; }
  .cards h3 { font-size: 22px; margin: 8px 0 6px; }
  .nav-cta .pill { padding: 8px 12px; }
  .nav-cta { gap: 14px; }
  .sound-lbl { display: none; }
  .hero-actions { gap: 18px; margin-top: 36px; }
  .back { display: none; }
  .stats { gap: 28px; } .stats b { font-size: 36px; }
  .cards { grid-template-columns: 1fr; }
  .route { min-width: 0; width: 100%; }
  .telemetry { grid-template-columns: 1fr 1fr; }
  .hud { left: 20px !important; right: auto; } .hud-br { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .grain, .scroll-cue span, .sec.in .crosshair { animation: none; }
}
