:root {
  --night: #0a0a0b;
  --paper: #efece6;
  --mute: rgba(239,236,230,.52);
  --line: rgba(239,236,230,.16);
  --pin: #ff6a1a;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Barlow', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --gut: clamp(18px, 3.4vw, 56px);
  --ease: cubic-bezier(.2,.7,0,1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--night); color: var(--paper); font-family: var(--body); -webkit-font-smoothing: antialiased; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; text-transform: none; color: var(--pin); }
button { font: inherit; color: inherit; background: none; border: 0; }
#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: 0; }
#track { height: 2200vh; }
@media (hover: hover) { html, body, a, button { cursor: none; } }

/* ---------- loader: counter + split curtain */
.loader { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.curtain { position: absolute; left: 0; right: 0; height: 50.5%; background: var(--night); transition: transform 1.1s var(--ease); }
.curtain--t { top: 0; } .curtain--b { bottom: 0; }
.loader.done .curtain--t { transform: translateY(-101%); } .loader.done .curtain--b { transform: translateY(101%); }
.ld { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; transition: opacity .4s ease; }
.loader.done .ld { opacity: 0; }
.ld-k, .ld-m { color: var(--mute); }
.ld-n { font-family: var(--display); font-weight: 800; font-size: clamp(110px, 18vw, 300px); line-height: .8; letter-spacing: -.02em; }
.ld-line { width: min(420px, 60vw); height: 1px; background: var(--line); overflow: hidden; }
.ld-line i { display: block; height: 100%; width: 100%; background: var(--pin); transform-origin: 0 50%; transform: scaleX(0); transition: transform .4s ease; }

/* ---------- HUD frame */
.hud { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
.br { position: absolute; width: 22px; height: 22px; border: 0 solid rgba(239,236,230,.5); }
.br--tl { left: 16px; top: 16px; border-left-width: 1px; border-top-width: 1px; }
.br--tr { right: 16px; top: 16px; border-right-width: 1px; border-top-width: 1px; }
.br--bl { left: 16px; bottom: 16px; border-left-width: 1px; border-bottom-width: 1px; }
.br--br { right: 16px; bottom: 16px; border-right-width: 1px; border-bottom-width: 1px; }
.ruler { position: absolute; left: 22px; top: 18vh; bottom: 18vh; width: 1px; background: var(--line); }
.ruler i { position: absolute; left: -4px; width: 9px; height: 1px; background: rgba(239,236,230,.45); }
.ruler i b { position: absolute; left: 16px; top: -6px; font: 500 9px var(--mono); letter-spacing: .16em; color: var(--mute); opacity: 0; transition: opacity .3s; white-space: nowrap; }
.ruler i.on { background: var(--pin); width: 15px; } .ruler i.on b { opacity: 1; color: var(--paper); }
.ruler-mark { position: absolute; left: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--pin); box-shadow: 0 0 0 5px rgba(255,106,26,.18); transform: translateY(-50%); }
.tele { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); display: grid; gap: 10px; text-align: right; font-size: 9px; }
.tele dt { color: var(--mute); } .tele dd { color: var(--paper); font-size: 11px; letter-spacing: .1em; font-variant-numeric: tabular-nums; }
.bottom { position: absolute; left: var(--gut); right: var(--gut); bottom: 22px; display: flex; align-items: center; gap: 22px; font-size: 10px; color: var(--mute); }
.scrollcue { display: flex; align-items: center; gap: 10px; }
.scrollcue i { width: 1px; height: 22px; background: linear-gradient(var(--pin), transparent); animation: cue 1.6s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.prog { flex: 1; height: 1px; background: var(--line); }
.prog span { display: block; height: 100%; background: var(--pin); transform-origin: 0 50%; transform: scaleX(0); }
.count b { color: var(--paper); font-weight: 500; }

/* ---------- top bar + chapter nav */
.bar { position: fixed; z-index: 7; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 28px; padding: 26px calc(var(--gut) + 8px); pointer-events: none; }
.mark { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: .02em; color: var(--paper); text-decoration: none; pointer-events: auto; }
.mark i { font-style: normal; color: var(--pin); padding: 0 3px; }
.chapnav { position: relative; display: flex; gap: 2px; margin: 0 auto; pointer-events: auto; font-size: 10px; }
.chapnav button { padding: 8px 10px; color: var(--mute); letter-spacing: .16em; transition: color .3s; }
.chapnav button:hover, .chapnav button.on { color: var(--paper); }
.chapnav-ul { position: absolute; bottom: 2px; left: 0; height: 1px; background: var(--pin); transition: transform .5s var(--ease), width .5s var(--ease); }
.snd { pointer-events: auto; border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; font-size: 10px; transition: border-color .3s, color .3s; }
.snd.on { border-color: var(--pin); color: var(--pin); }

/* ---------- chapters: editorial blocks */
#stage { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.ch { position: absolute; left: calc(var(--gut) + 30px); right: calc(var(--gut) + 70px); top: 15vh; opacity: 0; visibility: hidden; }
.ch-hero { opacity: 1; visibility: visible; }
.ch--r { text-align: right; }
.ch--b { top: auto; bottom: 11vh; }
.num { position: absolute; top: -8vh; right: -2vw; font-family: var(--display); font-weight: 800; font-size: clamp(180px, 28vw, 520px); line-height: .8;
  color: transparent; -webkit-text-stroke: 1px rgba(239,236,230,.13); letter-spacing: -.03em; pointer-events: none; z-index: -1; }
.ch--r .num { right: auto; left: -2vw; }
.ch--b .num { top: auto; bottom: -4vh; }
.kick { display: inline-flex; align-items: center; gap: 12px; color: var(--paper); }
.kick::before { content: ''; width: 34px; height: 1px; background: var(--pin); }
.ch--r .kick { flex-direction: row-reverse; }
.title { margin-top: 18px; font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: clamp(56px, 9.2vw, 168px); line-height: .84; letter-spacing: -.012em; max-width: 9.5ch; }
.ch--r .title { margin-left: auto; }
.title em { font-size: 1.06em; text-transform: none; }
.sub { margin-top: 22px; max-width: 34ch; font-size: clamp(16px, 1.25vw, 20px); line-height: 1.35; color: var(--mute); }
.ch--r .sub { margin-left: auto; }
/* masked word reveal */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.wi { display: inline-block; will-change: transform; }
.chips { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.ch--r .chips { justify-content: flex-end; }
.chip { display: grid; gap: 6px; padding: 14px 18px 12px; border: 1px solid var(--line); background: rgba(10,10,11,.42); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); min-width: 150px; text-align: left; }
.chip span { color: var(--mute); font-size: 9px; }
.chip b { font-family: var(--display); font-weight: 600; font-size: 40px; letter-spacing: 0; line-height: 1; font-variant-numeric: tabular-nums; }
.chip--big b { font-size: clamp(64px, 7vw, 120px); }

/* marquee band (lando) */
.marq { position: fixed; left: 0; right: 0; top: 40vh; z-index: 1; overflow: hidden; pointer-events: none; opacity: 0; visibility: hidden; }
.marq-t { white-space: nowrap; font-family: var(--display); font-weight: 800; font-size: clamp(120px, 17vw, 300px); line-height: .9; color: transparent; -webkit-text-stroke: 1.5px rgba(239,236,230,.42); will-change: transform; }

/* exploded-view labels */
.labels { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
.lab { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform; }
.lab i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--pin); box-shadow: 0 0 0 6px rgba(255,106,26,.2); }
.lab svg { position: absolute; left: 0; top: 0; overflow: visible; }
.lab div { position: absolute; left: 0; top: 0; white-space: nowrap; padding: 7px 12px; background: rgba(10,10,11,.7); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-left: 1px solid var(--pin); }
.lab b { display: block; font-family: var(--display); font-weight: 600; font-size: 24px; text-transform: uppercase; }
.lab span { color: var(--mute); }

