/* ============================================================
   VANTA CYCLEWORKS
   A drafting table, not a showroom. Carbon black ground,
   aluminium structure, safety orange only where a hand goes.
   Palette is fixed by the brief:
     graphite #222326 · aluminium #C9C8C4 · safety orange #FF6A2A
     ice blue #A9DDF2 · cream #F4F0E8 · carbon #111214
   Type: condensed industrial display, technical mono labels,
   plain sans for reading.
   ============================================================ */

:root {
  --carbon: #111214;
  --graphite: #222326;
  --aluminium: #C9C8C4;
  --orange: #FF6A2A;
  --ice: #A9DDF2;
  --cream: #F4F0E8;

  --ink: var(--carbon);
  --ink-2: #17191C;
  --paper: var(--cream);
  --paper-2: #E7E1D6;
  --steel: var(--aluminium);
  --steel-dim: #8E8D89;
  --steel-faint: #5A5A57;
  --rule: rgba(201, 200, 196, 0.18);
  --rule-strong: rgba(201, 200, 196, 0.34);

  --sans: "Helvetica Neue", "Segoe UI", Inter, Arial, sans-serif;
  --display: "Barlow Condensed", "Oswald", "Arial Narrow",
             "Haettenschweiler", "Franklin Gothic Medium Cond", var(--sans);
  --mono: "IBM Plex Mono", "JetBrains Mono", "SFMono-Regular",
         Consolas, "Liberation Mono", monospace;

  --step: 6px;
  --gut: clamp(18px, 4vw, 56px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--carbon);
  color: var(--aluminium);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 8px; top: -60px;
  z-index: 90; padding: 10px 16px;
  background: var(--orange); color: #101010;
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  transition: top 0.18s var(--ease);
}
.skip:focus { top: 8px; }

/* ---------- drafting grid, drifts with the pointer ---------- */
.gridfield {
  position: fixed; inset: -14% -8%;
  z-index: 0; pointer-events: none;
  background: var(--carbon);
}
.gridfield-layer {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(169, 221, 242, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(169, 221, 242, 0.055) 1px, transparent 1px);
  background-size: 88px 88px;
  will-change: transform;
}
.gridfield-layer[data-depth="0.028"] {
  background-image:
    linear-gradient(to right, rgba(169, 221, 242, 0.085) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(169, 221, 242, 0.085) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 78%);
}

