/* Roadster — a Kintura motion study.
   Base rules lay every chapter out as a plain document. `.js` on <html> (set by
   roadster.js) switches the pinned chapters to sticky stages whose layers the
   script drives from scroll progress. */

/* Saira's squared, low-contrast forms match the type Tesla set in the reveal
   films. Like Tesla's own Display and Text cuts it runs at two widths, in
   400 and 500, sentence case, no italics; only the ROADSTER marks go wide,
   bold and spaced. */
@font-face {
  font-family: "Saira";
  src: url("fonts/saira-latin-wdth.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #050505;
  --paper: #f3f2ef;
  --studio: #c4c4c2;
  --fg: #f3f2ef;
  --fg-2: rgb(243 242 239 / 0.64);
  --fg-quiet: rgb(243 242 239 / 0.5);
  --fg-3: rgb(243 242 239 / 0.3);
  --rule: rgb(243 242 239 / 0.16);
  --ink-2: rgb(5 5 5 / 0.8);
  --ink-rule: rgb(5 5 5 / 0.16);
  --red: oklch(0.63 0.235 27);
  --red-glow: oklch(0.63 0.235 27 / 0.55);
  --gold: oklch(0.8 0.075 80);
  --sans: "Saira", "Helvetica Neue", Arial, sans-serif;
  --wide: 112%;
  --wordmark: 125%;
  --pad: clamp(20px, 4.2vw, 72px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --toolbar: 0px;
}

/* Pinned stages are as tall as the viewport with mobile toolbars collapsed;
   anything anchored to their bottom edge lifts by the toolbar's height so it
   stays visible while the toolbars are showing. */
@supports (height: 100lvh) {
  :root {
    --toolbar: calc(100lvh - 100svh);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  color: var(--fg);
  scrollbar-color: #2a2a2b var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  font-stretch: 104%;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p,
ol,
dl,
dd,
blockquote,
figure {
  margin: 0;
}

ol {
  padding: 0;
  list-style: none;
}

img,
video,
canvas {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--red);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--fg);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip:focus-visible {
  transform: none;
}

/* Type ----------------------------------------------------------------------- */

.eyebrow {
  font-size: 13px;
  font-weight: 500;
  font-stretch: var(--wide);
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--fg-2);
}

.eyebrow--ink {
  color: var(--ink-2);
}

.display {
  font-size: clamp(38px, 6vw, 116px);
  font-weight: 500;
  font-stretch: var(--wide);
  line-height: 1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* Emphasis is weight and colour against a quieter line, never italics. */
.design__title em,
.configs__title em {
  font-style: normal;
  font-weight: 500;
  color: var(--fg);
}

.display--ink {
  color: var(--ink);
}

.statement {
  max-width: 20ch;
  font-size: clamp(28px, 4vw, 72px);
  font-weight: 500;
  font-stretch: var(--wide);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.statement--sm {
  font-size: clamp(22px, 2.6vw, 44px);
}

.lede {
  max-width: 40ch;
  font-size: clamp(16px, 1.15vw, 19px);
  line-height: 1.5;
  color: var(--fg-2);
  text-wrap: pretty;
}

.lede--ink {
  color: var(--ink-2);
}

/* Chrome --------------------------------------------------------------------- */

.bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px var(--pad);
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
}

.bar a {
  pointer-events: auto;
}

.bar__mark {
  font-size: 13px;
  font-weight: 600;
  font-stretch: var(--wordmark);
  letter-spacing: 0.3em;
  text-decoration: none;
  text-transform: uppercase;
}

.bar__chapter {
  display: flex;
  gap: 14px;
  font-size: 13px;
  font-weight: 500;
  font-stretch: var(--wide);
  letter-spacing: 0.02em;
}

.bar__num {
  opacity: 0.55;
}

.bar__cta {
  justify-self: end;
  padding: 8px 18px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  font-stretch: var(--wide);
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s;
}

.bar__cta:hover {
  background: #fff;
  color: #000;
}

.taillight {
  position: fixed;
  inset: auto 0 0;
  z-index: 50;
  height: 2px;
  pointer-events: none;
}

.taillight i {
  position: absolute;
  inset: 0;
  background: var(--red);
  box-shadow:
    0 0 14px 1px var(--red-glow),
    0 0 2px var(--red);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* Pin system ----------------------------------------------------------------- */

.pin {
  position: relative;
}

.pin__stage {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  overflow: clip;
}

.js .pin {
  height: calc(var(--len) * 1vh);
}

.js .pin__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  min-height: 0;
}

.stage-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Each clip's first frame, in the crop that matches the screen. The script
   sets the same file as the poster; the background covers a page whose script
   never ran. With scripting off, browsers draw native controls over a <video>,
   so a <noscript> picture stands in instead. */
video[data-clip],
video[data-loop] {
  background-image: var(--still);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

[data-clip="orbit"] {
  --still: url("media/clips/orbit-l.webp");
}
[data-clip="plume"] {
  --still: url("media/clips/plume-l.webp");
}
[data-clip="track"] {
  --still: url("media/clips/track-l.webp");
}
[data-clip="wall"] {
  --still: url("media/clips/wall-l.webp");
}
[data-loop="kickflip"] {
  --still: url("media/clips/kickflip-l.webp");
}

@media (scripting: none) {
  .film video {
    display: none;
  }
}

@media (max-aspect-ratio: 4 / 5) {
  [data-clip="orbit"] {
    --still: url("media/clips/orbit-p.webp");
  }
  [data-clip="plume"] {
    --still: url("media/clips/plume-p.webp");
  }
  [data-clip="track"] {
    --still: url("media/clips/track-p.webp");
  }
  [data-clip="wall"] {
    --still: url("media/clips/wall-p.webp");
  }
  [data-loop="kickflip"] {
    --still: url("media/clips/kickflip-p.webp");
  }
}

figure.stage-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stage-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Fades a stage to or from black where neighbouring chapters change ground. */
.stage-black {
  background: #000;
  opacity: 0;
}

.beats {
  position: relative;
  display: grid;
  gap: 28vh;
  padding: 20vh var(--pad);
}

.js .beats {
  position: absolute;
  inset: 0;
  grid-template-areas: "beat";
  gap: 0;
  padding: 0;
}

.js .beat {
  grid-area: beat;
  will-change: opacity, transform;
}

/* 00 · Reveal ---------------------------------------------------------------- */

.hero {
  --word: min(13.5vw, 40vh);
  background: #000;
}

.hero__video {
  background: var(--studio);
}

.hero__mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #000;
  color: #fff;
  mix-blend-mode: multiply;
}

.hero__lift {
  display: block;
  animation: lift 1.6s var(--ease-out) 0.15s backwards;
}

@keyframes lift {
  from {
    clip-path: inset(0 0 100% 0);
    transform: translateY(18%);
  }
  to {
    clip-path: inset(0 0 0 0);
    transform: none;
  }
}

.hero__word {
  display: block;
  margin-right: -0.06em;
  font-size: var(--word);
  font-weight: 700;
  font-stretch: var(--wordmark);
  line-height: 1;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transform-origin: var(--ox, 50%) var(--oy, 50%);
}

.hero__intro {
  position: absolute;
  inset: 0;
  pointer-events: none;
  animation: intro 1.2s var(--ease-out) 0.9s backwards;
}

@keyframes intro {
  from {
    opacity: 0;
  }
}

.hero__scrim {
  background: linear-gradient(20deg, rgb(206 206 204 / 0.95), rgb(206 206 204 / 0.8) 30%, rgb(206 206 204 / 0) 62%);
}

/* Small type over footage gets full ink, not the softened secondary. */
.hero__copy :is(.eyebrow, .lede),
.track__lede {
  color: var(--ink);
}

.js .hero__scrim {
  opacity: 0;
}

.hero__intro .eyebrow {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% - var(--word) * 0.5 - 2.4em);
  text-align: center;
  color: var(--fg-2);
}

.hero__tag {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% + var(--word) * 0.5 + 12px);
  font-size: clamp(18px, 1.9vw, 32px);
  font-weight: 400;
  font-stretch: var(--wide);
  line-height: 1.2;
  text-align: center;
}

.hero__copy {
  position: absolute;
  left: var(--pad);
  bottom: calc(11vh + var(--toolbar));
  display: grid;
  gap: 18px;
  max-width: 44rem;
  color: var(--ink);
}

.hero__headline {
  font-size: clamp(40px, 6vw, 116px);
  font-weight: 500;
  font-stretch: var(--wide);
  line-height: 1;
  letter-spacing: -0.015em;
}

.cue {
  position: absolute;
  left: 50%;
  bottom: calc(28px + var(--toolbar));
  display: grid;
  justify-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  font-stretch: var(--wide);
  letter-spacing: 0.04em;
  color: var(--fg-2);
  transform: translateX(-50%);
}

.cue i {
  display: block;
  width: 1px;
  height: 46px;
  background: linear-gradient(var(--fg), transparent);
  transform-origin: 50% 0;
  animation: cue 2.2s var(--ease-out) infinite;
}

@keyframes cue {
  0% {
    transform: scaleY(0);
    opacity: 1;
  }
  60% {
    transform: scaleY(1);
    opacity: 1;
  }
  100% {
    transform: scaleY(1);
    opacity: 0;
  }
}

.js .hero__copy {
  opacity: 0;
}

/* 01 · Legacy ---------------------------------------------------------------- */

.legacy {
  background: #000;
}

.js .legacy__photo {
  opacity: 0;
  will-change: opacity, transform;
}

.legacy__scrim {
  background:
    linear-gradient(90deg, rgb(0 0 0 / 0.78), rgb(0 0 0 / 0.1) 62%),
    linear-gradient(0deg, rgb(0 0 0 / 0.7), transparent 50%);
}

.legacy__beat {
  position: relative;
  display: grid;
  align-content: center;
  gap: 28px;
  padding: 0 var(--pad);
}

.legacy__year {
  position: absolute;
  right: var(--pad);
  top: 50%;
  font-size: clamp(110px, 22vw, 440px);
  font-weight: 500;
  font-stretch: var(--wordmark);
  line-height: 1;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1px var(--fg-3);
  transform: translateY(-50%);
  pointer-events: none;
}

.legacy__beat--ride {
  align-content: end;
  padding-bottom: calc(14vh + var(--toolbar));
}

.legacy__ride {
  max-width: 16ch;
  font-size: clamp(36px, 5.2vw, 100px);
  font-weight: 500;
  font-stretch: var(--wide);
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.legacy__beat--swap {
  justify-items: center;
}

/* A soft shadow pool under the line keeps the red words clear of Earth's clouds. */
.legacy__beat--swap::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(130vw, 1800px);
  height: 70%;
  background: radial-gradient(closest-side, rgb(0 0 0 / 0.72), rgb(0 0 0 / 0.4) 60%, transparent);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.swap {
  position: relative;
  font-size: clamp(28px, 5.4vw, 108px);
  font-weight: 500;
  font-stretch: var(--wide);
  line-height: 1;
  letter-spacing: -0.015em;
  text-align: center;
  white-space: nowrap;
}

.swap__ghost {
  visibility: hidden;
}

.swap__ghost[data-swap-ghost="b"] {
  position: absolute;
  inset: 0;
}

.swap__actors {
  display: none;
}

.js .swap__actors {
  position: absolute;
  inset: 0;
  display: block;
}

.swap__actors span {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform, opacity;
}

.swap__hot {
  color: var(--red);
}

/* Without the script the first ghost line is the readable one. */
html:not(.js) .swap__ghost[data-swap-ghost="a"] {
  visibility: visible;
}

/* Layers that only make sense mid-scroll stay out of the static page. */
html:not(.js) :is(.cue, .hero__scrim, .hud, .launch__scrim) {
  display: none;
}

/* The static hero makes room for its copy under the wordmark, on black. */
html:not(.js) .hero .pin__stage {
  min-height: 150vh;
}

html:not(.js) :is(.hero__video, .hero__mask, .hero__intro) {
  bottom: auto;
  height: 100vh;
}

html:not(.js) .hero__copy {
  color: var(--fg);
}

html:not(.js) .hero__copy :is(.eyebrow, .lede) {
  color: var(--fg-2);
}

.legacy__beat--today .statement {
  max-width: 22ch;
}

/* 02 · Design ---------------------------------------------------------------- */

.design {
  padding-top: 24vh;
  background: var(--ink);
}

.design__head {
  display: grid;
  gap: 4vh;
  padding: 0 var(--pad);
}

.lineage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 0;
  font-size: clamp(13px, 1vw, 16px);
  font-weight: 500;
  font-stretch: var(--wide);
  letter-spacing: 0.02em;
}

.lineage li {
  display: flex;
  align-items: center;
  color: var(--fg-quiet);
  transition: color 0.4s;
}

html:not(.js) .lineage li {
  color: var(--fg);
}

.lineage li:not(:last-child)::after {
  content: "";
  width: clamp(24px, 5vw, 96px);
  height: 1px;
  margin: 0 14px;
  background: currentColor;
}

.lineage li.is-lit {
  color: var(--fg);
}

.lineage .lineage__now.is-lit {
  color: var(--red);
}

.design__title {
  font-size: clamp(44px, 7.4vw, 150px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--fg-2);
}

.design__lede {
  margin-left: auto;
  margin-right: 4vw;
}

.exterior {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: var(--pad);
  padding: 10vh var(--pad) 12vh;
}

.exterior__media {
  display: none;
}

.exterior__list {
  display: grid;
  grid-column: 1 / -1;
}

.exterior__item {
  display: grid;
  align-content: center;
  gap: 18px;
  min-height: 74vh;
  padding: 6vh 0;
  border-top: 1px solid var(--rule);
}

.exterior__item p:not(.eyebrow) {
  max-width: 34ch;
  font-size: clamp(18px, 1.5vw, 24px);
  line-height: 1.4;
  color: var(--fg-2);
  text-wrap: pretty;
}

.exterior__title {
  font-size: clamp(40px, 5vw, 96px);
  font-weight: 500;
  font-stretch: var(--wide);
  line-height: 1;
  letter-spacing: -0.015em;
}

.exterior__item[data-exterior-item="3"] .exterior__title {
  color: var(--gold);
}

.exterior__inline {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 3px;
}

@media (min-width: 901px) {
  .js .exterior__media {
    position: sticky;
    top: 0;
    display: block;
    height: 100vh;
    height: 100svh;
  }

  .js .exterior__list {
    grid-column: 2;
  }

  .js .exterior__inline {
    display: none;
  }

  .exterior__frame {
    position: absolute;
    inset: 14vh 0 12vh;
    overflow: hidden;
    border-radius: 3px;
    clip-path: inset(100% 0 0 0);
    transition: clip-path 1.2s var(--ease-out);
  }

  .exterior__frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.12);
    transition: transform 1.8s var(--ease-out);
  }

  .exterior__frame.is-on {
    clip-path: inset(0 0 0 0);
  }

  .exterior__frame.is-on img {
    transform: scale(1);
  }

  .exterior__counter {
    position: absolute;
    left: 0;
    bottom: 5vh;
    font-size: 13px;
    font-weight: 500;
    font-stretch: var(--wide);
    letter-spacing: 0.02em;
    color: var(--fg-2);
  }
}

