/* CNTRL//Radio, v2.
   One display family (Bricolage Grotesque, variable), one mono (IBM Plex Mono).
   Warm black for the station, paper for the cue sheet, one signal red.
   Every animation has a static state and prefers-reduced-motion turns it off. */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url("/fonts/BricolageGrotesque-latin.woff2") format("woff2");
}
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/IBMPlexMono-400-latin.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/IBMPlexMono-500-latin.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/IBMPlexMono-600-latin.woff2") format("woff2"); }

:root {
  --bg: #0f0d0b;
  --bg-2: #171310;
  --bg-3: #221c17;
  --fg: #f3ece1;
  --fg-2: #c2b7a7;
  --fg-3: #8a7f73;
  --line: rgba(243, 236, 225, 0.14);
  --line-2: rgba(243, 236, 225, 0.07);
  --red: #ff3b2e;
  --red-deep: #d12a1f;
  --red-glow: rgba(255, 59, 46, 0.35);
  --paper: #efe7d8;
  --paper-2: #e6dcc9;
  --paper-3: #d9ceb8;
  --ink: #141210;
  --ink-2: #4b443c;
  --ink-3: #7a7065;
  --ink-line: rgba(20, 18, 16, 0.16);
  --font: "Bricolage Grotesque", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gut: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 240ms;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 18px/1.55 var(--font);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  min-width: 320px;
}
img, picture, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: 0.16em; text-decoration-thickness: from-font; }
p, h1, h2, h3, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--red); color: #fff; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-weight: 500; font-feature-settings: "tnum" 1; letter-spacing: 0.01em; }
.nowrap { white-space: nowrap; }
.wrap { width: min(100% - 2 * var(--gut), var(--max)); margin-inline: auto; }

/* ---------- Demo banner (same pattern as the sibling demo sites) ---------- */
.demo-banner {
  background: var(--paper);
  color: var(--ink);
  text-align: center;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0.02em;
  padding: 6px 16px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.demo-banner p { margin: 0; max-width: 100%; }
.demo-banner a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(20, 18, 16, 0.45); }
.demo-banner a:hover { text-decoration-color: var(--ink); }
@media (max-width: 639px) { .demo-banner { min-height: 44px; } }

.skip { position: absolute; left: 16px; top: -200px; z-index: 100; background: var(--red); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 52px; }

/* ---------- Masthead ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-2);
}
.masthead-inner {
  width: min(100% - 2 * var(--gut), var(--max));
  margin-inline: auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wordmark, .foot-mark {
  font-weight: 800;
  font-stretch: 92%;
  letter-spacing: -0.035em;
  font-size: 24px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.slash { color: var(--red); font-weight: 700; }
.sections { display: none; gap: 28px; }
.sections a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--fg-2); letter-spacing: 0.01em; padding: 6px 0; border-bottom: 1px solid transparent; }
.sections a:hover { color: var(--fg); border-bottom-color: var(--red); }
@media (min-width: 760px) { .sections { display: flex; } }

.onair {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px 8px 12px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.onair:hover { color: var(--fg); border-color: var(--fg-3); }
.onair-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--fg-3); transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.onair[data-state="playing"] { color: var(--fg); border-color: var(--red-deep); background: rgba(255, 59, 46, 0.08); }
.onair[data-state="playing"] .onair-dot { background: var(--red); box-shadow: 0 0 0 4px var(--red-glow); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px var(--red-glow); } 50% { box-shadow: 0 0 0 7px rgba(255, 59, 46, 0.12); } }

/* ---------- Type ---------- */
h1, h2 { font-weight: 800; font-stretch: 88%; letter-spacing: -0.035em; line-height: 0.96; text-wrap: balance; color: var(--fg); }
h1 { font-size: clamp(50px, 8.6vw, 128px); }
h2 { font-size: clamp(34px, 4.4vw, 62px); }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 22px;
}
.eyebrow-sep { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.lede { font-size: clamp(19px, 1.5vw, 23px); line-height: 1.45; color: var(--fg-2); max-width: 40ch; text-wrap: pretty; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(36px, 6vw, 84px) clamp(20px, 3vw, 36px); }
.hero-grid { display: grid; gap: clamp(28px, 4vw, 48px); align-items: start; }
.hero-head { grid-column: 1 / -1; min-width: 0; }
.hero-text { min-width: 0; }
.meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.meta dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 5px; }
.meta dd { font-size: 17px; font-weight: 500; color: var(--fg); }
.meta dd.mono { font-size: 15px; }

