/* AutoRails v2 — "Road and roadside" (forge converged 2026-10-02; spec: ../DESIGN-SPEC.md)
   No JavaScript. CSP-safe: no inline styles, no data: URIs; every image is a first-party file. */

@font-face {
  font-family: "Overpass";
  src: url("/fonts/overpass-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* Marking palette: one meaning per color */
  --asphalt: #3a3d41;      /* the ground */
  --shoulder: #2f3135;     /* header and footer */
  --white: #f2f2ee;        /* solid = interface, dashed = lane line */
  --text: #d6d6d1;         /* body text */
  --yellow: #f6c21c;       /* road edge line + the primary call to action */
  --green: #00663f;        /* live-link guide sign */
  --orange: #f28c28;       /* in-progress sign */
  --ink: #111111;          /* legends on orange; QR modules */
  --post: #8b8e92;         /* sign posts */

  /* Road geometry (desktop >= 1200 px) */
  --ycol: 64px;            /* column holding the double yellow */
  --yw: 12px;              /* double yellow: 4 + 4 gap + 4 */
  --gap: 56px;             /* column holding the dashed lane line */
  --side: 200px;           /* roadside: signs */
  --dash: 40px;            /* dash length; gap is the same */
  --bar: 12px;             /* stop bar thickness */
  --cta-h: 56px;
  --pad-end: 96px;         /* space under the last call to action */
  --cta-indent: 56px;      /* room for the yellow line to turn into the call to action */
  --r: 28px;               /* radius of that turn */
  --measure: 680px;

  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--asphalt) url("/assets/asphalt.svg") repeat;
  color: var(--text);
  font: 400 17px/1.6 "Overpass", system-ui, sans-serif;
}
a { color: var(--white); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 2px; }
b, strong { color: var(--white); font-weight: 700; }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--white); color: var(--ink); padding: 8px 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Paint: every marking gets the same lived-in wear (small missing flecks). */
.paint, .road::after, main::before, main::after, .stop::before, .shoulder::after {
  -webkit-mask-image: url("/assets/wear.svg");
  mask-image: url("/assets/wear.svg");
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
}