/* 03 · Physics --------------------------------------------------------------- */

.physics {
  background: #000;
}

.js .physics__plume {
  opacity: 0;
}

.physics__scrim {
  background: linear-gradient(90deg, rgb(0 0 0 / 0.9), rgb(0 0 0 / 0.62) 58%, rgb(0 0 0 / 0.15) 88%);
}

.js .physics__scrim {
  opacity: 0;
}

.physics__beat--space .lede {
  color: var(--fg);
}

.physics__beat {
  display: grid;
  align-content: center;
  gap: 26px;
  padding: 10vh var(--pad);
}

.physics__beat--grip .statement {
  max-width: 17ch;
  font-size: clamp(32px, 4.8vw, 92px);
}

.force {
  display: grid;
  gap: 22px;
  width: min(100%, 1180px);
  margin-top: 3vh;
}

.force__row {
  display: grid;
  grid-template-columns: 10ch minmax(0, 1fr) 7ch;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  font-weight: 500;
  font-stretch: var(--wide);
  letter-spacing: 0.02em;
}

.force__label {
  color: var(--fg-2);
}

.force__value {
  font-size: 20px;
  text-align: right;
  white-space: nowrap;
}

.force__row--thrust .force__value {
  color: var(--red);
}

.force__track {
  position: relative;
  height: 16px;
  background: rgb(255 255 255 / 0.06);
}