/* ---------- bench grain ---------- */
.grainfield {
  position: fixed; inset: -30px;
  width: calc(100% + 60px); height: calc(100% + 60px);
  z-index: 9; pointer-events: none;
  will-change: transform;
  mix-blend-mode: normal; opacity: 0.1;
  animation: grainBoil 1.4s steps(6, end) infinite;
}
@keyframes grainBoil {
  0%   { transform: translate3d(0, 0, 0); }
  16%  { transform: translate3d(-11px, 6px, 0); }
  33%  { transform: translate3d(8px, -9px, 0); }
  50%  { transform: translate3d(-6px, -12px, 0); }
  66%  { transform: translate3d(12px, 4px, 0); }
  83%  { transform: translate3d(-9px, 10px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* ---------- overhead bench lamp ---------- */
.bench-light {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(58% 46% at 50% 8%, rgba(244, 240, 232, 0.16), transparent 70%),
    radial-gradient(40% 60% at 50% -6%, rgba(255, 106, 42, 0.07), transparent 72%);
  /* animation declared with the sheen block further down */
}
@keyframes benchSweep {
  0%   { transform: translate3d(-11%, 0, 0) scale(1.05); opacity: 0.55; }
  50%  { transform: translate3d(0, 3%, 0) scale(1.12); opacity: 1; }
  100% { transform: translate3d(11%, 0, 0) scale(1.05); opacity: 0.55; }
}
/* ---------- dust in the light beam ---------- */
.bench-dust {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none; opacity: 0.5;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 22%, rgba(244,240,232,0.5), transparent 60%),
    radial-gradient(1.3px 1.3px at 34% 61%, rgba(244,240,232,0.42), transparent 60%),
    radial-gradient(1.8px 1.8px at 58% 14%, rgba(244,240,232,0.36), transparent 60%),
    radial-gradient(1.2px 1.2px at 76% 48%, rgba(244,240,232,0.46), transparent 60%),
    radial-gradient(1.5px 1.5px at 88% 74%, rgba(244,240,232,0.32), transparent 60%),
    radial-gradient(1.1px 1.1px at 21% 83%, rgba(244,240,232,0.4), transparent 60%);
  background-size: 260px 260px;
  animation: dustDrift 34s linear infinite;
}
@keyframes dustDrift {
  0%   { background-position: 0 0; }
  100% { background-position: 260px -520px; }
}

main, .topbar, .foot { position: relative; z-index: 1; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 24px;
  padding: 0 var(--gut); height: 62px;
  background: rgba(17, 18, 20, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.mark {
  display: flex; align-items: center; gap: 10px;
  color: var(--cream); text-decoration: none;
  font-family: var(--display); font-size: 21px;
  letter-spacing: 0.02em; text-transform: uppercase;
  white-space: nowrap;
}
.mark:hover { text-decoration: none; }
.mark-thin { color: var(--steel-dim); font-weight: 400; }
.crank {
  width: 20px; height: 20px; flex: none;
  stroke: var(--orange); stroke-width: 2.4; fill: none;
  stroke-linecap: square;
}
.crank circle { fill: var(--orange); stroke: none; }

.topnav {
  display: flex; gap: 22px; margin-left: auto;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.topnav a {
  color: var(--steel-dim); padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.topnav a:hover { color: var(--cream); border-bottom-color: var(--orange); text-decoration: none; }

.topcta {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--carbon); background: var(--orange);
  padding: 9px 16px; white-space: nowrap;
}
.topcta:hover { background: var(--ice); text-decoration: none; }

/* ---------- shared type ---------- */
.kicker {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 22px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ice);
}
/* the hero's kicker carries a rule, never a number — sections use .rail-code */
.tick {
  width: 26px; height: 2px; background: var(--orange); flex: none;
}

.display {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.5rem, 6.4vw, 5.1rem);
  line-height: 0.92;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--cream);
}
.display em {
  font-style: normal;
  color: var(--orange);
  display: inline-block;
}

.lede {
  max-width: 46ch;
  margin: 24px 0 0;
  font-size: clamp(1rem, 1.2vw, 1.09rem);
  color: var(--steel-dim);
  line-height: 1.72;
}

.mono-label {
  margin: 0 0 10px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--steel-faint);
}

.link-arrow {
  display: inline-block; margin-top: 8px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.link-arrow::after { content: " \2192"; }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.5fr);
  gap: clamp(28px, 3.4vw, 60px);
  align-items: start;
  padding: clamp(40px, 5vw, 76px) var(--gut) clamp(48px, 6vw, 90px);
  border-bottom: 1px solid var(--rule);
}
.hero-copy { position: sticky; top: 92px; }

.hero-figures {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px; margin: 40px 0 0;
  padding-top: 22px; border-top: 1px solid var(--rule);
}
.hero-figures div { margin: 0; }
.hero-figures dt {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--steel-faint); line-height: 1.5;
}
.hero-figures dd {
  margin: 6px 0 0;
  font-family: var(--display); font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  color: var(--cream); letter-spacing: 0.01em;
}

/* ---------- the stage (drawing + panel) ---------- */
.stage { min-width: 0; }

.stage-canvas {
  position: relative;
  padding: 20px 20px 18px;
  background:
    /* the bench top the drawing is lying on */
    linear-gradient(180deg,
      rgba(34, 35, 38, 0) 0%,
      rgba(34, 35, 38, 0) 58%,
      rgba(58, 46, 38, 0.5) 78%,
      rgba(78, 58, 42, 0.62) 100%),
    repeating-linear-gradient(96deg,
      rgba(201, 200, 196, 0.022) 0 2px,
      rgba(201, 200, 196, 0) 2px 7px),
    linear-gradient(180deg, rgba(34, 35, 38, 0.9), rgba(23, 25, 28, 0.9));
  border: 1px solid var(--rule);
}

/* lamp reflection travelling across the sheet — the sheen on a metal drawing */
.bench-sheen {
  /* Bounds never change: only the gradient inside travels, so this cannot
     widen the page at any point in its cycle. */
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none; opacity: 0.4;
  background-image: linear-gradient(74deg,
    transparent 42%,
    rgba(244, 240, 232, 0.09) 47%,
    rgba(244, 240, 232, 0.15) 50%,
    rgba(244, 240, 232, 0.09) 53%,
    rgba(244, 240, 232, 0.15) 50%,
    transparent 58%);
  background-size: 260% 100%;
  background-repeat: no-repeat;
  animation: sheenSweep 19s var(--ease) infinite alternate;
}
@keyframes sheenSweep {
  0%   { background-position: 130% 0; }
  100% { background-position: -30% 0; }
}


/* an incandescent bench lamp is never perfectly steady */
.bench-light { animation: benchSweep 26s var(--ease) infinite alternate,
                             lampFlicker 7.3s steps(1, end) infinite; }
