@font-face {
  font-family: "Press Start 2P";
  src: url("assets/fonts/PressStart2P-Regular.ttf") format("truetype");
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}

:root {
  --ink: #1a2126;
  --ink-deep: #11181c;
  --ink-soft: #263137;
  --paper: #f5ebba;
  --paper-light: #fff7d1;
  --paper-shadow: #b8ab7d;
  --grass: #477a4f;
  --grass-dark: #2e523b;
  --asphalt: #5e6663;
  --asphalt-light: #80857a;
  --red: #bf422e;
  --orange: #f57829;
  --gold: #ffd429;
  --lime: #a8de3d;
  --success: #5cdb73;
  --blue: #7dbad1;
  --border: 3px;
  --page-pad: clamp(1.25rem, 4vw, 4.5rem);
  --content-max: 1240px;
  --font-pixel: "Press Start 2P", "Courier New", monospace;
  --font-body: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  font-kerning: normal;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image: linear-gradient(90deg, color-mix(in srgb, var(--ink) 2%, transparent) 1px, transparent 1px), linear-gradient(color-mix(in srgb, var(--ink) 2%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 88%);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

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

a {
  color: inherit;
}

.site-grain {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: .032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  padding: .75rem 1rem;
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-160%);
  transition: transform 180ms var(--ease-out-expo);
}

.skip-link:focus {
  transform: translateY(0);
}

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

.section-shell {
  width: min(calc(100% - (var(--page-pad) * 2)), var(--content-max));
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 50;
  border-bottom: 2px solid color-mix(in srgb, var(--ink) 14%, transparent);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - (var(--page-pad) * 2)), 1360px);
  min-height: 84px;
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 42px;
  height: 42px;
  border: 2px solid var(--ink);
  border-radius: 9px;
  background: var(--ink);
  box-shadow: 3px 3px 0 var(--red);
  image-rendering: pixelated;
  object-fit: cover;
}

.brand-name {
  font-family: var(--font-pixel);
  font-size: .88rem;
  line-height: 1;
  letter-spacing: -.08em;
}

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

.site-menu {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.5rem);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.site-menu a {
  position: relative;
  text-decoration: none;
}

.site-menu a:not(.nav-cta)::after {
  position: absolute;
  right: 0;
  bottom: -.45rem;
  left: 0;
  height: 2px;
  background: var(--red);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms var(--ease-out-expo);
}

.site-menu a:not(.nav-cta):hover::after,
.site-menu a:not(.nav-cta):focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .7rem 1rem;
  color: var(--paper);
  background: var(--ink);
  box-shadow: 4px 4px 0 var(--red);
  transition: transform 150ms var(--ease-out-quart), box-shadow 150ms var(--ease-out-quart), background-color 150ms ease;
}

