:root {
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);

  --bg: #F2FAFE;
  --surface: #FFFFFF;
  --text: #1D2B4F;
  --muted: #4F5F7E;
  --line: #CDE4F0;
  --teal: #0B8A92;
  --gold: #FFC531;
  --gold-ink: #8A5A00;
  --ember: #D6336C;
  --navy: #1479B8;
  --navy-2: #1884C4;
  --on-navy: #FFFFFF;
  --on-navy-muted: #E8F6FF;
  --memorial-bg: #FFE9D6;
  --memorial-card: #FFFFFF;
  --memorial-text: #3B2340;
  --memorial-muted: #6B4A63;
  --candle: #B4470F;
  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 110px); scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  background: var(--navy);
  z-index: 10;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; }
p { margin: 0 0 1em; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(56px, 8vw, 100px) 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }

/* Header */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--navy);
  color: var(--on-navy);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; min-height: 60px; padding-top: 6px; padding-bottom: 6px; }
.brand { font-family: var(--serif); font-size: 1.15rem; text-decoration: none; white-space: nowrap; }
.nav { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px 4px; }
.nav a { padding: 8px 12px; text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--on-navy-muted); border-radius: 999px; white-space: nowrap; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav a.remembered { color: #FFE27A; }
@media (max-width: 720px) {
  .site-header .wrap { gap: 0; }
  .brand { font-size: 1.05rem; padding: 6px 0 2px; }
  .nav { margin-left: -10px; justify-content: flex-start; width: 100%; }
  .nav a { padding: 6px 10px; font-size: .92rem; }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 0%, rgba(255,214,77,.8), transparent 40%),
    repeating-conic-gradient(from 0deg at 88% 0%, rgba(255,255,255,.13) 0deg 5deg, transparent 5deg 10deg),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--on-navy);
  padding: clamp(48px, 8vw, 96px) 0 clamp(84px, 10vw, 130px);
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(2.7rem, 9vw, 6rem);
  line-height: 1.05;
  max-width: 13ch;
  margin-bottom: 26px;
  color: #fff;
  text-shadow: 3px 3px 0 #E8592F, 6px 6px 0 #FFC531;
}
@media (max-width: 560px) { .hero h1 { text-shadow: 2px 2px 0 #E8592F, 4px 4px 0 #FFC531; } }
.callsigns { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-bottom: 30px; }
.badge { font-family: var(--serif); font-size: clamp(1rem, 2.8vw, 1.35rem); padding: 10px 22px; border-radius: 999px; box-shadow: 0 5px 0 rgba(10,50,90,.28); }
.badge.b1 { background: #FFC531; color: #3B2300; transform: rotate(-2deg); }
.badge.b2 { background: #fff; color: #C93E22; transform: rotate(1.5deg); }
.callsigns .join { font-family: var(--serif); font-size: 1.6rem; color: #fff; }
.wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: clamp(40px, 6vw, 70px); display: block; }
.hero .lede { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--on-navy-muted); max-width: 52ch; margin-bottom: 40px; }

.radio {
  background: linear-gradient(180deg, #E8592F, #CF3F22);
  border-radius: 20px;
  padding: clamp(12px, 2.5vw, 22px);
  box-shadow: 0 20px 40px rgba(10,60,100,.35), inset 0 1px 0 rgba(255,255,255,.35);
}
.glass {
  position: relative;
  height: clamp(130px, 22vw, 170px);
  border-radius: 10px;
  background: linear-gradient(180deg, #F8DE9A 0%, #EBBA5C 100%);
  box-shadow: inset 0 4px 14px rgba(70,35,0,.45), inset 0 0 0 2px rgba(70,35,0,.25);
  overflow: hidden;
  color: #3E2509;
}
.glass .pin {
  position: absolute; top: 14px; transform: translateX(-50%);
  font-family: var(--serif); font-size: clamp(.9rem, 2.4vw, 1.25rem); white-space: nowrap;
}
.glass .pin .short { display: none; }
@media (max-width: 560px) {
  .glass .pin .long { display: none; }
  .glass .pin .short { display: inline; }
}
.glass .scale { position: absolute; left: 0; right: 0; bottom: 0; height: 56%; }
.tick { position: absolute; bottom: 24px; width: 1.5px; height: 10px; background: #5A3A14; transform: translateX(-50%); }
.tick.major { height: 20px; width: 2px; }
.num { position: absolute; bottom: 4px; transform: translateX(-50%); font-size: .78rem; font-weight: 700; color: #4A2E0C; }
.zone-line { position: absolute; top: 0; bottom: 0; left: 82.5%; width: 2px; background: rgba(90,58,20,.45); }
.zone-label { position: absolute; left: 91.25%; bottom: 4px; transform: translateX(-50%); font-size: .78rem; font-weight: 700; color: #4A2E0C; white-space: nowrap; }
.needle {
  position: absolute; top: 0; bottom: 0; width: 3px; left: 3%;
  background: #C8372B; box-shadow: 0 0 10px 2px rgba(200,55,43,.55);
  transform: translateX(-50%);
  transition: left 1.6s cubic-bezier(.65,.05,.25,1);
}
.needle::after { content: ""; position: absolute; top: -2px; left: 50%; width: 11px; height: 11px; border-radius: 50%; background: #C8372B; transform: translateX(-50%); }

.stations { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.station-btn {
  appearance: none; border: 2px solid rgba(255,255,255,.45); background: rgba(255,255,255,.16);
  color: var(--on-navy); font: inherit; text-align: left; padding: 14px 16px; border-radius: 12px; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.station-btn strong { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(1rem, 2.6vw, 1.3rem); }
.station-btn span { color: #FFF1EA; font-size: .95rem; }
.station-btn:hover { background: rgba(255,255,255,.28); }
.station-btn[aria-selected="true"] { border-color: #FFE27A; background: rgba(255,255,255,.3); }
.station-info { margin-top: 18px; color: var(--on-navy); max-width: 70ch; min-height: 4.8em; }
.station-info p { margin: 0; color: #FFFFFF; }

/* Story */
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 800px) { .story-grid { grid-template-columns: 1fr; } }
.story-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: clamp(22px, 3.5vw, 36px); }
.story-card.wpex { border-top: 6px solid var(--teal); }
.story-card.tpr { border-top: 6px solid var(--gold); }
.story-card h3 { font-size: 1.7rem; margin-bottom: 4px; }
.story-card .years { color: var(--muted); font-weight: 500; margin-bottom: 18px; }
.facts { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: .96rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }
.bridge { font-family: var(--serif); font-size: clamp(1.3rem, 3vw, 1.8rem); line-height: 1.35; max-width: 30ch; margin: 56px auto 0; text-align: center; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; max-width: 760px; }
.timeline::before { content: ""; position: absolute; left: 148px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { display: grid; grid-template-columns: 124px 1fr; column-gap: 48px; padding-bottom: 34px; position: relative; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 140px; top: 7px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--gold); border: 4px solid var(--bg);
}
.timeline li.loss::before { background: var(--ember); }
.timeline .when { font-family: var(--serif); font-size: 1.05rem; text-align: right; padding-top: 2px; }
.timeline h3 { font-size: 1.3rem; margin-bottom: 4px; }
.timeline p { margin: 0; color: var(--muted); }
@media (max-width: 600px) {
  .timeline::before { left: 8px; }
  .timeline li { grid-template-columns: 1fr; padding-left: 36px; row-gap: 2px; }
  .timeline li::before { left: 0; }
  .timeline .when { text-align: left; font-size: .95rem; color: var(--muted); }
}

/* DJs */
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  appearance: none; font: inherit; font-weight: 500; font-size: .95rem; cursor: pointer;
  padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; color: var(--text);
}
.chip:hover { border-color: var(--teal); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.dj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.dj { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.dj-top { display: flex; align-items: center; gap: 14px; }
.mono { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-family: var(--serif); font-size: 1.1rem; }
.dj h3 { font-size: 1.2rem; }
.dj .show { color: var(--teal); font-weight: 700; font-size: .98rem; }
.dj .where { font-size: .92rem; color: var(--muted); }
.dj p { margin: 0; font-size: .98rem; }
.dj .aired { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); font-size: .9rem; color: var(--muted); }
.crew { margin-top: 36px; padding: 20px 24px; border-left: 5px solid var(--gold); background: var(--bg); border-radius: 0 12px 12px 0; max-width: 720px; }
.crew h3 { font-size: 1.2rem; margin-bottom: 4px; }
.crew p { margin: 0; color: var(--muted); }

/* Archive videos */
.archive-layout { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }
@media (max-width: 860px) { .archive-layout { grid-template-columns: 1fr; } }
.playlist-tabs { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 860px) { .playlist-tabs { flex-direction: row; } .playlist-tabs > * { flex: 1; } }
.pl-btn {
  appearance: none; font: inherit; text-align: left; cursor: pointer; padding: 16px 18px; border-radius: 12px;
  border: 2px solid var(--line); background: var(--surface); color: var(--text);
}
.pl-btn strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.3rem; }
.pl-btn span { color: var(--muted); font-size: .93rem; }
.pl-btn[aria-selected="true"] { border-color: var(--teal); }
.player { background: #000; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; width: 100%; box-shadow: 0 14px 34px rgba(0,0,0,.25); }
.player iframe { width: 100%; height: 100%; border: 0; display: block; }
.player-note { margin-top: 14px; color: var(--muted); font-size: .96rem; }
.player-note a { color: var(--teal); font-weight: 700; }

/* Remembered */
.remembered-section { background: linear-gradient(180deg, #FFF0DD 0%, #FFDDE6 100%); color: var(--memorial-text); }
.remembered-section .section-head p { color: var(--memorial-muted); }
.mem-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; }
.mem {
  background: var(--memorial-card); border-radius: 16px; padding: 30px 28px 28px;
  border: 1px solid rgba(214,51,108,.2);
  box-shadow: 0 10px 26px rgba(214,51,108,.12);
  background-image: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255,197,49,.3), transparent 70%);
}
.flame { width: 28px; height: 44px; display: block; margin-bottom: 14px; }
.mem-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.mem-top .flame { margin-bottom: 0; }
.portrait { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; border: 4px solid #FFC531; box-shadow: 0 6px 16px rgba(214,51,108,.25); background: #FFF3D6; display: block; }
.portrait.ph { display: grid; place-items: center; font-family: var(--serif); font-size: 2rem; color: #B4470F; }
.flame .f { transform-origin: 50% 90%; animation: flicker 3.4s ease-in-out infinite; }
@keyframes flicker { 0%,100% { transform: scale(1,1); } 30% { transform: scale(.94,1.06); } 60% { transform: scale(1.03,.97); } }
.mem:nth-child(2) .f { animation-delay: -1.1s; }
.mem:nth-child(3) .f { animation-delay: -2.2s; }
.mem h3 { font-size: 1.6rem; margin-bottom: 6px; }
.mem .role { color: var(--candle); font-weight: 700; margin-bottom: 4px; }
.mem .date { color: var(--memorial-muted); font-size: .95rem; margin-bottom: 16px; }
.mem p { color: var(--memorial-text); font-size: 1rem; }
.mem p.small { color: var(--memorial-muted); font-size: .94rem; }
.mem a { color: var(--candle); font-weight: 700; }

/* Footer */
.footer { background: var(--navy); color: var(--on-navy-muted); padding: 48px 0 56px; font-size: .96rem; }
.footer .wrap { display: grid; gap: 14px; }
.footer .name { font-family: var(--serif); font-size: 1.3rem; color: var(--on-navy); }
.footer a { color: var(--on-navy); }
.footer p { margin: 0; max-width: 70ch; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .needle { transition: none; }
  .flame .f { animation: none; }
}
