/* ===================================================================
   Little Shop of Horrors
   Scroll-driven one-pager. JavaScript sets the custom properties that
   drive every scene; the rules below only describe what each value of
   those properties looks like.
   =================================================================== */

/* --- Tokens ------------------------------------------------------- */

:root {
  /* Surfaces */
  --bg: #07120c;
  --panel: #0b1a11;
  --noir: #020101;

  /* Type */
  --ink: #ece5d3;
  --moss: #a9b8a6;
  --gold: #c9a75a;
  --gold-lit: #e0c27a;

  /* Paper stock for the pinned clippings and legacy cards */
  --paper: #e9e1cc;
  --paper-alt: #e4dcc5;
  --paper-warm: #f1e3c2;
  --paper-ink: #1b1a16;
  --paper-ink-soft: #4a463c;
  --paper-meta: #6b5a2e;
  --blood: #8f1414;

  /* Gauge arcs */
  --flop: #8a2a35;
  --hit: #3d7048;

  --serif: 'Bodoni Moda', Georgia, serif;
  --sans: 'Figtree', system-ui, -apple-system, sans-serif;

  /* Shared frame treatment */
  --edge: rgba(201, 167, 90, 0.55);
  --edge-soft: rgba(201, 167, 90, 0.35);
}

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

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

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { display: block; }

a { color: var(--gold); }
a:hover { color: var(--gold-lit); }

/* Anything scripts show and hide needs this to outrank author display rules. */
[hidden] { display: none !important; }

.symbol-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* --- Shared type -------------------------------------------------- */

.display {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: var(--ink);
  text-wrap: balance;
}
.display--sm { font-size: clamp(30px, 3vw, 44px); line-height: 1.05; font-style: normal; }
.display--md { font-size: clamp(40px, 5vw, 76px); line-height: 1; }
.display--lg { font-size: clamp(44px, 5.5vw, 88px); line-height: 0.95; }
.display--xl { font-size: clamp(56px, 9vw, 150px); line-height: 1.1; }

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow--muted { color: var(--moss); }

.lede {
  margin: 0;
  max-width: 560px;
  font-size: 20px;
  line-height: 1.45;
  color: var(--moss);
  text-wrap: pretty;
}
.lede--wide { max-width: 600px; }

.hairline { display: block; height: 1px; background: rgba(201, 167, 90, 0.45); }

.lozenge {
  width: 8px;
  height: 8px;
  flex: none;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

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

.hero {
  position: relative;
  height: 400vh;          /* 100vh of sticky stage + 300vh of travel */
  background: var(--bg);
}

.hero__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: radial-gradient(ellipse 70% 60% at 50% 62%, #1d4430 0%, #0f2619 55%, #07120c 100%);
}

.hero__foliage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero__foliage--back { filter: blur(1.5px); }
.hero__foliage--front { filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.5)); }

/* Leaves slide inward as --a rises, so the frame opens up around the plant. */
.hero__drift { transform: translateX(calc((1 - var(--a, 0)) * var(--drift))); }
.hero__drift--front {
  transform-origin: var(--origin) 900px;
  transform: translateX(calc((1 - var(--a, 0)) * var(--drift))) scale(calc(1.12 - var(--a, 0) * 0.12));
}

.sway { transform-box: view-box; }
.sway--back-l  { transform-origin: 0 900px;    animation: sway-back-l  9s ease-in-out  0s infinite; }
.sway--back-r  { transform-origin: 1600px 900px; animation: sway-back-r  9s ease-in-out  0s infinite; }
.sway--mid-l   { transform-origin: 0 900px;    animation: sway-mid-l   7s ease-in-out -2s infinite; }
.sway--mid-r   { transform-origin: 1600px 900px; animation: sway-mid-r   7s ease-in-out -2s infinite; }
.sway--front-l { transform-origin: 0 900px;    animation: sway-front-l 6s ease-in-out -4s infinite; }
.sway--front-r { transform-origin: 1600px 900px; animation: sway-front-r 6s ease-in-out -4s infinite; }

.hero__logo {
  position: absolute;
  z-index: 4;          /* clear of the front leaf layer */
  left: 50%;
  top: 45%;
  width: min(54vw, 94vh);
  transform: translate(-50%, -50%) translateY(calc(var(--a, 0) * -4vh)) scale(calc(1 - var(--lg, 0) * 0.12));
  opacity: calc(1 - var(--lg, 0) * 1.6);
  filter: blur(calc(var(--lg, 0) * 6px)) drop-shadow(0 20px 40px rgba(0, 0, 0, 0.55));
  pointer-events: none;
}
.hero__logo img {
  width: 100%;
  height: auto;
  animation: logo-pulse 4.5s ease-in-out infinite;
  will-change: transform;
  filter: brightness(0.88) saturate(0.8) sepia(0.15) contrast(1.05);
}

