:root {
  --bg: #0b0a09;
  --bg-2: #141311;
  --fg: #f2ede4;
  --soft: rgba(242, 237, 228, 0.84);   /* reading text */
  --muted: rgba(242, 237, 228, 0.66);  /* labels, captions */
  --line: rgba(242, 237, 228, 0.16);
  --gold: #e3a10a;
  --gold-hi: #ffdc3c;
  --gold-grad: linear-gradient(180deg, #fff7c4 0%, #ffdc3c 25%, #e3a10a 55%, #ffe15a 78%, #9a6409 100%);
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: 36px;
  --edge: max(var(--pad), calc((100vw - 1760px) / 2));
  --nav-h: 54px;
  /* type roles: body copy, small copy, labels on things you press, tags/captions */
  --t-body: 16px;
  --t-small: 14px;
  --t-label: 12px;
  --t-meta: 11px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); scroll-snap-type: y mandatory; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
body.locked, html.locked { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
em { font-style: italic; }
ol, ul { list-style: none; }

.label {
  font-family: var(--mono); font-size: var(--t-meta); font-weight: 400;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); line-height: 1.5;
}

/* ---------- canvas + overlays ---------- */
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
body.hover-frame #gl { cursor: pointer; }
.grain {
  position: fixed; inset: -50%; pointer-events: none; z-index: 40; opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.8s steps(5) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-5%, 3%); }
  40% { transform: translate(4%, -6%); } 60% { transform: translate(-3%, 5%); }
  80% { transform: translate(6%, 2%); } 100% { transform: translate(0, 0); }
}
/* ---------- keyboard + screen reader ---------- */
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(227, 161, 10, 0.4); color: var(--fg); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip {
  position: fixed; left: var(--pad); top: 12px; z-index: 200;
  padding: 12px 18px; border-radius: 999px; background: var(--gold-grad); color: #120d02;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  transform: translateY(-160%); transition: transform 0.3s var(--ease-out);
}
.skip:focus-visible { transform: none; outline-offset: 4px; }
h1[tabindex], h2[tabindex] { outline: none; } /* focused by script when you jump to a section */