/* ---------- Shoulders: header and footer, solid white edge = interface ---------- */
.shoulder { background: var(--shoulder); position: relative; }
.shoulder::after { content: ""; position: absolute; left: 0; right: 0; height: 4px; background: var(--white); }
.site-header::after { bottom: 0; }
.site-footer::after { top: 0; }
.shoulder-in {
  max-width: 1240px; margin: 0 auto;
  padding: 0 calc(var(--side) + var(--gap)) 0 var(--ycol);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.site-header .shoulder-in { min-height: 64px; }
.brand img { display: block; width: 119px; height: auto; }
.tag, .hdr-link {
  font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.tag { color: var(--text); }
.hdr-link { text-decoration: none; }
.hdr-link:hover { text-decoration: underline; }

.site-footer .shoulder-in { padding-top: 28px; padding-bottom: 32px; flex-wrap: wrap; font-size: 14px; }
.site-footer p { margin: 0; }

/* ---------- The road ---------- */
.road {
  max-width: 1240px; margin: 0 auto;
  display: grid;
  grid-template-columns: var(--ycol) minmax(0, 1fr) var(--gap) var(--side);
  position: relative;
  overflow: hidden;
  overflow: clip;
}
main { grid-column: 2; grid-row: 1; position: relative; min-width: 0; }

/* The one dashed white lane line, between reading and navigating. It rolls once on load. */
.road::after {
  content: ""; position: absolute; z-index: 0;
  top: calc(var(--dash) * -18); bottom: 0;
  right: calc(var(--side) + var(--gap) / 2 - 2px);
  width: 4px;
  background: repeating-linear-gradient(to bottom, var(--white) 0 var(--dash), transparent var(--dash) calc(var(--dash) * 2));
  transform: translateY(calc(var(--dash) * 18));
  animation: roll 2.8s cubic-bezier(.12, .7, .25, 1) both;
}
@keyframes roll {
  from { transform: translateY(0); }
  to   { transform: translateY(calc(var(--dash) * 18)); }
}

/* Double solid yellow at the left edge: one continuous line down the page. */
main::before {
  content: ""; position: absolute; top: 0; bottom: 0;
  left: calc(var(--ycol) / -2 - var(--yw) / 2);
  border-left: var(--yw) double var(--yellow);
}
/* On the home page it turns right, into the call to action at the end of the road. */
.main--turn::before { bottom: calc(var(--pad-end) + var(--cta-h) / 2 - var(--yw) / 2 + var(--r) + var(--yw)); }
.main--turn::after {
  content: ""; position: absolute;
  left: calc(var(--ycol) / -2 - var(--yw) / 2);
  bottom: calc(var(--pad-end) + var(--cta-h) / 2 - var(--yw) / 2);
  width: calc(var(--ycol) / 2 + var(--yw) / 2 + var(--cta-indent) - 24px);
  height: calc(var(--r) + var(--yw));
  border-left: var(--yw) double var(--yellow);
  border-bottom: var(--yw) double var(--yellow);
  border-bottom-left-radius: var(--r);
}

/* Sections are stops; each boundary is a solid white stop bar across the lane. */
.stop { position: relative; padding: 88px 0 80px; }
.stop::before {
  content: ""; position: absolute; top: 0; height: var(--bar);
  left: calc(var(--ycol) / -2 + var(--yw) / 2 + 6px);
  right: calc(var(--gap) / -2 + 8px);
  background: var(--white);
}
.stop > * { max-width: var(--measure); }
main > .stop:first-child::before { display: none; }   /* the header's edge is already the interface */
.stop:last-child { padding-bottom: var(--pad-end); }

/* ---------- Hero: the trademark specimen view ---------- */
.hero { padding: 72px 0 88px; position: relative; }
.paint {
  margin: 0;
  color: var(--white);
  font-weight: 800;
  font-size: clamp(46px, 12.5vw, 72px);
  line-height: 1;
  letter-spacing: .01em;
  padding-top: .95em;               /* reserves the space the 1.9x stretch adds */
}
.paint-in { display: inline-block; transform: scaleY(1.9); transform-origin: left bottom; }
.paint .tm { font-size: .32em; vertical-align: top; margin-left: 0; letter-spacing: 0; }
.offer {
  margin: 28px 0 0; max-width: 30ch;
  color: var(--white); font-size: clamp(21px, 2.2vw, 26px); line-height: 1.35; font-weight: 600;
}
.eyebrow {
  margin: 18px 0 0; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text);
}

.btn {
  display: inline-flex; align-items: center; height: var(--cta-h);
  padding: 0 26px; margin-top: 32px;
  background: var(--yellow); color: var(--ink);
  font-weight: 800; font-size: 16px; letter-spacing: .04em; text-decoration: none;
  border-radius: 4px;
}
.btn:hover { background: #ffd23f; }
.btn:focus-visible { outline-color: var(--white); }
.btn--end { position: relative; margin-left: var(--cta-indent); }
.btn--end::before {             /* the yellow line's arrowhead */
  content: ""; position: absolute; left: -26px; top: 50%;
  width: 18px; height: 24px; margin-top: -12px;
  background: var(--yellow);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/* ---------- Stops below the fold ---------- */
h2 { color: var(--white); font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; margin: 0 0 18px; font-weight: 800; letter-spacing: -.005em; }
.stop p { margin: 0 0 16px; }
.lead { font-size: 19px; }

.dashlist { list-style: none; margin: 8px 0 0; padding: 0; }
.dashlist li { position: relative; padding-left: 34px; margin: 0 0 18px; }
.dashlist li::before {           /* bullets are short painted dashes */
  content: ""; position: absolute; left: 0; top: .72em; width: 18px; height: 4px; background: var(--white);
}
.origin { font-size: 15px; }

/* ---------- Roadside: guide signs with AutoRails QR plates ---------- */
.roadside {
  grid-column: 4; grid-row: 1; position: relative; z-index: 1;
  padding: 56px 0 96px;
  display: flex; flex-direction: column; align-items: center;
}
.signs { display: flex; flex-direction: column; align-items: center; gap: 48px; width: 100%; }
.signs--soon { margin-top: 96px; }
.post { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.post::before {                  /* galvanized post behind the sign and plate */
  content: ""; position: absolute; top: 20px; bottom: -14px; left: 50%; width: 4px; margin-left: -2px;
  background: var(--post); z-index: -1;
}

.sign {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 150px; min-height: 58px; padding: 10px 12px;
  border-radius: 8px;
  font-weight: 800; font-size: 14px; line-height: 1.15; letter-spacing: .05em; text-transform: uppercase;
  text-decoration: none;
}
.sign--go {                       /* green guide sign = a live link */
  background: var(--green); color: var(--white);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 3px var(--green);
}
.sign--soon {                     /* orange work-zone sign = in progress */
  position: relative; overflow: hidden;
  background: var(--orange); color: var(--ink);
  border: 3px solid var(--ink);
  padding-top: 20px;
}
.sign--soon::before {             /* barricade band: meaning not carried by color alone */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 9px;
  background: repeating-linear-gradient(-45deg, var(--ink) 0 6px, var(--orange) 6px 12px);
}
.sign:hover { filter: brightness(1.1); }
.sign:focus-visible { outline: 3px solid var(--yellow); outline-offset: 6px; }
.sign-arrow { font-size: 18px; line-height: 1; }

.plate {                          /* the AutoRails QR plate: plain QR + caption, no frame */
  width: 88px; padding: 8px 8px 6px;
  background: #ffffff; border-radius: 4px;
  display: flex; flex-direction: column; align-items: center;
  color: var(--ink); font-size: 10px; font-weight: 800; letter-spacing: .02em; line-height: 1.2;
}
.plate img { display: block; width: 72px; height: 72px; }
.plate span { margin-top: 4px; }

/* ---------- Other pages ---------- */
.page-head { padding: 72px 0 72px; }
.page-head h1 { color: var(--white); font-size: clamp(36px, 5vw, 56px); line-height: 1.1; margin: 0 0 16px; font-weight: 800; }
.barricade {                      /* work zone / road closed */
  height: 28px; max-width: 420px; margin: 0 0 28px; border-radius: 3px;
  background: repeating-linear-gradient(-45deg, var(--orange) 0 18px, var(--white) 18px 36px);
}
.closed {
  display: inline-block; margin: 0 0 24px; padding: 10px 18px;
  background: var(--white); color: var(--ink); border: 3px solid var(--ink); outline: 3px solid var(--white);
  font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
.news { list-style: none; margin: 0; padding: 0; }
.news li { margin: 0 0 12px; }
.news time { display: block; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text); }

/* ---------- Narrower desktops ---------- */
@media (max-width: 1199px) {
  :root { --side: 176px; }
  .sign { width: 140px; }
}
@media (min-width: 900px) {
  .paint { font-size: clamp(80px, 9vw, 136px); }
}

/* ---------- Phones: the road narrows, it doesn't disappear ---------- */
@media (max-width: 899px) {
  :root {
    --ycol: 28px; --yw: 9px; --gap: 28px; --side: 0px;
    --bar: 9px; --cta-h: 52px; --pad-end: 72px; --cta-indent: 36px; --r: 20px; --dash: 28px;
  }
  body { font-size: 16px; }
  .road { grid-template-columns: var(--ycol) minmax(0, 1fr) var(--gap); }
  .shoulder-in { padding: 0 var(--gap) 0 var(--ycol); }
  .site-footer .shoulder-in { flex-direction: column; align-items: flex-start; gap: 6px; }
  .hero { padding: 40px 0 64px; }
  .stop { padding: 64px 0 56px; }
  .roadside { grid-column: 2; grid-row: 2; padding: 8px 0 64px; }
  .signs, .signs--soon { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 14px; margin-top: 0; }
  .signs--soon { margin-top: 14px; }
  .post { gap: 0; }
  .post::before, .plate { display: none; }   /* a code can't be scanned on the screen showing it */
  .sign { width: 150px; }
}

/* ---------- Motion and print ---------- */
@media (prefers-reduced-motion: reduce) {
  .road::after { animation: none; }
}
@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .road::after, main::before, main::after, .stop::before, .roadside, .shoulder::after, .skip { display: none; }
  .shoulder { background: #fff; }
  .road { display: block; }
  a, b, strong, h1, h2, .paint, .offer, .tag, .eyebrow { color: #000; }
  .paint { padding-top: 0; font-size: 40pt; }
  .paint-in { transform: none; }
  .btn { background: none; color: #000; padding: 0; height: auto; margin-left: 0; }
  .btn::before { display: none; }
}
