/* ==========================================================================
   beinfer.com — Linea Rossa
   Milan Metro 1964 signage world: one red band, enamel white, tunnel black,
   line diagrams with stations, direction-sign panels as actions.
   Single family: Archivo (variable width 62–125, weight 100–900).
   Fixed type steps only: 12 / 14 / 16 / 20 / 28 / 44 / 64 / 96.
   ========================================================================== */

/* Archivo variable (self-hosted; latin + latin-ext, upright) */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;

  --red: #d2232a;
  --red-press: #b01c22;
  --black: #141414;
  --ink: #1a1a1a;
  --ink-2: #4f4f4b;
  --steel: #6b6b66;
  --enamel: #f4f4f2;
  --white: #ffffff;
  --concrete: #c9c9c4;
  --concrete-2: #e2e2de;
  --on-dark-muted: #b5b5b0;

  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --t-12: 12px;
  --t-14: 14px;
  --t-16: 16px;
  --t-20: 20px;
  --t-28: 28px;
  --t-44: 44px;
  --t-64: 64px;
  --t-96: 96px;

  --gutter: clamp(20px, 5vw, 72px);
  --max: 1440px;
  --nav-h: 64px;
  --way-h: 40px;
  --band-h: clamp(150px, 21vh, 232px);
  --panel: 320px;

  --line-w: 8px;
  --station: 22px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--black) var(--enamel);
  scrollbar-width: thin;
  -webkit-text-size-adjust: 100%;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--enamel); }
::-webkit-scrollbar-thumb { background: var(--black); }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

body {
  margin: 0;
  background: var(--enamel);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-16);
  line-height: 1.55;
  font-stretch: 100%;
  caret-color: var(--red);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--red); color: var(--white); }

a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--red);
}
a:hover { text-decoration-color: var(--black); }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}
.section--red :focus-visible,
.site-footer :focus-visible,
.panel :focus-visible { outline-color: var(--white); }

h1, h2, h3, h4, p, ul, ol, dl, figure { margin: 0; }
ul, ol { padding: 0; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; }

.num { font-variant-numeric: tabular-nums; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: var(--gutter); top: -100px;
  z-index: 100;
  background: var(--black); color: var(--white);
  padding: 12px 16px;
  font-weight: 700; font-size: var(--t-14); text-transform: uppercase; letter-spacing: 0.06em;
  text-decoration: none;
}
.skip:focus { top: 8px; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* --------------------------------------------------------------------------
   Masthead: white nav strip + compact red wayfinder band (sticky)
   -------------------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav {
  background: var(--white);
  border-bottom: 1px solid var(--concrete);
}

.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  flex: none;
}
.brand img,
.brand svg { height: 34px; width: auto; }
.brand__word {
  font-weight: 800;
  font-size: var(--t-20);
  letter-spacing: -0.02em;
  line-height: 1;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  display: inline-block;
  padding: 10px 12px;
  font-size: var(--t-14);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.nav__links a:hover { color: var(--red); }
.nav__links a[aria-current="page"] {
  color: var(--red);
  box-shadow: inset 0 -3px 0 var(--red);
}

.nav .sign { height: 40px; padding-inline: 14px; }

.way {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  background: var(--red);
  color: var(--white);
  transition: grid-template-rows 0.32s var(--ease-out);
}
.way[data-on] { grid-template-rows: 1fr; }
.way__track {
  display: flex;
  align-items: center;
  min-height: 0;
  overflow: hidden;
  line-height: var(--way-h);
  white-space: nowrap;
  font-weight: 700;
  font-size: var(--t-14);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  will-change: transform;
}
.way__track span { padding-right: 3.5em; }
.way__track.is-wiping { animation: way-wipe 0.44s var(--ease-out); }

@keyframes way-wipe {
  0%   { transform: translateX(0); opacity: 1; }
  45%  { transform: translateX(-48px); opacity: 0; filter: blur(2px); }
  55%  { transform: translateX(48px); opacity: 0; filter: blur(2px); }
  100% { transform: translateX(0); opacity: 1; filter: blur(0); }
}

/* --------------------------------------------------------------------------
   The red band: the station name repeated edge to edge
   -------------------------------------------------------------------------- */

.band {
  position: relative;
  background-color: var(--red);
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent calc(var(--panel) - 1px),
    rgba(0, 0, 0, 0.16) calc(var(--panel) - 1px),
    rgba(0, 0, 0, 0.16) var(--panel)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.28);
  color: var(--white);
  overflow: hidden;
  height: var(--band-h);
  display: flex;
  align-items: center;
}

