:root {
  --paper: #fcf0e0;
  --paper-deep: #e8d5b0;
  --ink: #584a3c;
  --ink-mid: #746654;
  --ink-faint: #9c8b74;
  --espresso: #211a16;
  --espresso-soft: #2b211a;
  --night-ink: #efe3cd;
  --gold: #c6a464;
  --fire: #ef9b49;
  --hud: #f2d9a6;
  --hairline: color-mix(in srgb, var(--ink) 24%, transparent);
  --display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --body: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  /* 24 timeline segments: the satellite descent, twelve held beats and
     eleven motion clips between them. */
  --journey-height: 1580svh;
  --sat-zoom: 1;
  --sat-strength: 0;
}

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

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  overflow-x: clip;
  background: var(--paper);
}

button, a {
  font: inherit;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  min-height: 44px;
  padding: 12px 16px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.tour {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

/* ---------------------------------------------------------------- chrome */

.tour-chrome {
  position: sticky;
  z-index: 60;
  top: 0;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px clamp(18px, 4vw, 60px);
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  color: var(--ink);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.tour-chrome__end {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
}

.tour-credit {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  color: inherit;
  font-family: var(--display);
  font-size: 12px;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.13em;
  text-decoration: none;
}

.tour-credit span:nth-child(2) {
  color: var(--gold);
}

.tour-disclosure {
  margin: 0;
  color: inherit;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.35;
  text-align: right;
  text-transform: uppercase;
}

.chrome-toggle {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid color-mix(in srgb, var(--night-ink) 24%, transparent);
  color: color-mix(in srgb, var(--night-ink) 82%, transparent);
  cursor: pointer;
  background: transparent;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.chrome-toggle:hover {
  border-color: color-mix(in srgb, var(--hud) 62%, transparent);
  color: var(--hud);
}

.chrome-toggle__dot {
  width: 5px;
  height: 5px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.chrome-toggle[aria-pressed="true"] .chrome-toggle__dot {
  background: var(--hud);
  box-shadow: 0 0 10px color-mix(in srgb, var(--hud) 70%, transparent);
}

/* ---------------------------------------------------------------- stage */

.tour-journey {
  height: 0;
}

[data-tour-mode="cinematic"] {
  background: var(--espresso);
  color: var(--night-ink);
}

[data-tour-mode="cinematic"] .tour-chrome {
  position: fixed;
  right: 0;
  left: 0;
  border-bottom-color: color-mix(in srgb, var(--night-ink) 14%, transparent);
  background: color-mix(in srgb, var(--espresso) 88%, transparent);
  color: var(--night-ink);
}

[data-tour-mode="cinematic"] .tour-journey {
  height: var(--journey-height);
}

[data-tour-mode="cinematic"] .poster-sequence {
  display: none;
}

.tour-stage {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100svh;
  overflow: hidden;
  background: var(--espresso);
}

.tour-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.17;
  pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, var(--night-ink) 0.65px, transparent 0.8px);
  background-size: 5px 5px;
}

.cinema {
  position: absolute;
  top: 53.5%;
  left: 50%;
  width: min(92vw, 158vh);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  transform: translate(-50%, -50%);
  border: 1px solid color-mix(in srgb, var(--night-ink) 22%, transparent);
  background: #171714;
  box-shadow:
    0 0 0 1px color-mix(in srgb, #000 60%, transparent),
    0 26px 80px color-mix(in srgb, #000 46%, transparent);
}

.cinema::before,
.cinema::after {
  content: "";
  position: absolute;
  z-index: 17;
  pointer-events: none;
}

.cinema::before {
  inset: 12px;
  border: 1px solid color-mix(in srgb, var(--night-ink) 16%, transparent);
}

.cinema::after {
  inset: 0;
  box-shadow: inset 0 0 84px color-mix(in srgb, #080706 38%, transparent);
}

.scene-stack,
.stage-layer,
.cinema-shade,
.scene-copy-layer,
.sat-hud {
  position: absolute;
  inset: 0;
}

.scene-stack {
  overflow: hidden;
  background: #171714;
}

.stage-layer {
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform-origin: 50% 54%;
  will-change: opacity, transform;
}

.stage-still,
.stage-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* The clips carry their own grade; this only unifies the two media types. */
  background: #171714;
}

.cinema-shade {
  z-index: 4;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(15, 13, 11, 0.52) 0%, rgba(15, 13, 11, 0.08) 33%, transparent 48%),
    linear-gradient(270deg, rgba(15, 13, 11, 0.46) 0%, rgba(15, 13, 11, 0.06) 31%, transparent 47%),
    linear-gradient(0deg, rgba(12, 10, 9, 0.43) 0%, transparent 29%);
}

/* ---------------------------------------------------------- satellite HUD */

.sat-hud {
  z-index: 12;
  opacity: 0;
  color: var(--hud);
  pointer-events: none;
}

.sat-hud__topo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
}

/* The graticule and contours ride the descent; the reticle stays locked on
   the house so the frame reads as tracking a target, not drifting. */
.sat-hud__grid,
.sat-hud__contours {
  transform-box: view-box;
  transform-origin: 800px 450px;
  transform: scale(var(--sat-zoom, 1));
}

.sat-hud__grid {
  opacity: clamp(0, calc(1.15 - var(--sat-zoom, 1) * 0.34), 0.85);
}

.sat-hud__contours {
  opacity: clamp(0, calc(1.3 - var(--sat-zoom, 1) * 0.4), 1);
}

.sat-hud__reticle {
  transform-box: view-box;
  transform-origin: 800px 450px;
  transform: scale(calc(1 + (var(--sat-zoom, 1) - 1) * 0.22));
}

.sat-hud__bracket {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 0 solid currentColor;
  opacity: 0.72;
}

.sat-hud__bracket--tl { top: 24px; left: 24px; border-top-width: 1px; border-left-width: 1px; }
.sat-hud__bracket--tr { top: 24px; right: 24px; border-top-width: 1px; border-right-width: 1px; }
.sat-hud__bracket--bl { bottom: 24px; left: 24px; border-bottom-width: 1px; border-left-width: 1px; }
.sat-hud__bracket--br { bottom: 24px; right: 24px; border-bottom-width: 1px; border-right-width: 1px; }

.sat-hud__title {
  position: absolute;
  top: 30px;
  left: 62px;
  margin: 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.sat-hud__title span {
  opacity: 0.6;
}

.sat-hud__readout {
  position: absolute;
  top: 22%;
  right: clamp(74px, 8.5%, 132px);
  display: grid;
  gap: 11px;
  margin: 0;
  font-family: var(--mono);
  text-align: right;
}

.sat-hud__readout div {
  display: grid;
  gap: 3px;
}

.sat-hud__readout dt {
  font-size: 8px;
  letter-spacing: 0.19em;
  opacity: 0.58;
  text-transform: uppercase;
}

.sat-hud__readout dd {
  margin: 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.sat-controls {
  position: absolute;
  z-index: 24;
  bottom: 62px;
  left: 50%;
  display: flex;
  width: min(58%, 430px);
  align-items: center;
  gap: 16px;
  opacity: 0;
  transform: translateX(-50%);
}

.sat-fly {
  display: inline-flex;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  padding: 0 16px;
  border: 1px solid color-mix(in srgb, var(--hud) 44%, transparent);
  color: var(--hud);
  cursor: pointer;
  background: color-mix(in srgb, #14100c 62%, transparent);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.sat-fly:hover {
  border-color: var(--hud);
  background: color-mix(in srgb, #3a2a18 78%, transparent);
}

.sat-fly__glyph {
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 7px solid currentColor;
}

[data-sat-flying="true"] .sat-fly__glyph {
  width: 7px;
  height: 8px;
  border: 0;
  background: currentColor;
  clip-path: polygon(0 0, 40% 0, 40% 100%, 0 100%, 0 0, 60% 0, 100% 0, 100% 100%, 60% 100%, 60% 0);
}

.sat-scrub {
  display: flex;
  min-width: 0;
  height: 44px;
  flex: 1 1 auto;
  align-items: center;
  cursor: ew-resize;
  touch-action: none;
}

.sat-scrub__track {
  position: relative;
  display: block;
  width: 100%;
  height: 2px;
  overflow: hidden;
  background: color-mix(in srgb, var(--hud) 24%, transparent);
}

.sat-scrub__fill {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--hud);
  box-shadow: 0 0 12px color-mix(in srgb, var(--hud) 60%, transparent);
}

/* ---------------------------------------------------------------- copy */

.scene-copy-layer {
  /* The stage layers sit below 12; the HUD owns 12. */
  z-index: 30;
  pointer-events: none;
}

.scene-copy {
  position: absolute;
  top: 22%;
  width: min(29%, 370px);
  color: #fff4df;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 2px 24px rgba(11, 8, 6, 0.55);
  transform: translateY(14px);
  will-change: opacity, transform;
}

.scene-copy--left {
  left: clamp(38px, 5.2%, 72px);
}

.scene-copy--right {
  right: clamp(48px, 7%, 94px);
}

.scene-copy.is-active {
  opacity: 1;
  pointer-events: auto;
}

.scene-copy__eyebrow,
.beat-label {
  margin: 0 0 13px;
  color: #edc779;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.18em;
  line-height: 1.3;
  text-transform: uppercase;
}

.scene-copy h2,
.beat-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(28px, 3.1vw, 52px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
}

.scene-copy > p:last-of-type {
  max-width: 31rem;
  margin: 18px 0 0;
  color: color-mix(in srgb, #fff4df 84%, transparent);
  font-family: var(--body);
  font-size: clamp(12px, 1.05vw, 15px);
  line-height: 1.55;
}

.scene-copy--final {
  top: 18%;
}

.tour-cta {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  padding: 12px 19px;
  border: 1px solid color-mix(in srgb, #f1d29a 56%, transparent);
  color: #fff5e5;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  background: color-mix(in srgb, #2b211a 72%, transparent);
}

.tour-cta:hover {
  border-color: #f1d29a;
  background: color-mix(in srgb, #5a3b27 78%, transparent);
}

.scene-status {
  position: absolute;
  z-index: 20;
  bottom: 27px;
  left: 31px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: color-mix(in srgb, #fff4df 86%, transparent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.scene-status__count {
  color: #edc779;
}

.scene-status__name::before {
  content: "";
  display: inline-block;
  width: 19px;
  height: 1px;
  margin: 0 11px 3px 0;
  background: color-mix(in srgb, #fff4df 46%, transparent);
}

.progress-rail {
  position: absolute;
  z-index: 22;
  top: 50%;
  right: 11px;
  width: 48px;
  height: 328px;
  transform: translateY(-50%);
}

.progress-rail__track {
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 23px;
  width: 1px;
  overflow: hidden;
  background: color-mix(in srgb, #fff4df 22%, transparent);
}

.progress-rail__fill {
  display: block;
  width: 100%;
  height: var(--tour-progress, 0%);
  background: #f1cf8b;
}

.progress-rail ol {
  position: relative;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  list-style: none;
}

.progress-rail li {
  width: 48px;
  height: 44px;
}

.progress-rail button {
  position: relative;
  display: grid;
  width: 48px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  color: transparent;
  cursor: pointer;
  background: transparent;
}

.progress-rail button::before {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border: 1px solid color-mix(in srgb, #fff4df 56%, transparent);
  border-radius: 50%;
  background: var(--espresso);
}

.progress-rail button.is-active::before {
  width: 8px;
  height: 8px;
  border-color: #f1cf8b;
  background: #f1cf8b;
  box-shadow: 0 0 16px rgba(241, 207, 139, 0.7);
}

.progress-rail button span {
  position: absolute;
  right: 34px;
  color: transparent;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.progress-rail button.is-active span,
.progress-rail button:focus-visible span {
  color: color-mix(in srgb, #fff4df 76%, transparent);
}

.scroll-cue {
  position: absolute;
  z-index: 20;
  bottom: 21px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: color-mix(in srgb, #fff4df 72%, transparent);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.scroll-cue i {
  display: block;
  width: 27px;
  height: 1px;
  background: currentColor;
}

/* -------------------------------------------------------- static posters */

.poster-sequence {
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: clamp(46px, 8vw, 112px) clamp(18px, 5vw, 70px) 92px;
}

.poster-beat {
  padding: clamp(36px, 7vw, 92px) 0;
  border-top: 1px solid var(--hairline);
}

.poster-beat:first-child {
  border-top: 0;
}

.poster-figure {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(240px, 0.55fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: end;
  margin: 0;
}

.poster-beat:nth-child(even) .poster-frame {
  order: 2;
}

.poster-beat:nth-child(even) figcaption {
  order: 1;
}

.poster-frame {
  position: relative;
  min-width: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ink) 32%, transparent);
  background: var(--espresso-soft);
  box-shadow: 0 24px 58px color-mix(in srgb, var(--ink) 15%, transparent);
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(252, 240, 224, 0.2);
  pointer-events: none;
}

.poster-frame picture {
  display: block;
  width: 100%;
  height: 100%;
}

.poster-visual {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-figure figcaption {
  min-width: 0;
  padding-bottom: 9px;
}

.beat-label {
  color: #9a6a32;
}

.beat-title {
  color: var(--ink);
  font-size: clamp(32px, 4.8vw, 62px);
}

.poster-figure figcaption > p:last-of-type {
  margin: 20px 0 0;
  color: var(--ink-mid);
  font-size: 14px;
  line-height: 1.7;
}

.poster-beat--final {
  padding-bottom: 28px;
}

.poster-beat--final .tour-cta {
  border-color: var(--ink);
  color: var(--paper);
  background: var(--ink);
}

.poster-beat--final .tour-cta:hover {
  border-color: var(--espresso);
  background: var(--espresso);
}

/* ---------------------------------------------------------------- narrow */

@media (max-width: 1180px) {
  .sat-hud__readout {
    top: 19%;
    right: clamp(66px, 7%, 96px);
  }

  .sat-hud__readout dd {
    font-size: 11px;
  }

  .sat-controls {
    width: min(70%, 380px);
  }
}

@media (max-width: 820px) {
  .tour-chrome {
    min-height: 74px;
    align-items: flex-start;
    gap: 14px;
    padding: 10px 16px;
  }

  .tour-credit {
    flex: 0 0 auto;
    font-size: 10px;
  }

  .tour-disclosure {
    max-width: 158px;
    padding-top: 7px;
    font-size: 8px;
  }

  .poster-sequence {
    padding: 25px 14px 68px;
  }

  .poster-beat {
    padding: 34px 0 48px;
  }

  .poster-figure {
    display: block;
  }

  .poster-beat:nth-child(even) .poster-frame,
  .poster-beat:nth-child(even) figcaption {
    order: initial;
  }

  .poster-frame {
    aspect-ratio: 4 / 5;
    box-shadow: 0 18px 42px color-mix(in srgb, var(--ink) 14%, transparent);
  }

  /* The satellite plate is an orthophoto — cropping it to 4:5 loses the site
     in its fan, so this one beat keeps its full frame. */
  .poster-frame--satellite {
    aspect-ratio: 16 / 9;
  }

  .poster-figure figcaption {
    padding: 25px 5px 0;
  }

  .beat-label {
    margin-bottom: 11px;
  }

  .beat-title {
    max-width: 10ch;
    font-size: clamp(36px, 12.5vw, 50px);
  }

  .poster-figure figcaption > p:last-of-type {
    max-width: 34rem;
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.65;
  }

  .poster-beat--final .tour-cta {
    width: 100%;
    min-height: 48px;
    margin-top: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

  .skip-link {
    transform: none;
    clip-path: inset(100%);
  }

  .skip-link:focus {
    clip-path: none;
  }
}

@media (forced-colors: active) {
  .tour-cta,
  .chrome-toggle,
  .sat-fly,
  .progress-rail button::before,
  .poster-frame {
    border: 1px solid CanvasText;
  }

  .sat-hud {
    display: none;
  }
}

/* ------------------------------------------------------------- parallax GL */

.scene-canvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

[data-parallax="off"] .scene-canvas {
  display: none;
}

/* --------------------------------------------------------------- hotspots */

.hotspot-layer {
  position: absolute;
  z-index: 26;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  color: var(--hud);
  cursor: pointer;
  background: transparent;
  transform: translate(-50%, -50%);
}

.hotspot__ring {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 1px solid color-mix(in srgb, var(--hud) 62%, transparent);
  border-radius: 50%;
}

.hotspot__dot {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--hud);
  box-shadow: 0 0 12px color-mix(in srgb, var(--hud) 80%, transparent);
}

.hotspot__tag {
  position: absolute;
  top: 50%;
  left: 30px;
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--hud) 30%, transparent);
  opacity: 0;
  background: color-mix(in srgb, #14100c 82%, transparent);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translateY(-50%);
  transition: opacity 140ms ease;
}

.hotspot:hover .hotspot__ring,
.hotspot:focus-visible .hotspot__ring {
  border-color: var(--hud);
  transform: scale(1.18);
}

.hotspot:hover .hotspot__tag,
.hotspot:focus-visible .hotspot__tag {
  opacity: 1;
}

/* ------------------------------------------------------------- plate card */

.plate-card {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  padding: clamp(16px, 4vw, 48px);
  place-items: center;
  background: color-mix(in srgb, #0d0a08 78%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.plate-card__inner {
  position: relative;
  display: grid;
  width: min(100%, 980px);
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr);
  gap: clamp(18px, 3vw, 38px);
  align-items: center;
  padding: clamp(16px, 2.4vw, 30px);
  border: 1px solid color-mix(in srgb, var(--hud) 22%, transparent);
  background: #17120e;
}

.plate-card__figure {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #100d0a;
}

.plate-card__figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.plate-card__body {
  color: #fff4df;
}

.plate-card__eyebrow {
  margin: 0 0 10px;
  color: var(--hud);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.plate-card__body h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.plate-card__body p:last-child {
  margin: 14px 0 0;
  color: color-mix(in srgb, #fff4df 78%, transparent);
  font-size: 13px;
  line-height: 1.6;
}

.plate-card__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border: 0;
  color: #fff4df;
  cursor: pointer;
  background: transparent;
  font-size: 22px;
  line-height: 1;
}

/* ------------------------------------------------------------- instrument */

.instrument {
  position: absolute;
  z-index: 24;
  bottom: 22px;
  right: 74px;
  width: 214px;
  color: color-mix(in srgb, #fff4df 88%, transparent);
  font-family: var(--mono);
  pointer-events: none;
}

.instrument__plan {
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--hud) 20%, transparent);
  background: color-mix(in srgb, #14100c 58%, transparent);
}

.plan {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.plan__grid { stroke: color-mix(in srgb, var(--hud) 12%, transparent); stroke-width: 0.14; }
.plan__terrace { fill: color-mix(in srgb, var(--hud) 7%, transparent); }
.plan__court { fill: color-mix(in srgb, var(--hud) 5%, transparent); stroke: color-mix(in srgb, var(--hud) 22%, transparent); stroke-width: 0.2; }
.plan__pool { fill: color-mix(in srgb, #4fd0e0 26%, transparent); }
.plan__canopy { fill: none; stroke: color-mix(in srgb, var(--hud) 40%, transparent); stroke-width: 0.3; stroke-dasharray: 1.2 0.9; }
.plan__volume { fill: color-mix(in srgb, var(--hud) 20%, transparent); stroke: color-mix(in srgb, var(--hud) 52%, transparent); stroke-width: 0.35; }
.plan__room { fill: none; stroke: color-mix(in srgb, var(--hud) 28%, transparent); stroke-width: 0.2; }
.plan__wall { stroke: color-mix(in srgb, var(--hud) 62%, transparent); stroke-width: 0.7; }
.plan__ground { stroke: color-mix(in srgb, var(--hud) 40%, transparent); stroke-width: 0.3; }
.plan__cone { fill: color-mix(in srgb, var(--hud) 20%, transparent); stroke: none; }
.plan__camera { fill: var(--hud); }
.plan__north { stroke: color-mix(in srgb, var(--hud) 50%, transparent); stroke-width: 0.3; }

.plan__label,
.plan__north-label {
  fill: color-mix(in srgb, var(--hud) 68%, transparent);
  font-family: var(--mono);
  font-size: 1.7px;
  letter-spacing: 0.12em;
  text-anchor: middle;
}

.plan__north-label { font-size: 2.4px; }

.instrument__readout {
  display: grid;
  gap: 4px;
  margin: 10px 0 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.instrument__readout div { display: grid; gap: 2px; }

.instrument__readout dt {
  font-size: 7px;
  letter-spacing: 0.16em;
  opacity: 0.56;
  text-transform: uppercase;
}

.instrument__readout dd {
  margin: 0;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.instrument__notes { margin-top: 9px; display: grid; gap: 3px; }

.instrument__note {
  display: grid;
  margin: 0;
  gap: 0 8px;
  /* A fixed label column keeps the value on one line; an inline-block label let
     long values wrap under their own units. */
  grid-template-columns: 58px minmax(0, 1fr);
  font-size: 8.5px;
  line-height: 1.4;
  opacity: 0.82;
}

.instrument__note span {
  opacity: 0.54;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

[data-sat-active="true"] .instrument { opacity: 0; }

@media (max-width: 1180px) {
  .instrument { width: 178px; right: 66px; }
}

@media (max-width: 980px) {
  .instrument { display: none; }
  .plate-card__inner { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- portrait
 * A phone gets the same tour, not a lesser one. The difference is the frame:
 * the letterboxed 16:9 card becomes a full-bleed portrait stage, the copy sits
 * on the floor of the frame instead of beside it, and the beat rail lies down.
 * `data-layout` is written by the player so JS and CSS never disagree about
 * which stage is on screen.
 */

[data-layout="portrait"] .cinema {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border: 0;
  box-shadow: none;
  transform: none;
}

[data-layout="portrait"] .cinema::before {
  display: none;
}

[data-layout="portrait"] .tour-stage::before {
  opacity: 0.1;
}

/* The frame is cropped hard from 16:9, so the vignette and edge shading have
   to ease off or the subject sits in a tunnel. */
[data-layout="portrait"] .cinema-shade {
  background:
    linear-gradient(0deg, rgba(12, 10, 9, 0.82) 0%, rgba(12, 10, 9, 0.34) 26%, transparent 52%),
    linear-gradient(180deg, rgba(12, 10, 9, 0.5) 0%, transparent 22%);
}

[data-layout="portrait"] .scene-copy {
  top: auto;
  right: 0;
  bottom: 132px;
  left: 0;
  width: 100%;
  padding: 0 20px;
}

[data-layout="portrait"] .scene-copy--final {
  top: auto;
  bottom: 132px;
}

[data-layout="portrait"] .scene-copy h2 {
  font-size: clamp(30px, 8.6vw, 44px);
}

[data-layout="portrait"] .scene-copy > p:last-of-type {
  max-width: 34rem;
  margin-top: 12px;
  font-size: 14px;
}

[data-layout="portrait"] .tour-cta {
  width: 100%;
  margin-top: 18px;
}

/* The rail lies down along the bottom edge and keeps 44px targets. */
[data-layout="portrait"] .progress-rail {
  top: auto;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 56px;
  transform: none;
}

[data-layout="portrait"] .progress-rail__track {
  top: auto;
  right: 14px;
  bottom: 17px;
  left: 14px;
  width: auto;
  height: 1px;
}

[data-layout="portrait"] .progress-rail__fill {
  width: var(--tour-progress, 0%);
  height: 100%;
}

[data-layout="portrait"] .progress-rail ol {
  flex-direction: row;
  align-items: flex-end;
  padding: 0 4px;
}

[data-layout="portrait"] .progress-rail li,
[data-layout="portrait"] .progress-rail button {
  width: auto;
  min-width: 22px;
  height: 44px;
  flex: 1 1 0;
}

[data-layout="portrait"] .progress-rail button span {
  right: auto;
  bottom: 2px;
  font-size: 7px;
}

[data-layout="portrait"] .progress-rail button.is-active span {
  color: color-mix(in srgb, #fff4df 82%, transparent);
}

/* The copy eyebrow already reads "00 · SATELLITE" and the rail shows position,
   so the status line is pure duplication at this width — and it collided with
   the satellite HUD title, which sat in the same corner. */
[data-layout="portrait"] .scene-status {
  display: none;
}

/* No room for the plan at this width; the readout keeps the information that
   still reads at a glance and drops the drawing. */
[data-layout="portrait"] .instrument {
  display: block;
  top: 74px;
  right: 20px;
  bottom: auto;
  width: auto;
}

[data-layout="portrait"] .instrument__plan,
[data-layout="portrait"] .instrument__notes {
  display: none;
}

[data-layout="portrait"] .instrument__readout {
  display: flex;
  gap: 14px;
  margin: 0;
  justify-content: flex-end;
}

[data-layout="portrait"] .instrument__readout div {
  justify-items: end;
}

[data-layout="portrait"] .instrument__readout dt {
  font-size: 6.5px;
}

[data-layout="portrait"] .instrument__readout dd {
  font-size: 9px;
}

/* Top-right, not bottom-right: the bottom of a portrait frame belongs to the
   copy, and the readout was landing on the paragraph. The instrument is hidden
   while the satellite is up, so the corner is free. */
[data-layout="portrait"] .sat-hud__readout {
  top: 74px;
  right: 20px;
  bottom: auto;
  gap: 6px;
}

[data-layout="portrait"] .sat-hud__readout dd { font-size: 10px; }
[data-layout="portrait"] .sat-hud__readout dt { font-size: 7px; }
[data-layout="portrait"] .sat-hud__title { display: none; }
[data-layout="portrait"] .sat-hud__bracket { display: none; }

[data-layout="portrait"] .sat-controls {
  bottom: 74px;
  width: calc(100% - 40px);
}

[data-layout="portrait"] .scroll-cue { display: none; }

/* Touch has no hover, so the ring has to read as tappable at rest. The label
   stays hidden: at this width the tag overlapped the body copy, and the plate
   it opens names itself anyway. */
[data-layout="portrait"] .hotspot__ring {
  width: 32px;
  height: 32px;
  border-color: color-mix(in srgb, var(--hud) 82%, transparent);
}

[data-layout="portrait"] .hotspot__dot {
  width: 6px;
  height: 6px;
}

[data-layout="portrait"] .hotspot__tag {
  display: none;
}

[data-layout="portrait"] .plate-card__inner {
  grid-template-columns: minmax(0, 1fr);
  max-height: 88svh;
  overflow-y: auto;
}

/* The disclosure has to survive on a phone — it is the honesty line — but the
   long form wrapped to three lines and pushed the header into the frame. Keep
   both qualifiers in a compact, real-text variant at portrait widths. */
[data-layout="portrait"] .tour-disclosure {
  max-width: none;
  font-size: 9px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

[data-layout="portrait"] .tour-disclosure__long {
  display: none;
}

.tour-disclosure__short {
  display: none;
}

[data-layout="portrait"] .tour-disclosure__short {
  display: inline;
}

/* Preserve the honesty line at phone widths. Quality auto-selects from the
   connection and device, so the manual Web toggle is nonessential here. */
[data-layout="portrait"] .chrome-toggle {
  display: none;
}

[data-layout="portrait"] .tour-chrome {
  min-height: 58px;
  align-items: center;
  padding: 8px 16px;
}

[data-layout="portrait"] .tour-credit {
  font-size: 9px;
}
