:root {
  /* DESIGN TYPOGRAPHY TOKENS: Inter** 400–600 refined Space Grotesk** 600–700. Use huge cropped labels */
  --pit-black: #07080D;
  --pencil-silver: #D9D6CC;
  --aurora-cyan: #5EF7FF;
  --imperial-violet: #5A3DFF;
  --reluctant-rose: #FF5A8A;
  --champagne-graphite: #B8A77E;
  --x: 50vw;
  --y: 50vh;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--pit-black);
  color: var(--pencil-silver);
  font-family: Inter, Arial, Helvetica, sans-serif;
}

body {
  cursor: none;
  background:
    radial-gradient(circle at 14% 12%, rgba(90, 61, 255, .12), transparent 30%),
    linear-gradient(90deg, #07080D 0%, #0b0c13 48%, #07080D 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  z-index: 2;
  background-image:
    linear-gradient(rgba(217, 214, 204, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 214, 204, .035) 1px, transparent 1px),
    radial-gradient(circle at var(--x) var(--y), rgba(217, 214, 204, .28), transparent 115px);
  background-size: 72px 72px, 72px 72px, 100% 100%;
  mix-blend-mode: screen;
}

.cursor-lamp {
  position: fixed;
  left: var(--x);
  top: var(--y);
  width: 210px;
  height: 210px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 20;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(94, 247, 255, .38) 0%, rgba(94, 247, 255, .16) 28%, rgba(90, 61, 255, .13) 48%, transparent 72%);
  filter: blur(2px);
  mix-blend-mode: screen;
}

.pencil-reveal {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background:
    radial-gradient(circle at var(--x) var(--y), rgba(217, 214, 204, .15), transparent 168px),
    repeating-linear-gradient(-8deg, transparent 0 21px, rgba(217, 214, 204, .035) 22px, transparent 24px);
  mix-blend-mode: screen;
}

.race-ui {
  position: fixed;
  inset: 0 0 auto 0;
  height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px 30px;
  z-index: 15;
  pointer-events: none;
}