/* --b raises the plant into frame, --c lunges it at the viewer. */
.hero__plant {
  position: absolute;
  left: 50%;
  bottom: -2vh;
  height: 96vh;
  aspect-ratio: 1536 / 1024;
  transform-origin: 50% 42%;
  transform:
    translateX(-50%)
    translateY(calc((1 - var(--b, 0)) * 100%))
    scale(calc((0.82 + var(--b, 0) * 0.18 + var(--c, 0) * var(--lunge, 0.9)) * (1 + var(--out, 0) * 0.12)));
  pointer-events: none;
  will-change: transform;
}
.hero__plant img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.6)) saturate(1.05) brightness(0.92);
}

.hero__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 85% 75% at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(3, 10, 6, 0.75) 100%);
}
.hero__dim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: #050d08;
  opacity: calc(var(--c, 0) * var(--c, 0) * 0.35);
}

.hero__cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  color: var(--gold);
  opacity: calc(0.8 - var(--a, 0) * 3);
}

/* --- Page body ---------------------------------------------------- */

.page {
  position: relative;
  z-index: 6;
  margin-top: -100vh;      /* the page slides up over the sticky hero */
  overflow-x: clip;
  background: linear-gradient(to bottom, rgba(7, 18, 12, 0) 0, rgba(7, 18, 12, 0) 50vh, var(--bg) 68vh);
  color: var(--ink);
  font-family: var(--sans);
}

.seam {
  position: relative;
  display: block;
  width: 100%;
  height: 75vh;
  z-index: 4;
  pointer-events: none;
  overflow: visible;
  filter: drop-shadow(0 -20px 40px rgba(0, 0, 0, 0.55));
}

/* Decorative foliage clusters that parallax past the text columns. */
.decor {
  position: absolute;
  width: clamp(280px, 38vw, 640px);
  aspect-ratio: 1;
  pointer-events: none;
  overflow: visible;
}
.decor--haze { z-index: 0; filter: blur(2px); }
.decor--near { z-index: 3; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.5)); }

.decor[data-field="videoLeft"]    { left: -10vw; top: -10vh; }
.decor[data-field="videoRight"]   { right: -10vw; top: 20vh; }
.decor[data-field="storyRight"]   { right: -12vw; top: 0; }
.decor[data-field="storyNear"]    { left: -14vw; bottom: -8vh; }
.decor[data-field="peopleLeft"]   { left: -12vw; top: 0; }
.decor[data-field="peopleNear"]   { right: -14vw; bottom: -8vh; }
.decor[data-field="historyLeft"]  { left: -12vw; top: 0; }
.decor[data-field="historyRight"] { right: -12vw; top: 40vh; }

/* --- Chapter headings --------------------------------------------- */

.chapter {
  position: relative;
  z-index: 2;
  padding: 16vh 6vw 6vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}
.chapter__title { padding: 0 0.1em; }

.rule-row {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: 1180px;
}
.rule-row--narrow { max-width: 520px; }
.rule-row__no {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}
.rule {
  flex: 1;
  height: 1px;
  background: var(--gold);
  transform-origin: right center;
}
.rule-row > .rule:last-of-type { transform-origin: left center; }
.rule--closed { transform: scaleX(0); }
.rule--grow { transform: scaleX(var(--tt, 0)); }
.rule--title { transform: scaleX(var(--tl, 0)); }

/* --- Prologue ----------------------------------------------------- */

.prologue {
  position: relative;
  padding: 18vh 6vw 16vh;
  z-index: 1;
}
.prologue__inner {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.eyebrow-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.screen {
  position: relative;
  padding: 12px;
  border: 1px solid var(--edge);
  background: rgba(7, 18, 12, 0.6);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55);
}
.screen__well {
  position: relative;
  aspect-ratio: 16 / 9;
  background: radial-gradient(ellipse at 50% 45%, #183a27 0%, #0a1710 75%);
  overflow: hidden;
}
.screen__well iframe,
.screen__well video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Two-column story blocks -------------------------------------- */

.split { position: relative; padding: 6vh 6vw 18vh; }
.split__grid {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
}

.panel {
  position: relative;
  z-index: 5;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 480px;
  padding: clamp(24px, 4vw, 48px);
  background: rgba(7, 18, 12, 0.84);
  backdrop-filter: blur(6px);
  border: 1px solid var(--edge-soft);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}
.panel--left  { grid-column: 1 / 7;  justify-self: start; }
.panel--right { grid-column: 7 / -1; justify-self: end; }
.panel__lede { margin: 0; font-size: 20px; line-height: 1.45; color: var(--ink); text-wrap: pretty; }

.ticks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.ticks li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  font-size: 16px;
  line-height: 1.5;
  color: var(--moss);
}
.tick { flex: none; width: 18px; height: 1px; background: var(--gold); transform: translateY(-4px); }

.stack {
  position: relative;
  grid-row: 1;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 4 / 5;
}
.stack--right { grid-column: 6 / -1; justify-self: end; }
.stack--left  { grid-column: 1 / 8;  justify-self: start; }

