/* forage.life — the valley. Dark glass over a living world.
   House rules (Opus 5.5 default tells are banned): no cream backgrounds, no
   italic accent words in headlines, no numbered section labels, no monospace
   labels, no pill buttons. */

:root {
  --text: #f6f3ee;
  --muted: rgba(246, 243, 238, 0.74);
  --faint: rgba(246, 243, 238, 0.5);
  --ember: #ff7a21;
  --ember-hot: #ff9a4d;
  --ember-ink: #1c0f05;
  --glass: rgba(13, 17, 29, 0.5);
  --glass-strong: rgba(10, 13, 23, 0.78);
  --line: rgba(255, 255, 255, 0.14);
  --go: #7ee08a;
  --private: #9fb0ff;
  --lab: #ffd16e;
  --paused: #ff9471;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body: "Instrument Sans", "Avenir Next", system-ui, sans-serif;
  --rail-space: 64px;
}

* { box-sizing: border-box; }
html { background: #1d2a52; scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--ember); color: var(--ember-ink); }

/* ---------- the world behind everything ---------- */
.sky-fallback {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(120% 70% at 70% 100%, rgba(255, 170, 130, 0.55), transparent 60%),
    linear-gradient(180deg, #26396a 0%, #4b5b8f 38%, #c98e8a 72%, #f0a98c 100%);
  transition: opacity 1.2s ease;
}
#world {
  position: fixed; inset: 0; z-index: 1;
  width: 100vw; height: 100vh;
  height: 100lvh;
  display: block;
  opacity: 0;
  transition: opacity 1.4s ease;
}
body.world-ready #world { opacity: 1; }
body.world-ready .sky-fallback { opacity: 0; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(18px, 3.2vw, 44px);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.02em;
  text-decoration: none;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.25);
}
.wordmark span { color: var(--ember); }
.topnav { display: flex; align-items: center; gap: 6px; }
.navlink, .navbtn {
  font-size: 14px; font-weight: 600;
  text-decoration: none;
  border: 0; background: none; cursor: pointer;
  padding: 10px 12px;
  border-radius: 8px;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.3);
}
.navlink:hover { background: rgba(255, 255, 255, 0.08); }
.navbtn {
  background: rgba(255, 255, 255, 0.92);
  color: #111623;
  text-shadow: none;
  padding: 10px 14px;
}
.navbtn:hover { background: #fff; }

/* ---------- river map (right rail) ---------- */
.rail {
  position: fixed; right: 18px; top: 50%; z-index: 25;
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: flex-end; gap: 7px;
  padding: 10px 0;
}
.rail::before {
  content: ""; position: absolute; right: 5px; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, transparent, var(--line) 8%, var(--line) 92%, transparent);
}
.rail a {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  font-size: 12.5px; font-weight: 600;
  color: transparent;
  height: 14px;
}
.rail a i {
  width: 11px; height: 11px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  border: 2px solid rgba(12, 16, 28, 0.55);
  transition: transform 0.25s ease, background 0.25s ease;
  flex: none;
}
.rail a:hover, .rail a:focus-visible { color: var(--text); text-shadow: 0 1px 10px rgba(0,0,0,.6); }
.rail a.is-here i { background: var(--ember); transform: scale(1.35); }
.rail a.is-past i { background: rgba(255, 255, 255, 0.6); }
.rail a.is-district { margin-top: 6px; }