.wordmark,
.lap-counter,
.kicker,
.chapter-label,
.negative-space-label,
.stamp {
  font-family: "Space Grotesk", Arial, Helvetica, sans-serif;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.wordmark {
  font-size: 12px;
  color: rgba(217, 214, 204, .76);
}

.lap-counter {
  color: var(--aurora-cyan);
  font-weight: 700;
  font-size: 13px;
  border: 1px solid rgba(94, 247, 255, .34);
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 0 24px rgba(94, 247, 255, .13);
}

.lap-counter span:last-child { color: rgba(217, 214, 204, .48); }

.chapter-dots {
  justify-self: end;
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.dot {
  width: 28px;
  height: 12px;
  border: 1px solid rgba(217, 214, 204, .35);
  background: transparent;
  transform: skewX(-22deg);
  padding: 0;
  cursor: none;
}

.dot span { display: none; }
.dot.is-active { background: var(--reluctant-rose); border-color: var(--reluctant-rose); box-shadow: 0 0 20px rgba(255, 90, 138, .44); }

.scroll-track {
  height: 100vh;
  width: 500vw;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.scroll-track::-webkit-scrollbar { display: none; }

.panel {
  position: relative;
  width: 100vw;
  height: 100vh;
  flex: 0 0 100vw;
  overflow: hidden;
  scroll-snap-align: start;
  padding: 110px 7vw 70px;
  border-right: 1px solid rgba(217, 214, 204, .09);
  background:
    radial-gradient(circle at 80% 70%, rgba(184, 167, 126, .08), transparent 24%),
    linear-gradient(115deg, rgba(217, 214, 204, .025), transparent 35%);
}

.continuous-line {
  position: fixed;
  top: 0;
  left: 0;
  width: 500vw;
  height: 100vh;
  pointer-events: none;
  z-index: 6;
  transform: translateX(calc(var(--track-offset, 0px) * -1));
}

.line-main,
.line-shadow,
.line-scratch {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#roughStroke);
}

.line-main { stroke: var(--aurora-cyan); stroke-width: 9; filter: drop-shadow(0 0 16px rgba(94, 247, 255, .72)); stroke-dasharray: 6100; stroke-dashoffset: 6100; animation: lineLaunch 2.1s .8s cubic-bezier(.2,.8,.2,1) forwards; }
.line-shadow { stroke: var(--imperial-violet); stroke-width: 24; opacity: .18; }
.line-scratch { stroke: var(--pencil-silver); stroke-width: 2; opacity: .35; stroke-dasharray: 20 18; }

.hero-copy { position: absolute; left: 7vw; bottom: 9vh; z-index: 8; }
.kicker { color: var(--champagne-graphite); font-size: 12px; font-weight: 700; margin: 0 0 16px; }

h1,
h2 {
  font-family: "Space Grotesk", Arial, Helvetica, sans-serif;
  font-weight: 700;
  margin: 0;
  line-height: .82;
  text-transform: uppercase;
  letter-spacing: -.06em;
}

h1 { font-size: clamp(76px, 15vw, 230px); color: var(--pencil-silver); text-shadow: 0 0 45px rgba(217, 214, 204, .12); }
h1 span { display: block; transform: translateX(-8vw); opacity: 0; animation: titleSettle 1.1s cubic-bezier(.17,.84,.24,1.16) forwards; }
h1 span:last-child { color: transparent; -webkit-text-stroke: 2px rgba(217, 214, 204, .72); animation-delay: .16s; }
h2 { font-size: clamp(46px, 7vw, 116px); max-width: 850px; }

.handwritten { font-family: Caveat, "Comic Sans MS", cursive; font-size: clamp(24px, 3vw, 44px); color: var(--reluctant-rose); line-height: 1; }
.note { margin: 20px 0 0 3vw; transform: rotate(-3deg); }
.correction { margin: 18px 0 0; transform: rotate(-2deg); }

.starting-lights {
  position: absolute;
  top: 22vh;
  left: 48vw;
  display: flex;
  gap: 22px;
  z-index: 9;
  transform: rotate(-8deg);
}

.starting-lights i {
  display: block;
  width: 56px;
  height: 56px;
  border: 2px solid rgba(255, 90, 138, .55);
  border-radius: 50%;
  background: radial-gradient(circle, var(--reluctant-rose), rgba(255, 90, 138, .08) 48%, transparent 60%);
  box-shadow: 0 0 28px rgba(255, 90, 138, .55);
  opacity: 0;
  animation: lightBlink .42s ease forwards;
}
.starting-lights i:nth-child(2) { animation-delay: .26s; }
.starting-lights i:nth-child(3) { animation-delay: .52s; }

.paper,
.vellum {
  color: var(--pit-black);
  background: rgba(217, 214, 204, .9);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .34);
  border: 1px solid rgba(184, 167, 126, .46);
}

.pass-card { position: absolute; right: 11vw; top: 20vh; width: 270px; padding: 24px; z-index: 7; }
.tilted-left { transform: rotate(-7deg); }
.stamp { display: inline-block; color: var(--pit-black); border: 1px solid var(--champagne-graphite); padding: 8px 10px; font-size: 11px; margin-bottom: 14px; }
.paper p { margin: 0; line-height: 1.5; font-size: 13px; }

.construction,
.hidden-layer { position: absolute; color: rgba(217, 214, 204, .55); font-family: Caveat, cursive; font-size: 26px; pointer-events: none; }
.construction { right: 8vw; bottom: 17vh; display: grid; gap: 18px; transform: rotate(3deg); }
.hidden-layer { opacity: .2; transition: opacity .25s ease; }
body.lamp-active .hidden-layer { opacity: .62; }

.aurora { position: absolute; inset: auto; pointer-events: none; filter: blur(10px); opacity: .72; mix-blend-mode: screen; }
.aurora::before,
.aurora::after { content: ""; position: absolute; inset: 0; border-radius: 50%; transform: rotate(-10deg); }
.aurora-one { width: 760px; height: 180px; right: -120px; top: 80px; background: linear-gradient(95deg, transparent, rgba(94,247,255,.25), rgba(90,61,255,.22), transparent); clip-path: polygon(0 62%, 16% 35%, 34% 48%, 53% 10%, 71% 38%, 100% 24%, 88% 72%, 52% 54%, 23% 88%); }
.aurora-two { width: 1100px; height: 260px; left: 3vw; top: 9vh; background: linear-gradient(100deg, transparent, rgba(90,61,255,.22), rgba(94,247,255,.2), transparent); clip-path: polygon(0 50%, 10% 36%, 22% 60%, 35% 24%, 49% 52%, 66% 18%, 82% 48%, 100% 26%, 91% 73%, 70% 57%, 53% 82%, 32% 62%, 16% 78%); }
.aurora-three { width: 980px; height: 420px; right: 8vw; top: 3vh; background: radial-gradient(ellipse, rgba(94,247,255,.28), rgba(90,61,255,.17), transparent 70%); clip-path: polygon(0 42%, 18% 20%, 36% 38%, 52% 4%, 70% 30%, 100% 12%, 91% 66%, 69% 52%, 46% 92%, 24% 58%); }

.diagonal-slab { position: absolute; inset: -10vh 8vw -10vh 24vw; background: rgba(217, 214, 204, .06); border-left: 1px solid rgba(184,167,126,.4); border-right: 1px solid rgba(184,167,126,.22); transform: skewX(-24deg); }
.chapter-label { position: absolute; top: 16vh; left: 6vw; font-size: clamp(72px, 13vw, 190px); color: rgba(217,214,204,.07); font-weight: 700; }
.chapter-label.rose { color: rgba(255,90,138,.12); }
.turn-map { position: absolute; right: 6vw; top: 19vh; width: min(54vw, 780px); z-index: 5; transform: rotate(-3deg); }
.turn-map svg { width: 100%; overflow: visible; }
.map-grid { stroke: rgba(217,214,204,.13); stroke-width: 1; }
.map-line { fill: none; stroke: var(--pencil-silver); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 16px rgba(94,247,255,.32)); }
.map-ghost { fill: none; stroke: var(--reluctant-rose); stroke-width: 2; stroke-dasharray: 11 12; }
.turn-map circle { fill: var(--pit-black); stroke: var(--champagne-graphite); stroke-width: 3; }
.scene-copy { position: relative; z-index: 8; max-width: 820px; }
.scene-copy p:not(.kicker):not(.handwritten) { font-size: clamp(17px, 1.5vw, 22px); line-height: 1.55; color: rgba(217,214,204,.78); max-width: 620px; }
.sharp-copy { margin-top: 30vh; }
.quote-strip { position: absolute; right: 11vw; bottom: 18vh; padding: 13px 24px; color: var(--pit-black); background: var(--pencil-silver); font-family: Caveat, cursive; font-size: 32px; transform: rotate(4deg); z-index: 8; }
.speed-lines { left: 16vw; top: 18vh; display: grid; gap: 18px; }
.speed-lines i { display: block; width: 320px; height: 2px; background: rgba(217,214,204,.55); transform: skewX(-30deg); }

.long-corridor { position: absolute; left: 8vw; right: 8vw; top: 45vh; height: 120px; }
.rail { position: absolute; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(217,214,204,.2), transparent); }
.rail.top { top: 0; } .rail.bottom { bottom: 0; }
.race-thread { position: absolute; left: 0; right: 0; top: 55px; height: 10px; background: linear-gradient(90deg, transparent, var(--aurora-cyan), var(--imperial-violet), var(--aurora-cyan), transparent); box-shadow: 0 0 24px rgba(94,247,255,.45); clip-path: polygon(0 55%, 20% 30%, 44% 54%, 68% 42%, 100% 57%, 100% 68%, 70% 56%, 46% 68%, 21% 44%, 0 70%); }
.straight-copy { margin-top: 16vh; margin-left: 5vw; }
.negative-space-label { position: absolute; right: 8vw; bottom: 20vh; color: rgba(184,167,126,.72); font-size: 12px; }
.tiny-card { right: 14vw; top: 60vh; width: 260px; padding: 18px; transform: rotate(5deg); font-family: Caveat, cursive; font-size: 26px; }