.plate {
  border: 1px solid var(--edge);
  background: var(--panel);
}
.plate--main {
  position: absolute;
  inset: 0;
  padding: 10px;
  box-shadow: 0 40px 70px rgba(0, 0, 0, 0.5);
}
.plate--inset {
  position: absolute;
  width: 64%;
  aspect-ratio: 1;
  bottom: -18%;
  padding: 8px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  z-index: 2;
}
.plate--inset-right { right: -8%; }
.plate--inset-left  { left: -6%; }
.plate__well { position: relative; width: 100%; height: 100%; }

/* --- Horizontal timeline ------------------------------------------ */

.timeline { position: relative; height: 585vh; }
.timeline__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5vh;
}
.timeline__head {
  position: relative;
  z-index: 1;
  padding: 0 6vw;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px 24px;
  flex-wrap: wrap;
}
.timeline__track {
  position: relative;
  z-index: 1;
  display: flex;
  width: max-content;
  padding: 0 40vw 0 6vw;
  will-change: transform;
}

.stop {
  position: relative;
  flex: none;
  width: min(76vw, 400px);
  padding-right: 7vw;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.stop__year {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(56px, 7vw, 108px);
  line-height: 0.9;
  color: var(--gold);
}
.stop__line { position: relative; height: 14px; display: flex; align-items: center; }
.stop__dot {
  position: relative;
  z-index: 1;
  flex: none;
  width: 11px;
  height: 11px;
  margin-left: 1px;
  transform: rotate(45deg);
  border: 1px solid var(--gold);
  background: var(--bg);
}
.stop__seg {
  position: absolute;
  left: 14px;
  right: -7vw;
  top: 50%;
  height: 1px;
  background: rgba(201, 167, 90, 0.22);
}
.stop__fill {
  display: block;
  height: 100%;
  background: var(--gold);
  transform-origin: left center;
  transform: scaleX(0);
}
.stop__plate {
  position: relative;
  width: 100%;
  height: clamp(140px, 26vh, 260px);
  padding: 8px;
  border: 1px solid var(--edge);
  background: var(--panel);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}
.stop__body { display: flex; flex-direction: column; gap: 8px; }
.stop__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1.1;
  color: var(--ink);
}
.stop__text { margin: 0; font-size: 16px; line-height: 1.5; color: var(--moss); text-wrap: pretty; }
.stop__note {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(201, 167, 90, 0.3);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  text-wrap: pretty;
}
.stop__tag {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

/* --- The bite ----------------------------------------------------- */

.bite { position: relative; height: 190vh; }
.bite__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, #163521 0%, #07120c 75%);
}
.bite__title {
  position: relative;
  z-index: 1;
  padding: 0 6vw;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

/* The jaws are fixed so they close over the viewport, not the section. */
.jaw__throat {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  background: radial-gradient(ellipse 55% 40% at 50% 50%, #3a0b14 0%, #160407 55%, #050a07 100%);
}
.jaw {
  position: fixed;
  left: 50%;
  top: 0;
  width: min(120vw, 172vh);
  aspect-ratio: 2172 / 724;
  pointer-events: none;
  visibility: hidden;
  will-change: transform;
}
.jaw img { width: 100%; height: 100%; filter: brightness(0.9) saturate(0.82) sepia(0.08); }
.jaw--bottom {
  z-index: 41;
  transform: translate(-50%, 100vh);
  filter: drop-shadow(0 -10px 30px rgba(0, 0, 0, 0.6));
}
.jaw--top {
  z-index: 42;
  transform: translate(-50%, -100%);
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.65));
}

/* --- Reviews board ------------------------------------------------ */

.board { position: relative; padding: 2vh 6vw 14vh; }
.board__inner { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }
.board__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
}
.board__felt {
  padding: clamp(20px, 3vw, 40px);
  padding-bottom: clamp(40px, 5vw, 70px);
  border: 1px solid var(--edge);
  background: radial-gradient(ellipse at 50% 30%, #12291b 0%, #0b1a11 80%);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.6), 0 40px 80px rgba(0, 0, 0, 0.5);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(6px, 1.4vw, 20px);
}
.board__col { display: flex; flex-direction: column; }

.board__label {
  align-self: center;
  position: relative;
  z-index: 3;
  margin-bottom: 18px;
  padding: 8px 22px 10px;
  background: var(--gold);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.5);
}
.board__label span {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1;
  color: var(--bg);
}
.board__label--a { transform: rotate(-2.5deg); }
.board__label--b { transform: rotate(2deg); }
.board__label--c { transform: rotate(-1.5deg); }