.force__bar {
  position: absolute;
  inset: 0 auto 0 0;
  transform: scaleX(var(--s, 1));
  transform-origin: 0 50%;
}

.force__bar--grip {
  width: 20%;
  background: var(--fg-2);
}

.force__bar--thrust {
  width: 80%;
  background: var(--red);
  box-shadow: 0 0 18px var(--red-glow);
}

.force__band {
  position: absolute;
  inset: 0 0 0 80%;
  background: repeating-linear-gradient(135deg, var(--red) 0 2px, transparent 2px 7px);
  opacity: var(--band, 1);
}

.force__scale {
  display: flex;
  justify-content: space-between;
  margin: 0 calc(7ch + 18px) 0 calc(10ch + 18px);
  font-size: 12px;
  font-weight: 500;
  font-stretch: var(--wide);
  letter-spacing: 0.02em;
  color: var(--fg-2);
}

.js .force__bar--grip,
.js .force__bar--thrust {
  --s: 0;
}

.js .force__band {
  --band: 0;
}

.physics__lede {
  max-width: 52ch;
}

.physics__title {
  max-width: 14ch;
}

.physics__beat--copv {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--pad);
}

.copv {
  overflow: hidden;
  border-radius: 3px;
}

.copv img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.copv__text {
  display: grid;
  gap: 26px;
}