.band__track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  margin-left: calc(var(--gutter) - 0.35em);
  font-weight: 700;
  font-size: clamp(52px, 8vw, var(--t-96));
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: uppercase;
}
.band__track > * {
  margin: 0;
  padding-right: 1.15em;
  font: inherit;
  letter-spacing: inherit;
}

.band--doc { height: 112px; }
.band--doc .band__track { font-size: var(--t-44); }

/* --------------------------------------------------------------------------
   Sections and typography
   -------------------------------------------------------------------------- */

.section {
  padding-block: clamp(64px, 9vw, 128px);
}
.section--enamel { background: var(--enamel); }
.section--white { background: var(--white); }
.section--red { background: var(--red); color: var(--white); }
.section--black { background: var(--black); color: var(--white); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }

.display {
  font-size: var(--t-96);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-wrap: balance;
  max-width: 13ch;
}
.display em {
  font-style: normal;
  color: var(--red);
}
.display--stack { max-width: none; text-wrap: initial; }
.display--condensed { font-stretch: 80%; max-width: none; text-wrap: initial; letter-spacing: -0.025em; }

.h2 {
  font-size: var(--t-44);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
  max-width: 20ch;
}
.h3 {
  font-size: var(--t-28);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.h4 {
  font-size: var(--t-20);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.lead {
  font-size: var(--t-20);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 58ch;
}
.section--red .lead,
.section--black .lead { color: rgba(255, 255, 255, 0.88); }

.body { color: var(--ink-2); max-width: 66ch; }
.body + .body { margin-top: 16px; }

.handrail {
  width: 96px;
  height: 6px;
  border-radius: 3px;
  background: var(--black);
  margin-top: 24px;
}
.section--red .handrail,
.section--black .handrail { background: var(--white); }

.section-head { margin-bottom: clamp(40px, 5vw, 72px); }
.section-head .lead { margin-top: 24px; }

.stack > * + * { margin-top: 16px; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero__body {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
  padding-block: clamp(36px, 4vw, 52px) clamp(48px, 6vw, 88px);
}
.hero__copy .lead { margin-top: 24px; }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

/* --------------------------------------------------------------------------
   Direction sign (buttons / links)
   -------------------------------------------------------------------------- */

.sign {
  --sign-bg: var(--black);
  --sign-fg: var(--white);
  --sign-hover: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: 52px;
  padding: 0 20px;
  background: var(--sign-bg);
  color: var(--sign-fg);
  border: 2px solid var(--sign-bg);
  font-weight: 700;
  font-size: var(--t-14);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.sign svg {
  width: 20px;
  height: 20px;
  flex: none;
  transition: transform 0.28s var(--ease-out);
}
.sign:hover,
.sign:focus-visible {
  background: var(--sign-hover);
  border-color: var(--sign-hover);
  color: var(--white);
}
.sign:hover svg { transform: translateX(5px); }
.sign--down:hover svg { transform: translateY(5px); }
.sign:active { background: var(--red-press); border-color: var(--red-press); }

.sign--ghost {
  --sign-bg: transparent;
  --sign-fg: var(--ink);
  --sign-hover: var(--black);
  border-color: var(--black);
}
.sign--ghost:hover,
.sign--ghost:focus-visible { color: var(--white); }

.sign--white {
  --sign-bg: var(--white);
  --sign-fg: var(--black);
  --sign-hover: var(--black);
  border-color: var(--white);
}
.sign--white:hover,
.sign--white:focus-visible { color: var(--white); border-color: var(--white); }

.sign--red {
  --sign-bg: var(--red);
  --sign-fg: var(--white);
  --sign-hover: var(--black);
}

/* --------------------------------------------------------------------------
   Black information panel (station information)
   -------------------------------------------------------------------------- */

.panel {
  background: var(--black);
  color: var(--white);
}
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--red);
  color: var(--white);
  padding: 12px 24px;
  font-size: var(--t-12);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.panel__head svg { width: 18px; height: 18px; }
.panel__body { padding: 28px 24px 30px; }

.facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.facts > div {
  display: grid;
  grid-template-columns: 164px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.facts > div:first-child { border-top: 0; padding-top: 0; }
.facts dt {
  font-size: var(--t-12);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
  padding-top: 3px;
}
.facts dd {
  margin: 0;
  font-size: var(--t-16);
  font-weight: 500;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.facts dd a,
.doc .panel a { color: var(--white); text-decoration-color: var(--red); }
.facts dd a:hover,
.doc .panel a:hover { color: var(--white); text-decoration-color: var(--white); }

/* --------------------------------------------------------------------------
   Route: the line diagram with stations
   -------------------------------------------------------------------------- */

.route {
  --c: var(--red);
  --n: 4;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.route--black { --c: var(--black); }
.route--white { --c: var(--white); }

.stop {
  position: relative;
  padding: calc(var(--station) + 22px) 14px 0;
  text-align: center;
  min-width: 0;
}
.stop::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--station);
  height: var(--station);
  margin-left: calc(var(--station) / -2);
  border-radius: 50%;
  background: var(--white);
  border: 5px solid var(--c);
  z-index: 2;
}
.stop::after {
  content: "";
  position: absolute;
  top: calc(var(--station) / 2 - var(--line-w) / 2);
  left: 50%;
  width: 100%;
  height: var(--line-w);
  background: var(--c);
  transform-origin: left center;
  z-index: 1;
}
.stop:last-child::after { display: none; }

.stop--terminus::before { background: var(--c); }
.stop--planned::before {
  border-style: dashed;
  border-width: 3px;
  background: transparent;
}
.stop--planned::after { display: none; }
.stop--planned-link::after {
  background: repeating-linear-gradient(90deg, var(--c) 0 12px, transparent 12px 22px);
}
.stop--interchange::before {
  width: 30px;
  height: 30px;
  margin-left: -15px;
  top: -4px;
  border-width: 6px;
  box-shadow: 0 0 0 3px var(--white);
}

.route--black .stop::before { background: var(--white); }
.route--black .stop--terminus::before { background: var(--black); }

.stop__name {
  font-size: var(--t-20);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}
.stop__text {
  margin: 10px auto 0;
  font-size: var(--t-16);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 30ch;
}
.stop--planned .stop__name { color: var(--steel); }
.stop--planned .stop__text { color: var(--steel); }

.section--black .stop__text,
.section--red .stop__text { color: rgba(255, 255, 255, 0.82); }
.section--black .stop--planned .stop__name,
.section--black .stop--planned .stop__text { color: var(--on-dark-muted); }

/* return arc for the loop: sits above the line, from the last stop back to the first */
.route__return {
  grid-column: 1 / -1;
  order: -1;
  position: relative;
  height: 44px;
  margin: 0 calc(100% / (var(--n) * 2)) 8px;
  border: 2px dashed var(--c);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
}
.route__return::before {
  content: "";
  position: absolute;
  left: -7px;
  bottom: -2px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 9px solid var(--c);
}
.route__return span {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 10px;
  background: var(--white);
  font-size: var(--t-12);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
  white-space: nowrap;
}
.section--enamel .route__return span { background: var(--enamel); }

/* route drawing (only armed by JS, only without reduced motion) */
.route.is-armed .stop::before { transform: scale(0); }
.route.is-armed .stop::after { transform: scaleX(0); }
.route.is-armed .stop__name,
.route.is-armed .stop__text { opacity: 0; translate: 0 10px; }
.route.is-armed .route__return { opacity: 0; }

.route.is-live .stop::before {
  transform: scale(1);
  transition: transform 0.5s var(--ease-out) calc(var(--i, 0) * 0.22s);
}
.route.is-live .stop::after {
  transform: scaleX(1);
  transition: transform 0.7s var(--ease-out) calc(var(--i, 0) * 0.22s + 0.12s);
}
.route.is-live .stop__name,
.route.is-live .stop__text {
  opacity: 1;
  translate: 0 0;
  transition: opacity 0.5s ease calc(var(--i, 0) * 0.22s + 0.18s),
              translate 0.6s var(--ease-out) calc(var(--i, 0) * 0.22s + 0.18s);
}
.route.is-live .route__return {
  opacity: 1;
  transition: opacity 0.5s ease calc(var(--n) * 0.22s + 0.2s);
}

/* route legend */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 24px;
  font-size: var(--t-14);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.legend i {
  display: inline-block;
  width: 34px;
  height: 8px;
  background: var(--red);
}
.legend i.is-black { background: var(--black); }
.legend i.is-dashed {
  background: repeating-linear-gradient(90deg, var(--steel) 0 8px, transparent 8px 14px);
}

.route-group + .route-group { margin-top: clamp(56px, 7vw, 96px); }
.route-group .h3 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
}
.route-group .h3 i {
  display: inline-block;
  width: 40px;
  height: 10px;
  background: var(--red);
  flex: none;
}
.route-group .h3 i.is-black { background: var(--black); }

/* --------------------------------------------------------------------------
   Service panels (white signs on the red wall)
   -------------------------------------------------------------------------- */

.signs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.sign-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 100%;
  padding: 32px 32px 28px;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25), 0 14px 28px -18px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.sign-panel:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25), 0 22px 36px -18px rgba(0, 0, 0, 0.55);
}
.sign-panel .h3 { color: var(--ink); }
.sign-panel p { color: var(--ink-2); max-width: 46ch; }
.sign-panel .stations-inline { margin-top: auto; }
.sign-panel .sign { align-self: flex-start; }
.sign-panel:hover .sign { background: var(--red); border-color: var(--red); }
.sign-panel:hover .sign svg { transform: translateX(5px); }