.nav-cta:hover {
  background: var(--red);
  box-shadow: 3px 3px 0 var(--ink);
  transform: translate(1px, 1px);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: .6rem;
  min-height: 44px;
  padding: .5rem 0 .5rem .75rem;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.menu-icon {
  display: grid;
  gap: 4px;
}

.menu-icon i {
  display: block;
  width: 22px;
  height: 3px;
  background: var(--ink);
  transition: transform 180ms ease;
}

.menu-toggle[aria-expanded="true"] .menu-icon i:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-icon i:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: 0 0 1.5rem;
  color: var(--red);
  font-family: var(--font-pixel);
  font-size: .58rem;
  line-height: 1.7;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 9px;
  height: 9px;
  background: var(--red);
  box-shadow: 3px 3px 0 var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(520px, 1.15fr);
  gap: clamp(2rem, 6vw, 7.5rem);
  align-items: center;
  min-height: min(820px, calc(100vh - 84px));
  padding-top: clamp(4rem, 8vw, 7.5rem);
  padding-bottom: clamp(4.5rem, 9vw, 9rem);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero h1,
.section-intro h2,
.circuits-copy h2,
.garage-header h2,
.finish-copy h2 {
  margin: 0;
  font-family: var(--font-pixel);
  font-weight: 400;
  letter-spacing: -.09em;
  text-wrap: balance;
}

.hero h1 {
  max-width: 10ch;
  font-size: clamp(2.9rem, 6.1vw, 6.35rem);
  line-height: 1.22;
}

.hero h1 span {
  color: var(--red);
  text-shadow: 5px 5px 0 var(--paper-shadow);
}

.hero-lede {
  max-width: 48ch;
  margin: clamp(1.6rem, 3vw, 2.4rem) 0 0;
  color: color-mix(in srgb, var(--ink) 80%, var(--paper));
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  font-weight: 650;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem 2rem;
  margin-top: 2.25rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  min-height: 52px;
  padding: .8rem 1.25rem;
  border: var(--border) solid var(--ink);
  border-radius: 2px;
  color: var(--ink);
  background: var(--paper-light);
  cursor: pointer;
  font-family: var(--font-pixel);
  font-size: .63rem;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 150ms var(--ease-out-quart), box-shadow 150ms var(--ease-out-quart), background-color 150ms ease, color 150ms ease;
}

.button:hover {
  color: var(--paper-light);
  background: var(--red);
  box-shadow: 2px 2px 0 var(--ink);
  transform: translate(2px, 2px);
}

.button:active {
  box-shadow: 0 0 0 var(--ink);
  transform: translate(4px, 4px);
}

.button-primary {
  color: var(--paper-light);
  background: var(--red);
}

.button-primary:hover {
  color: var(--ink);
  background: var(--gold);
}

.button-small {
  min-height: 46px;
  padding: .65rem 1rem;
  font-size: .55rem;
}

.button-quiet {
  min-height: 40px;
  padding: .4rem .6rem;
  border-color: transparent;
  color: var(--paper-shadow);
  background: transparent;
  box-shadow: none;
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 800;
  text-transform: none;
}

.button-quiet:hover {
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  transform: none;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.text-link {
  min-height: 44px;
  padding-block: .6rem;
  color: var(--ink);
  font-size: .78rem;
  font-weight: 800;
  text-underline-offset: .35rem;
  text-decoration-thickness: 2px;
}

.text-link:hover {
  color: var(--red);
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem clamp(1.5rem, 3vw, 2.7rem);
  margin: clamp(3rem, 6vw, 5rem) 0 0;
  padding-top: 1.2rem;
  border-top: 2px solid color-mix(in srgb, var(--ink) 20%, transparent);
}

.hero-facts div {
  display: grid;
  gap: .25rem;
}

.hero-facts dt {
  color: var(--red);
  font-family: var(--font-pixel);
  font-size: 1.15rem;
}

.hero-facts dd {
  max-width: 10ch;
  margin: 0;
  color: color-mix(in srgb, var(--ink) 72%, var(--paper));
  font-size: .69rem;
  font-weight: 750;
  line-height: 1.35;
  text-transform: uppercase;
}

.hero-demo-wrap {
  position: relative;
  min-width: 0;
}

.arcade-card {
  position: relative;
  padding: 12px;
  border: 3px solid var(--ink);
  background: var(--ink);
  box-shadow: 10px 10px 0 var(--red);
  transform: rotate(1.2deg);
}

.arcade-card::before,
.arcade-card::after {
  position: absolute;
  z-index: -1;
  content: "";
  background: var(--paper-shadow);
}

.arcade-card::before {
  top: -10px;
  right: 16%;
  width: 72px;
  height: 10px;
}

.arcade-card::after {
  bottom: -18px;
  left: 8%;
  width: 44px;
  height: 10px;
}

.arcade-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 4px 4px 10px;
  color: var(--paper);
  font-family: var(--font-pixel);
  font-size: .47rem;
  letter-spacing: .04em;
}

.arcade-status {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--success);
}

.arcade-status i {
  width: 7px;
  height: 7px;
  background: var(--success);
  box-shadow: 2px 2px 0 color-mix(in srgb, var(--success) 35%, var(--ink));
}

.arcade-mode {
  color: var(--paper-shadow);
}

.race-screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 4px solid var(--paper-shadow);
  background: var(--grass);
  isolation: isolate;
}

.race-screen::before,
.race-screen::after {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  content: "";
}

.race-screen::before {
  inset: 0;
  border: 4px solid color-mix(in srgb, var(--paper) 50%, transparent);
  mix-blend-mode: screen;
}

.race-screen::after {
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, color-mix(in srgb, var(--ink) 18%, transparent) 100%);
  pointer-events: none;
}

.theme-background {
  position: absolute;
}

.race-map {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
}

.screen-tint {
  fill: var(--grass);
  opacity: .18;
  mix-blend-mode: multiply;
}

.race-screen[data-theme="canyon"] .screen-tint {
  fill: #695746;
}

.race-screen[data-theme="city"] .screen-tint {
  fill: #1d2b32;
}

.track-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.track-outline {
  stroke: var(--ink);
  stroke-width: 82;
}