.copv__eq {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
  font-size: clamp(14px, 1.1vw, 17px);
  font-weight: 500;
  font-stretch: var(--wide);
  letter-spacing: 0.02em;
  color: var(--fg-2);
}

.copv__eq b {
  font-size: 30px;
  font-weight: 400;
  color: var(--red);
}

.copv__eq span:last-child {
  color: var(--fg);
}

/* 04 · Launch ---------------------------------------------------------------- */

.launch {
  background: #000;
}

.launch__scrim {
  background: rgb(0 0 0 / 0.72);
  opacity: 0;
}

.hud {
  position: absolute;
  inset: 0;
  color: #fff;
  pointer-events: none;
}

/* The clock and scale sit over mid-grey asphalt, where a difference blend
   lands on mid-grey too; they read as plain white over a dark foot. */
.hud::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.8), transparent);
  opacity: var(--hud, 1);
}

.hud__chapter,
.hud__speed {
  mix-blend-mode: difference;
}

.hud__chapter {
  position: absolute;
  left: var(--pad);
  top: 92px;
  color: #fff;
}

.hud__speed {
  position: absolute;
  right: var(--pad);
  top: 13vh;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.hud__mph {
  font-size: clamp(96px, 16vw, 288px);
  font-weight: 500;
  font-stretch: var(--wide);
  line-height: 0.8;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.hud__unit,
.hud__label {
  font-size: 15px;
  font-weight: 500;
  font-stretch: var(--wide);
  letter-spacing: 0.02em;
}

.hud__clock {
  position: absolute;
  left: var(--pad);
  bottom: calc(13vh + var(--toolbar));
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: clamp(34px, 4.2vw, 68px);
  font-weight: 400;
  font-stretch: var(--wide);
  font-variant-numeric: tabular-nums;
}

.hud__ticks {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  bottom: calc(7vh + var(--toolbar));
  display: flex;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid rgb(255 255 255 / 0.4);
  font-size: 12px;
  font-weight: 500;
  font-stretch: var(--wide);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.hud__ticks i {
  position: absolute;
  left: 0;
  right: 0;
  top: -2px;
  height: 3px;
  background: #fff;
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.launch__result {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 22px;
  padding: 0 var(--pad);
  text-align: center;
}

.js .launch__result {
  opacity: 0;
}

.launch__big {
  max-width: 14ch;
  font-size: clamp(40px, 6.4vw, 124px);
  font-weight: 500;
  font-stretch: var(--wide);
  line-height: 1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.launch__big span {
  color: var(--red);
}

.launch__foot {
  font-size: 15px;
  font-weight: 500;
  font-stretch: var(--wide);
  letter-spacing: 0.02em;
  color: var(--fg-2);
}

/* 05 · Track Mode ------------------------------------------------------------ */

.track {
  background: var(--studio);
}

.track__video {
  background: var(--studio);
}

/* Studio haze behind the copy (top left) and the mode list (right edge). */
.track__scrim {
  background:
    radial-gradient(130% 110% at 0% 0%, rgb(214 214 212 / 0.94), rgb(214 214 212 / 0.78) 34%, rgb(214 214 212 / 0) 62%),
    radial-gradient(34% 48% at 100% 50%, rgb(214 214 212 / 0.95), rgb(214 214 212 / 0.6) 55%, rgb(214 214 212 / 0));
}

.track__copy {
  position: absolute;
  left: var(--pad);
  top: 104px;
  display: grid;
  gap: 18px;
  max-width: min(52rem, 60vw);
}

.track__title {
  max-width: 11ch;
  font-size: clamp(38px, 5vw, 96px);
}

.js .track__lede {
  opacity: 0;
}

.modes {
  position: absolute;
  right: var(--pad);
  top: 50%;
  display: grid;
  gap: 18px;
  font-size: 14px;
  font-weight: 500;
  font-stretch: var(--wide);
  letter-spacing: 0.02em;
  color: rgb(5 5 5 / 0.9);
  transform: translateY(-50%);
}

.modes li {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  transition: color 0.3s;
}

.modes li::after {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0.4);
  transform-origin: 100% 50%;
  transition:
    transform 0.4s var(--ease-out),
    background-color 0.3s;
}

.modes li.is-on {
  color: var(--ink);
}

.modes li.is-on::after {
  background: var(--red);
  transform: scaleX(1);
}

/* 06 · Beyond ---------------------------------------------------------------- */

.beyond {
  background: #000;
}

.beyond__scrim {
  background: linear-gradient(90deg, rgb(0 0 0 / 0.7), transparent 52%);
}

.beyond__beat {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 24px;
  max-width: min(46rem, 50vw);
  padding: 0 var(--pad);
}

.beyond__title,
.beyond__invert {
  font-size: clamp(44px, 6.4vw, 124px);
}

.beyond__invert {
  display: inline-block;
  transform-origin: 50% 46%;
}

/* 07 · Flight ---------------------------------------------------------------- */

.flight {
  padding: 24vh var(--pad) 18vh;
  background: #000;
}

.flight__head {
  display: grid;
  justify-items: center;
  gap: 4vh;
  text-align: center;
}

.flight__title {
  font-size: clamp(56px, 10vw, 200px);
  font-weight: 500;
  font-stretch: var(--wide);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.film {
  display: grid;
  gap: 18px;
  margin: 12vh calc(-1 * var(--pad)) 0;
}

.film__video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
}

.film__caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 var(--pad);
}

.film__toggle {
  padding: 7px 16px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: none;
  font-size: 13px;
  font-weight: 500;
  font-stretch: var(--wide);
  letter-spacing: 0.02em;
  cursor: pointer;
}

.film__toggle:hover {
  border-color: var(--fg);
}

.quote {
  display: grid;
  justify-items: center;
  gap: 26px;
  margin-top: 22vh;
  text-align: center;
}

.quote p {
  max-width: 20ch;
  font-size: clamp(30px, 4.4vw, 84px);
  font-weight: 400;
  font-stretch: var(--wide);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.quote footer {
  font-size: 14px;
  font-weight: 500;
  font-stretch: var(--wide);
  letter-spacing: 0.02em;
  color: var(--fg-2);
}

.reel {
  background: #000;
}

.reel__stage {
  display: flex;
  align-items: center;
  overflow-x: auto;
}

.js .reel__stage {
  overflow: hidden;
  overflow: clip;
}

.reel__track {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 56px);
  padding: 0 var(--pad);
  will-change: transform;
}

.reel__card {
  flex: none;
  display: grid;
  gap: 14px;
  width: min(48vw, 88vh);
}

.reel__card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 3px;
}

.reel__card figcaption {
  display: flex;
  gap: 16px;
  font-size: 14px;
  font-weight: 500;
  font-stretch: var(--wide);
  letter-spacing: 0.02em;
  color: var(--fg-2);
}

.reel__card figcaption span {
  color: var(--red);
}

.reel__card--title {
  width: min(40vw, 72vh);
}

.reel__title {
  font-size: clamp(56px, 8.4vw, 168px);
  font-weight: 500;
  font-stretch: var(--wide);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.reel__progress {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  bottom: calc(8vh + var(--toolbar));
  height: 1px;
  background: var(--rule);
}

.reel__progress i {
  position: absolute;
  inset: 0;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* 08 · Interior -------------------------------------------------------------- */

.interior {
  background: var(--paper);
  color: var(--ink);
}

.curtain {
  background: #000;
}

.curtain__stage {
  display: grid;
  place-items: center;
}

.curtain__light {
  position: absolute;
  inset: 0;
  background: var(--paper);
}

.js .curtain__light {
  transform: scaleY(0.003);
  box-shadow: 0 0 40px 6px rgb(255 255 255 / 0.5);
}

.curtain__copy {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 3vh;
  text-align: center;
}

.js .curtain__copy {
  opacity: 0;
}

.curtain__title {
  font-size: clamp(56px, 12vw, 240px);
  font-weight: 500;
  font-stretch: var(--wide);
  line-height: 0.95;
  letter-spacing: -0.025em;
}

.interior__body {
  display: grid;
  gap: 16vh;
  padding: 4vh 0 22vh;
}

.interior__wide img {
  width: 100%;
  height: 92vh;
  object-fit: cover;
}

.interior__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  gap: 14vh var(--pad);
  padding: 0 var(--pad);
}

.interior__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 3px;
}

.interior__photo--seat {
  grid-column: 1 / span 5;
}

.interior__grid > :nth-child(2) {
  grid-column: 7 / span 5;
}

.interior__grid > :nth-child(3) {
  grid-column: 2 / span 4;
}

.interior__photo--yoke {
  grid-column: 7 / -1;
}

.interior__photo--yoke img,
.interior__photo--rear img {
  aspect-ratio: 4 / 3;
}

.interior__photo--rear {
  grid-column: 1 / span 7;
}

.interior__grid > :nth-child(6) {
  grid-column: 9 / -1;
}

.interior__text {
  display: grid;
  gap: 18px;
}

.interior__line {
  font-size: clamp(24px, 2.4vw, 42px);
  font-weight: 500;
  font-stretch: var(--wide);
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.interior__close {
  max-width: 18ch;
  margin: 0 auto;
  padding: 0 var(--pad);
  font-size: clamp(36px, 5vw, 96px);
  font-weight: 500;
  font-stretch: var(--wide);
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-align: center;
  text-wrap: balance;
}

.interior__close em {
  display: block;
  font-style: normal;
  color: var(--red);
}

/* 09 · Configurations -------------------------------------------------------- */

.configs {
  display: grid;
  gap: 12vh;
  padding: 26vh var(--pad) 22vh;
  background: var(--ink);
}

.configs__head {
  display: grid;
  gap: 4vh;
}

.configs__title {
  font-size: clamp(48px, 8vw, 160px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--fg-2);
}

.race {
  display: grid;
  gap: 28px;
  padding: 36px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.race__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.race__again {
  padding: 7px 16px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: none;
  font-size: 13px;
  font-weight: 500;
  font-stretch: var(--wide);
  letter-spacing: 0.02em;
  cursor: pointer;
}

.race__again:hover {
  border-color: var(--fg);
}

.race__lanes {
  display: grid;
  gap: 16px;
}

.race__lane {
  display: grid;
  grid-template-columns: 13ch minmax(0, 1fr) 10ch;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  font-weight: 500;
  font-stretch: var(--wide);
  letter-spacing: 0.02em;
}

.race__time {
  text-align: right;
  color: var(--fg-2);
}

.race__track {
  position: relative;
  height: 14px;
  background: rgb(255 255 255 / 0.06);
}

.race__track i {
  position: absolute;
  inset: 0;
  background: var(--fg);
  transform-origin: 0 50%;
}

.race__lane--rocket .race__track i {
  background: var(--red);
  box-shadow: 0 0 18px var(--red-glow);
}

.race__lane--rocket .race__time {
  color: var(--red);
}

.race__lane.is-finished .race__time {
  color: var(--fg);
}

.race__lane--rocket.is-finished .race__time {
  color: var(--red);
  text-shadow: 0 0 18px var(--red-glow);
}

.js .race__track i {
  transform: scaleX(0);
}

.js .race.is-running .race__track i {
  transform: scaleX(1);
  transition: transform calc(var(--t) * 1s) linear;
}

.js .race.is-done .race__track i {
  transform: scaleX(1);
}

.configs__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--pad);
}

.config {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 20px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}

.config__tag {
  font-size: 14px;
  font-weight: 500;
  font-stretch: var(--wide);
  letter-spacing: 0.02em;
  color: var(--fg-2);
}

.config__name {
  font-size: clamp(32px, 3.2vw, 60px);
  font-weight: 500;
  font-stretch: var(--wide);
  line-height: 1;
  letter-spacing: -0.015em;
}

.config--rocket .config__name {
  color: var(--red);
}

.config__body {
  max-width: 34ch;
  color: var(--fg-2);
  text-wrap: pretty;
}

.config__stat {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  font-stretch: var(--wide);
  letter-spacing: 0.02em;
  color: var(--fg-2);
}

.config__stat b {
  font-size: clamp(40px, 4.2vw, 80px);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--pad);
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}

.specs dt {
  font-size: 14px;
  font-weight: 500;
  font-stretch: var(--wide);
  letter-spacing: 0.02em;
  color: var(--fg-2);
}

.specs dd {
  font-size: clamp(48px, 6.4vw, 124px);
  font-weight: 500;
  font-stretch: var(--wide);
  line-height: 1;
  letter-spacing: -0.02em;
}

.specs small {
  margin-left: 0.2em;
  font-size: 0.2em;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--fg-2);
}