.badge { display: flex; justify-content: center; align-items: center; margin: 0; }
.badge-svg { width: min(70%, 240px); height: auto; }
@media (min-width: 960px) { .badge { align-self: center; } .badge-svg { width: min(100%, 400px); } }

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(40px, 5vw, 72px); }
  .hero-text { padding-top: 6px; }
}

/* ---------- Player ---------- */
.player { padding-block: clamp(12px, 2vw, 24px) clamp(44px, 5vw, 72px); }
.transport {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "play readout" "play skips" "now now" "dl dl";
  column-gap: 18px;
  row-gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}
.play {
  grid-area: play;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg);
  display: grid;
  place-items: center;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  box-shadow: 0 10px 30px -10px rgba(243, 236, 225, 0.35);
}
.play:hover { transform: scale(1.04); background: #fff; }
.play:active { transform: scale(0.97); }
.play svg { width: 34px; height: 34px; fill: currentColor; }
.play .ic-pause { display: none; }
body[data-playing="true"] .play { background: var(--red); color: #fff; box-shadow: 0 12px 34px -10px var(--red-glow); }
body[data-playing="true"] .play .ic-play { display: none; }
body[data-playing="true"] .play .ic-pause { display: block; }
.readout { grid-area: readout; font-size: 30px; font-weight: 500; letter-spacing: -0.01em; line-height: 1; display: flex; align-items: baseline; gap: 10px; }
.readout-sep { color: var(--fg-3); font-size: 22px; }
#t-dur { color: var(--fg-3); }
.skips { grid-area: skips; display: flex; gap: 8px; }
.skipbtn { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; font-size: 13px; color: var(--fg-2); transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.skipbtn:hover { color: var(--fg); border-color: var(--fg-3); }
.skipbtn svg { width: 18px; height: 18px; }
.now { grid-area: now; display: flex; align-items: baseline; gap: 12px; font-size: 17px; color: var(--fg-2); min-width: 0; margin-top: 6px; }
.now-label { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); flex: none; }
#now-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now[data-error="true"] #now-text { white-space: normal; }
.dl { grid-area: dl; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--fg-2); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; width: max-content; max-width: 100%; }
.dl:hover { color: var(--fg); border-bottom-color: var(--fg); }
.dl svg { width: 18px; height: 18px; flex: none; }
.dl .mono { font-size: 12px; color: var(--fg-3); letter-spacing: 0.06em; }

@media (min-width: 760px) {
  .transport {
    grid-template-columns: auto auto auto 1fr auto;
    grid-template-areas: "play readout skips now dl";
    column-gap: 24px;
  }
  .now { margin-top: 0; }
}

.timeline { position: relative; height: 112px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line-2); overflow: hidden; }
.timeline:focus-within { outline: 3px solid var(--red); outline-offset: 3px; }
#wave { position: absolute; inset: 0; width: 100%; height: 100%; }
.ticks { position: absolute; inset: 0; pointer-events: none; }
.ticks li { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(243, 236, 225, 0.22); }
.ticks li::after { content: attr(data-label); position: absolute; top: 6px; left: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: var(--fg-3); white-space: nowrap; }
.seek { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; -webkit-appearance: none; appearance: none; }
.seek:focus-visible { outline: none; }
.hint { margin-top: 12px; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); }
@media (max-width: 759px) { .hint { display: none; } .timeline { height: 88px; } .ticks li::after { display: none; } }