.track-road {
  stroke: var(--asphalt);
  stroke-width: 68;
}

.track-center {
  stroke: color-mix(in srgb, var(--asphalt-light) 70%, var(--paper));
  stroke-width: 3;
  stroke-dasharray: 14 20;
  opacity: .85;
}

.ghost-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 3 15;
  opacity: .88;
  pointer-events: none;
}

.drawn-line {
  fill: none;
  stroke: var(--gold);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(2px 2px 0 var(--ink));
  pointer-events: none;
}

.start-grid rect:nth-child(odd) {
  fill: var(--paper);
}

.start-grid rect:nth-child(even) {
  fill: var(--ink);
}

.apex-markers circle {
  fill: var(--gold);
  stroke: var(--ink);
  stroke-width: 3;
}

.race-car {
  transform-box: fill-box;
  transform-origin: center;
  pointer-events: none;
}

.race-car image {
  image-rendering: pixelated;
  filter: drop-shadow(3px 3px 0 var(--ink));
}

.map-annotation path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3;
  stroke-linecap: square;
}

.map-annotation text {
  fill: var(--paper-light);
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: .08em;
}

.screen-hud,
.screen-label,
.screen-footer {
  position: absolute;
  z-index: 4;
  color: var(--paper-light);
  font-family: var(--font-pixel);
  pointer-events: none;
  text-shadow: 3px 3px 0 var(--ink);
}

.screen-hud {
  top: 15px;
  display: grid;
  gap: .35rem;
}

.screen-hud-left {
  left: 16px;
}

.screen-hud-right {
  right: 16px;
  text-align: right;
}

.hud-label {
  color: var(--gold);
  font-size: .44rem;
}

.screen-hud strong {
  font-size: .7rem;
  font-weight: 400;
}

.screen-label {
  top: 16px;
  left: 50%;
  font-size: .43rem;
  transform: translateX(-50%);
  white-space: nowrap;
}

.screen-footer {
  right: 14px;
  bottom: 11px;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  color: var(--paper-light);
  font-size: .42rem;
}

.screen-dot {
  flex: 1;
  height: 2px;
  background: color-mix(in srgb, var(--paper) 65%, transparent);
}

.screen-corners i {
  position: absolute;
  z-index: 5;
  width: 12px;
  height: 12px;
  border-color: var(--gold);
  pointer-events: none;
}

.screen-corners i:nth-child(1) { top: 8px; left: 8px; border-top: 2px solid; border-left: 2px solid; }
.screen-corners i:nth-child(2) { top: 8px; right: 8px; border-top: 2px solid; border-right: 2px solid; }
.screen-corners i:nth-child(3) { right: 8px; bottom: 8px; border-right: 2px solid; border-bottom: 2px solid; }
.screen-corners i:nth-child(4) { bottom: 8px; left: 8px; border-bottom: 2px solid; border-left: 2px solid; }

.demo-panel {
  padding: 16px 6px 4px;
  color: var(--paper);
}

.demo-panel-topline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 13px;
}

.panel-label,
.control-label {
  color: var(--gold);
  font-family: var(--font-pixel);
  font-size: .45rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.demo-status {
  color: var(--paper-shadow);
  font-size: .68rem;
  font-weight: 700;
  text-align: right;
}

.demo-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--paper) 22%, transparent);
}

.control-group {
  display: grid;
  gap: 8px;
}

.segmented-control {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.segment {
  min-height: 34px;
  padding: .42rem .55rem;
  border: 1px solid color-mix(in srgb, var(--paper) 35%, transparent);
  color: var(--paper-shadow);
  background: transparent;
  cursor: pointer;
  font-size: .66rem;
  font-weight: 800;
  line-height: 1.2;
  transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.segment:hover,
.segment.is-active {
  border-color: var(--gold);
  color: var(--ink);
  background: var(--gold);
}

.demo-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 14px;
}

.demo-note {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 1.5rem 0 0;
  color: color-mix(in srgb, var(--ink) 68%, var(--paper));
  font-size: .7rem;
  font-weight: 700;
}

.demo-note span {
  color: var(--red);
  font-size: 1rem;
}

.hero-demo-wrap::after {
  position: absolute;
  right: -8%;
  bottom: -40px;
  width: 31%;
  height: 18px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 18px, var(--paper-light) 18px 36px);
  box-shadow: 5px 5px 0 var(--paper-shadow);
  content: "";
  transform: skewX(-34deg);
}