.clipping { position: relative; }
.clipping--gap { margin-top: 14px; }
.clipping__card {
  position: relative;
  padding: clamp(18px, 2vw, 26px) clamp(14px, 1.6vw, 22px) clamp(14px, 1.6vw, 20px);
  background: var(--paper);
  color: var(--paper-ink);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.clipping__card--alt { background: var(--paper-alt); }
.clipping__card--photo { padding: 8px; aspect-ratio: 4 / 3; display: block; }

/* Each clipping sits at its own angle so the board reads as pinned paper. */
.clipping__card--r1 { transform: rotate(-4deg)   translate(3.6%, 0); }
.clipping__card--r2 { transform: rotate(3deg)    translate(-4.8%, -3px); }
.clipping__card--r3 { transform: rotate(-2deg)   translate(6.0%, -5px); }
.clipping__card--m1 { transform: rotate(5deg)    translate(-2.4%, 2px); }
.clipping__card--m2 { transform: rotate(-3.5deg) translate(7.2%, -4px); }
.clipping__card--m3 { transform: rotate(2.5deg)  translate(-6.0%, -7px); }
.clipping__card--p1 { transform: rotate(-3deg)   translate(-3.6%, 2px); }
.clipping__card--p2 { transform: rotate(4deg)    translate(4.8%, -5px); }
.clipping__card--p3 { transform: rotate(-5deg)   translate(-2.4%, -7px); }

.pin {
  position: absolute;
  top: -6px;
  left: 50%;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  z-index: 2;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f0d690, #9c7a32);
  box-shadow: 0 3px 4px rgba(0, 0, 0, 0.5);
}
.clipping__meta {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-meta);
}
.clipping__quote {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(16px, 1.7vw, 22px);
  line-height: 1.3;
  text-wrap: pretty;
}
.clipping__by { font-size: 13px; color: var(--paper-ink-soft); }

/* --- Hit or flop -------------------------------------------------- */

.verdict {
  position: relative;
  padding: 0 0 20vh;
  margin-top: 8vh;
  overflow: hidden;
}
.verdict__paper {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url('assets/newspaper.jpg') center / cover no-repeat;
  filter: grayscale(0.4) contrast(1.05);
}
.verdict__wash {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(to bottom, rgba(3, 6, 4, 0.72), rgba(3, 6, 4, 0.8) 84%, var(--bg) 100%);
}
.verdict__inner {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 12vh 6vw 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.verdict__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  background: var(--gold);
  color: var(--bg);
  border-top: 1px solid var(--gold-lit);
  border-bottom: 1px solid #8a6f33;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55);
  padding: 16px 0;
}
.marquee__rail { display: flex; width: max-content; animation: marquee 50s linear infinite; }
.marquee__half { display: flex; align-items: center; gap: 28px; padding-right: 28px; flex: none; }
.marquee__title { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 26px; line-height: 1; }
.marquee__sub { font-size: 13px; font-weight: 600; letter-spacing: 0.26em; text-transform: uppercase; }
.marquee__sep { width: 7px; height: 7px; flex: none; background: var(--bg); transform: rotate(45deg); }

.gauge-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: clamp(24px, 3.5vw, 44px);
  background: rgba(7, 18, 12, 0.84);
  border: 1px solid var(--edge-soft);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}
.gauge-card__head { display: flex; flex-direction: column; gap: 8px; }
.gauge { position: relative; width: 100%; max-width: 360px; align-self: center; }
.gauge svg { display: block; width: 100%; overflow: visible; }
.gauge__needle { transform-origin: 100px 100px; transform: rotate(-90deg); }
.gauge__scale {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--moss);
}
.gauge__scale .is-on { color: var(--ink); }

.facts {
  margin: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px 20px;
  font-size: 16px;
  line-height: 1.5;
}
.facts dt {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  padding-top: 3px;
}
.facts dd { margin: 0; color: var(--ink); }

/* --- Vines and the song chooser ----------------------------------- */

.vines { position: relative; height: 580vh; }
.vines__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}
.vines__dark {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 55% at 50% 52%, #0b100d 0%, #040705 55%, #010201 100%);
  opacity: var(--dk, 0);
}
.vines__layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.vines__layer--back { filter: blur(2px); opacity: calc(1 - var(--dk, 0) * 0.55); }
.vines__layer--front { filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.6)); }

/* Stacking inside the vines stage: title above the vines, the chooser
   above the title, an opened song above everything. */
.vines__titleWrap {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6vw;
  pointer-events: none;
}
.vines__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
  width: 100%;
  max-width: 900px;
  opacity: var(--tt, 0);
  transform: translateY(calc((1 - var(--tt, 0)) * 40px));
}

.vines__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 70% at 50% 50%, rgba(0, 0, 0, 0) 45%, rgba(1, 2, 1, 0.85) 100%);
  opacity: var(--dk, 0);
}

.chooser {
  position: absolute;
  z-index: 4;
  inset: 0;
  transition: opacity 0.5s ease;
}
.chooser[data-dim="true"] { pointer-events: none; }
/* Buds fade out with the tree when a song takes over the stage. */
.chooser__tree [data-buds] { opacity: var(--lb, 0); }

.chooser__tree {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.6));
}
.chooser__labels {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100vw, 177.78vh);
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.song-pick {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: none;
  border: 0;
  cursor: pointer;
  pointer-events: auto;
  text-align: center;
  opacity: var(--lb, 0);
  transform: translate(-50%, 26px);
  transition: transform 0.3s ease;
  font-family: var(--sans);
}
.song-pick:hover, .song-pick:focus-visible { transform: translate(-50%, 34px); }
.song-pick__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 38px);
  line-height: 1.05;
  color: var(--ink);
  max-width: 18vw;
  text-wrap: balance;
}
.song-pick__theme {
  font-size: clamp(10px, 0.9vw, 13px);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  max-width: 18vw;
  text-wrap: balance;
}

