/* Layout: a night-in-the-wilderness page — one cinematic player as the hero, a scale plan, then stations
   with a sticky animated stage beside the reading column. Deliberately a single dark look (matches the logo). */
:root {
  --night: #0c0a12;
  --night-2: #16121f;
  --night-3: #221b2c;
  --linen: #f1e8d6;
  --linen-dim: #b8ad9a;
  --gold: #e3b04f;
  --gold-soft: rgba(227, 176, 79, 0.22);
  --flame: #f26b1d;
  --blue: #2f4ea6;
  --purple: #6a2f80;
  --scarlet: #b3202d;
  --rule: rgba(241, 232, 214, 0.12);
  --f-disp: "Cinzel", "Trajan Pro", Georgia, serif;
  --f-serif: "Cormorant Garamond", Garamond, Georgia, serif;
  --f-sans: "Nunito Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 3.2rem);
  --step-4: clamp(2.8rem, 2rem + 4.5vw, 6rem);
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--night); color: var(--linen);
  font-family: var(--f-sans); font-size: var(--step-0); line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--night); }
img { max-width: 100%; height: auto; }
a { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--gold); color: var(--night); padding: 8px 14px; border-radius: 8px; }

.wrap {
  max-width: 1240px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* header */
.bar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(12, 10, 18, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.bar-in {
  max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 16px; justify-content: space-between;
  padding-block: 10px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--linen); }
.brand img { width: 42px; height: auto; }
.brand span { font-family: var(--f-disp); font-weight: 700; letter-spacing: 0.12em; font-size: 0.95rem; text-transform: uppercase; }
.bar nav { display: flex; gap: 4px; flex-wrap: wrap; }
.bar nav a { color: var(--linen-dim); text-decoration: none; font-weight: 700; font-size: 0.88rem; padding: 6px 10px; border-radius: 999px; }
.bar nav a:hover { color: var(--linen); background: var(--night-3); }

/* hero */
.hero { padding-block: clamp(28px, 5vw, 64px) clamp(32px, 5vw, 56px); background: radial-gradient(120% 70% at 50% 0%, #2a1d36 0%, var(--night) 65%); }
.hero-head { text-align: center; max-width: 52rem; margin: 0 auto clamp(20px, 3vw, 36px); }
.eyebrow { font-family: var(--f-disp); font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; font-size: var(--step--1); color: var(--gold); margin: 0 0 10px; }
h1 { font-family: var(--f-disp); font-weight: 700; font-size: var(--step-4); line-height: 1; letter-spacing: 0.04em; margin: 0; text-wrap: balance;
  background: linear-gradient(180deg, #fff6e0 0%, #f0d08c 55%, #c98f34 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: var(--step-1); color: var(--linen-dim); margin: 16px auto 0; max-width: 40rem; text-wrap: balance; }

/* player */
.player { max-width: 1120px; margin: 0 auto; }
.screen { position: relative; aspect-ratio: 16 / 9; max-width: 100%; background: #000; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(227, 176, 79, 0.25); }
.screen canvas { display: block; width: 100%; height: 100%; }
.screen:fullscreen { border-radius: 0; aspect-ratio: auto; }
.bigplay { position: absolute; inset: 0; margin: auto; width: max-content; height: max-content; display: grid; justify-items: center; gap: 6px;
  background: none; border: 0; color: var(--linen); cursor: pointer; font: inherit; padding: 16px; }
.bigplay svg { width: clamp(64px, 9vw, 96px); height: auto; padding: 18px; border-radius: 50%; background: rgba(12, 10, 18, 0.55); fill: var(--gold);
  box-shadow: 0 0 0 2px var(--gold), 0 0 50px rgba(242, 107, 29, 0.45); transition: transform .2s ease; padding-left: 24px; }
.bigplay:hover svg { transform: scale(1.06); }
.bigplay span { font-family: var(--f-disp); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; font-size: var(--step-1); text-shadow: 0 2px 12px #000; }
.bigplay small { color: var(--linen-dim); font-weight: 700; text-shadow: 0 2px 8px #000; }
.player.started .bigplay { display: none; }

.controls { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 8px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.78)); transition: opacity .3s; }
.player.started.playing.idle .controls { opacity: 0; }
.player:not(.started) .controls { opacity: 0; pointer-events: none; }
.track { position: relative; height: 18px; cursor: pointer; touch-action: none; }
.segs { position: absolute; left: 0; right: 0; top: 7px; height: 4px; display: flex; gap: 2px; }
.segs i { display: block; height: 100%; background: rgba(241, 232, 214, 0.25); border-radius: 2px; }
.fill { position: absolute; left: 0; top: 7px; height: 4px; width: 0; border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--blue) 0 10px, var(--purple) 10px 20px, var(--scarlet) 20px 30px, var(--linen) 30px 34px); }
.knob { position: absolute; top: 3px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(227, 176, 79, .3); left: 0; }
.tip { position: absolute; bottom: 22px; transform: translateX(-50%); background: rgba(12, 10, 18, .92); border: 1px solid var(--gold-soft); color: var(--linen);
  font-size: 0.78rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none; opacity: 0; }
.track:hover .tip { opacity: 1; }
.row { display: flex; align-items: center; gap: 6px; }
.row button { background: none; border: 0; color: var(--linen); cursor: pointer; padding: 6px; border-radius: 8px; display: grid; place-items: center; font: 800 0.8rem var(--f-sans); }
.row button:hover { background: rgba(255, 255, 255, .1); }
.row svg { width: 22px; height: 22px; fill: currentColor; }
#play .i-pause { display: none; }
.player.playing #play .i-pause { display: block; }
.player.playing #play .i-play { display: none; }
#cc[aria-pressed="false"] { opacity: .45; }
.time { font-variant-numeric: tabular-nums; font-size: 0.85rem; font-weight: 700; color: var(--linen-dim); white-space: nowrap; }
.now { font-family: var(--f-disp); font-size: 0.85rem; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.grow { flex: 1; }

.chapters { list-style: none; margin: 14px 0 0; padding: 0 0 6px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.chapters button { flex: none; display: grid; gap: 2px; text-align: left; width: 150px; padding: 10px 12px; border-radius: 10px; cursor: pointer;
  background: var(--night-2); color: var(--linen); border: 1px solid var(--rule); font: inherit; }
.chapters button:hover { border-color: var(--gold-soft); }
.chapters button.on { border-color: var(--gold); background: var(--night-3); }
.chapters b { font-family: var(--f-disp); font-size: 0.72rem; letter-spacing: .14em; color: var(--gold); font-weight: 600; }
.chapters span { font-size: 0.86rem; font-weight: 700; line-height: 1.25; }
.chapters em { font-style: normal; font-size: 0.75rem; color: var(--linen-dim); font-variant-numeric: tabular-nums; }

.keyverse { margin: clamp(28px, 4vw, 48px) auto 0; text-align: center; max-width: 44rem; }
.keyverse p { font-family: var(--f-serif); font-style: italic; font-weight: 600; font-size: var(--step-2); line-height: 1.3; margin: 0; text-wrap: balance; }
.keyverse cite { display: block; margin-top: 8px; font-style: normal; font-family: var(--f-disp); letter-spacing: .18em; font-size: var(--step--1); color: var(--gold); }

/* the woven thread divider: blue, purple, scarlet and fine twined linen */
.thread { height: 6px; background: repeating-linear-gradient(90deg, var(--blue) 0 22px, var(--purple) 22px 44px, var(--scarlet) 44px 66px, var(--linen) 66px 72px); opacity: .85; }

.sec-head { max-width: 46rem; margin-bottom: clamp(20px, 3vw, 36px); }
.sec-head h2 { font-family: var(--f-disp); font-weight: 700; font-size: var(--step-3); line-height: 1.1; margin: 0 0 10px; text-wrap: balance; }
.sec-head p:not(.eyebrow) { color: var(--linen-dim); margin: 0; }

/* plan */
.plan { padding-block: clamp(40px, 6vw, 80px); background: var(--night); }
.plan-box { background: #17131c; border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(8px, 2vw, 20px); overflow-x: auto; }
#plansvg { display: block; width: 100%; min-width: 560px; height: auto; font-family: var(--f-sans); }
#plansvg .hot { cursor: pointer; }
#plansvg .hot:hover .mk, #plansvg .hot:focus .mk { fill: var(--flame); }
#plansvg .hot:focus { outline: none; }
.scale { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 18px 0 0; }
.scale div { border-top: 2px solid var(--gold-soft); padding-top: 8px; }
.scale dt { font-family: var(--f-disp); font-size: .8rem; letter-spacing: .12em; color: var(--gold); }
.scale dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }

/* stations */
.stations { padding-block: clamp(40px, 6vw, 80px) clamp(40px, 6vw, 96px); background: linear-gradient(var(--night), #120e18); }
.station { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(20px, 3.5vw, 52px); padding-block: clamp(28px, 4vw, 56px); border-top: 1px solid var(--rule); }
.station:first-child { border-top: 0; }
.stage-col { min-width: 0; }
.stage { position: sticky; top: 84px; }
.stage-screen { position: relative; aspect-ratio: 16 / 10; max-width: 100%; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: 0 0 0 1px rgba(227, 176, 79, .2), 0 20px 50px -20px rgba(0, 0, 0, .8); }
.stage-screen canvas { display: block; width: 100%; height: 100%; }
.stage-bar { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.listen { display: inline-flex; align-items: center; gap: 8px; background: var(--gold); color: #1a1208; border: 0; border-radius: 999px; padding: 9px 18px 9px 14px; font: 800 0.92rem var(--f-sans); cursor: pointer; }
.listen svg { width: 18px; height: 18px; fill: currentColor; }
.listen .i-pause { display: none; }
.station.speaking .listen .i-pause { display: block; }
.station.speaking .listen .i-play { display: none; }
.listen:hover { background: #f1c56c; }
.stage-bar .dur { color: var(--linen-dim); font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sprog { flex: 1; height: 3px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.sprog i { display: block; height: 100%; width: 0; background: var(--gold); }
.caption { min-height: 3.3em; margin: 10px 0 0; font-weight: 700; color: var(--linen); font-size: 1rem; line-height: 1.5; }
.caption.verse { font-family: var(--f-serif); font-style: italic; font-weight: 600; font-size: 1.18rem; color: #f6e2b5; }

.text-col { min-width: 0; }
.st-num { display: flex; align-items: baseline; gap: 12px; margin: 0 0 4px; }
.st-num b { font-family: var(--f-disp); font-size: var(--step-3); color: var(--gold); line-height: 1; font-weight: 700; }
.st-num span { font-family: var(--f-disp); letter-spacing: .16em; text-transform: uppercase; font-size: var(--step--1); color: var(--linen-dim); }
.station h3 { font-family: var(--f-disp); font-weight: 700; font-size: var(--step-2); line-height: 1.15; margin: 0; text-wrap: balance; }
.station .kicker { font-family: var(--f-serif); font-style: italic; font-size: var(--step-1); color: var(--gold); margin: 4px 0 18px; }
.script { color: var(--linen-dim); max-width: 65ch; }
.script p { margin: 0 0 .8em; }
.verses { display: grid; gap: 12px; margin: 22px 0; }
.verse { margin: 0; padding: 16px 18px; border-radius: 12px; background: linear-gradient(135deg, rgba(47, 78, 166, .2), rgba(106, 47, 128, .16) 60%, rgba(179, 32, 45, .14)); border: 1px solid rgba(241, 232, 214, .1); }
.verse p { margin: 0; font-family: var(--f-serif); font-weight: 600; font-size: 1.22rem; line-height: 1.45; color: #f8edd6; }
.verse cite { display: block; margin-top: 6px; font-style: normal; font-family: var(--f-disp); font-size: .76rem; letter-spacing: .16em; color: var(--gold); }
.facts { width: 100%; border-collapse: collapse; margin: 6px 0 20px; font-size: .95rem; }
.facts caption { text-align: left; font-family: var(--f-disp); letter-spacing: .14em; font-size: .78rem; color: var(--gold); padding-bottom: 6px; text-transform: uppercase; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 9px 0; border-top: 1px solid var(--rule); }
.facts th { width: 36%; padding-right: 14px; color: var(--linen-dim); font-weight: 700; }
.facts td { font-variant-numeric: tabular-nums; }
.kids { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; background: #231a12; border: 1px solid rgba(242, 107, 29, .35); border-radius: 18px 18px 18px 4px; padding: 14px 16px; margin: 0 0 14px; }
.kids .badge { width: 40px; height: 40px; border-radius: 50%; background: var(--flame); display: grid; place-items: center; }
.kids .badge svg { width: 22px; height: 22px; fill: #fff3e6; }
.kids b { display: block; font-family: var(--f-disp); font-size: .78rem; letter-spacing: .14em; color: #ffb27d; }
.kids p { margin: 2px 0 0; font-weight: 600; }
.opennote { font-size: .9rem; color: var(--linen-dim); border-left: 2px solid var(--gold-soft); padding: 4px 0 4px 12px; margin: 0; }
.opennote b { color: var(--linen); }

.foot { border-top: 1px solid var(--rule); background: #08070c; padding-block: 40px 56px; }
.foot-in { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; }
.foot-logo { width: 150px; }
.foot-text { color: var(--linen-dim); font-size: .9rem; max-width: 60ch; }
.foot-text p { margin: 0 0 8px; }
.copy { color: var(--linen); font-weight: 700; }

@media (max-width: 880px) {
  .station { grid-template-columns: minmax(0, 1fr); }
  .stage { position: relative; top: 0; }
  .now { display: none; }
}
@media (max-width: 520px) {
  .brand span { display: none; }
  .foot-in { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .chapters button { width: 132px; }
  .row { gap: 2px; }
  .facts th { width: 40%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bigplay svg { transition: none; }
}
