:root {
  --ink: #1E1612;          /* warm ink */
  --wood: #5A2A14;
  --cream: #F4E9D6;
  --cream-dim: rgba(244, 233, 214, 0.55);
  --brass: #FFC233;        /* sunny yellow (kickers, highlights) */
  --sun: #F2552C;          /* Golden Gate orange */
  --red: #D7262E;          /* cable-car red */
  --yellow: #FFC233;
  --teal: #1FA39A;         /* Bay teal */
  --paper: #F6EEE2;        /* ticket cream */
  --paper-ink: #1E1612;
  --display: "Bricolage Grotesque", "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --serif: "Fraunces", Georgia, serif;
  --gutter: clamp(16px, 3.2vw, 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--ink); color: var(--cream); }
body { font-family: var(--mono); overflow-x: hidden; }
body.is-intro { overflow: hidden; }
a { color: inherit; text-decoration: none; }

/* ---------- HERO ---------- */
.backdrop { position: fixed; inset: 0; z-index: 0; }
.ride { position: relative; z-index: 1; height: 1700vh; }
.hero { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.ride__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; visibility: hidden; }
.ride__video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; opacity: 0; pointer-events: none; }
.ride__video.on { opacity: 1; }
.hero__img {
  position: absolute; inset: 0;
  clip-path: circle(0px at 50% 50%);
  will-change: clip-path;
}
.hero__pic { position: absolute; inset: 0; background: url("frames/hero.jpg") center / cover no-repeat; will-change: transform; }
.hero__tint { position: absolute; inset: 0; background: var(--sun); mix-blend-mode: multiply; opacity: 0; }
.hero__shade, .ride__shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(20, 11, 7, 0.72) 0%, rgba(20, 11, 7, 0.35) 34%, rgba(20, 11, 7, 0) 58%),
    linear-gradient(0deg, rgba(20, 11, 7, 0.35) 0%, rgba(20, 11, 7, 0) 30%),
    linear-gradient(180deg, rgba(20, 11, 7, 0.55) 0%, rgba(20, 11, 7, 0) 18%);
  opacity: 0;
}
.ride__shade { opacity: 1; }
.hero__copy {
  position: absolute; z-index: 2;
  left: 50%; top: 0; transform: translateX(-50%);
  --drop: clamp(64px, 13vh, 130px); --arch-h: clamp(46px, 4.6vw, 74px);
}
/* vintage hanging sign: navy panel, arched crest, cable-car red border */
.sign {
  --sign-red: #A8322B; --sign-navy: #14202A; --sign-cream: #F1E6C8;
  position: relative; width: clamp(290px, 36vw, 580px); padding-top: var(--drop);
  transform-origin: 50% 0; text-align: center; color: var(--sign-cream);
  filter: drop-shadow(0 22px 34px rgba(10, 6, 4, 0.55));
}
.sign__chain {
  position: absolute; top: 0; width: 5px; height: calc(var(--drop) + var(--arch-h));
  background: repeating-linear-gradient(180deg, #C9A04E 0 8px, #6E4E1E 8px 9px, transparent 9px 11px);
  border-radius: 3px;
}
.sign__chain--l { left: 14%; }
.sign__chain--r { right: 14%; }
.sign__arch {
  position: relative; z-index: 2; width: 54%; height: var(--arch-h); margin: 0 auto -4px;
  background: var(--sign-navy); border: 4px solid var(--sign-red); border-bottom: 0;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 2px;
}
.sign__eyebrow { font-family: "Cormorant SC", var(--serif); font-weight: 600; font-size: clamp(10px, 0.95vw, 15px); letter-spacing: 0.3em; text-transform: uppercase; padding-left: 0.3em; line-height: 1.2; }
.sign__ride { font-family: "Cormorant", var(--serif); font-style: italic; font-weight: 600; font-size: clamp(15px, 1.45vw, 24px); line-height: 1; }
.sign__panel {
  position: relative; z-index: 1;
  background: radial-gradient(120% 90% at 50% 40%, #1B2B37 0%, var(--sign-navy) 70%);
  border: 4px solid var(--sign-red); border-radius: 3px;
  box-shadow: 0 0 0 2px #0E0A08, inset 0 0 0 1px rgba(241, 230, 200, 0.07);
  padding: clamp(10px, 1.1vw, 18px) clamp(14px, 2vw, 32px) clamp(14px, 1.5vw, 24px);
  font-family: "Cormorant SC", var(--serif); font-weight: 600; line-height: 1;
}
.sign__the { font-size: clamp(20px, 2.1vw, 34px); letter-spacing: 0.06em; margin-bottom: 0.12em; }
.sign__big { font-size: clamp(34px, 4.1vw, 66px); letter-spacing: 0.02em; white-space: nowrap; }
.sign__big + .sign__big { margin-top: 0.04em; }
.hero__kicker { font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--brass); margin-bottom: 20px; }
/* art-nouveau display: tall, narrow capitals with a small "the" tucked in */
.hero__title {
  font-family: "Federant", var(--serif); font-weight: 400; margin: 0;
  font-size: clamp(64px, 10.5vw, 158px); line-height: 1; letter-spacing: -0.035em;
  text-shadow: 0 2px 30px rgba(20, 11, 7, 0.35);
}
.hero__line { display: flex; align-items: center; transform: scaleY(1.32); transform-origin: 0 0; margin-bottom: 0.34em; }
.hero__line--2 { margin-top: -0.06em; padding-left: 0.42em; }
.hero__title + .hero__sub { margin-top: 4px; }
.hero__title .hw { display: inline-block; }
.hero__title .ch { display: inline-block; will-change: transform; }
.hero__title em { color: var(--yellow); font-style: normal; }
.hero__the {
  font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 0.3em; letter-spacing: 0;
  color: var(--yellow); margin: -0.6em 0 0 0.14em; transform: scaleY(0.78); align-self: center;
}
.hero__sub { font-size: 14px; line-height: 1.7; color: rgba(244, 233, 214, 0.85); margin-top: 24px; max-width: 380px; }
.hero__hint {
  position: absolute; z-index: 2; left: 50%; bottom: 7vh; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
}
.hero__hint svg { animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }
.hero__copy, .hero__hint { opacity: 0; }

/* ---------- INTRO ---------- */
.intro { position: fixed; inset: 0; z-index: 10; pointer-events: none; overflow: hidden; }
.intro__bg { position: absolute; inset: 0; background: var(--paper); }
.intro__bg::after { /* paper grain */
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  opacity: 0.08; mix-blend-mode: multiply;
}

/* wordmark */
.wm {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; margin: 0; white-space: nowrap;
  font-family: "Archivo", var(--display); font-weight: 800; font-variation-settings: "wdth" 125;
  font-size: clamp(40px, 8.4vw, 132px); letter-spacing: -0.035em; line-height: 1; color: var(--paper-ink);
  display: flex; align-items: baseline;
}
.wm .ch { display: inline-block; will-change: transform; }
.wm__dot { display: inline-block; color: var(--red); will-change: transform; }

/* the "Do train ride" pill */
.pill {
  position: absolute; left: 0; top: 0; height: 68px; padding: 0; border: 0; cursor: pointer;
  display: flex; align-items: center; gap: 14px; overflow: hidden; white-space: nowrap;
  background: var(--paper-ink); color: var(--paper); border-radius: 999px; pointer-events: auto;
  font: 700 19px "Archivo", var(--display); font-variation-settings: "wdth" 110; letter-spacing: -0.005em;
  box-shadow: 0 18px 40px -16px rgba(30, 22, 18, 0.6); visibility: hidden; will-change: transform;
}
.pill:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
.pill__bell {
  flex: none; width: 52px; height: 52px; margin-left: 8px; border-radius: 50%;
  display: grid; place-items: center; background: var(--red); color: var(--paper);
}
.pill__label { display: block; overflow: hidden; padding: 4px 0; }
.pill__label span { display: block; }
.pill__arrow { flex: none; width: 52px; margin-right: 8px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); color: var(--paper-ink); font-size: 22px; }
.pill__arrow::before { content: ""; } /* scale is animated by GSAP; keep CSS transforms off this element */
.pill:hover { box-shadow: 0 22px 46px -14px rgba(30, 22, 18, 0.7); }
.pill.ready .pill__bell svg { animation: ring 2.4s ease-in-out infinite; transform-origin: 50% 15%; }
@keyframes ring { 0%, 70%, 100% { rotate: 0deg; } 75% { rotate: 16deg; } 82% { rotate: -14deg; } 89% { rotate: 8deg; } 95% { rotate: -4deg; } }