.chooser__hint {
  position: absolute;
  left: 50%;
  bottom: 7vh;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border: 1px solid rgba(201, 167, 90, 0.6);
  border-radius: 999px;
  background: rgba(7, 18, 12, 0.7);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  pointer-events: none;
  white-space: nowrap;
  opacity: var(--hn, 0);
}
.chooser__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* --- Song detail -------------------------------------------------- */

.song {
  position: absolute;
  z-index: 5;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  gap: 5vh;
  padding: 4vh 0 6vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease 0s;
}
.song[data-open="true"] { opacity: 1; pointer-events: auto; transition-delay: 0.45s; }

.song__strip {
  display: block;
  width: 100%;
  height: 160px;
  flex: none;
  overflow: visible;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.6));
}
.song__strip path { stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.3s cubic-bezier(.6, .05, .3, 1) 0s; }
.song[data-open="true"] .song__strip path { stroke-dashoffset: 0; transition-duration: 1.5s; transition-delay: 0.55s; }
.song__strip [data-sleaf] { transform: scale(0); transition: transform 0.5s cubic-bezier(.34, 1.56, .64, 1) 0s; }
.song[data-open="true"] .song__strip [data-sleaf] { transform: scale(1); }

.song__grid {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 6vw;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 48px;
  align-items: center;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease 0s, transform 0.7s ease 0s;
}
.song[data-open="true"] .song__grid { opacity: 1; transform: translateY(0); transition-delay: 1.2s; }

.song__col { display: flex; flex-direction: column; gap: 20px; }
.song__meta { font-size: 16px; color: var(--moss); }

.review { position: relative; }
.review__scroll {
  max-height: 8em;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 167, 90, 0.55) transparent;
  transition: max-height 0.5s ease;
}
.review[data-expanded="true"] .review__scroll { max-height: 60em; overflow-y: visible; overscroll-behavior: auto; }
.review__scroll p {
  margin: 0;
  padding-bottom: 1.2em;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  text-wrap: pretty;
  white-space: pre-line;
}
.review__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3.2em;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(7, 18, 12, 0) 0%, var(--bg) 100%);
  transition: opacity 0.3s ease;
}
.review[data-expanded="true"] .review__fade { opacity: 0; }

.link-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}
.link-btn:hover { color: var(--gold-lit); }

.song__actions { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid var(--edge);
  background: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.btn:hover { background: rgba(201, 167, 90, 0.12); }
.btn--solid { background: var(--gold); border-color: var(--gold); color: var(--bg); }
.btn--solid:hover { background: var(--gold-lit); }
.btn--ghost {
  min-height: 44px;
  padding: 0 22px;
  border-color: var(--gold);
  color: var(--gold);
  background: transparent;
  letter-spacing: 0.22em;
  font-size: 13px;
}
.btn--ghost:hover { background: var(--gold); color: #0c0906; }

/* --- Finale ------------------------------------------------------- */

.finale { position: relative; height: 1300vh; background: var(--noir); }

.drips {
  position: absolute;
  left: 0;
  top: -145vh;
  width: 100%;
  height: 215vh;
  z-index: 4;
  pointer-events: none;
  overflow: visible;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.6));
}
.finale__seam {
  position: absolute;
  left: 0;
  right: 0;
  top: -45vh;
  height: 45vh;
  z-index: 2;
  opacity: 0;            /* the scroll driver turns it on; never present at load */
  pointer-events: none;
  transition: opacity 0.4s ease;
  background: linear-gradient(to bottom, rgba(2, 1, 1, 0) 0%, rgba(2, 1, 1, 0.55) 45%, var(--noir) 100%);
}

.finale__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--noir);
  color: var(--ink);
  z-index: 3;
}

.reel__beam {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--bm, 0);
  clip-path: polygon(46% 100%, 54% 100%, 100% 0, 0 0);
  background: linear-gradient(to top, rgba(255, 238, 205, 0.24) 0%, rgba(255, 238, 205, 0.05) 70%, rgba(255, 238, 205, 0) 100%);
  animation: flick 0.18s steps(1) infinite;
}

.finale__title {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 0 6vw;
  text-align: center;
  opacity: var(--ti, 1);
  transform: scale(calc(1 + var(--tz, 0) * 0.08));
  filter: blur(calc((1 - var(--ti, 1)) * 8px));
}

