/* ALWAYS BXTH — night drive. Static, no build step. */

@font-face {
  font-family: "Overpass";
  src: url("/fonts/overpass-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Overpass Mono";
  src: url("/fonts/overpassmono-latin-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("/fonts/courierprime-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("/fonts/courierprime-400i-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #050506;          /* the windshield */
  --glass: #07090c;
  --panel: #0a0d11;
  --line: #1a2028;
  --line-2: #2b333c;
  --head: #e6dfd0;         /* headlight off-white */
  --dim: #8d877b;          /* warm grey */
  --vfd: #bccad5;          /* lit instrument glyphs, cold */
  --vfd-dim: #7f909d;
  --ghost: #1a242d;        /* unlit segments */
  --cold: #6f8aa3;         /* instrument glow (LEDs) */
  --gold: #b8862b;         /* GOLD BORDER frame, seal, flame only */
  --gold-hi: #e2bd66;

  --sign: "Overpass", "Arial Narrow", sans-serif;
  --mono: "Overpass Mono", ui-monospace, monospace;
  --letter: "Courier Prime", "Courier New", monospace;

  --inset: 8px;            /* gold frame inset */
  --rail-w: 36px;
  --pad: 20px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
@media (min-width: 900px) {
  :root { --inset: 14px; --rail-w: 72px; --pad: 48px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-color: var(--line-2) var(--ink); scrollbar-width: thin; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--head);
  font: 400 16px/1.5 var(--sign);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: #2a3a4a; color: var(--head); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--line-2); border: 3px solid var(--ink); border-radius: 6px; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
h1, h2, p { margin: 0; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--head); outline-offset: 3px; border-radius: 2px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.skip {
  position: fixed; left: 24px; top: 24px; z-index: 50;
  padding: 12px 16px; background: var(--head); color: var(--ink);
  font: 800 14px/1 var(--sign); letter-spacing: .02em; text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus-visible { transform: none; outline-color: var(--head); }

/* The GOLD BORDER frame: one thin gold line around the windshield of the viewport. */
.frame {
  position: fixed; inset: var(--inset); z-index: 40; pointer-events: none;
  border: 1px solid var(--gold);
}

/* ---------- the cab: windshield + console ---------- */
.cab {
  display: grid;
  grid-template-rows: 58svh auto;
  min-height: 100svh;
}
@supports not (height: 1svh) { .cab { grid-template-rows: 58vh auto; min-height: 100vh; } }

.windshield {
  position: relative; overflow: hidden; background: var(--glass);
  border-bottom: 1px solid var(--line);
}
.windshield picture, .road-art {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.road-art {
  object-fit: cover; object-position: 50% 62%;
  transform-origin: 50% 64%;
  will-change: transform;
}
.sign {
  position: absolute; z-index: 2;
  left: calc(var(--inset) + 14px); top: calc(var(--inset) + 14px);
  margin: 0; padding: 7px 10px 5px;
  border: 1.5px solid var(--head); border-radius: 5px;
  background: rgba(5, 5, 6, .55);
  font: 900 15px/1 var(--sign); letter-spacing: -.005em;
}
.letter-line {
  position: absolute; z-index: 2;
  left: calc(var(--inset) + 16px); right: calc(var(--inset) + 16px); bottom: 18px;
  font: 400 clamp(12.5px, 3.5vw, 15px)/1.4 var(--letter); color: var(--head);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
}

.console {
  display: flex; flex-direction: column; gap: 14px;
  padding: 16px calc(var(--inset) + 12px) 28px;
  background: var(--ink);
}
.console .follow { order: 1; }
.console .deck { order: 2; margin-top: 18px; }

/* VFD display. Ghost segments are drawn; slots never move; only what lights changes. */
.vfd {
  position: relative;
  padding: 12px 14px 11px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, .7), 0 1px 0 rgba(230, 223, 208, .04);
  font-family: var(--mono); color: var(--vfd);
}
.vfd-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font: 600 11px/1 var(--mono); letter-spacing: .06em;
}
.vfd-label { color: var(--vfd); }
.vfd-label--dim { color: var(--vfd-dim); }
.vfd-k { color: var(--vfd-dim); }
.vfd-data { white-space: nowrap; }
.seg {
  position: relative; display: inline-block;
  font: 600 15px/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0;
  color: var(--vfd);
}
.seg::before {
  content: attr(data-ghost);
  position: absolute; right: 0; top: 0;
  color: var(--ghost); z-index: -1;
}
.vfd .seg { z-index: 0; }
.vfd-title {
  margin: 10px 0 9px;
  font: 600 clamp(17px, 5.4vw, 24px)/1.15 var(--mono); letter-spacing: 0;
  white-space: nowrap; overflow: hidden;
}
.cells {
  display: inline-block; position: relative;
  min-width: calc(var(--cells) * 1ch);
  padding: .14em 0 .06em;
  background-image: radial-gradient(circle at center, var(--ghost) 0 .055em, transparent .065em);
  background-size: .2ch .14em;
  background-position: 0 0;
  background-origin: content-box;
  background-clip: content-box;
  background-repeat: repeat;
}

/* Deck: canvas loop + controls */
.deck {
  display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 16px; align-items: start;
  scroll-margin-top: 24px;
}
.deck:focus { outline: none; }
.deck-media {
  position: relative; aspect-ratio: 9 / 16; overflow: hidden;
  border: 1px solid var(--line); border-radius: 4px; background: var(--glass);
}
.canvas-loop { width: 100%; height: 100%; object-fit: cover; }
.deck-controls { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.deck.is-live { grid-template-columns: 1fr; }
.deck.is-live .deck-media { aspect-ratio: auto; height: 352px; border-radius: 12px; border-color: var(--line); }
.deck.is-live .btn-listen { display: none; }
.deck iframe { display: block; width: 100%; height: 352px; border: 0; }

.btn-listen {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 18px;
  border: 1px solid var(--line-2); border-radius: 4px;
  background: var(--panel); color: var(--head); text-decoration: none;
  font: 900 15px/1 var(--sign); letter-spacing: .01em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(230, 223, 208, .05);
  transition: border-color .3s var(--ease), background-color .3s var(--ease), transform .2s var(--ease);
}
.btn-listen svg { width: 14px; height: 14px; color: var(--vfd); }
.btn-listen:hover { border-color: var(--dim); background: #10151a; }
.btn-listen:active { transform: translateY(1px); }
.plain {
  font: 500 14px/1.45 var(--sign); color: var(--dim);
  text-decoration: underline; text-decoration-color: rgba(141, 135, 123, .5);
  padding: 4px 0; align-self: flex-start;
}
.plain:hover { color: var(--head); text-decoration-color: currentColor; }
.plain--small { font-size: 14px; }

.side-b {
  display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center;
  margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line);
  text-decoration: none; min-height: 56px;
}
.side-b img { width: 56px; height: 56px; border: 1px solid var(--line); }
.side-b-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.side-b-meta { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); }
.side-b-meta svg { width: 11px; height: 11px; }
.side-b-title { font: 900 14px/1.15 var(--sign); letter-spacing: -.005em; }
.side-b:hover .side-b-title { text-decoration: underline; text-decoration-thickness: 1px; }

/* FOLLOW: the one lit button */
.follow { display: flex; flex-direction: column; gap: 8px; }
.btn-follow {
  display: flex; align-items: center; justify-content: center;
  min-height: 58px; padding: 4px 20px 0;
  background: var(--head); color: var(--ink); text-decoration: none;
  border-radius: 4px;
  font: 900 18px/1 var(--sign); letter-spacing: .005em;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .9), inset 0 -2px 0 rgba(5, 5, 6, .18);
  transition: background-color .3s var(--ease), transform .2s var(--ease);
}
.btn-follow:hover { background: #f1ebdd; }
.btn-follow:active { transform: translateY(1px); }
.btn-follow:focus-visible { outline-offset: 4px; }
.inapp {
  font: 500 14px/1.45 var(--sign); color: var(--head);
  padding: 8px 0 0;
}
.follow .plain { align-self: center; }

/* Desktop cab: windshield left 60%, stereo stacked right */
@media (min-width: 900px) {
  .cab { grid-template-rows: none; grid-template-columns: 60% 40%; height: 100svh; min-height: 640px; }
  .windshield { border-bottom: 0; border-right: 1px solid var(--line); }
  .road-art { object-position: 48% 60%; }
  .sign { left: calc(var(--inset) + 28px); top: calc(var(--inset) + 28px); font-size: 17px; padding: 8px 12px 6px; }
  .letter-line { left: calc(var(--inset) + 30px); bottom: calc(var(--inset) + 28px); font-size: 17px; }
  .console {
    justify-content: flex-start; gap: 22px;
    padding: calc(var(--inset) + 28px) calc(var(--inset) + 40px) calc(var(--inset) + 28px) 40px;
    max-width: 600px;
  }
  .console .deck { order: 0; margin-top: 0; }
  .console .follow { order: 1; margin-top: auto; }
  .deck { grid-template-columns: 176px 1fr; gap: 20px; }
  .vfd { padding: 16px 18px 14px; }
  .vfd-row { font-size: 12px; }
  .vfd-title { font-size: 25px; margin: 14px 0 12px; }
}
@media (min-width: 900px) and (max-height: 760px) {
  .deck { grid-template-columns: 132px 1fr; }
  .console { gap: 16px; }
}

/* ---------- the road (signature): centre dashes + mile markers ---------- */
.rail { display: none; }
.js .rail {
  display: block;
  position: fixed; z-index: 1; top: 0; bottom: 0;
  left: var(--inset); width: var(--rail-w);
  pointer-events: none; overflow: hidden;
  opacity: 0; transition: opacity .6s var(--ease);
}
.js .rail.is-on { opacity: 1; }
.rail-dashes {
  position: absolute; left: 50%; top: -64px; bottom: -64px; width: 2px; margin-left: -1px;
  background: repeating-linear-gradient(to bottom, rgba(230, 223, 208, .5) 0 26px, transparent 26px 64px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 45%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 45%);
  will-change: transform;
}
.post {
  position: absolute; left: 50%; top: 0;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  width: 30px; padding: 5px 0 6px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 3px;
  font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--head);
  transform: translate3d(-50%, -200px, 0);
  will-change: transform, opacity;
}
.post::after {
  content: ""; display: block; position: absolute; top: 100%; left: 50%;
  width: 1px; height: 22px; margin-left: -.5px; background: var(--line-2);
}
@media (max-width: 899px) {
  :root { --rail-w: 44px; }
  .post { width: 38px; }
  .post i { font-size: 10px; }
}
.post b { font-weight: 700; font-size: 11px; line-height: 1; }
.post i { font-style: normal; font-weight: 500; font-size: 10px; line-height: 1; color: var(--dim); letter-spacing: -.02em; }
@media (min-width: 900px) {
  .post { width: 52px; padding: 7px 0 8px; gap: 5px; }
  .post b { font-size: 15px; }
  .post i { font-size: 11px; letter-spacing: 0; }
}
/* reduced motion: a still road laid along the page */
.rail.is-still { position: absolute; bottom: auto; opacity: 1; }

/* ---------- sections after the cab ---------- */
.next, .presets, .close {
  position: relative; z-index: 2;
  padding-left: calc(var(--inset) + var(--rail-w) + 14px);
  padding-right: calc(var(--inset) + 16px);
}
@media (min-width: 900px) {
  .next, .presets, .close {
    padding-left: max(calc(var(--inset) + var(--rail-w) + 48px), calc((100% - 1040px) / 2));
    padding-right: max(calc(var(--inset) + 48px), calc((100% - 1040px) / 2));
  }
}

/* Mile marker: a distance sign for the next release */
.next {
  display: grid; grid-template-columns: 1fr; gap: 18px;
  padding-top: 88px; padding-bottom: 72px;
}
.next-view img {
  width: 100%; height: auto; max-width: 280px; aspect-ratio: 1; object-fit: cover;
  border: 1px solid var(--line); border-radius: 4px;
}
.sign-plate {
  align-self: center;
  padding: 6px;
  background: var(--panel);
  border-radius: 10px;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .9);
}
.sign-row {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 24px;
  padding: 20px 18px 16px;
  border: 2px solid var(--head); border-radius: 7px 7px 0 0; border-bottom: 0;
}
.sign-name {
  font: 900 clamp(26px, 7.4vw, 46px)/.98 var(--sign); letter-spacing: -.02em;
  text-wrap: balance; flex: 1 1 12ch;
}
.sign-no {
  display: inline-block; vertical-align: .3em; margin: 0 .45em 0 0; padding: 4px 6px 3px;
  border: 1.5px solid var(--head); border-radius: 3px;
  font: 600 .45em/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: .04em; color: var(--head);
}
.sign-dist {
  display: flex; align-items: baseline; gap: 8px; white-space: nowrap;
  font-family: var(--mono); font-variant-numeric: tabular-nums;
}
.sign-n { font: 700 clamp(30px, 8.5vw, 52px)/1 var(--mono); letter-spacing: -.03em; }
.sign-u { font: 700 clamp(14px, 3.8vw, 20px)/1 var(--mono); color: var(--head); }
.sign-out {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px;
  background: var(--head); color: var(--ink); text-decoration: none; border-radius: 4px;
  font: 900 18px/1 var(--sign);
}
.sign-sub {
  padding: 12px 18px 14px;
  border: 2px solid var(--head); border-radius: 0 0 7px 7px; border-top: 1px solid var(--line-2);
  font: 500 14px/1.45 var(--sign); color: var(--dim);
}
@media (min-width: 900px) {
  .next { grid-template-columns: 280px 1fr; gap: 40px; align-items: center; padding-top: 140px; padding-bottom: 110px; }
  .sign-row { padding: 26px 26px 20px; }
  .sign-sub { padding: 14px 26px 16px; }
}

/* Presets 1–6: car-stereo hardware */
.presets { padding-top: 48px; padding-bottom: 96px; }
.silk {
  margin-bottom: 14px;
  font: 800 12px/1 var(--sign); letter-spacing: .14em; color: var(--dim);
}
.preset-bank {
  list-style: none; margin: 0; padding: 10px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  background: var(--glass);
  border: 1px solid var(--line); border-radius: 8px;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, .7);
}
.preset {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  min-height: 76px; padding: 10px 10px 12px;
  background: var(--panel); color: var(--head); text-decoration: none;
  border: 1px solid var(--line-2); border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(230, 223, 208, .05);
  transition: background-color .25s var(--ease), border-color .25s var(--ease), transform .15s var(--ease);
}
.preset-n { font: 700 13px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--dim); }
.preset-name { font: 900 clamp(10.5px, 3vw, 15px)/1.05 var(--sign); letter-spacing: -.02em; }
.led {
  position: absolute; right: 10px; top: 12px; width: 12px; height: 3px; border-radius: 2px;
  background: var(--ghost);
  transition: background-color .25s var(--ease);
}
.preset:hover, .preset:focus-visible { background: #10151a; border-color: var(--dim); }
.preset:hover .led, .preset:focus-visible .led { background: var(--cold); }
.preset:hover .preset-n, .preset:focus-visible .preset-n { color: var(--head); }
.preset:active { transform: translateY(1px); }
@media (min-width: 900px) {
  .preset-bank { grid-template-columns: repeat(6, 1fr); padding: 12px; gap: 10px; }
  .preset { min-height: 96px; padding: 14px 14px 16px; }
  .preset-name { font-size: 15px; }
  .presets { padding-bottom: 140px; }
}

/* Close: the letter line, the address, the imprint */
.close {
  padding-top: 64px; padding-bottom: calc(var(--inset) + 56px);
  border-top: 1px solid var(--line);
}
.close-letter {
  font: 400 clamp(20px, 5.4vw, 30px)/1.3 var(--letter); color: var(--head);
  max-width: 28ch;
}
.close-mail {
  display: flex; flex-direction: column; gap: 6px; margin-top: 28px;
}
.close-for { font: 500 14px/1.45 var(--sign); color: var(--dim); }
.close-mail a {
  align-self: flex-start; padding: 6px 0;
  font: 800 clamp(17px, 4.8vw, 22px)/1.2 var(--sign); letter-spacing: -.005em;
  text-decoration: underline; text-decoration-color: rgba(230, 223, 208, .35); overflow-wrap: anywhere;
}
.close-mail a:hover { text-decoration-color: currentColor; }
.imprint {
  display: flex; align-items: center; gap: 10px; margin-top: 64px; color: var(--gold-hi);
}
.seal { width: 30px; height: 30px; color: var(--gold-hi); }
.imprint-name { font: 800 10px/1 var(--sign); letter-spacing: .32em; color: var(--gold-hi); }
.copy { margin-top: 14px; font: 600 11px/1 var(--mono); letter-spacing: .04em; color: var(--dim); }

/* ---------- 404: wrong turn ---------- */
.lost-main {
  min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  padding: 48px calc(var(--inset) + 20px);
}
.lost-road { width: min(420px, 90%); height: auto; }
.lost-plate { width: min(520px, 100%); margin-top: -8px; }
.lost-back { width: min(520px, 100%); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
  .road-art { will-change: auto; transform: none !important; }
}