/* photo tiles */
.grid { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
.tile {
  position: absolute; left: 0; top: 0; overflow: hidden; border-radius: 14px; visibility: hidden;
  background: #d8cbb8; will-change: transform, width, height; box-shadow: 0 14px 30px -18px rgba(30, 22, 18, 0.55);
}
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* wooden window frame that grows in around photo 1 */
.wframe { position: absolute; inset: 0; pointer-events: none; }
.wf { position: absolute; display: block; background: linear-gradient(135deg, #6B2E12, #9A4A1E 45%, #5A240E); box-shadow: 0 0 0 1px rgba(0,0,0,0.25) inset; }
.wf--t { left: 0; right: 0; top: 0; height: 0; }
.wf--b { left: 0; right: 0; bottom: 0; height: 0; }
.wf--l { left: 0; top: 0; bottom: 0; width: 0; }
.wf--r { right: 0; top: 0; bottom: 0; width: 0; }

/* six-blade iris */
.iris { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#irisPath { fill: var(--paper-ink); }
#irisBlades { fill: none; stroke: #4A382C; stroke-width: 1.5; }

/* sound toggle */
.sound {
  position: absolute; right: calc(var(--gutter) + 6px); top: calc(var(--gutter) + 6px); pointer-events: auto;
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 999px; cursor: pointer;
  background: rgba(30, 22, 18, 0.06); border: 1px solid rgba(30, 22, 18, 0.18); color: var(--paper-ink);
  font: 600 11px var(--mono); letter-spacing: 0.18em; text-transform: uppercase; opacity: 0;
}
.sound__icon { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); }
.sound[aria-pressed="false"] .sound__icon { background: transparent; box-shadow: 0 0 0 2px var(--paper-ink) inset; }
.intro__skip {
  position: absolute; left: 50%; bottom: calc(var(--gutter) + 6px); transform: translateX(-50%);
  pointer-events: auto; background: none; border: 1px solid rgba(30, 22, 18, 0.25);
  color: var(--paper-ink); font: 11px var(--mono); letter-spacing: 0.2em; text-transform: uppercase;
  padding: 9px 16px; cursor: pointer; opacity: 0; visibility: hidden;
}

/* ---------- HUD ---------- */
.hud {
  position: fixed; inset: 0; z-index: 20; pointer-events: none;
  font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase;
}
.hud a, .hud nav { pointer-events: auto; }
.br { position: absolute; width: 26px; height: 26px; border: 0 solid var(--cream); opacity: 0; }
.br--tl { border-top-width: 2px; border-left-width: 2px; }
.br--tr { border-top-width: 2px; border-right-width: 2px; }
.br--bl { border-bottom-width: 2px; border-left-width: 2px; }
.br--br { border-bottom-width: 2px; border-right-width: 2px; }

.hud__tl, .hud__tr, .hud__bl, .hud__br { position: absolute; display: flex; align-items: center; gap: 18px; }
.hud__tl { left: calc(var(--gutter) + 32px); top: calc(var(--gutter) + 22px); }
.hud__tr { right: calc(var(--gutter) + 32px); top: calc(var(--gutter) + 22px); }
.hud__bl { left: calc(var(--gutter) + 32px); bottom: calc(var(--gutter) + 22px); }
.hud__br { left: calc(var(--gutter) + 32px); bottom: calc(var(--gutter) + 22px); } /* bottom-right is kept free for the "Made with Emergent" badge */
.hud__logo { font-weight: 600; color: var(--cream); }
.hud__dim { color: var(--cream-dim); }
.hud__strong { font-weight: 600; color: var(--cream); }
.hud__tl, .hud__br { opacity: 0; }
.beats { display: inline-flex; gap: 4px; }
.beats i { width: 8px; height: 8px; border: 1px solid var(--cream-dim); }
.beats i { border-color: rgba(255, 194, 51, 0.6); }
.beats i.on { background: var(--yellow); border-color: var(--yellow); }
/* HUD colours: cream text with yellow and teal highlights (no grey) */
#tl2, #frame { color: var(--yellow); }
#bar, .hud__bl .hud__dim { color: var(--teal); }
.hud__logo, .hud__strong { color: var(--paper); }
.hud, .hud__tc { font-variant-numeric: tabular-nums; }

/* ---------- STEP CARDS (stops + history) ---------- */
/* A coloured block (station name) joined by a notch to a white text card.
   Cards alternate sides of the screen, and the block sits on the outer edge. */
.stops, .facts { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.step {
  position: absolute; display: flex; align-items: stretch; visibility: hidden;
  --c: var(--red); --on: #fff;
  filter: drop-shadow(0 18px 34px rgba(20, 8, 4, 0.35));
}
.step--left { left: calc(var(--gutter) + 3vw); }
.step--right { right: calc(var(--gutter) + 3vw); flex-direction: row-reverse; }
.step--stop { top: 50%; translate: 0 -50%; }
.step--fact { bottom: calc(11vh + 78px); }

.step__block {
  position: relative; flex: none; width: 230px; min-height: 230px; padding: 24px 22px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 82%, #fff 18%), var(--c) 55%, color-mix(in srgb, var(--c) 85%, #000 15%));
  color: var(--on); border-radius: 10px; will-change: transform;
}
/* real photo of the place, with the card colour washing up from the bottom */
.step__media { position: absolute; inset: 0; border-radius: 10px; overflow: hidden; z-index: 0; }
.step__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.step__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--c) 0%, color-mix(in srgb, var(--c) 78%, transparent) 30%, color-mix(in srgb, var(--c) 10%, transparent) 62%, transparent 80%);
}
.step__name, .step__num { position: relative; z-index: 1; text-shadow: 0 1px 12px color-mix(in srgb, var(--c) 70%, transparent); }
/* the little pointer where block meets card */
.step__block::after {
  content: ""; position: absolute; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  background: color-mix(in srgb, var(--c) 92%, #000 8%); rotate: 45deg; border-radius: 2px;
}
.step--left .step__block::after { right: -7px; }
.step--right .step__block::after { left: -7px; }
.step__name { font-family: "Archivo", var(--display); font-weight: 800; font-variation-settings: "wdth" 112; font-size: 30px; line-height: 0.98; letter-spacing: -0.02em; }
.step__num { font: 600 11px var(--mono); letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.85; margin-top: 10px; }

.step__body {
  position: relative; width: 380px; margin: 0 12px; padding: 24px 26px 22px;
  background: #FBF8F3; color: #3F3631; border-radius: 10px;
  display: flex; flex-direction: column; will-change: clip-path;
}
.step__head { display: flex; align-items: center; gap: 12px; font-family: "Archivo", var(--display); font-weight: 600; font-variation-settings: "wdth" 100; font-size: 21px; color: var(--paper-ink); }
.step__plus { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #5B514B; display: grid; place-items: center; font: 600 18px/1 var(--display); color: #5B514B; }
.step__text { font: 14px/1.6 "Archivo", var(--display); font-variation-settings: "wdth" 100; color: #6A5F58; margin: 14px 0 16px 40px; }
.step__icon { margin-top: auto; width: 34px; height: 34px; color: #B5ABA2; }
.step__icon svg { width: 100%; height: 100%; display: block; }

/* history cards: same layout, a little smaller */
.step--fact .step__block { width: 170px; min-height: 170px; padding: 18px; }
.step--fact .step__name { font-size: 22px; }
.step--fact .step__body { width: 340px; padding: 20px 22px 18px; }
.step--fact .step__head { font-size: 18px; }
.step--fact .step__text { font-size: 13px; margin: 10px 0 12px 40px; }
.step--fact .step__icon { width: 28px; height: 28px; }

/* ---------- TAGS (pinned to landmarks in the frame) ---------- */
.tags { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.tag { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform, opacity; }
.tag__dot {
  position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--paper); background: var(--yellow);
  box-shadow: 0 0 0 5px rgba(255, 194, 51, 0.35); animation: ping 1.6s ease-out infinite;
}
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255, 194, 51, 0.6); } 100% { box-shadow: 0 0 0 14px rgba(255, 194, 51, 0); } }
.tag__line { position: absolute; left: -1px; bottom: 7px; width: 2px; height: 44px; background: var(--paper); }
.tag__label {
  position: absolute; left: -2px; bottom: 50px; white-space: nowrap;
  padding: 8px 12px 9px; background: var(--teal); border-radius: 8px 8px 8px 0;
  box-shadow: 0 10px 24px -8px rgba(20, 8, 4, 0.6);
}
.tag__name { display: block; font-family: var(--display); font-size: 15px; font-weight: 800; letter-spacing: -0.01em; color: var(--paper); }
.tag__sub { display: block; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--yellow); margin-top: 3px; }
.tag__sub:empty { display: none; }
.tag.flip .tag__label { left: auto; right: -2px; border-radius: 8px 8px 0 8px; text-align: right; }

/* ---------- ROUTE progress ---------- */
.route {
  position: absolute; z-index: 3; left: 50%; bottom: calc(11vh + 18px); transform: translateX(-50%);
  width: min(680px, 62vw); height: 40px; opacity: 0; pointer-events: none;
}
.route__track { position: absolute; left: 0; right: 0; top: 18px; height: 4px; border-radius: 4px; overflow: hidden; background: rgba(244, 233, 214, 0.25); }
.route__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: var(--yellow); transform: scaleX(0); transform-origin: left center; }
.route__dots { position: absolute; inset: 0; }
.route__dot { position: absolute; top: 15px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--ink); border: 2px solid rgba(244, 233, 214, 0.5); transition: border-color 0.3s, background 0.3s; }
.route__dot.on { background: var(--red); border-color: var(--paper); transform: scale(1.25); }
.route__dot span {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cream-dim); transition: color 0.3s;
}
.route__dot.on span { color: var(--cream); }
.route__dot:last-child span { left: auto; right: -4px; transform: none; }
.route__car { position: absolute; top: -2px; left: 0; margin-left: -14px; color: var(--red); filter: drop-shadow(0 1px 6px rgba(20, 11, 7, 0.6)); }