.stations-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--t-14);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}
.stations-inline li { display: inline-flex; align-items: center; }
.stations-inline li + li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  margin: 0 12px;
}

/* --------------------------------------------------------------------------
   Two-column prose blocks, checklists, boards
   -------------------------------------------------------------------------- */

.cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 72px);
}
.cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols > div > .h3 { margin-bottom: 16px; }
.cols > div > .h4 { margin-bottom: 12px; }

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.checklist li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 14px;
  align-items: start;
  color: var(--ink-2);
}
.checklist li strong { color: var(--ink); font-weight: 700; }
.checklist svg {
  width: 24px;
  height: 24px;
  color: var(--red);
  margin-top: 1px;
}
.section--black .checklist li,
.section--red .checklist li { color: rgba(255, 255, 255, 0.85); }
.section--black .checklist li strong,
.section--red .checklist li strong { color: var(--white); }
.section--red .checklist svg { color: var(--white); }

.board {
  background: var(--black);
  color: var(--white);
}
.board__rows {
  list-style: none;
  margin: 0;
  padding: 0;
}
.board__rows li {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 20px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.board__rows li:first-child { border-top: 0; }
.board__rows b {
  font-weight: 700;
  font-size: var(--t-14);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  filter: brightness(1.35);
  padding-top: 3px;
}
.board__rows span { color: rgba(255, 255, 255, 0.86); }

/* --------------------------------------------------------------------------
   Contact strip
   -------------------------------------------------------------------------- */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
}
.contact .mail {
  font-size: var(--t-28);
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.address {
  font-style: normal;
  color: var(--ink-2);
  line-height: 1.6;
}
.address b { color: var(--ink); font-weight: 700; }

/* --------------------------------------------------------------------------
   Footer (the tunnel)
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--black);
  color: var(--white);
  border-top: 8px solid var(--red);
  padding-block: 56px 36px;
  font-size: var(--t-14);
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
}
.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
  margin-bottom: 20px;
}
.footer__brand img,
.footer__brand svg { height: 30px; width: auto; }
.footer__brand span { font-weight: 800; font-size: var(--t-20); letter-spacing: -0.02em; }
.footer__company {
  font-style: normal;
  color: var(--on-dark-muted);
  line-height: 1.7;
}
.footer__company b { color: var(--white); font-weight: 700; }
.footer__company a { color: var(--white); text-decoration-color: var(--red); }
.footer__company a:hover { text-decoration-color: var(--white); }
.footer h3 {
  font-size: var(--t-12);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
  margin-bottom: 14px;
}
.footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.footer__links a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
}
.footer__links a:hover { text-decoration: underline; text-decoration-color: var(--red); }
.footer__bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--on-dark-muted);
}

/* --------------------------------------------------------------------------
   Legal documents (Read mode)
   -------------------------------------------------------------------------- */

.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
  padding-block: clamp(48px, 6vw, 88px);
}
.doc {
  max-width: 72ch;
}
.doc .h2 { max-width: none; }
.doc__meta {
  margin-top: 16px;
  font-size: var(--t-14);
  color: var(--steel);
  font-weight: 500;
}
.doc__intro { margin-top: 28px; }
.doc section { margin-top: 44px; }
.doc section h2 {
  font-size: var(--t-16);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 18px;
  border-top: 2px solid var(--black);
  margin-bottom: 14px;
}
.doc section h3 {
  font-size: var(--t-16);
  font-weight: 700;
  margin: 22px 0 8px;
}
.doc p,
.doc li { color: var(--ink-2); }
.doc p + p,
.doc ul + p,
.doc ol + p,
.doc .callout + p { margin-top: 12px; }
.doc ul,
.doc ol { margin: 12px 0 0; padding-left: 22px; }
.doc li { margin-top: 8px; }
.doc li ul { margin-top: 8px; }
.doc strong { color: var(--ink); }
.doc a { color: var(--ink); }
.doc .callout {
  margin-top: 16px;
  padding: 18px 20px;
  background: var(--white);
  border: 1px solid var(--concrete);
}
.doc .callout p { margin: 0; }
.doc .callout p + p { margin-top: 8px; }
.doc .company {
  margin-top: 56px;
}
.doc .company .panel__body { padding: 24px; }