/* 10 · Reserve --------------------------------------------------------------- */

.finale {
  position: relative;
  display: grid;
  min-height: 100vh;
  overflow: hidden;
  background: #000;
}

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

.finale__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.finale__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgb(0 0 0 / 0.72), transparent 55%),
    linear-gradient(90deg, rgb(0 0 0 / 0.35), transparent 60%);
}

.finale__copy {
  position: relative;
  display: grid;
  align-content: end;
  justify-items: start;
  gap: 28px;
  padding: 0 var(--pad) 12vh;
}

.finale__title {
  font-size: clamp(56px, 8.4vw, 168px);
  font-weight: 500;
  font-stretch: var(--wide);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.finale__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 40px var(--red-glow);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  font-stretch: var(--wide);
  letter-spacing: 0.01em;
  text-decoration: none;
  transition:
    transform 0.4s var(--ease-out),
    box-shadow 0.4s;
}

.finale__cta span {
  font-weight: 400;
  opacity: 0.7;
}

.finale__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 60px var(--red-glow);
}

.credits {
  display: grid;
  gap: 14px;
  padding: 10vh var(--pad) 12vh;
  font-size: 13px;
  line-height: 1.6;
  color: var(--fg-2);
}

.credits p {
  max-width: 92ch;
}

.credits__mark {
  font-size: 14px;
  font-weight: 500;
  font-stretch: var(--wide);
  letter-spacing: 0.02em;
  color: var(--fg-2);
}