.loop-section {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(500px, 1.2fr);
  gap: clamp(3rem, 9vw, 10rem);
  padding-top: clamp(5rem, 12vw, 11rem);
  padding-bottom: clamp(5rem, 12vw, 11rem);
}

.section-intro h2,
.circuits-copy h2,
.garage-header h2 {
  font-size: clamp(2rem, 4.2vw, 4.15rem);
  line-height: 1.28;
}

.section-intro > p:last-child,
.circuits-copy > p:last-of-type,
.garage-header > p:last-child {
  max-width: 43ch;
  margin: 1.8rem 0 0;
  color: color-mix(in srgb, var(--ink) 72%, var(--paper));
  font-size: .98rem;
  font-weight: 650;
  line-height: 1.75;
}

.steps-list {
  position: relative;
  display: grid;
  gap: 1.25rem;
}

.steps-list::before {
  position: absolute;
  top: 42px;
  bottom: 42px;
  left: 34px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--paper-shadow) 0 10px, transparent 10px 18px);
  content: "";
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 68px minmax(150px, .65fr) minmax(230px, 1fr);
  gap: 1.3rem;
  align-items: center;
  min-height: 168px;
  padding: 1rem 0;
}

.step-number {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 3px solid var(--ink);
  color: var(--paper);
  background: var(--red);
  font-family: var(--font-pixel);
  font-size: .7rem;
  box-shadow: 4px 4px 0 var(--ink);
}

.step:nth-child(2) .step-number {
  color: var(--ink);
  background: var(--gold);
}

.step:nth-child(3) .step-number {
  color: var(--ink);
  background: var(--success);
}

.step-visual {
  display: grid;
  position: relative;
  align-items: center;
  min-height: 130px;
  overflow: hidden;
  border: 2px solid var(--ink);
  background: color-mix(in srgb, var(--paper-light) 55%, var(--paper));
}

.step-visual-draw svg {
  width: 100%;
  height: auto;
  padding: .5rem;
}

.mini-track,
.mini-line,
.mini-arrow {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mini-track {
  stroke: var(--ink);
  stroke-width: 36;
}

.mini-line {
  stroke: var(--gold);
  stroke-width: 5;
  stroke-dasharray: 1 11;
}

.mini-start {
  fill: var(--red);
  stroke: var(--ink);
  stroke-width: 3;
}

.mini-arrow {
  stroke: var(--red);
  stroke-width: 3;
}

.step-visual-run {
  background: var(--grass);
  isolation: isolate;
}

.step-visual-run::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("assets/backgrounds/meadow.png") center / cover;
  content: "";
  opacity: .7;
}

.step-visual-run img {
  width: 82%;
  height: auto;
  margin: auto;
  image-rendering: pixelated;
  transform: rotate(-8deg);
  filter: drop-shadow(4px 4px 0 var(--ink));
}

.mini-telemetry {
  position: absolute;
  top: 10px;
  right: 10px;
  left: 10px;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  color: var(--paper-light);
  font-family: var(--font-pixel);
  font-size: .42rem;
  text-shadow: 2px 2px 0 var(--ink);
}

.mini-telemetry i {
  width: 7px;
  height: 7px;
  background: var(--success);
  box-shadow: 2px 2px 0 var(--ink);
}

.speed-mark {
  position: absolute;
  color: var(--gold);
  font-family: var(--font-pixel);
  font-size: .55rem;
  text-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-10deg);
}

.speed-mark-one { top: 42px; left: 18px; }
.speed-mark-two { right: 18px; bottom: 30px; color: var(--success); transform: rotate(8deg); }

.step-visual-repeat {
  align-content: center;
  justify-items: center;
  gap: .4rem;
  color: var(--ink);
  background: var(--success);
  text-align: center;
}

.repeat-time {
  font-family: var(--font-pixel);
  font-size: clamp(.85rem, 2vw, 1.2rem);
}

.repeat-label {
  color: color-mix(in srgb, var(--ink) 72%, var(--success));
  font-family: var(--font-pixel);
  font-size: .42rem;
}

.medal-row {
  display: flex;
  gap: .35rem;
  margin-top: .35rem;
}

.medal-row i {
  width: 14px;
  height: 14px;
  border: 2px solid var(--ink);
  background: var(--paper-shadow);
  transform: rotate(45deg);
}

.medal-row i.is-gold {
  background: var(--gold);
}

.repeat-arrow {
  position: absolute;
  right: 12px;
  bottom: 8px;
  font-size: 2.5rem;
  line-height: 1;
}

