/* A2B design system v2. Shared by every page; owned by the parent session. Rules and rationale: ../STYLE.md
   Palette from the subject: white streets (the page itself), Melbourne bluestone for mass and text,
   gold leaf for passages (arcade interiors), vermilion for the route and the one primary action. */

@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-latin-wdth-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colour */
  --white: #FFFFFF;          /* page = the street network */
  --stone: #EEEEEA;          /* quiet surfaces, footpaths */
  --stone-line: #D6D6CF;     /* dividers, input borders at rest */
  --bluestone: #2B3038;      /* building mass, body text (13.3:1 on white) */
  --bluestone-2: #59606B;    /* secondary text (6.3:1 on white, 5.5:1 on stone) */
  --gold: #F2C14E;           /* passage, open; selected options */
  --gold-wash: #FBEBC0;      /* large gold areas, hover on options */
  --route: #FF4F1A;          /* route lines only */
  --route-btn: #D93D0B;      /* primary button fill (white text 4.5:1) */
  --route-btn-hover: #BF3409;
  --closed: #8A9099;         /* closed-passage hatch lines */
  --ok: #1F7A45;
  --error: #B42318;

  /* Type: Archivo only. Width is part of the voice. */
  --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --w-expanded: 125%;        /* display */
  --w-wide: 112%;            /* headings */
  --w-normal: 100%;          /* body */
  --w-semi: 87.5%;           /* labels, captions, UI */
  --w-condensed: 75%;        /* street names on maps only */

  /* Scale (ratio ~1.25, base 18) */
  --fs-14: 14px; --fs-16: 16px; --fs-18: 18px; --fs-22: 22px; --fs-28: 28px;
  --fs-36: clamp(30px, 3.2vw, 36px);
  --fs-48: clamp(36px, 4.6vw, 48px);
  --fs-display: clamp(42px, 7.4vw, 96px);

  /* Shape: radius by hierarchy. Maps and plates are square; controls are softly rounded; markers are round. */
  --r-control: 10px;
  --r-panel: 16px;

  /* Motion (web-animation-design): ease-out to enter/exit, ease-in-out to move, ease for hover/colour. */
  --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);        /* out-cubic */
  --ease-out-strong: cubic-bezier(0.165, 0.84, 0.44, 1);  /* out-quart */
  --ease-in-out: cubic-bezier(0.645, 0.045, 0.355, 1);    /* in-out-cubic */
  --t-press: 120ms;   /* button press, hover colour */
  --t-ui: 200ms;      /* small enter/exit */
  --t-panel: 280ms;   /* step and panel changes */
  --t-route: 500ms;   /* a route morphing after user input */

  --gutter: clamp(18px, 4vw, 48px);
  --max: 1280px;
  --measure: 34em;

  /* z-index scale */
  --z-raised: 1;
  --z-overlay: 5;
  --z-bar: 10;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--bluestone);
  font-family: var(--sans);
  font-size: var(--fs-18);
  line-height: 1.55;
  font-weight: 400;
  font-stretch: var(--w-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--route); outline-offset: 3px; }
::selection { background: var(--gold); color: var(--bluestone); }

/* ---------- Type roles ---------- */
.t-display {
  margin: 0;
  font-size: var(--fs-display);
  font-weight: 800;
  font-stretch: var(--w-expanded);
  line-height: 0.96;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.t-h2 {
  margin: 0;
  font-size: var(--fs-48);
  font-weight: 750;
  font-stretch: var(--w-wide);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.t-h3 {
  margin: 0;
  font-size: var(--fs-22);
  font-weight: 700;
  font-stretch: var(--w-wide);
  line-height: 1.2;
  text-wrap: balance;
}
.t-lead { font-size: var(--fs-22); line-height: 1.45; max-width: var(--measure); text-wrap: pretty; }
.t-body { max-width: var(--measure); text-wrap: pretty; }
.t-label { font-size: var(--fs-14); font-weight: 600; font-stretch: var(--w-semi); line-height: 1.35; color: var(--bluestone-2); }
.t-small { font-size: var(--fs-16); line-height: 1.5; color: var(--bluestone-2); }
.t-map { font-size: 11px; font-weight: 600; font-stretch: var(--w-condensed); text-transform: uppercase; letter-spacing: 0.08em; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.btn {
  appearance: none; -webkit-appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 52px; padding: 0 24px;
  border: 0; border-radius: var(--r-control);
  background: var(--bluestone); color: var(--white);
  font: 650 var(--fs-16)/1 var(--sans); font-stretch: var(--w-semi); letter-spacing: 0.005em;
  text-decoration: none; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--t-press) ease, color var(--t-press) ease, transform var(--t-press) var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--route-btn); }
.btn-dark { background: var(--bluestone); }
.btn-ghost { background: transparent; color: var(--bluestone); box-shadow: inset 0 0 0 1.5px var(--bluestone); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--route-btn-hover); }
  .btn-dark:hover { background: #3A404A; }
  .btn-ghost:hover { background: var(--stone); }
}

/* ---------- Inputs ---------- */
.input {
  width: 100%; min-height: 52px; padding: 14px 16px;
  border: 1.5px solid var(--stone-line); border-radius: var(--r-control);
  background: var(--white); color: var(--bluestone);
  font: 400 var(--fs-18)/1.3 var(--sans);
  transition: border-color var(--t-press) ease;
}
.input::placeholder { color: #767C86; }
.input:focus-visible { outline: none; border-color: var(--bluestone); box-shadow: 0 0 0 3px rgba(255, 79, 26, 0.28); }
.input[aria-invalid="true"] { border-color: var(--error); }

/* ---------- Header and footer (same markup on every page; see STYLE.md) ---------- */
.site-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding: 0 var(--gutter);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font-weight: 850; font-stretch: var(--w-expanded); font-size: 22px; letter-spacing: -0.01em; text-decoration: none;
}
.wordmark svg { width: 26px; height: 26px; }
.head-link { font-size: var(--fs-16); font-weight: 600; font-stretch: var(--w-semi); min-height: 44px; display: inline-flex; align-items: center; }
.site-foot {
  padding: 40px var(--gutter) 48px; background: var(--stone);
  display: grid; gap: 20px 40px; grid-template-columns: minmax(0, 1fr) auto; align-items: end;
  font-size: var(--fs-16); color: var(--bluestone-2);
}
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-foot a { min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 640px) { .site-foot { grid-template-columns: 1fr; } }

/* ---------- Utilities ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.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; }
.decor { user-select: none; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:active { transform: none; }
  .input { transition: none; }
}