/* ---------- loader ---------- */
.loader {
  position: absolute; z-index: 3; left: 50%; top: calc(var(--gutter) + 60px); transform: translateX(-50%);
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--cream-dim);
  opacity: 0; transition: opacity 0.4s; pointer-events: none;
}
.loader.on { opacity: 1; }

/* ---------- END ---------- */
.end {
  position: relative; z-index: 1; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 18vh calc(var(--gutter) + 4vw) 0;
  background:
    radial-gradient(70% 60% at 15% 0%, rgba(242, 85, 44, 0.32), transparent 60%),
    radial-gradient(60% 50% at 95% 100%, rgba(31, 163, 154, 0.28), transparent 60%),
    var(--ink);
}
.end__kicker { font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--brass); margin-bottom: 20px; }
.end__again {
  align-self: flex-start; margin-top: 7vh; display: inline-flex; align-items: center; gap: 14px;
  background: none; border: 1px solid rgba(244, 233, 214, 0.35); color: var(--cream);
  font: 12px var(--mono); letter-spacing: 0.22em; text-transform: uppercase; padding: 14px 22px; cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.end__again:hover { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.end__credits {
  display: flex; flex-wrap: wrap; gap: 12px 36px; margin-top: auto; padding: 8vh 0 var(--gutter);
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(244, 233, 214, 0.4);
}

@media (max-width: 720px) {
  .hud { font-size: 10px; letter-spacing: 0.18em; }
  .hud__tl, .hud__tr, .hud__bl, .hud__br { gap: 10px; }
  .hud__tl { flex-direction: column; align-items: flex-start; gap: 4px; }
  .hud__tr .hud__dim, .hud__bl { display: none; }
  .hero__copy { --drop: 118px; --arch-h: 48px; }
  .sign__chain--l { left: 36%; }
  .sign__chain--r { right: 36%; }
  .step { left: var(--gutter); right: var(--gutter); top: auto; translate: none; bottom: calc(8vh + 78px); }
  .step--right { flex-direction: row-reverse; }
  .step__block, .step--fact .step__block { width: 122px; min-height: 0; padding: 12px; }
  .step__name, .step--fact .step__name { font-size: 15.5px; font-variation-settings: "wdth" 100; overflow-wrap: anywhere; }
  .step__num { font-size: 9px; margin-top: 6px; }
  .step__body, .step--fact .step__body { flex: 1; width: auto; margin: 0 8px; padding: 14px 16px; }
  .step__head, .step--fact .step__head { font-size: 15px; gap: 8px; }
  .step__plus { width: 22px; height: 22px; font-size: 15px; }
  .step__text, .step--fact .step__text { font-size: 12px; margin: 8px 0 0 0; }
  .step__icon { display: none; }
  .route { width: calc(100vw - 2 * var(--gutter) - 24px); bottom: calc(8vh + 10px); }
  .route__dot span { display: none; }
  .hero__shade, .ride__shade { background: linear-gradient(0deg, rgba(20, 11, 7, 0.8) 0%, rgba(20, 11, 7, 0.3) 50%, rgba(20, 11, 7, 0) 75%); }
}

/* closing section: the ride readouts step aside */
.hud__br, .br { transition: opacity 0.4s; }
body.at-end .hud__br { opacity: 0 !important; }
body.at-end .br { opacity: 0 !important; }

/* ---------- SOUNDTRACK: "now playing" control in the top bar ---------- */
.np {
  position: absolute; right: calc(var(--gutter) + 26px); top: calc(var(--gutter) + 8px);
  display: flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border-radius: 999px;
  background: var(--paper); color: var(--paper-ink); pointer-events: auto;
  border: 1.5px solid rgba(201, 162, 39, 0.55); box-shadow: 0 12px 28px -12px rgba(20, 8, 4, 0.6);
  text-transform: none; letter-spacing: 0;
}
.np__eq { flex: none; display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; margin-right: 4px; }
.np__eq i { width: 3px; height: 4px; border-radius: 2px; background: var(--red); }
.np.is-playing .np__eq i { animation: eq 0.9s ease-in-out infinite; }
.np.is-playing .np__eq i:nth-child(2) { animation-delay: -0.3s; }
.np.is-playing .np__eq i:nth-child(3) { animation-delay: -0.6s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }
.np__meta {
  display: flex; flex-direction: column; align-items: flex-start; min-width: 0; width: 190px; margin-right: 4px;
  background: none; border: 0; padding: 2px 4px; cursor: pointer; color: inherit; text-align: left; border-radius: 8px;
}
.np__meta:hover .np__title { text-decoration: underline; text-underline-offset: 2px; }
.np__title, .np__artist { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np__title { font: 700 13px "Archivo", var(--display); font-variation-settings: "wdth" 105; }
.np__artist { font: 11px var(--mono); color: #7A6D64; margin-top: 2px; }
.np__btn {
  flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: transparent; color: var(--paper-ink); transition: background 0.2s;
}
.np__btn:hover { background: rgba(30, 22, 18, 0.08); }
.np__btn svg { width: 16px; height: 16px; fill: currentColor; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.np__btn--play { width: 40px; height: 40px; background: var(--red); color: var(--paper); }
.np__btn--play:hover { background: #B81F27; }
.np__btn--play .i-pause, .np.is-playing .np__btn--play .i-play { display: none; }
.np.is-playing .np__btn--play .i-pause { display: block; }
.np button:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

/* the playlist card drops down below it */
.player { position: fixed; z-index: 30; right: calc(var(--gutter) + 26px); top: calc(var(--gutter) + 66px); pointer-events: none; }
.player__card {
  width: min(380px, calc(100vw - 2 * var(--gutter))); padding: 14px 14px 10px; border-radius: 18px;
  background: var(--paper); color: var(--paper-ink); border: 1.5px solid rgba(201, 162, 39, 0.55);
  box-shadow: 0 24px 60px -18px rgba(20, 8, 4, 0.65); visibility: hidden; opacity: 0; transform-origin: 90% 0;
}
.player.open .player__card { pointer-events: auto; }
.player__head { display: flex; align-items: center; gap: 10px; padding: 2px 4px 10px; }
.player__title { font: 600 11px var(--mono); letter-spacing: 0.2em; text-transform: uppercase; }
.player__stamp {
  font: 700 9px var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--red);
  border: 1.5px solid var(--red); border-radius: 5px; padding: 3px 6px 2px; rotate: -5deg;
}
.player__close { margin-left: auto; width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(30, 22, 18, 0.08); color: var(--paper-ink); font-size: 12px; }
.player__hint { display: none; margin: 0 4px 10px; font: 600 12px var(--mono); color: var(--red); }
.player.nudge .player__hint { display: block; }
.player__embed { border-radius: 12px; overflow: hidden; background: #282828; height: 152px; }
.player__embed iframe { display: block; width: 100%; border: 0; }
.player__list { list-style: none; margin: 10px 0 0; padding: 0; max-height: min(300px, 40vh); overflow-y: auto; counter-reset: t; }
.player__list li { counter-increment: t; }
.player__list button {
  width: 100%; display: grid; grid-template-columns: 28px 1fr; gap: 2px 8px; align-items: center; text-align: left;
  padding: 7px 6px; border: 0; border-radius: 8px; background: none; cursor: pointer; color: var(--paper-ink);
}
.player__list button::before { content: counter(t); grid-row: span 2; font: 11px var(--mono); color: #9A8E85; text-align: right; }
.player__list button:hover { background: rgba(30, 22, 18, 0.06); }
.player__list .t { font: 600 13px "Archivo", var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player__list .a { font: 11px var(--mono); color: #7A6D64; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player__list li.on button { background: rgba(215, 38, 46, 0.1); }
.player__list li.on .t { color: var(--red); }

@media (max-width: 720px) {
  .np { right: var(--gutter); top: calc(var(--gutter) + 4px); padding: 4px 4px 4px 10px; gap: 2px; }
  .np__meta { width: 92px; }
  .np__artist { display: none; }
  .np__btn { width: 30px; height: 30px; }
  .np__btn--play { width: 34px; height: 34px; }
  .player { right: var(--gutter); left: var(--gutter); top: calc(var(--gutter) + 54px); }
  .player__card { width: auto; }
}

/* photo credits */
.end__photos { margin-top: 5vh; font-size: 11px; color: rgba(244, 233, 214, 0.55); }
.end__photos summary { cursor: pointer; letter-spacing: 0.2em; text-transform: uppercase; }
.end__photos ul { list-style: none; margin-top: 12px; display: grid; gap: 6px; line-height: 1.5; }
.end__photos a { color: var(--paper); text-decoration: underline; text-underline-offset: 2px; }

/* the top-right corner bracket would poke through the now-playing control */
#brTR { display: none; }

/* ---------- STATION PASSES (hanging cards in the closing section) ---------- */
.line { position: relative; margin-top: 6vh; margin-inline: calc(-1 * (var(--gutter) + 4vw)); }
.line__track { position: relative; padding: 0 calc(var(--gutter) + 4vw); }
.line__wire { position: absolute; left: 0; top: 0; width: 100%; height: 140px; overflow: visible; pointer-events: none; }
.line__wire path { fill: none; stroke: rgba(244, 233, 214, 0.55); stroke-width: 1.5; }
.line__cards { position: relative; display: flex; justify-content: space-between; gap: 22px; padding-bottom: 40px; }

.hanger { position: relative; flex: 0 1 236px; min-width: 0; transform-origin: 50% 0; will-change: transform; }
.hanger__string { display: block; width: 1.5px; margin: 0 auto; background: rgba(244, 233, 214, 0.55); }
.hanger__clip { position: relative; z-index: 2; display: block; width: 26px; height: 18px; margin: -2px auto -9px; }
.hanger__clip svg { width: 100%; height: 100%; display: block; }

.pass { position: relative; aspect-ratio: 236 / 380; perspective: 1100px; cursor: pointer; outline: none; }
.pass:focus-visible .pass__face { box-shadow: 0 0 0 3px var(--teal), 0 24px 40px -18px rgba(0, 0, 0, 0.6); }
.pass__inner { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.pass__face {
  position: absolute; inset: 0; border-radius: 20px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: var(--paper); color: var(--paper-ink); padding: 14px 14px 12px; display: flex; flex-direction: column;
  box-shadow: 0 24px 40px -18px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}
.pass__back { transform: rotateY(180deg); }

/* front */
.pass__top { display: flex; align-items: center; justify-content: space-between; font: 600 11px var(--mono); color: #8A7C72; padding: 2px 4px 10px; }
.pass__top b { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--paper-ink); }
.pass__top b::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.pass__photo { flex: 1; min-height: 0; border-radius: 14px; overflow: hidden; background: #d8cbb8; }
.pass__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pass__name { font: 800 21px/1.05 "Archivo", var(--display); font-variation-settings: "wdth" 108; letter-spacing: -0.015em; margin: 12px 4px 0; }
.pass__land { font: italic 400 15px/1.2 var(--serif); color: var(--red); margin: 3px 4px 0; }
.pass__foot { display: flex; align-items: center; justify-content: space-between; margin: 10px 4px 2px; font: 12px "Archivo", var(--display); color: #8A7C72; }
.pass__turn {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper-ink); color: var(--paper);
}
.pass__turn svg { width: 15px; height: 15px; }

/* back: cream paper with a palette sheen that slides as the card turns */
.pass__back { --shine: 30%; }
.pass__back::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(215, 38, 46, 0.2) 0%, rgba(242, 85, 44, 0.18) 22%, rgba(255, 194, 51, 0.26) 42%, rgba(246, 238, 226, 0) 55%, rgba(31, 163, 154, 0.22) 72%, rgba(47, 92, 122, 0.18) 100%);
  background-size: 260% 260%; background-position: var(--shine) 50%;
}
.pass__back > * { position: relative; }
.pass__brow { display: flex; align-items: center; justify-content: space-between; font: 600 11px var(--mono); color: #6F625A; padding: 4px 4px 0; }
.pass__back .pass__turn { width: 30px; height: 30px; background: rgba(30, 22, 18, 0.08); color: var(--paper-ink); }
.pass__who { display: flex; align-items: center; gap: 10px; margin: 10px 4px 0; }
.pass__avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 3px var(--paper), 0 0 0 4.5px var(--c); }
.pass__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pass__who .pass__name { margin: 0; font-size: 17px; }
.pass__who .pass__land { margin: 2px 0 0; font-size: 14px; }
.pass__area { display: flex; align-items: center; gap: 6px; margin: 8px 4px 0; font: 12px "Archivo", var(--display); color: #6F625A; }
.pass__area svg { width: 13px; height: 13px; flex: none; }
.pass__story { font: italic 400 14px/1.35 var(--serif); color: #3F3631; margin: 8px 4px 0; }
.pass__rule { height: 1px; background: rgba(30, 22, 18, 0.14); margin: 10px 4px 8px; }
.pass__hl-label { font: 600 11px var(--mono); color: #6F625A; margin: 0 4px 6px; }
.pass__hl { list-style: none; margin: 0 4px 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.pass__hl li { font: 600 11px "Archivo", var(--display); padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.65); border: 1px solid rgba(30, 22, 18, 0.12); }
.pass__ride {
  flex: none; margin: auto 4px 2px; height: 36px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--paper-ink); color: var(--paper); font: 700 13px "Archivo", var(--display);
}
.pass__ride:hover { background: var(--red); }
.pass__ride:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

@media (max-width: 1100px) {
  .line__track { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .line__track::-webkit-scrollbar { display: none; }
  .line__cards { width: max-content; justify-content: flex-start; gap: 18px; }
  .hanger { flex: 0 0 min(236px, 64vw); scroll-snap-align: center; }
}
@media (prefers-reduced-motion: reduce) { .hanger { transform: none !important; } }

/* closing headline: same art-nouveau treatment as the hero */
.end__title {
  font-family: "Federant", var(--serif); font-weight: 400; margin: 0;
  font-size: clamp(64px, 10.5vw, 158px); line-height: 1; letter-spacing: -0.035em;
}
.end__line { display: flex; align-items: center; transform: scaleY(1.32); transform-origin: 0 0; margin-bottom: 0.34em; }
.end__line--2 { margin-top: -0.06em; padding-left: 0.42em; }
.end__title em { color: var(--yellow); font-style: normal; }
.end__small {
  font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 0.3em; letter-spacing: 0;
  color: var(--yellow); margin: -0.6em 0 0 0.16em; transform: scaleY(0.78); white-space: nowrap;
}
#brBR { display: none; }