/* ---------- scroll stops ---------- */
main { position: relative; z-index: 10; pointer-events: none; }
.stop { position: relative; min-height: 150vh; display: flex; align-items: flex-start; padding: 4vh var(--rail-space) 0 0; }
.stop > * { pointer-events: auto; }
.stop--hero { min-height: 135vh; padding-top: 0; align-items: stretch; overflow-x: clip; } /* the hero glow bleeds past the edge on phones */
.stop--finale { min-height: 118vh; padding-top: 20vh; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: flex; flex-direction: column; justify-content: center;
  min-height: 100vh;
  max-width: 820px;
  padding: 90px clamp(22px, 6vw, 96px) 12vh;
}
.hero::before {
  content: ""; position: absolute; inset: -10% -30% -10% -20%; z-index: -1;
  background: radial-gradient(60% 55% at 30% 50%, rgba(18, 24, 48, 0.42), transparent 70%);
  pointer-events: none;
}
.hero-eyebrow { margin: 0 0 18px; font-weight: 600; font-size: 15px; color: var(--muted); }
.hero-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 750;
  font-size: clamp(46px, 7.4vw, 118px);
  line-height: 0.94;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 96;
  text-wrap: balance;
  text-shadow: 0 2px 40px rgba(10, 14, 32, 0.28);
}
.hero-lede { margin: 26px 0 0; max-width: 520px; font-size: clamp(17px, 1.45vw, 20px); color: var(--text); }
.hero-aside { margin: 14px 0 0; font-size: 15px; color: var(--faint); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.scroll-cue {
  position: absolute; left: clamp(22px, 6vw, 96px); bottom: 38vh;
  width: 1px; height: 64px; background: rgba(255, 255, 255, 0.18); overflow: hidden;
}
.scroll-cue span {
  position: absolute; left: 0; top: -40%; width: 1px; height: 40%;
  background: var(--text);
  animation: cue 2.2s cubic-bezier(.6,0,.2,1) infinite;
}
@keyframes cue { to { top: 110%; } }

/* ---------- buttons (rectangles, never pills) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px;
  border-radius: 8px;
  font-weight: 650; font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--primary { background: var(--ember); color: var(--ember-ink); }
.btn--primary:hover { background: var(--ember-hot); }
.btn--ghost { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.28); color: var(--text); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.5); }
:focus-visible { outline: 2px solid var(--ember-hot); outline-offset: 3px; }

/* ---------- project cards ---------- */
.card {
  width: min(452px, calc(100vw - 44px));
  padding: 28px 28px 22px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.55);
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2,.8,.2,1);
}
.card.is-in { opacity: 1; transform: none; }
.card--left { margin-left: clamp(22px, 6vw, 96px); }
.card--right { margin-left: auto; margin-right: clamp(22px, 5vw, 72px); }
.card-district { margin: 0 0 10px; font-size: 13px; font-weight: 650; color: var(--ember-hot); }
.card-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 720;
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.card-lede { margin: 14px 0 0; color: var(--muted); }
.card-more { margin: 14px 0 0; font-size: 14px; color: var(--faint); }
.card-more a { color: var(--text); text-underline-offset: 3px; }
.card-credit { margin: 14px 0 0; font-size: 13.5px; color: var(--faint); }
.crew-names { margin: 16px 0 0; font-family: var(--display); font-size: 19px; font-weight: 600; line-height: 1.5; color: var(--text); }

.facts { list-style: none; margin: 20px 0 0; padding: 16px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; border-top: 1px solid var(--line); }
.facts li { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.facts b { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -0.02em; line-height: 1.1; }
.facts span { font-size: 13px; line-height: 1.35; color: var(--faint); }
.facts--links a { display: flex; flex-direction: column; gap: 2px; text-decoration: none; padding: 8px; margin: -8px; border-radius: 8px; transition: background 0.2s ease; }
.facts--links a:hover { background: rgba(255, 255, 255, 0.08); }
.facts--links b { color: var(--ember-hot); }

.bench { list-style: none; margin: 18px 0 0; padding: 14px 0 0; display: grid; gap: 10px; border-top: 1px solid var(--line); }
.bench li { display: flex; flex-direction: column; }
.bench b { font-weight: 650; }
.bench span { font-size: 14px; color: var(--faint); }

.card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.status { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; font-size: 13px; font-weight: 600; color: var(--faint); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; }
.status--go { color: var(--go); }
.status--private { color: var(--private); }
.status--lab { color: var(--lab); }
.status--paused { color: var(--paused); }
.sheet-more { display: none; }

/* ---------- finale ---------- */
.finale { width: min(760px, calc(100vw - 44px)); margin: 0 auto; text-align: center; }
.finale-title { margin: 0; font-family: var(--display); font-weight: 760; font-size: clamp(56px, 9vw, 132px); line-height: 0.92; letter-spacing: -0.04em; }
.finale-lede { margin: 20px auto 0; max-width: 480px; font-size: 18px; color: var(--muted); }
.finale .hero-actions { justify-content: center; }
.spec {
  margin: 56px auto 0; max-width: 520px; padding: 22px 26px;
  text-align: left;
  border-radius: 14px; background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.spec div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); }
.spec div:first-child { border-top: 0; }
.spec dt { font-size: 13.5px; color: var(--faint); }
.spec dd { margin: 0; font-size: 15px; }
.footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 64px 0 52px; font-size: 14px; }
.footer a { color: var(--faint); text-decoration: none; }
.footer a:hover { color: var(--text); }

