:root {
  --fog: #08060b;        /* page black, matched to the photo backdrop */
  --pine: #f0ebf5;       /* primary text */
  --lichen: #54465f;     /* quiet lines */
  --route: #a66cf0;      /* the car's purple, lifted for dark */
  --beacon: #f2a900;     /* brake-caliper yellow */
  --ink-soft: #a99fb8;
  --gutter: clamp(20px, 5vw, 64px);
  --car: #7b3fc4;
  --radius-sm: 8px; --radius-md: 12px;
  --ease: 150ms cubic-bezier(.2,.7,.2,1);
  --cw: min(86vw, 1240px); /* car width; stage height derives from it */
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fog); color: var(--pine);
  font: 18px/1.6 "Atkinson Hyperlegible", system-ui, sans-serif;
}
a { color: var(--route); text-underline-offset: 3px; transition: color var(--ease); }
a:hover { color: var(--pine); }
::selection { background: var(--route); color: #000; }
a:focus-visible, button:focus-visible, .stop:focus-visible { outline: 3px solid var(--beacon); outline-offset: 3px; }

h1, h2 { font-family: "Big Shoulders Display", Impact, sans-serif; font-weight: 900; line-height: .92; margin: 0; letter-spacing: .005em; }
h1 { font-size: clamp(64px, 11vw, 168px); }
h2 { font-size: clamp(30px, 4.6vw, 48px); margin-bottom: 20px; }
h3 { font-size: 20px; margin: 0 0 10px; }
h1, h2, .lede, .takeaway { text-wrap: balance; }
p, li { text-wrap: pretty; }
.steps .when, .log time, .pipe b { font-variant-numeric: tabular-nums; }

/* stage: headline, spotlight, car and floor reflection share one scene */
.stage { position: relative; overflow: hidden; padding: clamp(8px, 2vw, 32px) var(--gutter) 0; isolation: isolate; }
.stage::before { content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 46% 44% at 58% 40%, rgba(123,63,196,.42), transparent 70%),
    radial-gradient(ellipse 90% 26% at 55% 62%, rgba(166,108,240,.16), transparent 75%); }
/* the headline stands on the floor in front of the car, overlapping the tyres and reflection */
.stage h1 { position: relative; z-index: 2; margin-top: calc(var(--cw) * -.2); font-size: clamp(40px, 11.5vw, 176px); white-space: nowrap; }
.car-wrap { position: relative; margin: 0 -3vw 0 auto; width: var(--cw); }
.car-wrap .car, .car-wrap .refl img { display: block; width: 100%; height: auto; mix-blend-mode: lighten; }
.car-wrap .car { -webkit-mask-image: radial-gradient(ellipse 54% 56% at 50% 50%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 54% 56% at 50% 50%, #000 62%, transparent 100%); }
.car-wrap .refl { margin-top: calc(var(--cw) * -.05); height: calc(var(--cw) * .1); overflow: hidden; opacity: .3;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent); mask-image: linear-gradient(to bottom, #000, transparent); }
.car-wrap .refl img { transform: scaleY(-1); filter: blur(1.5px); }

.brief { padding: 0 var(--gutter); max-width: 46em; margin-top: clamp(16px, 2.4vw, 32px); position: relative; z-index: 3; }
.lede { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; margin: 0 0 14px; font-weight: 700; }
.facts { margin: 0; color: var(--ink-soft); }

/* map */
.map-wrap { margin-top: 24px; padding: 0 var(--gutter); }
#map { display: block; width: 100%; height: auto; overflow: visible; }
#map .contour { fill: none; stroke: var(--lichen); stroke-width: 1.25; opacity: .8; }
#map .route-todo { fill: none; stroke: var(--lichen); stroke-width: 5; stroke-dasharray: 2 12; stroke-linecap: round; }
#map .route-done { fill: none; stroke: var(--route); stroke-width: 7; stroke-linecap: round; }
#map .stop { cursor: pointer; }
#map .stop circle { fill: var(--fog); stroke: var(--lichen); stroke-width: 3; }
#map .stop.done circle { fill: var(--route); stroke: var(--route); }
#map .stop.current circle { fill: var(--beacon); stroke: var(--fog); stroke-width: 4; }
#map .stop .halo { fill: none; stroke: var(--beacon); stroke-width: 2; opacity: .45; transform-box: fill-box; transform-origin: center; transform: scale(1.8); }
#map .tag { font: 700 26px "Atkinson Hyperlegible", sans-serif; fill: var(--pine); paint-order: stroke; stroke: var(--fog); stroke-width: 8px; }
#map .tag.dim { fill: var(--ink-soft); font-weight: 400; }
#map .car image { filter: drop-shadow(0 3px 3px rgba(0,0,0,.5)); }

/* sections */
main { padding: 0 var(--gutter); max-width: 1180px; margin: 0 auto; }
main > section { margin-top: clamp(56px, 8vw, 104px); }

.steps ol { list-style: none; margin: 0; padding: 0; border-bottom: 2px solid var(--pine); }
.steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1.2fr); gap: 6px 24px; padding: 18px 0; border-top: 2px solid var(--pine); scroll-margin-top: 24px; }
.steps li.todo { border-top-color: var(--lichen); color: var(--ink-soft); }
.steps li.current { background: linear-gradient(90deg, rgba(242,169,0,.14), transparent 70%); }
.steps .mark { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--lichen); margin-top: 5px; }
.steps .done .mark { background: var(--route); border-color: var(--route); }
.steps li.done .name { color: var(--pine); }
.steps li { transition: background var(--ease); }
.steps li:hover { background: rgba(240,235,245,.04); }
.steps .current .mark { background: var(--beacon); border-color: var(--beacon); box-shadow: 0 0 0 4px rgba(242,169,0,.25); }
.steps .name { font-weight: 700; font-size: 20px; line-height: 1.3; }
.steps .when { display: block; font-weight: 400; font-size: 15px; color: var(--ink-soft); }
.steps .what { margin: 0; }
.steps .typical { margin: 6px 0 0; font-size: 15px; color: var(--ink-soft); }
.steps li.flash { animation: flash 1.1s ease-out; }
@keyframes flash { from { background: rgba(166,108,240,.28); } to { background: transparent; } }

dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 32px; max-width: 30em; }
dt { color: var(--ink-soft); }
dd { margin: 0; font-weight: 700; }
#vin { margin: 16px 0 0; color: var(--ink-soft); }

.log ul { list-style: none; margin: 0; padding: 0; max-width: 40em; }
.log li { padding: 12px 0; border-top: 1px solid var(--lichen); }
.log time { display: block; font-size: 15px; color: var(--ink-soft); }

.takeaway { font-size: clamp(20px, 2.4vw, 26px); line-height: 1.35; font-weight: 700; max-width: 34em; margin: 0 0 32px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.cols ul { margin: 0; padding: 0; list-style: none; }
.cols li { padding: 12px 0; border-top: 1px solid var(--lichen); font-size: 16px; }
.cols li a { display: block; margin-top: 2px; font-size: 14px; }
.small { font-size: 15px; color: var(--ink-soft); margin-top: 24px; }

footer { margin-top: 96px; padding: 28px var(--gutter) 48px; border-top: 2px solid var(--pine); color: var(--ink-soft); font-size: 15px; }
footer p { margin: 0; max-width: 1180px; margin-inline: auto; }

@media (max-width: 820px) {
  :root { --cw: 98vw; }
  .car-wrap { margin-right: 0; }
  .stage h1 { margin-top: calc(var(--cw) * -.17); }
  .steps li { grid-template-columns: 28px 1fr; }
  .steps li > div:last-child { grid-column: 2; }
  .cols { grid-template-columns: 1fr; gap: 28px; }
}

/* one page-load moment: the route draws itself */
@media (prefers-reduced-motion: no-preference) {
  .car-wrap { animation: glide 1.4s cubic-bezier(.2,.7,.2,1) both; }
  #map .route-done { stroke-dashoffset: var(--len); animation: draw 1.6s .2s cubic-bezier(.4,0,.2,1) forwards; }
  #map .car, #map .stop.current { opacity: 0; animation: arrive .5s 1.6s ease-out forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes arrive { to { opacity: 1; } }

@keyframes glide { from { opacity: 0; transform: translateX(5vw); } to { opacity: 1; transform: none; } }

.pipeline { margin: 0 0 36px; max-width: 40em; }
.pipe { list-style: none; margin: 0 0 10px; padding: 0; }
.pipe li { position: relative; display: grid; grid-template-columns: 9.5em 1fr 4em; align-items: center; gap: 12px; padding: 6px 0; }
.pipe i { display: block; height: 10px; background: var(--route); border-radius: 2px; }
.pipe li:first-child i { background: var(--beacon); }
.pipe b { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .pipe li { grid-template-columns: 7.5em 1fr 3.2em; } }

.notfound { padding-top: 20vh; }
.notfound h1 { font-size: clamp(56px, 10vw, 120px); margin-bottom: 16px; }
