:root {
  --night: oklch(15.5% 0.008 60);
  --night-2: oklch(21% 0.01 60);
  --bone: oklch(93% 0.012 85);
  --bone-soft: oklch(70% 0.012 80);
  --ember: oklch(68% 0.17 45);
  --sans: "Archivo", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --bar-h: 64px;
  --rail-h: 168px;
  --foot-h: 36px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(120% 80% at 50% 38%, var(--night-2), var(--night) 70%);
  color: var(--bone);
  font: 400 14px/1.4 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

.bar {
  height: var(--bar-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(16px, 2.6vw, 40px);
  position: relative;
  z-index: 3;
}
.mark { font: 800 18px/1 var(--sans); font-stretch: 125%; letter-spacing: 0.02em; text-decoration: none; }
.mark b { font-weight: 400; margin-left: 0.3em; color: var(--bone-soft); }
.fits { margin: 0; font: 400 13px/1 var(--mono); color: var(--bone-soft); }
.fits b { color: var(--bone); font-weight: 500; }
.fits span { margin-left: 6px; }
.tally { margin: 0; justify-self: end; font: 400 13px/1 var(--mono); color: var(--bone-soft); }
.tally #count { color: var(--bone); }
.bump { animation: bump 0.45s var(--ease-out); }
@keyframes bump { 40% { color: var(--ember); } }

.stage {
  position: relative;
  height: calc(100vh - var(--bar-h) - var(--rail-h) - var(--foot-h));
}
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; cursor: grab; }
#gl:active { cursor: grabbing; }

/* Huge outlined words behind the car, after the Shoppable Video poster. */
.giant {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font: 800 clamp(110px, 15.5vw, 280px)/0.82 var(--sans);
  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;
  z-index: 0;
  transition: opacity 0.6s;
}
.giant span:last-child { -webkit-text-stroke-color: oklch(55% 0.11 45); }
.inside .giant { opacity: 0.25; }

.status {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  margin: 0; font: 400 13px/1 var(--mono); color: var(--bone-soft); z-index: 2;
}
.back {
  position: absolute; left: clamp(16px, 2.6vw, 40px); top: 12px; z-index: 2;
  font: 500 13px/1 var(--mono); color: var(--bone); background: none;
  border: 1px solid oklch(40% 0.01 60); border-radius: 99px; padding: 10px 14px; cursor: pointer;
}
.back:hover { border-color: var(--bone); }
.drag {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  margin: 0; font: 400 12px/1 var(--mono); color: var(--bone-soft); z-index: 2; transition: opacity 0.4s;
}
.inside .drag, .drag.gone { opacity: 0; }

/* ---------- rail ---------- */
.rail { height: var(--rail-h); padding: 0 clamp(16px, 2.6vw, 40px); position: relative; z-index: 3; }
#rail { height: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; }
#rail button {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  cursor: pointer;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 10px 12px 12px;
  background: var(--bone);
  color: var(--night);
  border-radius: 4px;
  transition: transform 0.3s var(--ease-out), background 0.3s;
}
#rail button:hover, #rail button:focus-visible { transform: translateY(-6px); }
#rail button:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
#rail .art { min-height: 0; display: grid; place-items: center; }
#rail img { max-width: 92%; max-height: 92px; object-fit: contain; filter: drop-shadow(0 6px 6px rgb(20 15 5 / 0.18)); }
#rail .row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
#rail b { font: 600 14px/1.1 var(--sans); font-stretch: 100%; }
#rail i { font: 400 12px/1 var(--mono); font-style: normal; }
#rail .on button { background: var(--ember); }
#rail .on i::before { content: "in · "; }
#rail .busy button { pointer-events: none; }

.foot {
  height: var(--foot-h);
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 clamp(16px, 2.6vw, 40px);
  font: 400 11px/1 var(--mono); color: var(--bone-soft);
}

@media (max-width: 900px) {
  :root { --rail-h: 150px; }
  .fits { display: none; }
  .bar { grid-template-columns: 1fr auto; }
  #rail { overflow-x: auto; grid-auto-columns: 140px; scrollbar-width: none; padding-bottom: 6px; }
  .mark { font-size: 15px; }
  .tally { font-size: 12px; }
  .giant { font-size: 25vw; }
  #rail .row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .foot { height: auto; flex-direction: column; gap: 6px; padding: 8px 16px 16px; text-align: center; }
  body { overflow: auto; }
}