.vellum-stack { position: absolute; left: 7vw; top: 18vh; width: 56vw; height: 62vh; z-index: 4; }
.vellum { position: absolute; padding: 22px; background: rgba(217,214,204,.72); backdrop-filter: blur(7px); }
.vellum span { font-family: "Space Grotesk", sans-serif; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: rgba(7,8,13,.72); }
.sheet-a { width: 560px; height: 390px; left: 5vw; top: 6vh; transform: rotate(-4deg); }
.sheet-a svg { width: 100%; height: 92%; }
.sheet-a path { fill: none; stroke: var(--pit-black); stroke-width: 3; stroke-linecap: round; opacity: .54; }
.sheet-b { width: 360px; height: 230px; left: 30vw; top: 24vh; transform: rotate(7deg); }
.sheet-c { width: 330px; height: 120px; left: 12vw; bottom: 0; transform: rotate(-9deg); font-family: Caveat, cursive; font-size: 32px; color: var(--pit-black); }
.blush-flare { position: absolute; width: 145px; height: 145px; border-radius: 50%; right: 44px; bottom: 18px; background: radial-gradient(circle, var(--reluctant-rose), rgba(255,90,138,.25) 42%, transparent 70%); box-shadow: 0 0 46px rgba(255,90,138,.46); }
.hairpin-copy { margin-left: 55vw; margin-top: 24vh; }
.arms-icon { position: absolute; right: 8vw; top: 20vh; color: var(--reluctant-rose); font-family: Caveat, cursive; font-size: 86px; transform: rotate(9deg); opacity: .8; }