/* Reveals -------------------------------------------------------------------- */

[data-reveal] {
  transition:
    opacity 1s var(--ease-out),
    transform 1.2s var(--ease-out);
}

.js [data-reveal]:not(.is-in) {
  opacity: 0;
  transform: translateY(36px);
}

/* Portrait screens ----------------------------------------------------------- */

@media (max-width: 900px) {
  .bar__chapter {
    display: none;
  }

  .bar {
    grid-template-columns: 1fr auto;
  }

  .exterior {
    padding-top: 6vh;
  }

  .exterior__item {
    min-height: 0;
    padding: 8vh 0;
  }

  .physics__beat--copv {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
  }

  .copv img {
    aspect-ratio: 16 / 10;
  }

  .force__row {
    grid-template-columns: minmax(0, 1fr) 7ch;
  }

  .force__label {
    grid-column: 1 / -1;
  }

  .force__scale {
    margin: 0 calc(7ch + 18px) 0 0;
  }

  .configs__grid,
  .specs {
    grid-template-columns: minmax(0, 1fr);
  }

  .race__lane {
    grid-template-columns: minmax(0, 1fr) 10ch;
  }

  .race__name {
    grid-column: 1 / -1;
  }

  .interior__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 7vh 0;
  }

  .interior__grid > .interior__photo,
  .interior__grid > .interior__text {
    grid-column: 1;
  }

  .interior__wide img {
    height: 70vh;
  }

  .reel__card {
    width: 84vw;
  }

  .reel__card--title {
    width: 70vw;
  }
}