.step-copy h3 {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: clamp(.85rem, 1.7vw, 1.1rem);
  font-weight: 400;
  line-height: 1.5;
  text-transform: uppercase;
}

.step-copy p {
  max-width: 34ch;
  margin: .85rem 0 0;
  color: color-mix(in srgb, var(--ink) 70%, var(--paper));
  font-size: .78rem;
  font-weight: 650;
  line-height: 1.65;
}

.circuits-section {
  padding: clamp(5rem, 10vw, 9rem) 0;
  color: var(--paper);
  background: var(--ink);
  overflow: hidden;
}

.circuits-shell {
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(460px, 1.18fr);
  gap: clamp(2.5rem, 8vw, 8rem);
  align-items: center;
}

.circuits-copy .eyebrow {
  color: var(--gold);
}

.circuits-copy .eyebrow::before {
  background: var(--gold);
}

.circuits-copy h2 {
  color: var(--paper-light);
}

.circuits-copy > p:last-of-type {
  color: color-mix(in srgb, var(--paper) 72%, var(--ink));
}

.world-list {
  display: grid;
  gap: 0;
  margin-top: 2.25rem;
  border-top: 1px solid color-mix(in srgb, var(--paper) 26%, transparent);
}

.world-tab {
  display: grid;
  grid-template-columns: 36px minmax(80px, 1fr) auto 24px;
  gap: .6rem;
  align-items: center;
  min-height: 62px;
  padding: .5rem 0;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--paper) 26%, transparent);
  color: color-mix(in srgb, var(--paper) 58%, var(--ink));
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.world-tab:hover,
.world-tab.is-active {
  color: var(--paper-light);
}

.world-number {
  color: var(--paper-shadow);
  font-size: .7rem;
  font-weight: 800;
}

.world-tab.is-active .world-number {
  color: var(--gold);
}

.world-name {
  font-family: var(--font-pixel);
  font-size: .72rem;
  text-transform: uppercase;
}

.world-note {
  font-size: .7rem;
  font-weight: 700;
}

.world-arrow {
  color: var(--gold);
  font-size: 1.2rem;
  opacity: 0;
  transform: translate(-5px, 5px);
  transition: opacity 150ms ease, transform 150ms var(--ease-out-quart);
}

.world-tab:hover .world-arrow,
.world-tab.is-active .world-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

.world-window {
  position: relative;
  aspect-ratio: 1.08 / 1;
  min-height: 440px;
  overflow: hidden;
  border: 4px solid var(--paper-shadow);
  background: var(--grass);
  box-shadow: 12px 12px 0 var(--red);
  isolation: isolate;
}

.world-window-top {
  position: absolute;
  top: 16px;
  right: 18px;
  left: 18px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  color: var(--paper-light);
  font-family: var(--font-pixel);
  font-size: .44rem;
  text-shadow: 2px 2px 0 var(--ink);
}

.world-window > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  transition: opacity 200ms ease;
}

.world-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 12%, transparent), color-mix(in srgb, var(--ink) 22%, transparent));
  mix-blend-mode: multiply;
}

.world-map {
  position: absolute;
  inset: 12% 5% 12%;
  z-index: 2;
  width: 90%;
  height: 76%;
}

.world-track-outline,
.world-track-road,
.world-track-center,
.world-ghost {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.world-track-outline { stroke: var(--ink); stroke-width: 60; }
.world-track-road { stroke: var(--asphalt); stroke-width: 48; }
.world-track-center { stroke: var(--asphalt-light); stroke-width: 2; stroke-dasharray: 11 18; }
.world-ghost { stroke: var(--gold); stroke-width: 4; stroke-dasharray: 2 13; }
.world-start { fill: var(--red); stroke: var(--ink); stroke-width: 3; }

.world-window-label {
  position: absolute;
  right: 18px;
  bottom: 16px;
  left: 18px;
  z-index: 3;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  color: var(--paper-light);
  text-shadow: 3px 3px 0 var(--ink);
}

.world-window-label span {
  font-family: var(--font-pixel);
  font-size: clamp(1.2rem, 3vw, 2rem);
  letter-spacing: -.08em;
}

.world-window-label small {
  color: var(--gold);
  font-family: var(--font-pixel);
  font-size: .43rem;
  line-height: 1.6;
  text-align: right;
}

.garage-section {
  padding-top: clamp(5rem, 12vw, 11rem);
  padding-bottom: clamp(5rem, 12vw, 11rem);
}

.garage-header {
  display: grid;
  grid-template-columns: 1fr minmax(260px, .7fr);
  column-gap: 3rem;
  align-items: end;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.garage-header .eyebrow {
  grid-column: 1 / -1;
}

.garage-header h2 {
  max-width: 10ch;
}

.garage-header > p:last-child {
  margin: 0 0 .3rem;
}

.garage-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1.15fr) minmax(320px, .85fr);
  gap: clamp(2.5rem, 8vw, 8rem);
  align-items: center;
}