.fade { position: fixed; inset: 0; z-index: 90; background: #000; opacity: 0; pointer-events: none; transition: opacity 0.6s; }
.fade.quick { transition: opacity 0.16s; }
.fade.on { opacity: 1; pointer-events: auto; }

/* ---------- loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: grid; place-items: center; clip-path: inset(0 0 0 0);
  transition: clip-path 1.2s var(--ease);
}
body.loaded #loader { clip-path: inset(0 0 100% 0); pointer-events: none; }
.loader-inner { display: grid; justify-items: center; gap: 22px; }
.loader-logo { width: 84px; opacity: 0.9; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; transform: scale(0.96); } }
.loader-count { font-family: var(--serif); font-size: 64px; line-height: 1; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 10px; }
.loader-unit { font-family: var(--mono); font-size: 13px; letter-spacing: 0.16em; color: var(--gold-hi); }
.loader-bar { width: 180px; height: 1px; background: var(--line); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 100%; background: var(--gold-grad); transform-origin: left; transform: scaleX(0); }

/* ---------- top bar ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; justify-content: space-between; align-items: center;
  padding: 26px var(--edge); pointer-events: none;
}
.top > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { width: 42px; height: 42px; transition: transform 0.8s var(--ease-out); }
.brand:hover img { transform: rotate(-12deg) scale(1.06); }
.brand .label { color: var(--fg); font-size: var(--t-meta); }
.top-link { font-size: var(--t-label); padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--fg); transition: border-color 0.3s; }
.top-link:hover { border-color: var(--gold); }
.top-link i { font-style: normal; color: var(--gold); }
body.driving .top, body.picking .top { opacity: 0; pointer-events: none; }

/* ---------- scroll stops ---------- */
.stops { position: relative; z-index: 1; pointer-events: none; }
.stop { height: 100vh; height: 100svh; scroll-snap-align: start; }

/* ---------- copy blocks (fixed, fade with the camera) ---------- */
.copy {
  position: fixed; left: var(--edge); bottom: calc(var(--nav-h) + 6vh); z-index: 10;
  width: min(560px, calc(100vw - 2 * var(--pad)));
  opacity: 0; visibility: hidden; transform: translateY(24px);
  transition: opacity 0.5s, transform 0.8s var(--ease-out), visibility 0s 0.5s;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
}
.copy.on { opacity: 1; visibility: visible; transform: none; transition: opacity 0.7s 0.15s, transform 1s var(--ease-out) 0.15s, visibility 0s; }
body.driving .copy, body.picking .copy, body.panel-open .copy { opacity: 0; visibility: hidden; }
.copy::before {
  /* soft dark wash so the text reads over the 3D scene */
  content: ''; position: absolute; inset: -140px -180px -60px calc(-1 * var(--edge)); z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 7, 6, 0.92), rgba(8, 7, 6, 0.78) 55%, rgba(8, 7, 6, 0));
  -webkit-mask-image: linear-gradient(transparent, #000 120px, #000 calc(100% - 30px), transparent);
  mask-image: linear-gradient(transparent, #000 120px, #000 calc(100% - 30px), transparent);
}
.kicker { color: var(--fg); }
.kicker .num { color: var(--gold-hi); margin-right: 8px; }
.copy h1, .copy h2, .picker h2 {
  font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em;
  line-height: 0.95; margin: 14px 0 20px; text-wrap: balance;
}
.copy h1 { font-size: clamp(50px, 6.4vw, 112px); white-space: nowrap; }
.copy h2, .picker h2 { font-size: clamp(44px, 5vw, 84px); }
.copy em, .picker h2 em, .panel-title em {
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.08em;
  text-shadow: none;
}
.sub { font-size: var(--t-body); line-height: 1.6; color: var(--soft); max-width: 30em; text-wrap: pretty; }
.hint { margin-top: 26px; display: flex; align-items: center; gap: 12px; }
.hint i { width: 40px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.hint i::after { content: ''; position: absolute; inset: 0; width: 40%; background: var(--gold); animation: slide 1.8s var(--ease) infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.copy:not(.on) .hint i::after { animation-play-state: paused; }

.strengths { border-top: 1px solid var(--line); }
.strengths li { border-bottom: 1px solid var(--line); }
.strengths button {
  width: 100%; display: grid; grid-template-columns: 34px 1fr auto; align-items: baseline; gap: 10px;
  padding: 13px 0; text-align: left; transition: color 0.3s;
}
.strengths .n { font-family: var(--mono); font-size: 11px; color: var(--gold-hi); letter-spacing: 0.1em; }
.strengths .t { font-family: var(--serif); font-size: 28px; line-height: 1.1; }
.strengths .r { font-family: var(--mono); font-size: var(--t-meta); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.strengths .t { display: inline-block; transition: transform 0.4s var(--ease-out), color 0.3s; }
.strengths button:hover .t, .strengths button.hot .t { transform: translateX(8px); }
.strengths button:hover .t, .strengths button.hot .t { color: var(--gold-hi); }

.certs { margin-top: 26px; }
.certs ul { margin-top: 10px; border-top: 1px solid var(--line); }
.certs li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cert-name { font-family: var(--serif); font-size: 22px; line-height: 1.2; transition: color 0.3s; }
.cert-name i { font-style: normal; font-size: 0.7em; color: var(--gold); }
.cert-name:hover { color: var(--gold-hi); }
.certs li .label { color: var(--gold-hi); text-align: right; }

.mail-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 22px; }
.mail { font-family: var(--serif); font-style: italic; font-size: clamp(26px, 2.6vw, 38px); border-bottom: 1px solid var(--line); padding-bottom: 4px; transition: color 0.3s, border-color 0.3s; }
.mail:hover { color: var(--gold-hi); border-color: var(--gold); }
.copy-btn {
  font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.14em; text-transform: uppercase;
  padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted);
  transition: color 0.3s, border-color 0.3s, background 0.3s; text-shadow: none;
}
.copy-btn:hover { color: var(--fg); border-color: var(--gold); }
.copy-btn.copied { color: var(--bg); background: var(--gold-hi); border-color: var(--gold-hi); }
.loc { margin-top: 12px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.play { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.play .spin { margin-top: 0; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.14em; text-transform: uppercase;
  padding: 12px 18px; border-radius: 999px; text-shadow: none;
  transition: border-color 0.3s, background 0.3s, transform 0.4s var(--ease-out);
}
.btn i { font-style: normal; color: var(--gold); }
.btn.ghost { border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--gold); background: rgba(227, 161, 10, 0.08); }
.btn.gold { background: var(--gold-grad); color: #120d02; font-weight: 500; }
.btn.gold:hover { transform: translateY(-2px); }
.spin { margin-top: 18px; padding: 10px 22px 10px 10px; font-size: var(--t-label); }
.spin .key { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(18, 13, 2, 0.5); border-radius: 6px; }

/* ---------- bottom nav ---------- */
.bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: var(--nav-h);
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 0 var(--edge); border-top: 1px solid var(--line);
  background: linear-gradient(0deg, rgba(8, 7, 6, 0.85), rgba(8, 7, 6, 0.35));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform 0.6s var(--ease-out);
}
.bottom button {
  font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); transition: color 0.3s; text-align: left;
}
.bottom button:nth-child(2) { text-align: center; }
.bottom button:nth-child(3) { text-align: center; }
.bottom button:nth-child(4) { text-align: right; }
.bottom button:hover, .bottom button.active { color: var(--fg); }
.bottom .nav-drive { color: var(--gold-hi); }
.progress { position: absolute; top: -1px; left: 0; height: 2px; width: 100%; background: var(--gold-grad); transform-origin: left; transform: scaleX(0); }
body.driving .bottom, body.picking .bottom { transform: translateY(110%); }

/* ---------- strength panel ---------- */
.panel {
  position: fixed; inset: 0; z-index: 50; overflow-y: auto; overscroll-behavior: contain;
  background: rgba(11, 10, 9, 0.95); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  clip-path: inset(100% 0 0 0); visibility: hidden;
  transition: clip-path 1s var(--ease), visibility 0s 1s;
}
.panel.open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 1s var(--ease), visibility 0s; }
.panel-close { font-size: var(--t-label); position: fixed; top: 28px; right: var(--edge); z-index: 3; display: flex; align-items: center; gap: 12px; color: var(--fg); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7); }
.panel-close i {
  width: 40px; height: 40px; border: 1px solid rgba(242, 237, 228, 0.3); border-radius: 50%;
  background: rgba(11, 10, 9, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center; font-style: normal; font-size: 18px;
  transition: transform 0.6s var(--ease-out), border-color 0.4s;
}
.panel-close:hover i { transform: rotate(90deg); border-color: var(--gold); }
.panel-inner { max-width: 1240px; margin: 0 auto; padding: 120px var(--pad) 100px; opacity: 0; transform: translateY(60px); transition: opacity 0.6s, transform 1.2s var(--ease-out); }
.panel.open .panel-inner { opacity: 1; transform: none; transition-delay: 0.35s; }
.panel-title { font-family: var(--serif); font-weight: 400; font-size: clamp(54px, 8vw, 140px); line-height: 0.95; letter-spacing: -0.015em; margin: 14px 0 48px; text-wrap: balance; }
.pp-hero { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 2px; background: var(--bg-2); }
.pp-hero img { width: 100%; height: 100%; object-fit: cover; }
.pp-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 60px; margin: 64px 0; }
.pp-meta { display: grid; gap: 26px; align-content: start; }
.pp-meta dd { font-family: var(--serif); font-size: 26px; margin-top: 4px; }
.pp-body p { font-size: 18px; line-height: 1.7; color: var(--soft); max-width: 62ch; text-wrap: pretty; }
.pp-body p + p { margin-top: 1.2em; }
.pp-body p:first-child { font-family: var(--serif); font-size: 30px; line-height: 1.3; color: var(--fg); }
.pp-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.pp-gallery figure { overflow: hidden; background: var(--bg-2); aspect-ratio: 4 / 3; }
.pp-gallery figure:only-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.pp-gallery img { width: 100%; height: 100%; object-fit: cover; }
.pp-next { display: grid; justify-items: start; gap: 12px; width: 100%; margin-top: 100px; padding-top: 40px; border-top: 1px solid var(--line); text-align: left; }
.pp-next-title { font-family: var(--serif); font-size: clamp(44px, 6vw, 96px); line-height: 1; transition: color 0.4s, transform 0.8s var(--ease-out); }
.pp-next:hover .pp-next-title { color: var(--gold-hi); transform: translateX(16px); }