.finish-flags { position: absolute; left: 7vw; top: 18vh; display: grid; grid-template-columns: repeat(3, 80px); grid-auto-rows: 80px; transform: skewX(-12deg) rotate(-4deg); opacity: .5; }
.finish-flags i:nth-child(odd) { background: rgba(217,214,204,.86); }
.finish-flags i:nth-child(even) { background: rgba(7,8,13,.82); border: 1px solid rgba(217,214,204,.22); }
.final-card { position: relative; z-index: 9; margin: 23vh auto 0; width: min(850px, 74vw); padding: 42px; border: 1px solid rgba(184,167,126,.5); background: linear-gradient(135deg, rgba(7,8,13,.82), rgba(7,8,13,.54)); box-shadow: 0 30px 90px rgba(0,0,0,.44), inset 0 0 50px rgba(184,167,126,.06); }
.final-card h2 { color: var(--pencil-silver); font-size: clamp(54px, 8vw, 118px); }
.final-card p:not(.kicker):not(.handwritten) { color: rgba(217,214,204,.78); line-height: 1.55; font-size: 19px; max-width: 630px; }
.pit-pass { margin-top: 18px; border: 1px solid var(--champagne-graphite); color: var(--pencil-silver); background: rgba(184,167,126,.08); padding: 15px 22px; font-family: "Space Grotesk", sans-serif; text-transform: uppercase; letter-spacing: .12em; cursor: none; transition: transform .25s ease, box-shadow .25s ease, color .25s ease; }
.pit-pass:hover { transform: translateY(-3px) skewX(-8deg); color: var(--aurora-cyan); box-shadow: 0 0 26px rgba(94,247,255,.18); }
.gold-seal { position: absolute; right: 12vw; bottom: 13vh; width: 110px; height: 110px; border-radius: 50%; border: 1px solid var(--champagne-graphite); color: var(--champagne-graphite); display: grid; place-items: center; text-align: center; font-family: "Space Grotesk", sans-serif; font-weight: 700; box-shadow: inset 0 0 28px rgba(184,167,126,.12); }
.finish-notes { right: 6vw; top: 18vh; max-width: 310px; font-family: Caveat, cursive; font-size: 28px; transform: rotate(6deg); }

.panel.is-visible .scene-copy,
.panel.is-visible .final-card { animation: copyArrive .7s cubic-bezier(.18,.82,.23,1.08) both; }

@keyframes lightBlink { 0% { opacity: 0; transform: scale(.5); } 55% { opacity: 1; transform: scale(1.16); } 100% { opacity: .82; transform: scale(1); } }
@keyframes lineLaunch { to { stroke-dashoffset: 0; } }
@keyframes titleSettle { to { opacity: 1; transform: translateX(0); } }
@keyframes copyArrive { from { opacity: .1; transform: translateX(40px) rotate(.6deg); } to { opacity: 1; transform: translateX(0) rotate(0); } }

@media (max-width: 760px) {
  .race-ui { grid-template-columns: 1fr auto; padding: 18px; }
  .chapter-dots { display: none; }
  .wordmark { display: none; }
  .panel { padding: 96px 24px 54px; }
  .pass-card, .turn-map, .vellum-stack, .finish-flags { opacity: .38; transform: scale(.72); transform-origin: top left; }
  .sharp-copy, .straight-copy, .hairpin-copy { margin: 25vh 0 0; }
  .hairpin-copy { position: relative; z-index: 9; }
  .sheet-b { left: 38vw; }
  .final-card { width: 100%; padding: 28px; }
}