.garage-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 445px;
  overflow: hidden;
  border: 3px solid var(--ink);
  background: var(--grass);
  box-shadow: 10px 10px 0 var(--paper-shadow);
  isolation: isolate;
}

.garage-stage-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .28;
  background-image: linear-gradient(90deg, var(--grass-dark) 2px, transparent 2px), linear-gradient(var(--grass-dark) 2px, transparent 2px);
  background-size: 32px 32px;
  transform: perspective(400px) rotateX(60deg) scale(1.5) translateY(30%);
  transform-origin: center bottom;
}

.garage-stage::before {
  position: absolute;
  top: 22%;
  left: 9%;
  width: 82%;
  height: 56%;
  border: 2px dashed color-mix(in srgb, var(--paper) 55%, transparent);
  content: "";
  transform: rotate(-7deg);
}

.garage-stage-shadow {
  position: absolute;
  z-index: -1;
  width: 47%;
  height: 24px;
  background: var(--ink);
  opacity: .62;
  transform: translateY(112px) rotate(-8deg);
  filter: blur(1px);
}

.garage-car {
  width: min(82%, 480px);
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(6px 6px 0 var(--ink));
  transition: opacity 160ms ease, transform 240ms var(--ease-out-expo);
}

.garage-stage.is-switching .garage-car {
  opacity: 0;
  transform: scale(.95) rotate(-4deg);
}

.garage-bay-label,
.garage-rotate {
  position: absolute;
  color: var(--paper-light);
  font-family: var(--font-pixel);
  font-size: .45rem;
  text-shadow: 2px 2px 0 var(--ink);
}

.garage-bay-label {
  top: 16px;
  left: 18px;
  display: grid;
  gap: .3rem;
}

.garage-bay-label span {
  color: var(--gold);
}

.garage-bay-label strong {
  font-size: .68rem;
  font-weight: 400;
}