/* ---------- car picker ---------- */
.picker {
  position: fixed; inset: 0; z-index: 45; overflow-y: auto;
  display: grid; align-items: end;
  background: linear-gradient(0deg, rgba(8, 7, 6, 0.92) 0%, rgba(8, 7, 6, 0.55) 45%, rgba(8, 7, 6, 0) 75%);
  opacity: 0; visibility: hidden; transition: opacity 0.6s, visibility 0s 0.6s;
}
.picker.open { opacity: 1; visibility: visible; transition: opacity 0.6s, visibility 0s; }
.picker-inner { width: 100%; max-width: 1180px; margin: 0 auto; padding: 120px var(--pad) 40px; transform: translateY(30px); transition: transform 0.9s var(--ease-out); }
.picker.open .picker-inner { transform: none; }
.picker .sub { margin-bottom: 26px; }
.locs { display: inline-flex; gap: 4px; padding: 4px; margin-top: 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(20, 19, 17, 0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.locs button {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 9px 16px; border-radius: 999px;
  font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  transition: color 0.3s, background 0.3s;
}
.locs button small { font-size: var(--t-meta); letter-spacing: 0.12em; opacity: 0.7; }
.locs button:hover { color: var(--fg); }
.locs button[aria-pressed="true"] { background: var(--gold-grad); color: #120d02; }
.locs button[aria-pressed="true"] small { opacity: 0.8; }
.locs .short { display: none; }
@media (max-width: 860px) {
  .locs { display: flex; }
  .locs button { flex: 1; justify-content: center; padding: 9px 10px; white-space: nowrap; }
  .locs .full, .locs small { display: none; }
  .locs .short { display: inline; }
}
.cars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.car-card {
  text-align: left; padding: 22px 22px 18px; border: 1px solid var(--line); border-radius: 4px;
  background: rgba(20, 19, 17, 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: grid; gap: 12px; transition: border-color 0.3s, transform 0.5s var(--ease-out), background 0.3s;
}
.car-card:hover, .car-card:focus-visible, .car-card.hot { border-color: var(--gold); background: rgba(40, 32, 14, 0.78); transform: translateY(-3px); }
.car-card .row { display: flex; justify-content: space-between; align-items: baseline; }
.car-card .name { font-family: var(--serif); font-size: 40px; line-height: 1; }
.car-card .tag { color: var(--gold-hi); }
.car-card .blurb { font-size: var(--t-small); color: var(--soft); }
.car-card dl { display: flex; gap: 22px; flex-wrap: wrap; }
.car-card dt { font-family: var(--mono); font-size: var(--t-meta); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.car-card dd { font-size: var(--t-small); margin-top: 2px; }
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 10px; }
.bar i { height: 3px; background: var(--line); position: relative; overflow: hidden; border-radius: 2px; }
.bar i::after { content: ''; position: absolute; inset: 0; width: var(--v); background: var(--gold-grad); }
.car-card .go { margin-top: 4px; font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-hi); }
.controls-note { margin-top: 18px; font-family: var(--sans); font-size: var(--t-small); letter-spacing: 0; text-transform: none; color: var(--muted); }

/* ---------- drive HUD ---------- */
.hud { position: fixed; inset: 0; z-index: 30; pointer-events: none; opacity: 0; transition: opacity 0.6s; }
body.driving .hud { opacity: 1; }
body.driving .hud button { pointer-events: auto; }
.hud-tl { position: absolute; top: 22px; left: var(--edge); display: flex; gap: 8px; flex-wrap: wrap; }
.hud-btn { font-size: var(--t-label); display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(8, 7, 6, 0.55); color: var(--fg); }
.hud-btn:hover { border-color: var(--gold); }
.kbd { font-size: var(--t-meta); padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); }
.hud-laps {
  position: absolute; top: 22px; right: var(--edge); display: grid; gap: 4px; min-width: 190px;
  padding: 12px 16px; border: 1px solid var(--line); border-radius: 4px; background: rgba(8, 7, 6, 0.55);
}
.hud-laps div { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; }
.hud-laps b { font-family: var(--mono); font-weight: 500; font-size: 14px; font-variant-numeric: tabular-nums; }
#minimap {
  position: absolute; right: var(--edge); top: 140px; width: 190px; height: 130px;
  border: 1px solid var(--line); border-radius: 4px; background: rgba(8, 7, 6, 0.45);
}
.hud-speed { position: absolute; right: var(--edge); bottom: 26px; display: grid; justify-items: end; gap: 6px; }
.speed-row { display: flex; align-items: baseline; gap: 8px; }
#hud-speed { font-family: var(--serif); font-size: 76px; line-height: 0.9; font-variant-numeric: tabular-nums; text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5); }
.unit { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; color: var(--gold-hi); }
.gear { font-family: var(--mono); font-size: 18px; margin-left: 8px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 4px; }
.rpm { width: 200px; height: 4px; background: rgba(242, 237, 228, 0.15); border-radius: 2px; overflow: hidden; }
.rpm i { display: block; height: 100%; background: var(--gold-grad); transform-origin: left; transform: scaleX(0.08); transition: transform 0.08s linear; }
.hud-msg {
  position: absolute; left: 50%; top: 22%; transform: translate(-50%, 10px);
  font-family: var(--serif); font-size: clamp(24px, 3vw, 40px); white-space: nowrap;
  opacity: 0; transition: opacity 0.4s, transform 0.6s var(--ease-out); text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}
.hud-msg.on { opacity: 1; transform: translate(-50%, 0); }
.hud-keys { position: absolute; left: var(--edge); bottom: 26px; color: var(--soft); font-family: var(--sans); font-size: var(--t-small); letter-spacing: 0; text-transform: none; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6); }

