/* One warm night from the stage to the panel; the car is lit like a reveal. */
:root {
  --night: oklch(15.5% 0.008 60);
  --night-2: oklch(21% 0.01 60);
  --panel: oklch(17.5% 0.009 60);
  --tile: oklch(25% 0.011 60);
  --ink: oklch(93% 0.012 85);
  --ink-soft: oklch(70% 0.012 80);
  --line: oklch(27% 0.01 60);
  --ember: oklch(68% 0.17 45);
  --display: "Archivo", system-ui, sans-serif;
  --sans: "Hanken Grotesk", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --panel-w: clamp(320px, 27vw, 400px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--night);
  color: var(--ink);
  font: 400 14px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; }

.studio { display: grid; grid-template-columns: 1fr var(--panel-w); height: 100vh; }

/* ---------- stage ---------- */
.stage {
  position: relative;
  background: radial-gradient(120% 80% at 50% 40%, var(--night-2), var(--night) 70%);
  overflow: hidden;
  container-type: size;
}
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; z-index: 1; }
#gl:active { cursor: grabbing; }
.busy #gl { cursor: default; }

/* Huge outlined words behind the car */
.giant {
  position: absolute; inset: 0; margin: 0;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  font: 800 min(25cqw, 33cqh)/0.82 var(--display); font-stretch: 125%;
  letter-spacing: -0.02em; text-transform: uppercase;
  color: transparent; -webkit-text-stroke: 1.5px oklch(46% 0.04 50);
  pointer-events: none; user-select: none;
  transition: opacity 0.6s var(--ease);
}
.giant span:last-child { -webkit-text-stroke-color: oklch(55% 0.11 45); }
.inside .giant { opacity: 0.22; }

.mark {
  position: absolute; left: 28px; top: 24px; z-index: 2;
  display: flex; align-items: baseline; gap: 12px;
  pointer-events: none;
  text-shadow: 0 1px 12px oklch(15.5% 0.008 60 / 0.75); /* stays legible over the white car in close-ups */
}
.mark a {
  pointer-events: auto; text-decoration: none;
  font: 700 17px/1 var(--display); font-stretch: 125%; letter-spacing: 0.04em; text-transform: uppercase;
}
.mark b { font-weight: 500; color: var(--ink-soft); margin-left: 0.35em; }
.mark span { font: 400 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }

/* a quiet, film-subtitle line that narrates each fitting */
.caption {
  position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%);
  margin: 0; padding: 8px 14px; border-radius: 99px;
  font: 400 12px/1 var(--mono); letter-spacing: 0.02em; color: var(--ink);
  background: oklch(15.5% 0.008 60 / 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transition: opacity 0.35s var(--ease);
  white-space: nowrap; pointer-events: none; z-index: 2;
}
.caption.on { opacity: 1; }

/* stage controls: back to the whole car (in a close-up), and zoom */
.back, .zoom {
  position: absolute; bottom: 28px; z-index: 2;
  border: 1px solid oklch(44% 0.012 60); background: oklch(23% 0.01 60 / 0.86);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.3s var(--ease);
}
.back {
  left: 28px; border-radius: 99px; height: 42px; padding: 0 18px;
  font-weight: 600; cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, opacity 0.3s var(--ease);
}
.back:hover { background: var(--ink); color: var(--night); border-color: var(--ink); }
.zoom { right: 24px; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; }
.zoom button {
  width: 42px; height: 42px; border: 0; background: none; cursor: pointer;
  font: 400 20px/1 var(--mono);
}
.zoom button + button { border-top: 1px solid oklch(44% 0.012 60); }
.zoom button:hover { background: oklch(32% 0.012 60); }
/* while a piece goes in, the staged shot plays out */
.busy .back, .busy .zoom { opacity: 0.35; pointer-events: none; }

.loading {
  position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 14px;
  margin: 0; font: 400 12px/1 var(--mono); color: var(--ink-soft);
  transition: opacity 0.6s var(--ease);
}
.loading span { width: 120px; height: 2px; background: var(--line); position: relative; overflow: hidden; border-radius: 2px; }
.loading span::after {
  content: ""; position: absolute; inset: 0; width: var(--p, 8%);
  background: var(--ink); transition: width 0.2s;
}
.loading.done { opacity: 0; pointer-events: none; }

/* ---------- panel ---------- */
.panel {
  background: var(--panel);
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  padding: 22px 24px 18px;
  overflow-y: auto;
}
.eyebrow { margin: 0 0 10px; font: 400 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.models { display: flex; flex-wrap: wrap; gap: 6px; }
.models button {
  border: 1px solid var(--line); background: none; border-radius: 99px;
  padding: 6px 10px; font-size: 12.5px; font-weight: 500; cursor: pointer;
}
.models button[aria-pressed="true"] { background: var(--ink); color: var(--night); border-color: var(--ink); }
.models button:disabled { color: var(--ink-soft); cursor: default; }

.list { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--line); flex: 1; }
.item {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.thumb { width: 52px; height: 52px; border-radius: 10px; background: var(--tile); display: grid; place-items: center; overflow: hidden; }
.thumb img { max-width: 84%; max-height: 84%; object-fit: contain; }
.item h3 { margin: 0; font: 600 15px/1.2 var(--sans); }
.item p { margin: 3px 0 0; font: 400 12px/1.2 var(--mono); color: var(--ink-soft); }
.add {
  min-width: 74px; height: 34px; padding: 0 12px;
  border: 1px solid var(--ink); border-radius: 99px; background: none;
  font: 500 13px/1 var(--sans); cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.add:hover { background: var(--ink); color: var(--night); }
.item.in .add { background: var(--ink); color: var(--night); }
.item.in .add:hover { background: none; color: var(--ink); }
.item.playing .add { opacity: 0.5; pointer-events: none; }
.item .soon { font: 400 11px/1 var(--mono); color: var(--ink-soft); }

.sum { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 0 10px; }
.sum p { margin: 0; color: var(--ink-soft); }
.sum #count { color: var(--ink); font-weight: 600; }
.total { font: 500 20px/1 var(--mono); color: var(--ink) !important; }
.cta {
  display: block; text-align: center; text-decoration: none;
  background: var(--ember); color: var(--night); border-radius: 12px;
  padding: 12px; font-weight: 600;
}
.fine { margin: 12px 0 0; font-size: 11.5px; color: var(--ink-soft); }
.legal { margin-top: 6px; font-size: 10.5px; line-height: 1.4; }

/* ---------- phones: the car on top, the list under it ---------- */
@media (max-width: 860px) {
  body { overflow: auto; }
  .studio { grid-template-columns: 1fr; height: auto; }
  .stage { height: 62vh; min-height: 380px; }
  .panel { border-left: 0; border-top: 1px solid var(--line); padding: 20px 16px 28px; overflow: visible; }
  .mark { left: 16px; top: 16px; }
  .back { left: 16px; bottom: 16px; height: 44px; }
  .zoom { right: 16px; bottom: 16px; }
  .zoom button { width: 44px; height: 44px; }
  .caption { top: 46px; bottom: auto; left: 16px; right: auto; transform: none; }
  /* the words frame the car: one line above it, one below */
  .giant { justify-content: space-between; padding: 58px 0 18px; font-size: 26cqw; }
}