.swatches { list-style: none; display: flex; justify-content: flex-end; gap: 22px; margin-top: 30px; }
.swatches li { display: flex; align-items: center; gap: 8px; opacity: .4; transition: opacity .3s; }
.swatches li.on { opacity: 1; }
.swatches i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }

.wlabs { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
.wlab { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 8px; opacity: 0; white-space: nowrap; padding: 5px 10px; background: rgba(10,10,11,.55); transition: color .2s; font-size: 9px; }
.wlab i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.wlab.on { color: var(--pin); }
.detail { position: fixed; left: calc(var(--gut) + 30px); right: var(--gut); bottom: 11vh; z-index: 4; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s; }
.detail.on { opacity: 1; visibility: visible; }
.detail .title { display: flex; align-items: center; gap: 22px; max-width: none; }
.detail .title i { width: .3em; height: .3em; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.detail .back { position: absolute; right: 70px; bottom: 0; pointer-events: auto; border: 1px solid var(--line); border-radius: 999px; padding: 11px 18px; }
.detail .back:hover { color: var(--pin); border-color: var(--pin); }

.ch-end { top: auto; bottom: 10vh; left: var(--gut); right: var(--gut); text-align: center; }
.links { display: inline-flex; gap: 40px; pointer-events: auto; }
.links a { color: var(--paper); text-decoration: none; font-size: 12px; padding: 12px 4px; display: inline-block; border-bottom: 1px solid var(--line); transition: color .3s, border-color .3s; }
.links a:hover { color: var(--pin); border-color: var(--pin); }
.credit { margin-top: 38px; line-height: 1.9; color: var(--mute); font-size: 9px; }

/* ---------- cursor: reticle */
.cursor { position: fixed; z-index: 30; left: 0; top: 0; pointer-events: none; }
.cursor .ret { position: absolute; left: -16px; top: -16px; width: 32px; height: 32px; border: 1px solid rgba(239,236,230,.8); border-radius: 50%; transition: transform .35s var(--ease), border-color .3s; }
.cursor .tk { position: absolute; background: var(--pin); transition: transform .35s var(--ease); }
.tk--t, .tk--b { left: -.5px; width: 1px; height: 7px; } .tk--t { top: -26px; } .tk--b { top: 19px; }
.tk--l, .tk--r { top: -.5px; height: 1px; width: 7px; } .tk--l { left: -26px; } .tk--r { left: 19px; }
.cursor span { position: absolute; left: 30px; top: 12px; color: var(--paper); white-space: nowrap; font-size: 9px; }
.cursor.big .ret { transform: scale(2.1); border-color: var(--pin); }
.cursor.big .tk--t { transform: translateY(-14px); } .cursor.big .tk--b { transform: translateY(14px); } .cursor.big .tk--l { transform: translateX(-14px); } .cursor.big .tk--r { transform: translateX(14px); }
@media (hover: none) { .cursor { display: none; } }

html.studio * { transition: none !important; }
@media (max-width: 900px) {
  .chapnav, .tele, .ruler { display: none; }
  .ch { left: var(--gut); right: var(--gut); }
  .title { font-size: clamp(48px, 13vw, 96px); }
  .num { font-size: 46vw; }
  .chip b { font-size: 30px; }
  .links { gap: 16px; flex-wrap: wrap; justify-content: center; }
  .lab b { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .scrollcue i { animation: none; } }
html.prepaint .ch, html.prepaint .marq, html.prepaint .detail { visibility: visible !important; opacity: .01 !important; }
html.prepaint .wi { transform: none !important; }
html.studio .cursor { display: none; }   /* the reel draws its own hand cursor */
html.reel .ch, html.reel .bar, html.reel .hud, html.reel .detail { display: none !important; }   /* reel: the car is the whole picture; the reel draws its own captions */