/* Shutter wipe, then an iris that opens and closes on the reel. */
.reel {
  position: absolute;
  inset: 0;
  clip-path: inset(calc((1 - var(--sy, 0)) * 49.7%) calc((1 - var(--sx, 0)) * 50%));
  background: radial-gradient(ellipse 75% 65% at 50% 45%, #231b13 0%, #0c0906 62%, #040302 100%);
}
.reel__iris {
  position: absolute;
  inset: 0;
  transform: translateY(calc(var(--roll, 0) * -5vh));
  clip-path: circle(calc(var(--ir, 1) * 80vmax) at 50% 50%);
}
.reel__inner { position: absolute; inset: 0; }

.leader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4vh;
  background: #17130f;
  opacity: var(--cdo, 1);
}
.leader__cross { position: absolute; background: rgba(236, 229, 211, 0.3); }
.leader__cross--h { left: 0; right: 0; top: 50%; height: 1px; }
.leader__cross--v { top: 0; bottom: 0; left: 50%; width: 1px; }
.leader__dial {
  position: relative;
  width: min(62vh, 82vw);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(rgba(236, 229, 211, 0.16) calc(var(--sw, 0) * 360deg), rgba(0, 0, 0, 0) 0);
}
.leader__ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(236, 229, 211, 0.6); }
.leader__ring--inner { inset: 9%; border: 1px solid rgba(236, 229, 211, 0.35); }
.leader__num {
  grid-area: 1 / 1;
  font-family: var(--serif);
  font-weight: 500;
  font-size: min(38vh, 50vw);
  line-height: 1;
  color: var(--ink);
}
.leader__num--3 { opacity: var(--n3, 1); }
.leader__num--2 { opacity: var(--n2, 0); }
.leader__num--1 { opacity: var(--n1, 0); }
.leader__caption {
  position: relative;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  background: #17130f;
  padding: 6px 14px;
}

.cue { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }

.cue--poster { opacity: var(--po, 0); animation: weave 0.24s steps(2) infinite; }
.cue--poster img {
  width: min(90vw, 116vh);
  height: auto;
  transform: scale(calc(1.24 - var(--pi, 0) * 0.22 + var(--pk, 0) * 0.08)) rotate(calc((1 - var(--pi, 0)) * -3deg));
  filter: sepia(0.2) contrast(1.05) brightness(calc(0.95 - var(--c1, 0) * 0.62)) blur(calc(var(--c1, 0) * 3px));
  box-shadow: 0 50px 100px rgba(0, 0, 0, 0.7);
}

.cue--dontfeed {
  opacity: var(--df, 0);
  animation: weave 0.24s steps(2) infinite;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(150, 14, 14, 0.5) 0%, rgba(0, 0, 0, 0) 70%);
}
.cue--dontfeed img {
  width: min(92vw, 140vh);
  height: auto;
  transform: translate(calc(var(--shx, 0) * 1px), calc(var(--shy, 0) * 1px))
             scale(calc(2.6 - var(--dfs, 0) * 1.6 + var(--dfh, 0) * 0.06));
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.7)) brightness(calc(1 - var(--c2, 0) * 0.65)) blur(calc(var(--c2, 0) * 3px));
}

.cue--warning {
  flex-direction: column;
  padding: 3vh 3vw;
  opacity: var(--wo, 0);
}
.warning__card {
  position: relative;
  width: min(90vw, 118vh);
  transform: translateY(calc((1 - var(--wd, 0)) * -110vh)) rotate(calc(-1.2deg - (1 - var(--wd, 0)) * 10deg));
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.7));
}
.warning__weave { animation: weave 0.24s steps(2) infinite; }
.warning__weave img { width: 100%; height: auto; }

.legacy {
  position: relative;
  z-index: 1;
  margin-top: calc(min(90vw, 118vh) * -0.17);
  width: min(94vw, 1080px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(14px, 2.2vw, 30px);
}
.legacy__card {
  position: relative;
  flex: 0 1 clamp(220px, 27vw, 320px);
  padding: 24px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--paper-warm);
  color: #1b130c;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.5);
}
.legacy__card--a { opacity: var(--c3a, 0); transform: translateY(calc((1 - var(--c3a, 0)) * 80px)) rotate(calc(-2.5deg + (1 - var(--c3a, 0)) * -7deg)); }
.legacy__card--b { opacity: var(--c3b, 0); transform: translateY(calc((1 - var(--c3b, 0)) * 80px)) rotate(calc(1.5deg + (1 - var(--c3b, 0)) * -7deg)); }
.legacy__card--c { opacity: var(--c3c, 0); transform: translateY(calc((1 - var(--c3c, 0)) * 80px)) rotate(calc(-1deg + (1 - var(--c3c, 0)) * -7deg)); }
.legacy__tape {
  position: absolute;
  left: 50%;
  top: -11px;
  width: 76px;
  height: 22px;
  background: rgba(232, 216, 180, 0.8);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.legacy__card--a .legacy__tape { transform: translateX(-50%) rotate(2.5deg); }
.legacy__card--b .legacy__tape { transform: translateX(-50%) rotate(-1.5deg); }
.legacy__card--c .legacy__tape { transform: translateX(-50%) rotate(1deg); }
.legacy__no { font-size: 13px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--blood); }
.legacy__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.1;
  color: var(--blood);
}
.legacy__card p { margin: 0; font-size: 16px; line-height: 1.45; font-weight: 500; text-wrap: pretty; }