@keyframes lampFlicker {
  0%, 62%, 100% { filter: brightness(1); }
  64% { filter: brightness(0.9); }
  66% { filter: brightness(1.04); }
  68% { filter: brightness(0.94); }
  71% { filter: brightness(1); }
}
.stage-canvas::before,
.stage-canvas::after {
  content: ""; position: absolute; width: 12px; height: 12px;
  border: 1px solid var(--orange);
}
.stage-canvas::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.stage-canvas::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.stage-tag {
  position: absolute; z-index: 2; margin: 0;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--steel-faint);
}
.stage-tag-a { top: 14px; left: 22px; }
.stage-tag-b { top: 14px; right: 22px; text-align: right; }

.drawing {
  width: 100%; height: auto;
  margin: 14px 0 6px;
  overflow: visible;
  position: relative; z-index: 1;
}

/* the exploded assembly sits under the lamp, not on a flat plate */
#frameParts {
  transform-box: fill-box; transform-origin: 50% 50%;
  animation: assemblyTurn 44s var(--ease) infinite alternate;
}
@keyframes assemblyTurn {
  0%   { transform: scale(0.996) rotate(-0.5deg); }
  100% { transform: scale(0.996) rotate(0.5deg); }
}

/* ink and brushed metal instead of clean vector fills */
.part-tube,
.part-wheel-rim,
.part-tyre,
.part-hub { filter: url(#partFinish); }
.part-spoke { filter: url(#partFinish); }

.datum { animation: datumPulse 9s var(--ease) infinite alternate; }
@keyframes datumPulse {
  0%   { opacity: 0.62; }
  100% { opacity: 1; }
}
.drawing-small { margin: 0; }

.datum {
  stroke: rgba(169, 221, 242, 0.28);
  stroke-width: 1; stroke-dasharray: 14 8 2 8;
}
.datum-soft { stroke: rgba(169, 221, 242, 0.14); stroke-dasharray: 3 7; }
.datum-label {
  fill: var(--steel-faint);
  font-family: var(--mono); font-size: 13px;
  letter-spacing: 0.16em;
}

/* exploded parts */
.part {
  cursor: pointer;
  transform-box: fill-box;
  transform-origin: 50% 50%;
}
.part-tube {
  fill: url(#alu);
  stroke: rgba(17, 18, 20, 0.55);
  stroke-width: 1;
  transition: transform 0.5s var(--ease-out), fill 0.35s var(--ease);
}
.part-ti .part-tube { fill: url(#ti); }
.part-carbon .part-tube { fill: url(#weave); stroke: rgba(201,200,196,0.28); }
.part-dark .part-tube { fill: #26292E; }

.part-wheel-rim { fill: none; stroke: #9C9B97; stroke-width: 9; }
.part-deep .part-wheel-rim { stroke-width: 22; }
.part-tyre { fill: none; stroke: #1B1D20; stroke-width: 15; }
.part-hub { fill: #5C5B58; }

.part-spoke {
  stroke: rgba(201, 200, 196, 0.4);
  stroke-width: 1.4;
}
.part-label {
  fill: var(--steel-dim);
  font-family: var(--mono); font-size: 13px;
  letter-spacing: 0.14em;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.part-leader { stroke: rgba(169, 221, 242, 0.4); stroke-width: 1; }

.part-glow {
  fill: none; stroke: var(--orange); stroke-width: 2;
  opacity: 0; transition: opacity 0.25s var(--ease);
}

.part:hover .part-tube,
.part:focus-visible .part-tube,
.part.is-active .part-tube {
  transform: translateY(-9px);
  fill: var(--orange);
}
.part:hover .part-glow,
.part:focus-visible .part-glow,
.part.is-active .part-glow { opacity: 1; }
.part:hover .part-label,
.part:focus-visible .part-label,
.part.is-active .part-label { opacity: 1; fill: var(--cream); }
.part:hover .part-leader,
.part.is-active .part-leader { stroke: var(--orange); }

.part:focus { outline: none; }
.part:focus-visible .part-glow { opacity: 1; stroke-dasharray: 5 4; }

.callout-line {
  stroke: rgba(169, 221, 242, 0.45); stroke-width: 1;
  stroke-dasharray: 4 5;
}
.callout-text {
  fill: var(--ice);
  font-family: var(--mono); font-size: 13px;
  letter-spacing: 0.1em;
}
.callout-dim { fill: var(--steel-dim); }

.frame-furniture text {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.14em; fill: var(--steel-faint);
}

/* size rail */
.size-rail-wrap {
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--rule);
}
.size-rail {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; background: var(--rule);
  border: 1px solid var(--rule);
}
.size-btn {
  display: flex; flex-direction: column; gap: 3px;
  padding: 12px 10px 10px; text-align: left;
  background: var(--ink-2); border: 0; cursor: pointer;
  transition: background 0.22s var(--ease), color 0.22s var(--ease);
}
.size-btn:hover { background: #212429; }
.size-letter {
  font-family: var(--display); font-size: 1.5rem; line-height: 1;
  color: var(--cream);
}
.size-meta, .size-stack {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.12em; color: var(--steel-faint);
}
.size-btn[aria-pressed="true"] {
  background: var(--orange); color: #12100E;
}
.size-btn[aria-pressed="true"] .size-letter,
.size-btn[aria-pressed="true"] .size-meta,
.size-btn[aria-pressed="true"] .size-stack { color: #12100E; }
.rail-note {
  margin: 12px 0 0; font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.12em;
  color: var(--steel-faint);
}

/* spec panel */
.specpanel {
  margin-top: 22px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--orange);
  background: rgba(23, 25, 28, 0.86);
}
.specpanel-inner { padding: 22px clamp(18px, 2.2vw, 30px) 24px; }
.specpanel-code {
  margin: 0 0 10px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--orange);
}
.specpanel-title {
  margin: 0; font-family: var(--display);
  font-size: clamp(1.6rem, 2.6vw, 2.15rem);
  line-height: 1; text-transform: uppercase; color: var(--cream);
}
.specpanel-mat {
  margin: 10px 0 0; max-width: 46ch;
  color: var(--steel-dim); font-size: 0.94rem;
}
.specpanel-list {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 14px 22px; margin: 22px 0 0; padding: 18px 0 0;
  border-top: 1px solid var(--rule);
}
.specpanel-list div { margin: 0; }
.specpanel-list dt {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--steel-faint);
}
.specpanel-list dd {
  margin: 5px 0 0;
  font-family: var(--mono); font-size: 0.95rem;
  color: var(--cream);
}
.specpanel-price {
  margin: 20px 0 0; font-family: var(--display);
  font-size: 1.6rem; color: var(--orange); letter-spacing: 0.01em;
}
.specpanel-link {
  display: inline-block; margin-top: 12px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.15em; text-transform: uppercase;
}
.specpanel.flash { animation: flashPanel 0.5s var(--ease); }
@keyframes flashPanel {
  0% { background: rgba(255, 106, 42, 0.14); }
  100% { background: rgba(23, 25, 28, 0.86); }
}

/* ---------- section shells ----------
   No shared "band + head" wrapper. Each section opens on its own
   structural device: a vertical rail, a docket masthead, a bare h2,
   a full-bleed title plate, a margin note, a figures strip.
   --------------------------------- */
.sheet,
.docket,
.console,
.mapwrap,
.ledger,
.record,
.house { border-bottom: 1px solid var(--rule); }

/* geometry — a spec sheet: heading runs down the left edge */
.sheet {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 0 clamp(28px, 4vw, 64px);
  padding: clamp(48px, 6vw, 96px) var(--gut);
  background: var(--ink-2);
}
.sheet-head {
  grid-row: 1 / span 3;
  border-right: 1px solid var(--rule);
  padding-right: clamp(18px, 2.2vw, 34px);
  align-self: start;
}
.rail-code {
  margin: 0 0 14px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--orange);
}
.rail-title {
  margin: 0;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  line-height: 0.94; text-transform: uppercase;
  color: var(--cream);
}
.rail-unit {
  margin: 14px 0 0;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.12em; color: var(--steel-faint);
}
.sheet-lede {
  grid-column: 2;
  max-width: 58ch; margin: 0 0 clamp(24px, 3vw, 40px);
  font-size: clamp(1rem, 1.2vw, 1.09rem);
  color: var(--steel-dim); line-height: 1.72;
}

.sheet-notes {
  grid-column: 2;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(20px, 2.4vw, 36px);
  margin: clamp(26px, 3.4vw, 44px) 0 0;
  padding-top: clamp(20px, 2.4vw, 30px);
  border-top: 1px solid var(--rule);
}
.sheet-notes dt {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ice); margin-bottom: 9px;
}
.sheet-notes dd {
  margin: 0; color: var(--steel-dim);
  font-size: 0.94rem; max-width: 40ch;
}
table { border-collapse: collapse; width: 100%; }
caption { text-align: left; }
th, td {
  padding: 13px 14px; text-align: left;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.06em; white-space: nowrap;
}
thead th {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--steel-faint); font-weight: 400;
  border-bottom-color: var(--rule-strong);
}
tbody th { color: var(--cream); font-weight: 700; }
tbody td { color: var(--steel-dim); }
tbody tr.is-current th,
tbody tr.is-current td { color: var(--orange); }
tbody tr.is-current th { box-shadow: inset 3px 0 0 var(--orange); }

.geo-table-wrap { grid-column: 2; overflow-x: auto; }

/* build — a job docket: masthead bar spans full width, then a two-up */
.docket {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: 0 clamp(28px, 3.6vw, 56px);
  padding: clamp(48px, 6vw, 92px) var(--gut);
}
.docket-head {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px clamp(20px, 3vw, 48px);
  margin-bottom: clamp(28px, 3.6vw, 52px);
  padding-bottom: 16px;
  border-bottom: 2px solid var(--orange);
}
.docket-title {
  grid-column: 1;
  margin: 0;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.1rem, 4.6vw, 3.7rem);
  line-height: 0.92; text-transform: uppercase;
  color: var(--cream);
}
.docket-slug {
  grid-column: 1;
  margin: 0; max-width: 46ch;
  color: var(--steel-dim); font-size: 1.02rem;
}
.docket-stamp {
  grid-column: 2; grid-row: 1 / span 2;
  align-self: end; margin: 0;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--steel-faint); text-align: right;
  max-width: 22ch;
}
.config-controls { min-width: 0; }

/* ---------- configurator ---------- */
.config-preview { align-self: start; }
.opt { border: 0; padding: 0; margin: 0 0 26px; }
.opt legend {
  display: flex; align-items: center; gap: 10px;
  padding: 0 0 12px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--cream);
}
.opt-step {
  display: inline-grid; place-items: center;
  width: 20px; height: 20px; background: var(--ice);
  color: var(--carbon); font-weight: 700; font-size: 10px;
}
.opt-row {
  display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  background: var(--rule); border: 1px solid var(--rule);
}
.opt-row-inline { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.opt-btn {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  padding: 13px 12px; background: var(--graphite);
  border: 0; cursor: pointer; text-align: left;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.opt-btn:hover { background: #2B2D31; }
.opt-btn b {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.06em; color: var(--cream); font-weight: 700;
}
.opt-btn i {
  font-style: normal; font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.08em; color: var(--steel-faint);
}
.opt-btn[aria-checked="true"] { background: var(--ice); }
.opt-btn[aria-checked="true"] b,
.opt-btn[aria-checked="true"] i { color: var(--carbon); }
.opt-btn-mini {
  align-items: center; text-align: center;
  font-family: var(--display); font-size: 1.2rem;
  padding: 12px 6px;
}
.chip {
  width: 100%; height: 10px; margin-bottom: 6px;
  border: 1px solid rgba(17, 18, 20, 0.5);
}
.chip-raw { background: linear-gradient(90deg, #EDEBE5, #9C9B97); }
.chip-graphite { background: #2A2C30; }
.chip-orange { background: var(--orange); }
.chip-ice { background: var(--ice); }

.config-preview {
  position: sticky; top: 92px;
  padding: 22px;
  background: var(--carbon);
  border: 1px solid var(--rule);
}
.config-name {
  margin: 16px 0 0;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--steel-dim);
}
.config-price {
  margin: 8px 0 0;
  font-family: var(--display); font-size: clamp(2.1rem, 3.6vw, 2.9rem);
  line-height: 1; color: var(--orange);
}
.config-lines {
  margin: 18px 0 22px; padding: 16px 0 0;
  border-top: 1px solid var(--rule); list-style: none;
}
.config-lines li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 7px 0;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--steel-faint);
  border-bottom: 1px dotted rgba(201, 200, 196, 0.12);
}
.config-lines li b { color: var(--aluminium); font-weight: 400; }

.btn-solid {
  display: inline-block; width: 100%;
  padding: 15px 20px; border: 0; cursor: pointer;
  background: var(--orange); color: #12100E;
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase;
  text-align: center;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn-solid:hover { background: var(--ice); text-decoration: none; }
.btn-solid:active { transform: translateY(1px); }

/* gearing — an instrument console: bare h2, then a recessed bay */
.console {
  padding: clamp(48px, 6vw, 92px) var(--gut);
  background: var(--carbon);
}
.console-title {
  max-width: 1180px; margin: 0 auto;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.1rem, 4.6vw, 3.7rem);
  line-height: 0.92; text-transform: uppercase;
  color: var(--cream);
}
.console-sub {
  max-width: min(1180px, 58ch);
  margin: 18px auto 0;
  color: var(--steel-dim); font-size: 1.02rem;
}
.console-body {
  max-width: 1180px; margin: clamp(26px, 3.4vw, 46px) auto 0;
  padding: clamp(18px, 2.4vw, 32px);
  background: var(--ink-2);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--orange);
}
.console-fig {
  margin: 0;
  padding: 18px;
  background: var(--carbon);
  border: 1px solid var(--rule);
}
.gearing-caption { margin: 12px 0 0; display: block; }
.gearing-caption span { color: var(--orange); }

.spin { transform-origin: 0 0; }
.spin-ring { animation: spinRing 3.4s linear infinite; }
.spin-cog { animation: spinCog 3.4s linear infinite; }
@keyframes spinRing { to { transform: rotate(360deg); } }
@keyframes spinCog { to { transform: rotate(360deg); } }
.cog-tooth { fill: #6E6D6A; }
.cog-selected { fill: var(--orange); }
.chain-line {
  stroke: rgba(201, 200, 196, 0.45); stroke-width: 3;
  fill: none; stroke-dasharray: 9 6;
  /* the chain creeping over the cassette — the drivetrain never quite stops */
  animation: chainCrawl 2.8s linear infinite;
}
@keyframes chainCrawl {
  to { stroke-dashoffset: -15; }
}

.console-strip {
  display: grid;
  grid-template-columns: minmax(0, 0.5fr) minmax(0, 1.5fr);
  gap: clamp(18px, 2.4vw, 32px);
  align-items: center;
  margin: clamp(18px, 2.2vw, 26px) 0 0;
}
.ratio-readout { display: block; }
.ratio-value {
  margin: 0; font-family: var(--display);
  font-size: clamp(3rem, 7vw, 4.6rem); line-height: 0.9;
  color: var(--orange);
}
.ratio-unit { font-size: 0.4em; color: var(--steel-dim); }

.gear-cogs {
  display: grid; grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 1px; margin: 0; padding: 0; list-style: none;
  background: var(--rule); border: 1px solid var(--rule);
}
.gear-cogs button {
  width: 100%; padding: 11px 2px; border: 0; cursor: pointer;
  background: var(--graphite); color: var(--cream);
  font-family: var(--mono); font-size: 11px;
  transition: background 0.18s var(--ease);
}
.gear-cogs button:hover { background: #2E3035; }
.gear-cogs button[aria-pressed="true"] {
  background: var(--orange); color: #12100E;
}

.console-lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(18px, 2.4vw, 40px);
  align-items: start;
  margin: clamp(18px, 2.2vw, 26px) 0 0;
  padding-top: clamp(18px, 2.2vw, 26px);
  border-top: 1px solid var(--rule);
}
.console-table { min-width: 0; overflow-x: auto; }
.gear-table { min-width: 0; }
.gear-note { margin: 0; max-width: 46ch; color: var(--steel-dim); }

/* route — a full-bleed survey sheet, edge to edge, no gutter */
.mapwrap {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 0;
  padding: 0;
  background: var(--ink-2);
}
.map-plate {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 10px clamp(24px, 3vw, 56px);
  padding: clamp(34px, 4vw, 60px) var(--gut) clamp(20px, 2.4vw, 30px);
}
.map-title {
  flex: 0 0 auto; margin: 0;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  line-height: 0.92; text-transform: uppercase;
  color: var(--cream);
}
.map-sub {
  flex: 1 1 320px; margin: 0; max-width: 62ch;
  color: var(--steel-dim); font-size: 0.98rem;
}
.route-draw {
  flex: 1 1 100%; margin: 0;
  padding-top: 12px; border-top: 1px dotted var(--rule);
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--orange);
}
.is-drawn .route-draw { visibility: hidden; }

.route-map {
  grid-column: 1 / -1;
  margin: 0; position: relative;
  background: var(--carbon);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
#routeSvg { width: 100%; height: auto; display: block; }
.route-grid line { stroke: rgba(169, 221, 242, 0.1); stroke-width: 1; }
.route-path {
  fill: none; stroke: var(--orange); stroke-width: 4;
  stroke-linejoin: round;
  stroke-dasharray: 2600; stroke-dashoffset: 2600;
}
.is-drawn .route-path {
  animation: drawLine 2.4s var(--ease-out) forwards;
}
@keyframes drawLine { to { stroke-dashoffset: 0; } }
.route-node { fill: var(--ice); }
.route-node-label {
  fill: var(--cream); font-family: var(--mono); font-size: 13px;
  letter-spacing: 0.1em;
}

.route-table {
  align-self: start; width: 100%; min-width: 0;
  padding: clamp(20px, 2.6vw, 34px) clamp(16px, 2vw, 26px) 0 var(--gut);
}
.route-table th, .route-table td { white-space: normal; }
.profile {
  margin: 0; padding: clamp(20px, 2.6vw, 34px) var(--gut) clamp(26px, 3vw, 44px) 0;
}
#profileSvg { width: 100%; height: auto; display: block; }
.profile-line { fill: none; stroke: var(--ice); stroke-width: 2; }
.profile-fill { fill: rgba(169, 221, 242, 0.12); }

/* bench — a wall ledger: sticky margin note beside a ruled timeline */
.ledger {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(28px, 3.6vw, 64px);
  padding: clamp(48px, 6vw, 92px) var(--gut);
}
.ledger-margin {
  align-self: start;
  position: sticky; top: 92px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}
.margin-title {
  margin: 0;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 0.92; text-transform: uppercase;
  color: var(--cream);
}
.margin-note {
  margin: 18px 0 0; max-width: 40ch;
  color: var(--steel-dim); font-size: 0.98rem;
}
.weeks {
  margin: 0; padding: 0; list-style: none;
  counter-reset: wk;
  border-top: 1px solid var(--rule-strong);
}
.weeks li {
  position: relative;
  padding: clamp(20px, 2.6vw, 32px) 0 clamp(20px, 2.6vw, 32px) clamp(38px, 4vw, 62px);
  border-bottom: 1px solid var(--rule);
}
.weeks li::before {
  content: ""; position: absolute;
  left: 0; top: calc(clamp(20px, 2.6vw, 32px) + 0.72em);
  width: 9px; height: 9px;
  background: var(--orange);
}
.step-n {
  display: block; margin-bottom: 8px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ice);
}
.weeks h3 {
  margin: 0 0 10px; font-family: var(--display);
  font-size: clamp(1.3rem, 2.2vw, 1.75rem); line-height: 1;
  text-transform: uppercase; color: var(--cream);
}
.weeks p { margin: 0; font-size: 0.94rem; color: var(--steel-dim); max-width: 54ch; }

/* record — a returns ledger: figures strip, bar chart, table, plain note */
.record { padding: clamp(48px, 6vw, 92px) var(--gut); background: var(--ink-2); }
.record-title {
  margin: 0;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.1rem, 4.6vw, 3.7rem);
  line-height: 0.92; text-transform: uppercase;
  color: var(--cream);
}
.record-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px; margin: clamp(24px, 3vw, 40px) 0 0;
  padding: 0; background: var(--rule);
  border: 1px solid var(--rule);
}
.record-strip div { margin: 0; padding: 16px 18px 18px; background: var(--carbon); }
.record-strip dt {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--steel-faint); line-height: 1.5;
}
.record-strip dd {
  margin: 8px 0 0; font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1;
  color: var(--orange);
}
.record-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(26px, 3.4vw, 56px);
  align-items: start;
  margin: clamp(30px, 3.6vw, 52px) 0 0;
}
.record-bars {
  display: grid; gap: 14px; align-content: start;
  padding: 20px;
  background: var(--carbon); border: 1px solid var(--rule);
}
.bar-row {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) 38px;
  align-items: center; gap: 12px; margin: 0;
}
.bar-year {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; color: var(--steel-dim);
}
.bar-track {
  height: 22px; background: rgba(201, 200, 196, 0.09);
  border: 1px solid var(--rule);
}
.bar-fill { display: block; height: 100%; background: var(--orange); }
.bar-val {
  font-family: var(--mono); font-size: 12px;
  color: var(--cream); text-align: right;
}
.record-table-wrap { overflow-x: auto; min-width: 0; }
.record-note {
  margin: clamp(24px, 3vw, 40px) 0 0;
  max-width: 66ch; color: var(--steel-dim);
}

/* fitting — a workshop card: one left column of details, form on the right */
.house {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 3.6vw, 64px);
  align-items: start;
  padding: clamp(48px, 6vw, 92px) var(--gut);
  background: var(--carbon);
}
.house-head { max-width: 46ch; }
.house-title {
  margin: 0 0 26px;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.1rem, 4.6vw, 3.7rem);
  line-height: 0.92; text-transform: uppercase;
  color: var(--cream);
}
.fit-dl { margin: 0 0 26px; display: grid; gap: 18px; }
.fit-dl div {
  display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px;
  padding-bottom: 16px; border-bottom: 1px solid var(--rule);
}
.fit-dl dt {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--steel-faint); padding-top: 3px;
}
.fit-dl dd { margin: 0; color: var(--cream); font-size: 0.96rem; }
.fit-small { margin: 0; max-width: 42ch; color: var(--steel-dim); }

