/* Layout: three pinned scenes, one per vision. Each fills the screen, is scrubbed by scroll, and can be turned or changed by hand.
   Words sit on one caption plate per step; readouts are mono, like instrument labels.
   System: one typeface plus mono, fixed type and spacing scales, no gradients, motion on transform and opacity. */
:root{
  color-scheme:dark;
  --bg:#000000;
  --plate:rgba(0,0,0,.62);
  --text:#FFFFFF;
  --muted:#9B9B9B;
  --line:rgba(255,255,255,.28);
  --font:"Geist","Manrope",system-ui,-apple-system,"Segoe UI",sans-serif;
  --mono:"Geist Mono",ui-monospace,"SF Mono",Menlo,monospace;
  --ease:cubic-bezier(0.22, 1, 0.36, 1);
  --gutter:24px;
}
@media (min-width:768px){ :root{ --gutter:48px; } }
@media (min-width:1200px){ :root{ --gutter:64px; } }
*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-padding-top:0; }
body{ margin:0; background:var(--bg); color:var(--text); font-family:var(--font); font-size:16px; line-height:24px; -webkit-font-smoothing:antialiased; overflow-x:hidden; }
body::before{ content:""; position:fixed; inset:0 0 auto; height:env(safe-area-inset-top, 0px); z-index:30; background:var(--bg); }
button{ font:inherit; color:inherit; }
a{ color:inherit; }
:focus-visible{ outline:2px solid var(--text); outline-offset:4px; }
.wrap{ padding-left:max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right:max(var(--gutter), env(safe-area-inset-right, 0px)); }
.mono{ font-family:var(--mono); font-size:12px; line-height:16px; letter-spacing:.04em; text-transform:uppercase; font-variant-numeric:tabular-nums; }
.sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.touch-only{ display:none; }
@media (hover:none){ .fine-only{ display:none; } .touch-only{ display:inline; } }

/* top bar */
.bar{ position:fixed; top:env(safe-area-inset-top, 0px); left:0; right:0; z-index:20; display:flex; justify-content:space-between; align-items:center; gap:16px; padding-block:16px; pointer-events:none; }
.bar > *{ pointer-events:auto; }
.mark{ display:inline-flex; align-items:center; gap:8px; font-size:20px; line-height:28px; font-weight:600; letter-spacing:-0.01em; text-decoration:none; }
.mark svg{ width:28px; height:28px; }
.nav{ display:flex; gap:24px; }
.nav button{ background:none; border:0; padding:16px 0; cursor:pointer; color:var(--muted); transition:opacity 300ms var(--ease); }
.nav button[aria-current="true"]{ color:var(--text); }
@media (hover:hover){ .nav button:hover{ opacity:.7; } }
@media (max-width:640px){ .nav{ gap:16px; } }

/* intro and outro */
.intro{ padding-block:160px 96px; }
.intro h1{ margin:0 0 24px; max-width:680px; font-size:48px; line-height:1; font-weight:600; letter-spacing:-0.03em; text-wrap:balance; }
.intro p{ margin:0; max-width:560px; font-size:18px; line-height:28px; color:var(--muted); text-wrap:pretty; }
@media (min-width:768px){ .intro h1{ font-size:72px; } .intro p{ font-size:20px; } }
.outro{ padding-block:96px 48px; display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:24px; }
.outro p{ margin:0; color:var(--muted); font-size:14px; line-height:20px; }
.btn{
  display:inline-flex; align-items:center; gap:8px; min-height:48px; padding:12px 24px; border-radius:9999px;
  background:var(--text); color:var(--bg); text-decoration:none; font-size:16px; line-height:24px; font-weight:600;
  transition:transform 300ms var(--ease), opacity 300ms var(--ease);
}
@media (hover:hover){ .btn:hover{ opacity:.8; } }
.btn:active{ transform:scale(0.98); }