.cue--shop { display: block; opacity: var(--so, 0); animation: weave 0.24s steps(2) infinite; }
.shop {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(56vw, 84vh);
  aspect-ratio: 16 / 10;
  transform: translate(-50%, -50%);
}
.shop__walls {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 15%, #6a2016 0%, #2a0a07 55%, #0d0504 100%);
  border: 1px solid var(--gold);
  box-shadow: inset 0 0 0 7px #0d0504, inset 0 0 0 8px rgba(201, 167, 90, 0.5), 0 0 80px rgba(120, 30, 20, 0.35);
  opacity: calc(1 - var(--sg, 0) * 0.35);
}
.shop__plant {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 92%;
  transform-origin: 50% 100%;
  transform: translateX(-50%) translateY(calc(var(--sg, 0) * 22%)) scale(calc(0.6 + var(--sg, 0) * 1.35));
}
.shop__plant img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.6)) brightness(calc(1 - var(--c4, 0) * 0.6)) blur(calc(var(--c4, 0) * 3px));
}
.shop__skyline {
  position: absolute;
  left: -3vw;
  right: -3vw;
  bottom: -4vh;
  display: flex;
  justify-content: space-between;
  gap: 1vw;
  pointer-events: none;
}
.shop__skyline span {
  flex: 1;
  max-width: 130px;
  aspect-ratio: 1 / 1.2;
  border-radius: 50% 50% 38% 38%;
  background: #030202;
}
.shop__skyline span:nth-child(2) { margin-top: 2vh; }
.shop__skyline span:nth-child(4) { margin-top: 3vh; }
.shop__skyline span:nth-child(5) { margin-top: 1vh; }
.shop__skyline span:nth-child(7) { margin-top: 2.5vh; }
.shop__skyline span:nth-child(8) { margin-top: 0.5vh; }
.shop__skyline span:nth-child(9) { margin-top: 2vh; }

.cue--end { flex-direction: column; padding: 0 5vw 190px; opacity: var(--eo, 0); }
.cue__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 45% at 60% 48%, rgba(170, 16, 16, 0.55) 0%, rgba(0, 0, 0, 0) 70%);
  opacity: var(--rq, 0);
}
.cue--end img {
  position: relative;
  width: min(86vw, 130vh, 92vh);
  height: auto;
  clip-path: inset(0 calc((1 - var(--q, 0)) * 24%) 0 0);
  transform: translate(calc(var(--qx, 0) * 1px), calc(var(--qy, 0) * 1px)) scale(calc(0.92 + var(--ez, 0) * 0.08));
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.75));
}

.theme {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(88vw, 680px);
  max-height: 88vh;
  padding: clamp(28px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  background: rgba(10, 8, 6, 0.9);
  border: 1px solid var(--gold);
  box-shadow: inset 0 0 0 7px rgba(10, 8, 6, 0.9), inset 0 0 0 8px rgba(201, 167, 90, 0.45), 0 40px 80px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}
.theme p { margin: 0; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.theme--i   { opacity: var(--c1, 0); transform: translate(-50%, calc(-50% + (1 - var(--c1, 0)) * 30px)); }
.theme--ii  { opacity: var(--c2, 0); transform: translate(-50%, calc(-50% + (1 - var(--c2, 0)) * 30px)); }
.theme--iv  { opacity: var(--c4, 0); transform: translate(-50%, calc(-50% + (1 - var(--c4, 0)) * 30px)); width: min(88vw, 720px); }
.theme__list { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.theme__list p { padding-top: 14px; border-top: 1px solid var(--edge-soft); }

/* Projector artefacts, layered over everything in the gate. */
.reel__flash { position: absolute; inset: 0; pointer-events: none; background: #f3e6c8; opacity: var(--fl, 0); }
.reel__warm {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: #fff2d6;
  mix-blend-mode: overlay;
  animation: flick 0.18s steps(1) infinite;
}
.reel__grain {
  position: absolute;
  inset: -50%;
  pointer-events: none;
  background: url('assets/grain.png') repeat;
  opacity: 0.16;
  animation: grain 0.7s steps(5) infinite;
}
.reel__scratch {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 30%;
  width: 1px;
  pointer-events: none;
  background: rgba(236, 229, 211, 0.4);
  animation: scratch 3.4s steps(24) infinite;
}
.reel__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 75% at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.6) 100%);
}
.reel__gate {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  opacity: 0.85;
  animation: jit 0.3s steps(2) infinite;
}
.reel__shutter { position: absolute; inset: 0; pointer-events: none; background: #fff6e4; opacity: calc(1 - var(--sy, 0)); }

.credits {
  position: absolute;
  left: 5vw;
  right: 5vw;
  bottom: max(5vh, 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  opacity: calc(var(--cr, 0) * var(--eo, 0));
  transform: translateY(calc((1 - var(--cr, 0)) * 20px));
  pointer-events: none;
}
.credits img { width: min(35.7vw, 315px); height: auto; }
.credits__line {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  text-wrap: balance;
}
.credits__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }

.stop-auto {
  position: absolute;
  right: max(3vw, 20px);
  bottom: max(3vh, 20px);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  background: rgba(10, 8, 6, 0.85);
  border: 1px solid rgba(201, 167, 90, 0.7);
  color: var(--gold);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
}
.stop-auto:hover { background: var(--gold); color: #0c0906; }

/* --- Sources ------------------------------------------------------ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vw;
  background: rgba(2, 1, 1, 0.78);
}
.modal__box {
  position: relative;
  width: min(100%, 620px);
  max-height: 86vh;
  padding: clamp(28px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: rgba(10, 8, 6, 0.96);
  border: 1px solid var(--gold);
  box-shadow: inset 0 0 0 7px rgba(10, 8, 6, 0.96), inset 0 0 0 8px rgba(201, 167, 90, 0.45), 0 40px 80px rgba(0, 0, 0, 0.6);
  font-family: var(--sans);
}
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.modal__close {
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: 1px solid var(--edge);
  color: var(--gold);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.modal__close:hover { background: rgba(201, 167, 90, 0.15); }
.modal__body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 167, 90, 0.55) transparent;
}
.source {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 0;
  border-top: 1px solid var(--edge-soft);
  text-decoration: none;
}
a.source:hover { opacity: 0.8; }
.source__label { font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.source__url { font-size: 15px; color: var(--ink); word-break: break-all; }
.source__cite { font-size: 15px; line-height: 1.5; color: var(--ink); text-wrap: pretty; }

/* --- Image slots -------------------------------------------------- */

image-slot { position: absolute; inset: 0; display: block; overflow: hidden; background: var(--panel); }
image-slot img { position: absolute; max-width: none; transform: translate(-50%, -50%); }
.slot-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  text-align: center;
  border: 1px dashed var(--edge-soft);
  color: var(--gold);
}
.slot-empty svg { opacity: 0.7; }
.slot-empty span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-wrap: balance;
}

/* --- Keyframes ---------------------------------------------------- */

@keyframes logo-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }

@keyframes sway-back-l  { 0%, 100% { transform: rotate(0deg) translateY(0); } 50% { transform: rotate(1.2deg)  translateY(-6px); } }
@keyframes sway-back-r  { 0%, 100% { transform: rotate(0deg) translateY(0); } 50% { transform: rotate(-1.2deg) translateY(-6px); } }
@keyframes sway-mid-l   { 0%, 100% { transform: rotate(0deg) translateY(0); } 50% { transform: rotate(1.8deg)  translateY(-6px); } }
@keyframes sway-mid-r   { 0%, 100% { transform: rotate(0deg) translateY(0); } 50% { transform: rotate(-1.8deg) translateY(-6px); } }
@keyframes sway-front-l { 0%, 100% { transform: rotate(0deg) translateY(0); } 50% { transform: rotate(2.4deg)  translateY(-6px); } }
@keyframes sway-front-r { 0%, 100% { transform: rotate(0deg) translateY(0); } 50% { transform: rotate(-2.4deg) translateY(-6px); } }

@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-8%, 4%); }
  40%  { transform: translate(5%, -6%); }
  60%  { transform: translate(-3%, 9%); }
  80%  { transform: translate(7%, 2%); }
  100% { transform: translate(0, 0); }
}

@keyframes flick {
  0% { opacity: .05; } 20% { opacity: .13; } 40% { opacity: .03; }
  60% { opacity: .1; } 80% { opacity: .06; } 100% { opacity: .09; }
}

@keyframes scratch {
  0%   { left: 22%; opacity: 0; }
  8%   { opacity: .6; }
  30%  { left: 24%; }
  50%  { left: 63%; opacity: 0; }
  55%  { left: 71%; opacity: .5; }
  80%  { left: 69%; }
  100% { left: 30%; opacity: 0; }
}

@keyframes weave {
  0%   { transform: translate(0, 0); }
  50%  { transform: translate(0.6px, -1px); }
  100% { transform: translate(-0.5px, 0.5px); }
}

@keyframes jit { 0% { transform: translate(0, 0); } 50% { transform: translate(-1px, 1px); } }

@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --- Narrow screens ----------------------------------------------- *
 * The layout scales fluidly everywhere else. These two rules exist
 * only because a 12-column split and a three-up board stop being
 * readable once the column is narrower than the text inside it.      */

@media (max-width: 860px) {
  .split__grid { display: flex; flex-direction: column; gap: 14vh; }
  .panel--left, .panel--right { max-width: none; justify-self: stretch; }
  .stack--left, .stack--right { max-width: none; }
  .plate--inset { width: 52%; bottom: -12%; }

  .board__felt { grid-template-columns: 1fr; gap: 40px 0; }
  .clipping__card { transform: none; }

  .song-pick__title, .song-pick__theme { max-width: 40vw; }
}

@media (prefers-reduced-motion: reduce) {
  .sway, .marquee__rail, .reel__grain, .reel__scratch, .reel__warm,
  .reel__beam, .cue--poster, .cue--dontfeed, .cue--shop, .warning__weave, .reel__gate,
  .hero__logo img { animation: none !important; }
}