.fit-form {
  padding: 26px;
  background: var(--carbon); border: 1px solid var(--rule);
  border-top: 3px solid var(--orange);
}
.field { margin-bottom: 16px; }
.field label {
  display: block; margin-bottom: 7px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--steel-faint);
}
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 13px;
  background: var(--graphite); color: var(--cream);
  border: 1px solid var(--rule); border-radius: 0;
  font-family: var(--mono); font-size: 13px;
  transition: border-color 0.2s var(--ease);
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--orange);
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: #E0483C; }
.form-status {
  margin: 14px 0 0; min-height: 20px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; color: var(--orange);
}
.fit-honest {
  margin: 18px 0 0; padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: 10px;
  line-height: 1.7; letter-spacing: 0.06em;
  color: var(--steel-faint);
}

/* ---------- footer ---------- */
.foot {
  padding: 40px var(--gut) 54px;
  display: grid; gap: 14px;
  border-top: 1px solid var(--rule);
}
.foot-brand { display: flex; align-items: center; gap: 12px; }
.crank-lg { width: 26px; height: 26px; }
.foot-brand p {
  margin: 0; font-family: var(--display);
  font-size: 1.3rem; text-transform: uppercase; color: var(--cream);
}
.foot-mono {
  margin: 0; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--steel-faint);
}
.foot-mono-dim { color: #45443F; }

/* ---------- reveal ---------- */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- 900px and down ---------- */
@media (max-width: 1180px) {
  .gear-cogs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { position: static; }
  .sheet { grid-template-columns: 1fr; }
  .sheet-head { grid-row: auto; border-right: 0; border-bottom: 1px solid var(--rule); padding: 0 0 22px; }
  .sheet-lede, .geo-table-wrap, .sheet-notes { grid-column: 1; }
  .docket, .house, .ledger { grid-template-columns: 1fr; }
  .ledger-margin { position: static; }
  .console-strip { grid-template-columns: 1fr; }
  .console-lower { grid-template-columns: 1fr; }
  .record-grid { grid-template-columns: 1fr; }
  .config-preview { position: static; }
}

@media (max-width: 760px) {
  :root { --step: 4px; }
  html { scroll-padding-top: 58px; }
  .topbar { height: 54px; gap: 14px; }
  .mark { font-size: 17px; }
  .topnav {
    display: none;
  }
  .topcta { margin-left: auto; padding: 8px 12px; font-size: 10px; }
  .stage-tag { font-size: 9px; letter-spacing: 0.12em; }
  .stage-tag-b { display: none; }
  .stage-canvas { padding: 14px 12px 12px; }
  .specpanel-inner { padding: 18px 16px 20px; }
  .size-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .size-letter { font-size: 1.25rem; }
  .hero-figures { gap: 12px; }
  .hero-figures dd { font-size: 1.5rem; }
  .mapwrap { grid-template-columns: 1fr; }
  .route-table { padding: 22px var(--gut) 0; }
  .profile { padding: 22px var(--gut) 30px 0; }
  .map-plate { padding-top: 38px; }
  .gear-cogs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .opt-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fit-dl div { grid-template-columns: 1fr; gap: 4px; }
  .foot { padding-bottom: 40px; }
  .sheet, .docket, .console, .ledger, .record, .house { padding-top: 46px; padding-bottom: 52px; }
}

@media (max-width: 420px) {
  .opt-row-inline { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fit-form { padding: 18px 16px; }
  .config-preview { padding: 16px 14px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .gridfield-layer { transform: none !important; }
  .route-path { stroke-dashoffset: 0 !important; }
  .spin-ring, .spin-cog { animation: none; }
  /* Ambient motion stops; the scene it was lighting must not disappear with it.
     The grain, the ink warp and the brushed metal are texture, not motion, and
     stay exactly as they are. */
  .grainfield { transform: none !important; animation: none; }
  .bench-sheen { transform: translate3d(0, 0, 0) !important; animation: none; }
  .bench-light { transform: none !important; filter: none !important; animation: none; }
  .bench-dust { background-position: 0 0 !important; animation: none; }
  #frameParts { transform: none !important; animation: none; }
  .datum { opacity: 1; animation: none; }
  .chain-line { stroke-dashoffset: 0 !important; animation: none; }
  .part:hover .part-tube,
  .part:focus-visible .part-tube,
  .part.is-active .part-tube { transform: none; fill: var(--orange); }
}