/* a scene */
.scene{ position:relative; --accent:#FFFFFF; }
.eagle{ height:720vh; --accent:#4CC9F0; }
.ath{ height:640vh; --accent:#F2A541; }
.guide{ height:680vh; --accent:#B69CFF; }
.pin{ position:sticky; top:0; height:100vh; height:100svh; overflow:hidden; background:var(--bg); }
.pin canvas{ position:absolute; inset:0; width:100%; height:100%; display:block; touch-action:pan-y; cursor:grab; }
.pin canvas:active{ cursor:grabbing; }
.leaders{ position:absolute; inset:0; width:100%; height:100%; pointer-events:none; overflow:visible; }
.leaders path{ fill:none; stroke:rgba(255,255,255,.5); stroke-width:1; }
.leaders circle{ fill:#FFFFFF; }
.lbl{ position:absolute; left:0; top:0; width:208px; pointer-events:none; opacity:0; font-size:14px; line-height:20px; }
.lbl b{ display:block; font-weight:600; }
.lbl span{ display:block; color:var(--muted); }
.lbl i{ font-style:normal; color:var(--c, #FFFFFF); margin-right:8px; }
.lbl.left{ text-align:right; }
.lbl.tag{ width:auto; white-space:nowrap; font-family:var(--mono); font-size:12px; line-height:16px; letter-spacing:.04em; text-transform:uppercase; }
.lbl.tag b{ font-weight:500; }
.tags{ position:absolute; inset:0; pointer-events:none; }
.tags .t{ position:absolute; left:0; top:0; padding-left:16px; white-space:nowrap; opacity:0; }
.tags .t::before{ content:""; position:absolute; left:0; top:4px; width:8px; height:8px; border-radius:9999px; background:var(--accent); }

.hud{ position:absolute; left:max(var(--gutter), env(safe-area-inset-left, 0px)); top:96px; width:min(352px, 80vw); display:flex; flex-direction:column; gap:16px; }
.chips{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 16px; }
.chips li{ display:flex; align-items:center; gap:8px; color:var(--muted); opacity:.5; transition:opacity 300ms var(--ease); }
.chips .d{ flex:none; width:8px; height:8px; border-radius:9999px; border:1px solid var(--c); }
.chips li.on{ opacity:1; color:var(--text); }
.chips li.on .d{ background:var(--c); }
.meter-h{ display:flex; justify-content:space-between; margin-bottom:8px; color:var(--muted); }
.meter-h output{ color:var(--text); }
.meter{ height:2px; background:rgba(255,255,255,.16); }
.meter i{ display:block; height:100%; background:var(--text); transform-origin:left; transform:scaleX(0); }
.readout{ margin:0; display:grid; grid-template-columns:auto 1fr; gap:8px 16px; }
.readout div{ display:contents; }
.readout dt{ color:var(--muted); } .readout dd{ margin:0; }
.seg{ display:inline-flex; align-self:flex-start; padding:4px; border-radius:9999px; border:1px solid var(--line); background:var(--plate); }
.seg button{ min-height:40px; padding:8px 16px; border-radius:9999px; border:0; background:transparent; color:var(--muted); cursor:pointer; font-size:14px; line-height:20px; font-weight:600; transition:opacity 300ms var(--ease), transform 300ms var(--ease); }
.seg button[aria-pressed="true"]{ background:var(--text); color:var(--bg); }
.seg button:active{ transform:scale(0.98); }

.panels{ position:absolute; left:max(var(--gutter), env(safe-area-inset-left, 0px)); bottom:48px; width:min(560px, 42vw); pointer-events:none; }
.panel{ position:absolute; left:0; bottom:0; width:100%; opacity:0; padding:24px; border-radius:16px; background:var(--plate); -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px); }
.panel .idx{ display:block; margin-bottom:12px; color:var(--accent); }
.panel h2{ margin:0 0 8px; font-size:30px; line-height:36px; font-weight:500; letter-spacing:-0.02em; text-wrap:balance; }
.panel p{ margin:0; color:var(--muted); text-wrap:pretty; }
.panel blockquote{ margin:0 0 8px; font-size:30px; line-height:36px; font-weight:500; letter-spacing:-0.02em; text-wrap:balance; transition:opacity 300ms var(--ease); }
.panel blockquote.out{ opacity:0; }
.panel h2 + blockquote{ margin-top:16px; font-size:20px; line-height:28px; }
.panel cite{ display:block; margin-bottom:12px; font-style:normal; color:var(--muted); }
.panel ol{ margin:0 0 12px; padding:0; list-style:none; display:flex; flex-direction:column; gap:8px; counter-reset:n; }
.panel ol li{ counter-increment:n; display:grid; grid-template-columns:24px 1fr; }
.panel ol li::before{ content:counter(n); font-family:var(--mono); font-size:12px; line-height:24px; color:var(--muted); }
.panel ol.machine li{ font-family:var(--mono); font-size:14px; line-height:24px; color:var(--muted); }
@media (min-width:1200px){ .panel h2, .panel blockquote{ font-size:36px; line-height:40px; } .panel h2 + blockquote{ font-size:20px; line-height:28px; } }

.rail{ position:absolute; right:max(var(--gutter), env(safe-area-inset-right, 0px)); bottom:48px; display:flex; gap:24px; }
.rail button{ display:flex; flex-direction:column; justify-content:center; gap:8px; min-height:48px; padding:0; background:none; border:0; cursor:pointer; color:var(--muted); transition:opacity 300ms var(--ease); }
.rail button::after{ content:""; width:16px; height:1px; background:currentColor; transform-origin:left; transition:transform 500ms var(--ease); }
.rail button.on{ color:var(--text); }
.rail button.on::after{ transform:scaleX(2.5); }
.tip{ position:absolute; left:0; top:0; pointer-events:none; opacity:0; transform:translate(16px,-50%); max-width:320px; padding:4px 12px; border-radius:16px; background:var(--text); color:var(--bg); font-size:14px; line-height:20px; font-weight:500; transition:opacity 200ms var(--ease); }
.no-gl .pin canvas, .no-gl .leaders{ display:none; }

@media (max-width:860px){
  .panels{ left:max(var(--gutter), env(safe-area-inset-left, 0px)); right:max(var(--gutter), env(safe-area-inset-right, 0px)); width:auto; bottom:24px; }
  .panel{ padding:16px; }
  .panel h2, .panel blockquote{ font-size:24px; line-height:32px; }
  .rail, .lbl, .leaders{ display:none; }
  .hud{ top:80px; }
}
[data-c="4CC9F0"]{--c:#4CC9F0}
[data-c="9BE564"]{--c:#9BE564}
[data-c="B69CFF"]{--c:#B69CFF}
[data-c="E0457B"]{--c:#E0457B}
[data-c="F2A541"]{--c:#F2A541}
[data-c="FFD08A"]{--c:#FFD08A}
[data-c="FFE3A3"]{--c:#FFE3A3}