@media (max-aspect-ratio: 4 / 5) {
  .hero__copy {
    right: var(--pad);
    bottom: calc(8vh + var(--toolbar));
  }

  .legacy__year {
    top: 24%;
    right: auto;
    left: var(--pad);
  }

  .legacy__beat {
    align-content: end;
    padding-bottom: calc(12vh + var(--toolbar));
  }

  .legacy__scrim {
    background: linear-gradient(0deg, rgb(0 0 0 / 0.9), rgb(0 0 0 / 0.2) 70%);
  }

  .legacy__beat--swap {
    align-content: center;
    padding-bottom: 0;
  }

  .physics__scrim {
    background: rgb(0 0 0 / 0.72);
  }

  .launch__canvas,
  .launch__poster,
  .track__video {
    top: 50%;
    bottom: auto;
    height: auto;
    aspect-ratio: 1;
    transform: translateY(-50%);
    -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent);
    mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent);
  }

  .hud__speed {
    top: 16vh;
  }

  .hud__clock {
    bottom: calc(16vh + var(--toolbar));
  }

  .track__copy {
    max-width: none;
    right: var(--pad);
    top: 86px;
  }

  /* Sit the square cut below the copy so the caption never lands on the car. */
  .track__video {
    top: 60%;
  }

  .track__title {
    font-size: clamp(36px, 10vw, 64px);
  }

  .modes {
    top: auto;
    bottom: calc(7vh + var(--toolbar));
    left: var(--pad);
    right: var(--pad);
    display: flex;
    justify-content: space-between;
    transform: none;
  }

  .modes li {
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .modes li::after {
    transform-origin: 0 50%;
  }

  .beyond__scrim {
    background: linear-gradient(0deg, rgb(0 0 0 / 0.85), transparent 55%);
  }

  .beyond__beat {
    align-content: end;
    max-width: none;
    padding-bottom: calc(10vh + var(--toolbar));
  }

  .beyond__title,
  .beyond__invert {
    font-size: clamp(40px, 11vw, 76px);
  }

  .film__video {
    aspect-ratio: 4 / 5;
  }

  .reel__card img {
    aspect-ratio: 4 / 5;
  }

  .reel__card {
    width: 78vw;
  }

  .hero__scrim {
    background: linear-gradient(0deg, rgb(206 206 204 / 0.96), rgb(206 206 204 / 0.86) 42%, rgb(206 206 204 / 0) 72%);
  }
}

/* Print ---------------------------------------------------------------------- */

@media print {
  html {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  :is(.bar, .taillight, .skip, .cue, .hud, .stage-black, .film__toggle, .race__again) {
    display: none;
  }

  /* Inline styles are scroll state; print the composed page. */
  [style] {
    opacity: 1 !important;
    transform: none !important;
  }

  .reel {
    height: auto !important;
  }

  .reel__stage {
    overflow: visible;
  }

  .reel__track {
    flex-wrap: wrap;
  }
}

/* Motion preferences --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .cue i,
  .hero__lift,
  .hero__intro {
    animation: none;
  }

  [data-reveal],
  .exterior__frame,
  .exterior__frame img {
    transition-duration: 0.01s;
  }
}