.doc-aside {
  position: sticky;
  top: calc(var(--nav-h) + var(--way-h) + 24px);
}
.doc-aside h2 {
  font-size: var(--t-12);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 14px;
}
.doc-aside ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.doc-aside a {
  display: block;
  padding: 8px 12px;
  font-size: var(--t-14);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--ink);
  border-left: 1px solid var(--concrete);
}
.doc-aside a:hover { color: var(--red); }
.doc-aside a[aria-current="page"] {
  color: var(--white);
  background: var(--black);
  border-left-color: var(--black);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1199px) {
  .display { font-size: var(--t-64); }
}

@media (max-width: 899px) {
  .hero__body,
  .contact,
  .cols,
  .cols--3,
  .doc-layout { grid-template-columns: 1fr; }
  .signs { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
  .doc-aside { position: static; order: -1; }
  .doc-aside ul { display: flex; flex-wrap: wrap; gap: 6px; }
  .doc-aside a { border-left: 0; border: 1px solid var(--concrete); }

  /* routes go vertical, like the diagram inside the car */
  .route { grid-template-columns: 1fr; }
  .stop {
    text-align: left;
    padding: 0 0 36px calc(var(--station) + 22px);
  }
  .stop:last-child { padding-bottom: 0; }
  .stop::before { left: 0; margin-left: 0; top: 1px; }
  .stop::after {
    top: var(--station);
    left: calc(var(--station) / 2 - var(--line-w) / 2);
    width: var(--line-w);
    height: calc(100% - var(--station));
    transform-origin: top center;
  }
  .stop--planned-link::after {
    background: repeating-linear-gradient(180deg, var(--c) 0 12px, transparent 12px 22px);
  }
  .stop--interchange::before { left: -4px; margin-left: 0; top: -3px; }
  .stop__text { margin-left: 0; max-width: 40ch; }
  .route.is-armed .stop::after { transform: scaleY(0); }
  .route.is-live .stop::after { transform: scaleY(1); }
  .route__return { display: none; }
  .route-group .h3 { margin-bottom: 28px; }
}

@media (max-width: 759px) {
  :root { --nav-h: 56px; --way-h: 34px; --band-h: 132px; }
  .display { font-size: var(--t-44); max-width: none; }
  .h2 { font-size: var(--t-28); }
  .h3 { font-size: var(--t-20); }
  .lead { font-size: var(--t-16); }
  .band__track { font-size: 44px; }
  .band--doc { height: 88px; }
  .band--doc .band__track { font-size: var(--t-28); }
  .nav__inner { flex-wrap: wrap; padding-block: 10px; gap: 8px 16px; }
  .nav__inner > nav { flex: 1 1 100%; min-width: 0; }
  .nav .sign { display: none; }
  .nav__links {
    width: 100%;
    flex-wrap: wrap;
    gap: 0 2px;
    margin-left: -8px;
  }
  .nav__links a { font-size: var(--t-12); padding: 8px 8px; letter-spacing: 0.04em; }
  .way__track { font-size: var(--t-12); }
  .sign { height: 48px; padding-inline: 16px; }
  .facts > div { grid-template-columns: 1fr; gap: 4px; }
  .panel__body { padding: 22px 20px 24px; }
  .board__rows li { grid-template-columns: 1fr; gap: 6px; padding: 16px 20px; }
  .footer__grid { grid-template-columns: 1fr; }
  .contact .mail { font-size: var(--t-20); }
  .sign-panel { padding: 24px 22px 22px; }
  .legend { gap: 10px 20px; }
}

/* --------------------------------------------------------------------------
   Motion preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .route.is-armed .stop::before,
  .route.is-armed .stop::after { transform: none; }
  .route.is-armed .stop__name,
  .route.is-armed .stop__text,
  .route.is-armed .route__return { opacity: 1; translate: 0 0; }
}

/* --------------------------------------------------------------------------
   Print: legal documents on paper
   -------------------------------------------------------------------------- */

@media print {
  :root { --gutter: 0; }
  .route.is-armed .stop::before,
  .route.is-armed .stop::after { transform: none; }
  .route.is-armed .stop__name,
  .route.is-armed .stop__text,
  .route.is-armed .route__return { opacity: 1; translate: 0 0; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .masthead,
  .band,
  .skip,
  .doc-aside,
  .site-footer nav,
  .footer__bottom,
  .sign { display: none !important; }
  .doc-layout { display: block; padding: 0; }
  .doc { max-width: none; }
  .doc p, .doc li { color: #000; }
  .doc section h2 { border-top-color: #000; }
  .doc a { text-decoration: none; color: #000; }
  .doc a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  .panel, .site-footer { background: #fff !important; color: #000 !important; border: 1px solid #000; }
  .panel__head { background: #fff !important; color: #000 !important; border-bottom: 1px solid #000; }
  .facts dt, .facts dd, .footer__company, .footer__company b { color: #000 !important; }
  .facts > div { border-top-color: #000; }
}