/* ---------- Cue sheet (paper) ---------- */
.cues { background: var(--paper); color: var(--ink); color-scheme: light; padding-block: clamp(56px, 8vw, 120px); }
.cues ::selection { background: var(--ink); color: var(--paper); }
.cues :focus-visible { outline-color: var(--red-deep); }
.cues h2, .cues-lede { color: var(--ink); }
.cues .eyebrow { color: var(--red-deep); }
.cues-head { display: grid; gap: 8px; margin-bottom: clamp(28px, 4vw, 48px); }
.cues-lede { font-size: 18px; color: var(--ink-2); margin-top: 10px; }
.cue-list { border-top: 1px solid var(--ink-line); }
.cue-list li { border-bottom: 1px solid var(--ink-line); }
.cue {
  width: 100%;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px 18px;
  text-align: left;
  padding: 18px 10px;
  border-radius: 8px;
  transition: background var(--dur) var(--ease);
}
.cue:hover { background: rgba(20, 18, 16, 0.05); }
.cue-time { font-size: 15px; color: var(--ink-3); padding-top: 5px; }
.cue-body { display: grid; gap: 4px; min-width: 0; }
.cue-title { font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; font-stretch: 92%; letter-spacing: -0.02em; line-height: 1.08; }
.cue-note { font-size: 16px; color: var(--ink-2); line-height: 1.45; text-wrap: pretty; max-width: 62ch; }
.cue[aria-current="true"] { background: var(--ink); color: var(--paper); }
.cue[aria-current="true"] .cue-time { color: var(--red); }
.cue[aria-current="true"] .cue-note { color: var(--paper-3); }
.cue[aria-current="true"]:hover { background: var(--ink); }
@media (min-width: 760px) { .cue { grid-template-columns: 96px minmax(0, 1fr); padding: 22px 14px; } .cue-time { font-size: 16px; } }

.sheet-foot { display: grid; gap: clamp(28px, 4vw, 48px); margin-top: clamp(28px, 4vw, 48px); }
@media (min-width: 960px) { .sheet-foot { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; } }
.transcript { border: 1px solid var(--ink-line); border-radius: var(--radius); background: rgba(255, 255, 255, 0.35); }
.transcript summary { cursor: pointer; padding: 18px 20px; font-weight: 600; font-size: 17px; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.transcript summary::-webkit-details-marker { display: none; }
.transcript summary::after { content: "+"; font-family: var(--mono); font-size: 20px; color: var(--ink-3); }
.transcript[open] summary::after { content: "\2212"; }
.transcript-body { padding: 0 20px 22px; display: grid; gap: 14px; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.transcript-body b { color: var(--ink); font-weight: 600; }
.transcript-note { font-size: 14px; color: var(--ink-3); }
.transcript-music { font-size: 12px; letter-spacing: 0.08em; color: var(--ink-3); }
.credits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.credits dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.credits dd { font-size: 17px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.credits dd.mono { font-size: 14px; }

/* ---------- Station + why ---------- */
.station { padding-block: clamp(64px, 9vw, 136px); border-top: 1px solid var(--line-2); }
.station-grid { display: grid; gap: clamp(44px, 6vw, 80px); }
.station-col { min-width: 0; }
.station-col p + p { margin-top: 16px; }
.station-col h2 { margin-bottom: 22px; }
.station-col p { color: var(--fg-2); max-width: 56ch; text-wrap: pretty; }
.facts { display: grid; gap: 14px; margin-top: 24px; }
.facts li { padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--fg-2); font-size: 17px; line-height: 1.45; }
.facts b { display: block; color: var(--fg); font-weight: 600; margin-bottom: 2px; }
.btn { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; padding: 14px 20px; border-radius: 999px; background: var(--fg); color: var(--bg); text-decoration: none; font-weight: 600; font-size: 16px; transition: background var(--dur) var(--ease), transform var(--dur) var(--ease); }
.btn:hover { background: #fff; transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }
@media (min-width: 960px) { .station-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line-2); padding-block: 36px 48px; color: var(--fg-3); font-size: 14px; }
.foot-grid { display: grid; gap: 12px; }
.foot-mark { font-size: 20px; color: var(--fg); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { color: var(--fg-2); }
.foot-line { max-width: 60ch; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