/* mouse-steering indicator */
.steer-ind {
  position: absolute; left: 50%; bottom: 34px; width: 260px; height: 2px; margin-left: -130px;
  background: linear-gradient(90deg, transparent, rgba(242, 237, 228, 0.35) 15%, rgba(242, 237, 228, 0.35) 85%, transparent);
  opacity: 0; transition: opacity 0.25s;
}
.steer-ind::after { content: ''; position: absolute; left: 50%; top: -5px; width: 1px; height: 12px; background: rgba(242, 237, 228, 0.5); }
.steer-ind i { position: absolute; left: 50%; top: -5px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--gold-grad); }
.steer-ind.on { opacity: 1; }
body.driving #gl { cursor: crosshair; }

.touch { display: none; }
body.is-touch .hud-keys, body.is-touch .controls-note, body.is-touch .kbd { display: none; }
body.is-touch .touch {
  display: flex; justify-content: space-between; align-items: flex-end;
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0 16px calc(16px + env(safe-area-inset-bottom));
}
.touch > div { display: flex; gap: 10px; align-items: flex-end; }
.touch button {
  width: 74px; height: 74px; border-radius: 50%;
  border: 1px solid rgba(242, 237, 228, 0.3); background: rgba(8, 7, 6, 0.45);
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg);
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.touch button.small { width: 56px; height: 56px; font-size: var(--t-meta); line-height: 1.15; }
.touch button.gas { width: 84px; height: 84px; border-color: var(--gold); color: var(--gold-hi); }
.touch button.down { background: rgba(227, 161, 10, 0.35); border-color: var(--gold-hi); }
body.is-touch .hud-speed { bottom: auto; top: 158px; right: var(--edge); }
body.is-touch .spin .key { display: none; }
body.is-touch .spin { padding: 10px 22px; }
/* touch: every control at least 44px tall */
@media (pointer: coarse) {
  .skip, .top-link, .copy-btn, .btn, .hud-btn, .locs button { min-height: 44px; }
  .top-link, .copy-btn, .hud-btn { display: inline-flex; align-items: center; gap: 0.5em; }
  .mail { display: inline-flex; align-items: center; min-height: 44px; }
  .brand { min-height: 44px; }
  .panel-close i { width: 44px; height: 44px; }
}
@media (max-width: 480px) {
  .touch button { width: 60px; height: 60px; font-size: 12px; }
  .touch button.small { width: 52px; height: 52px; }
  .touch button.gas { width: 70px; height: 70px; }
  .touch > div { gap: 8px; }
}
body.is-touch #hud-speed { font-size: 48px; }
body.is-touch .rpm { width: 130px; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  :root { --pad: 20px; --nav-h: 52px; }
  .top { padding: 18px var(--pad) 28px; background: linear-gradient(rgba(8, 7, 6, 0.95) 45%, rgba(8, 7, 6, 0)); }
  .copy { bottom: calc(var(--nav-h) + 22px); }
  .copy::before {
    inset: -96px calc(-1 * var(--pad)) calc(-1 * (var(--nav-h) + 22px));
    background: linear-gradient(rgba(8, 7, 6, 0), rgba(8, 7, 6, 0.8) 96px, rgba(8, 7, 6, 0.9));
    -webkit-mask-image: none; mask-image: none;
  }
  .play { margin-top: 20px; padding-top: 16px; }
  .copy h1 { white-space: normal; font-size: clamp(44px, 12vw, 64px); }
  .copy h2 { font-size: clamp(40px, 11vw, 60px); margin-bottom: 14px; }
  .sub { font-size: 15px; }
  .strengths .t { font-size: 24px; }
  .strengths button { padding: 10px 0; }
  .copy-about .sub { font-size: var(--t-small); }
  .copy-contact .sub { font-size: var(--t-small); }
  .bottom button { font-size: var(--t-label); letter-spacing: 0.08em; }
  .cars { grid-template-columns: 1fr 1fr; gap: 10px; }
  .car-card { padding: 14px; gap: 8px; }
  .car-card .name { font-size: 30px; }
  .car-card .bars, .car-card .blurb, .car-card dl div:nth-child(2) { display: none; }
  .car-card dl { gap: 12px; }
  .car-card .go { font-size: var(--t-meta); letter-spacing: 0.08em; }
  .picker-inner { padding-top: 80px; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .picker h2 { font-size: 36px; margin: 8px 0 10px; }
  .picker .sub { display: none; }
  .pp-grid { grid-template-columns: 1fr; gap: 28px; margin: 40px 0; }
  .pp-gallery { grid-template-columns: 1fr; }
  .hud-laps { min-width: 0; padding: 8px 10px; top: 70px; }
  .hud-laps b { font-size: 13px; }
  .hud-tl { top: 16px; }
  .hud-btn { padding: 7px 10px; font-size: var(--t-meta); }
  #minimap { width: 120px; height: 84px; top: 68px; left: 16px; right: auto; bottom: auto; }
  .hud-msg { font-size: 22px; top: 30%; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .copy { bottom: calc(var(--nav-h) + 12px); }
  .copy h2 { font-size: 40px; margin: 6px 0 10px; }
  .copy .sub { display: none; }
  #minimap { width: 120px; height: 84px; top: 64px; left: 16px; right: auto; bottom: auto; }
}
/* ---------- slow start + plain fallback (no WebGL, script error, or chosen) ---------- */
.loader-slow { display: none; font-size: 14px; color: var(--muted); }
.loader-slow button { color: var(--gold-hi); text-decoration: underline; text-underline-offset: 3px; }
body.slow-start .loader-slow { display: block; }
.fallback-note, .noscript-note { display: none; }
html.no-3d { scroll-snap-type: none; }
body.no-3d #gl, body.no-3d .grain, body.no-3d .stops, body.no-3d .hint, body.no-3d .play,
body.no-3d .nav-drive, body.no-3d #loader, body.no-3d .hud, body.no-3d .fade { display: none !important; }
body.no-3d .bottom { grid-template-columns: repeat(3, 1fr); }
body.no-3d .bottom button:nth-child(3) { text-align: right; }
body.no-3d .copy {
  position: static; opacity: 1; visibility: visible; transform: none; transition: none;
  margin: 0 auto; padding: 16vh var(--pad) 0; width: min(640px, 100%);
}
body.no-3d .copy::before { display: none; }
body.no-3d .copy { scroll-margin-top: 96px; }
body.no-3d .top { background: linear-gradient(var(--bg) 65%, rgba(11, 10, 9, 0)); }
body.no-3d .copy h1 { white-space: normal; }
body.no-3d .copy-about .sub { display: block; }
body.no-3d .copy-contact { padding-bottom: calc(var(--nav-h) + 12vh); }
body.no-3d .fallback-note, .noscript-note { display: block; }
.fallback-note, .noscript-note { font-size: 14px; line-height: 1.6; color: var(--muted); margin-bottom: 28px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 6px; }
.fallback-note a { color: var(--gold-hi); text-decoration: underline; text-underline-offset: 3px; }
.noscript-note { max-width: 640px; margin: 100px auto 0; }

@media (prefers-reduced-motion: reduce) {
  /* fewer, gentler animations: no travel, wipes or lifts; state changes still fade */
  .grain, .loader-logo { animation: none; }
  .hint i::after { animation: none; width: 100%; opacity: 0.55; }
  #loader { transition: opacity 0.3s; }
  body.loaded #loader { clip-path: inset(0 0 0 0); opacity: 0; }
  .copy, .copy.on { transform: none; }
  .panel { clip-path: none; opacity: 0; transition: opacity 0.2s, visibility 0s 0.2s; }
  .panel.open { clip-path: none; opacity: 1; transition: opacity 0.2s, visibility 0s; }
  .panel-inner, .panel.open .panel-inner, .picker-inner, .picker.open .picker-inner { transform: none; transition: opacity 0.2s; transition-delay: 0s; }
  .car-card:hover, .car-card:focus-visible, .car-card.hot, .btn.gold:hover,
  .brand:hover img, .panel-close:hover i, .pp-next:hover .pp-next-title,
  .strengths button:hover .t, .strengths button.hot .t { transform: none; }
  .hud-msg, .hud-msg.on { transform: translate(-50%, 0); }
  .skip { transition: none; }
}