/* ---------- pinned labels on 3D landmarks ---------- */
.labels { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
.tag {
  position: absolute; left: 0; top: 0;
  transform: translate(-50%, -100%);
  display: flex; flex-direction: column; align-items: center;
  opacity: 0; transition: opacity 0.35s ease;
  will-change: transform, opacity;
}
.tag b {
  font-size: 12.5px; font-weight: 650; white-space: nowrap;
  padding: 6px 10px; border-radius: 6px;
  background: rgba(10, 13, 23, 0.72); border: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.tag i { width: 1px; height: 26px; background: linear-gradient(rgba(255,255,255,.5), transparent); }

/* ---------- all-projects index ---------- */
.index {
  position: fixed; inset: 0; z-index: 60;
  display: flex; justify-content: flex-end;
  background: rgba(5, 7, 14, 0.45);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.index[hidden] { display: none; }
.index-panel { width: min(560px, 100vw); height: 100%; overflow-y: auto; padding: 26px 30px 60px; background: var(--glass-strong); border-left: 1px solid var(--line); }
.index-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; position: sticky; top: -26px; padding: 26px 0 14px; margin-top: -26px; background: linear-gradient(var(--glass-strong) 80%, transparent); }
.index-head h2 { margin: 0; font-family: var(--display); font-size: 28px; letter-spacing: -0.02em; }
.index-close, .exhibit-close { border: 1px solid var(--line); background: rgba(255,255,255,0.06); border-radius: 8px; padding: 9px 14px; cursor: pointer; font-weight: 600; font-size: 14px; }
.index-list { list-style: none; margin: 8px 0 0; padding: 0; }
.index-list .dist { margin: 22px 0 6px; font-size: 13px; font-weight: 650; color: var(--ember-hot); }
.index-list a { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; padding: 12px 12px; margin: 0 -12px; border-radius: 10px; text-decoration: none; }
.index-list a:hover { background: rgba(255, 255, 255, 0.07); }
.index-list a strong { font-weight: 650; }
.index-list a em { font-style: normal; font-size: 13px; color: var(--faint); grid-column: 1; }
.index-list a small { grid-row: 1; grid-column: 2; font-size: 12.5px; font-weight: 600; color: var(--faint); }

/* ---------- interactive exhibits ---------- */
.exhibit {
  position: fixed; inset: 0; z-index: 70;
  display: grid; grid-template-columns: 1fr min(400px, 38vw);
  background: #070a12;
}
.exhibit[hidden] { display: none; }
.exhibit-stage { position: relative; min-height: 0; }
.exhibit-host { position: absolute; inset: 0; }
.exhibit-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.exhibit-controls-host { display: grid; gap: 16px; }
.exhibit-panel { padding: 90px 34px 40px; border-left: 1px solid var(--line); overflow-y: auto; background: #0b0f1a; }
.exhibit-kicker { margin: 0 0 10px; font-size: 13px; font-weight: 650; color: var(--ember-hot); }
.exhibit-panel h2 { margin: 0; font-family: var(--display); font-size: 36px; line-height: 1.02; letter-spacing: -0.025em; }
.exhibit-lede { color: var(--muted); }
.exhibit-controls { display: grid; gap: 16px; margin-top: 22px; }
.exhibit-close { position: absolute; top: 20px; right: 22px; z-index: 2; }
.exhibit-disclosure {
  position: absolute; left: 22px; bottom: 16px; z-index: 1;
  max-width: min(460px, calc(100% - min(400px, 38vw) - 44px));
  margin: 0; padding: 8px 12px; border-radius: 8px;
  background: #0b0f1a; color: var(--muted); pointer-events: none;
}

/* ---------- phones ---------- */
@media (max-width: 760px) {
  :root { --rail-space: 0px; }
  .topbar { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
  .topnav .navlink { background: rgba(10, 13, 23, .62); text-shadow: 0 1px 2px rgba(7, 10, 18, .95); }
  .topnav .navlink:not([data-open-index]) { display: none; }
  .rail { right: auto; left: 0; top: auto; bottom: env(safe-area-inset-bottom); transform: none; width: 100%; height: 26px; flex-direction: row; justify-content: center; align-items: center; gap: 5px; padding: 0; pointer-events: none; }
  .rail::before { display: none; }
  .rail a { height: 10px; pointer-events: none; }
  .rail a i { width: 7px; height: 7px; border-width: 1px; }
  .rail a span { display: none; }
  .stop { min-height: 125vh; padding: 52vh 0 0 0; }
  .card, .card--left, .card--right { margin: 0 auto; width: calc(100vw - 28px); padding: 22px 20px 18px; }
  .facts { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .facts b { font-size: 20px; }
  .stop--hero { align-items: flex-start; padding-top: 0; }
  .stop--finale { padding-top: 6vh; }
  .hero {
    min-height: 100vh;
    min-height: 100svh;
    padding-top: 96px; justify-content: flex-end;
    padding-bottom: 13vh;
    padding-bottom: 13svh;
  }
  .hero::before {
    inset: var(--hero-copy-top, 20%) -32px auto;
    height: var(--hero-copy-height, 60%);
    background: linear-gradient(180deg, transparent, rgba(7, 10, 18, .72) 64px, rgba(7, 10, 18, .72) calc(100% - 64px), transparent);
  }
  .hero-aside { color: var(--muted); }
  .finale-lede { color: var(--text); text-shadow: 0 1px 3px rgba(7, 10, 18, .85), 0 0 14px rgba(7, 10, 18, .45); }
  /* A caption never owns the swipe. Only an explicitly opened sheet can scroll. */
  body.ui-ready:not(.flat) .stop:not(.stop--hero):not(.stop--finale) { padding-top: 0; }
  body.ui-ready:not(.flat) .card {
    position: fixed; z-index: 20;
    left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right));
    top: auto; bottom: calc(26px + env(safe-area-inset-bottom));
    width: auto; margin: 0; padding: 14px 16px;
    background: rgba(13, 17, 29, .72);
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 6px;
    max-height: none; overflow: visible; overscroll-behavior: auto;
    opacity: 0; transform: translateY(18px); visibility: hidden; pointer-events: none;
    transition: opacity 0.3s ease, transform 0.45s cubic-bezier(.2,.8,.2,1), visibility 0s linear 0.45s;
  }
  body.ui-ready:not(.flat) .card.has-sheet-more { grid-template-columns: minmax(0, 1fr) auto 28px; }
  body.ui-ready:not(.flat) .card > * { grid-column: 1 / -1; min-width: 0; }
  body.ui-ready:not(.flat) .card.is-current {
    opacity: 1; transform: none; visibility: visible; pointer-events: auto;
    transition: opacity 0.3s ease 0.08s, transform 0.45s cubic-bezier(.2,.8,.2,1) 0.08s, visibility 0s;
  }
  body.ui-ready:not(.flat) .card .card-district { grid-column: 1; grid-row: 1; align-self: center; margin: 0; font-size: 12px; line-height: 1.3; font-weight: 650; }
  body.ui-ready:not(.flat) .card .status { grid-column: 2; grid-row: 1; align-self: center; justify-self: end; gap: 5px; margin: 0; font-size: 12px; line-height: 1.3; }
  body.ui-ready:not(.flat) .card .status::before { width: 6px; height: 6px; flex: none; }
  body.ui-ready:not(.flat) .card-title { margin-top: 6px; font-size: clamp(21px, 6.3vw, 26px); line-height: 1.06; text-wrap: balance; }
  body.ui-ready:not(.flat) .card-lede { margin-top: 8px; font-size: 14.5px; line-height: 1.42; }
  body.ui-ready:not(.flat) :is(#fourwords, #ollies) .card-lede { text-wrap: balance; }
  body.ui-ready:not(.flat) .facts { margin-top: 10px; padding-top: 10px; gap: 10px; }
  body.ui-ready:not(.flat) .facts b { font-size: 17px; }
  body.ui-ready:not(.flat) .facts span { font-size: 11.5px; line-height: 1.2; color: var(--muted); text-wrap: balance; }
  body.ui-ready:not(.flat) .facts--links a { padding: 0; margin: 0; }
  body.ui-ready:not(.flat) .crew-names { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.3; }
  body.ui-ready:not(.flat) .card-actions { margin-top: 10px; gap: 8px; }
  body.ui-ready:not(.flat) .card-actions .btn { flex: 1 1 0; min-width: max-content; min-height: 44px; padding: 7px 10px; font-size: 14px; line-height: 1.25; text-align: center; }
  body.ui-ready:not(.flat) .card-credit { margin-top: 8px; font-size: 11.5px; line-height: 1.3; color: var(--muted); }
  body.ui-ready:not(.flat) .card:not(.is-open) :where(.card-title, .card-lede, .card-credit, .facts span, .crew-names) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  body.ui-ready:not(.flat) .card:not(.is-open) .card-lede { -webkit-line-clamp: 3; }
  body.ui-ready:not(.flat) .card:not(.is-open) :is(.card-more, .bench) { display: none; }
  body.ui-ready:not(.flat) .card .sheet-more {
    position: absolute; grid-column: auto; grid-row: auto; top: 0; right: 4px; width: 44px; height: 44px; padding: 8px;
    border: 0; border-radius: 8px; background: transparent; cursor: pointer;
  }
  body.ui-ready:not(.flat) .card.has-sheet-more .sheet-more { display: grid; place-items: center; }
  .sheet-more::before { content: ""; grid-area: 1 / 1; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255, 255, 255, .05); }
  .sheet-more::after { content: ""; grid-area: 1 / 1; width: 9px; height: 9px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(2px) rotate(225deg); }
  .sheet-more[aria-expanded="true"]::after { transform: translateY(-2px) rotate(45deg); }
  body.ui-ready:not(.flat) .card.is-open {
    max-height: calc(100vh - var(--sheet-nav-bottom, 60px) - 38px - env(safe-area-inset-bottom));
    max-height: calc(100dvh - var(--sheet-nav-bottom, 60px) - 38px - env(safe-area-inset-bottom));
    overflow-y: auto; overscroll-behavior: auto;
  }
  .tag i { height: 10px; }
  .scroll-cue { display: none; }
  .exhibit {
    height: 100vh;
    height: 100dvh;
    grid-template-columns: 1fr;
    grid-template-rows: 56vh minmax(0, 1fr);
    grid-template-rows: 56dvh minmax(0, 1fr);
  }
  .exhibit-panel { min-height: 0; padding: 22px 20px 40px; border-left: 0; border-top: 1px solid var(--line); }
  .exhibit-disclosure {
    left: 16px; right: 16px; bottom: auto;
    top: calc(56vh - 12px);
    top: calc(56dvh - 12px);
    transform: translateY(-100%); max-width: none;
  }
  .exhibit :is(input, select, textarea) { font-size: 16px; }
}
@media (max-width: 760px) and (max-height: 600px) {
  body.ui-ready:not(.flat) .card:not(.is-open) .card-lede { -webkit-line-clamp: 2; }
  body.ui-ready:not(.flat) .card:not(.is-open) .facts { display: none; }
}
@media (pointer: coarse) {
  .stop {
    min-height: 150vh;
    min-height: 150svh;
  }
  .stop--hero {
    min-height: 135vh;
    min-height: 135svh;
  }
  .stop--finale {
    min-height: 118vh;
    min-height: 118svh;
  }
}
@media (max-width: 760px) and (pointer: coarse) {
  .stop {
    min-height: 125vh;
    min-height: 125svh;
  }
  html[data-tier="low"] body.ui-ready:not(.flat) .card { background: var(--glass-strong); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* ---------- no WebGL / reduced motion: a calm, readable list ---------- */
body.flat #world, body.flat .labels, body.flat .rail, body.flat .scroll-cue { display: none; }
body.flat .sky-fallback { opacity: 1 !important; }
body.flat .stop { min-height: auto; padding: 18px 0; justify-content: center; }
body.flat .stop--hero { min-height: 100vh; }
body:not(.ui-ready) .card { opacity: 1; transform: none; }
body.flat .card { opacity: 1; transform: none; margin: 0 auto; background: #0b0f1a; }
body.flat .card--left, body.flat .card--right { margin: 0 auto; }
body:not(.ui-ready) [data-open-index], body:not(.world-ready) [data-exhibit], body.flat [data-exhibit] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .card, #world, .sky-fallback { transition: none; }
  .scroll-cue span { animation: none; }
}

/* ---------- loading: the page holds still until the valley is on screen ---------- */
html.valley-loading { overflow: hidden; }
html.valley-loading .scroll-cue { opacity: 0; }
.hero-loading {
  /* pinned to the foot of the screen so it shows on any viewport height, clear of the hero text;
     on its own dark pill because the dawn sky behind it is too pale for light text */
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 5;
  margin: 0; padding: 8px 16px 10px; min-width: 150px; text-align: center; border-radius: 999px;
  background: #0b0f1a; color: var(--text);
  font-size: 13px; letter-spacing: .04em; opacity: 0; pointer-events: none;
  transition: opacity .35s ease;
}
html.valley-loading .hero-loading { opacity: 1; }
.hero-loading::after {
  content: ""; display: block; height: 2px; margin-top: 8px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, currentColor, transparent) 0 0 / 60% 100% no-repeat;
  animation: valley-loading 1.3s ease-in-out infinite alternate;
}
@keyframes valley-loading { from { background-position: -40% 0; } to { background-position: 140% 0; } }
@media (prefers-reduced-motion: reduce) { .hero-loading::after { animation: none; background-position: 50% 0; } }
body.flat .hero-loading { display: none; }