.garage-rotate {
  right: 18px;
  bottom: 16px;
  color: var(--paper);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.garage-info {
  min-width: 0;
}

.garage-tabs {
  display: flex;
  gap: 1.5rem;
  border-bottom: 2px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

.garage-tab {
  position: relative;
  min-height: 48px;
  padding: .45rem 0;
  border: 0;
  color: color-mix(in srgb, var(--ink) 52%, var(--paper));
  background: transparent;
  cursor: pointer;
  font-family: var(--font-pixel);
  font-size: .55rem;
}

.garage-tab::after {
  position: absolute;
  right: 0;
  bottom: -2px;
  left: 0;
  height: 4px;
  background: var(--red);
  content: "";
  transform: scaleX(0);
  transition: transform 150ms var(--ease-out-quart);
}

.garage-tab:hover,
.garage-tab.is-active {
  color: var(--ink);
}

.garage-tab.is-active::after {
  transform: scaleX(1);
}

.garage-copy {
  padding: 2.4rem 0 2rem;
}

.garage-class {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: var(--red);
  font-family: var(--font-pixel);
  font-size: .48rem;
}

.garage-led {
  width: 8px;
  height: 8px;
  background: var(--success);
  box-shadow: 2px 2px 0 var(--ink);
}

.garage-copy h3 {
  margin: .8rem 0 0;
  font-family: var(--font-pixel);
  font-size: clamp(1.7rem, 3.5vw, 3rem);
  font-weight: 400;
  letter-spacing: -.09em;
  text-transform: uppercase;
}

.garage-copy p {
  max-width: 38ch;
  margin: 1.2rem 0 0;
  color: color-mix(in srgb, var(--ink) 72%, var(--paper));
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.75;
}

.specs {
  display: grid;
  gap: 1.1rem;
  margin: 0;
  padding: 1.35rem 0;
  border-top: 2px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-bottom: 2px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

.spec-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1rem;
  align-items: center;
}

.spec-row dt {
  color: color-mix(in srgb, var(--ink) 68%, var(--paper));
  font-family: var(--font-pixel);
  font-size: .46rem;
}

.spec-row dd {
  display: grid;
  grid-template-columns: 1fr 25px;
  gap: .7rem;
  align-items: center;
  margin: 0;
}

.spec-row dd > span {
  height: 9px;
  overflow: hidden;
  border: 2px solid var(--ink);
  background: var(--paper-shadow);
}

.spec-row dd i {
  display: block;
  height: 100%;
  background: var(--red);
  transition: width 260ms var(--ease-out-expo);
}

.spec-row dd strong {
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
}

.garage-footnote {
  display: flex;
  gap: .65rem;
  align-items: center;
  margin: 1.5rem 0 0;
  color: color-mix(in srgb, var(--ink) 58%, var(--paper));
  font-size: .7rem;
  font-weight: 750;
}

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

.finish-section {
  position: relative;
  overflow: hidden;
  color: var(--paper-light);
  background: var(--ink);
}

.finish-checkers {
  height: 18px;
  background: repeating-conic-gradient(var(--paper-light) 0 25%, var(--red) 0 50%) 0 / 36px 36px;
}

.finish-inner {
  display: grid;
  grid-template-columns: minmax(150px, .45fr) minmax(320px, 1fr);
  gap: clamp(2rem, 10vw, 11rem);
  align-items: center;
  padding-top: clamp(5rem, 10vw, 9rem);
  padding-bottom: clamp(5rem, 10vw, 9rem);
}

.finish-stamp {
  display: grid;
  place-items: center;
  width: clamp(150px, 18vw, 230px);
  height: clamp(150px, 18vw, 230px);
  border: 4px solid var(--gold);
  outline: 2px solid var(--gold);
  outline-offset: -13px;
  color: var(--gold);
  font-family: var(--font-pixel);
  font-size: .55rem;
  line-height: 1.9;
  text-align: center;
  transform: rotate(-9deg);
}

.finish-stamp strong {
  color: var(--paper-light);
  font-size: clamp(1.2rem, 3vw, 2.2rem);
  font-weight: 400;
}

.eyebrow-light {
  color: var(--gold);
}

.finish-copy h2 {
  max-width: 11ch;
  font-size: clamp(2.2rem, 5.5vw, 5.25rem);
  line-height: 1.25;
}

.finish-copy > p:not(.eyebrow) {
  max-width: 42ch;
  margin: 1.8rem 0 2.25rem;
  color: color-mix(in srgb, var(--paper) 76%, var(--ink));
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.75;
}

.button-light {
  color: var(--ink);
  background: var(--gold);
  border-color: var(--paper-light);
  box-shadow: 4px 4px 0 var(--paper-light);
}

.button-light:hover {
  color: var(--ink);
  background: var(--paper-light);
  box-shadow: 2px 2px 0 var(--gold);
}

.site-footer {
  color: var(--paper);
  background: var(--ink-deep);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 2rem 4rem;
  align-items: center;
  min-height: 190px;
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.footer-brand {
  color: var(--paper-light);
}

.footer-brand img {
  width: 32px;
  height: 32px;
}

.footer-note,
.footer-copyright {
  margin: 0;
  color: var(--paper-shadow);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.7;
}

.footer-links {
  display: grid;
  gap: .5rem;
  justify-items: end;
  font-size: .72rem;
  font-weight: 800;
}

.footer-links a {
  min-height: 32px;
  color: var(--paper);
  text-underline-offset: .25rem;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-copyright {
  grid-column: 1 / -1;
  padding-top: 1rem;
  border-top: 1px solid color-mix(in srgb, var(--paper) 16%, transparent);
  font-size: .62rem;
}

.noscript-note {
  padding: 1rem;
  color: var(--paper-light);
  background: var(--red);
  font-size: .9rem;
  font-weight: 700;
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 650ms var(--ease-out-expo), transform 650ms var(--ease-out-expo);
}

.reveal-delay-1 { transition-delay: 90ms; }
.reveal-delay-2 { transition-delay: 180ms; }

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: minmax(280px, .8fr) minmax(440px, 1.2fr);
    gap: 3rem;
  }

  .arcade-card {
    box-shadow: 7px 7px 0 var(--red);
  }

  .circuits-shell,
  .garage-layout {
    gap: 3rem;
  }
}

@media (max-width: 820px) {
  .nav-wrap {
    min-height: 72px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-menu {
    position: absolute;
    top: 72px;
    right: var(--page-pad);
    left: var(--page-pad);
    display: grid;
    gap: 0;
    padding: .5rem;
    border: 3px solid var(--ink);
    background: var(--paper-light);
    box-shadow: 6px 6px 0 var(--red);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms var(--ease-out-expo), transform 180ms var(--ease-out-expo);
  }

  .site-menu.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-menu a {
    display: flex;
    align-items: center;
    min-height: 50px;
    padding: .7rem .8rem;
  }

  .site-menu a:not(.nav-cta)::after {
    right: .8rem;
    bottom: 6px;
    left: .8rem;
  }

  .nav-cta {
    margin-top: .3rem;
    color: var(--paper-light);
    background: var(--red);
    box-shadow: none;
  }

  .hero,
  .loop-section,
  .circuits-shell,
  .garage-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    gap: 4.5rem;
    padding-top: 5rem;
  }

  .hero-copy {
    max-width: 700px;
  }

  .hero h1 {
    max-width: 12ch;
  }

  .hero-demo-wrap {
    width: min(100%, 740px);
    margin-inline: auto;
  }

  .loop-section {
    gap: 3.5rem;
  }

  .section-intro > p:last-child {
    max-width: 52ch;
  }

  .circuits-copy {
    max-width: 680px;
  }

  .world-window {
    width: min(100%, 720px);
    min-height: 0;
    margin-inline: auto;
  }

  .garage-header {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .garage-header > p:last-child {
    margin: 0;
  }

  .garage-stage {
    width: min(100%, 720px);
    margin-inline: auto;
  }

  .finish-inner {
    grid-template-columns: 150px 1fr;
    gap: clamp(2rem, 7vw, 5rem);
  }
}

@media (max-width: 620px) {
  .brand-name {
    font-size: .72rem;
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .hero {
    gap: 3.5rem;
    padding-top: 3.5rem;
    padding-bottom: 5.5rem;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 12vw, 4rem);
  }

  .hero-lede {
    font-size: .95rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    gap: .8rem;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-actions .text-link {
    text-align: center;
  }

  .hero-facts {
    gap: 1.2rem;
    justify-content: space-between;
  }

  .hero-facts dt {
    font-size: .96rem;
  }

  .hero-facts dd {
    font-size: .58rem;
  }

  .arcade-card {
    padding: 8px;
    transform: rotate(0);
  }

  .arcade-header {
    padding-bottom: 8px;
    font-size: .4rem;
  }

  .race-screen {
    border-width: 3px;
  }

  .screen-hud {
    top: 10px;
  }

  .screen-hud-left { left: 11px; }
  .screen-hud-right { right: 11px; }
  .screen-label { top: 11px; font-size: .35rem; }
  .screen-footer { right: 9px; bottom: 8px; left: 9px; font-size: .33rem; }
  .map-annotation { display: none; }

  .demo-panel {
    padding-top: 13px;
  }

  .demo-panel-topline {
    display: grid;
    gap: .45rem;
  }

  .demo-status {
    text-align: left;
  }

  .demo-controls {
    grid-template-columns: 1fr;
  }

  .demo-actions {
    justify-content: space-between;
  }

  .steps-list::before {
    left: 25px;
  }

  .step {
    grid-template-columns: 50px 1fr;
    gap: .8rem;
    align-items: start;
  }

  .step-number {
    width: 50px;
    height: 50px;
    font-size: .52rem;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .step-visual,
  .step-copy {
    grid-column: 2;
  }

  .step-visual {
    min-height: 120px;
  }

  .step-copy h3 {
    font-size: .8rem;
  }

  .step-copy p {
    font-size: .75rem;
  }

  .world-tab {
    grid-template-columns: 30px minmax(80px, 1fr) auto 20px;
  }

  .world-note {
    font-size: .6rem;
  }

  .world-window {
    box-shadow: 6px 6px 0 var(--red);
  }

  .world-window-label {
    display: grid;
    gap: .4rem;
  }

  .world-window-label small {
    text-align: left;
  }

  .garage-stage {
    min-height: 300px;
  }

  .garage-bay-label,
  .garage-rotate {
    font-size: .38rem;
  }

  .garage-tabs {
    gap: 1rem;
  }

  .garage-tab {
    font-size: .48rem;
  }

  .spec-row {
    grid-template-columns: 88px 1fr;
    gap: .7rem;
  }

  .finish-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .finish-stamp {
    width: 145px;
    height: 145px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.7rem;
  }

  .footer-note {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .footer-links {
    justify-items: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
