/* BBC Radio Dig — Editorial music archive. Record shop meets broadsheet. */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300..700;1,9..40,300..700&display=swap');

:root {
  --bg: #0f0d0d;
  --bg-warm: #141111;
  --bg-card: #1a1616;
  --bg-card-hover: #211c1c;
  --bg-table-alt: #161313;
  --text: #ede8e3;
  --text-secondary: #a89f97;
  --text-muted: #6b6360;
  --gold: #d4a853;
  --gold-dim: rgba(212, 168, 83, 0.15);
  --gold-glow: rgba(212, 168, 83, 0.06);
  --spotify: #1DB954;
  --spotify-dim: rgba(29, 185, 84, 0.12);
  --youtube: #FF4444;
  --youtube-dim: rgba(255, 68, 68, 0.10);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --nav-bg: rgba(15, 13, 13, 0.85);
  --max-width: 1100px;
  --radius: 12px;
  --radius-sm: 6px;
  --radius-pill: 999px;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Grain texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.5;
}

a { color: var(--gold); text-decoration: none; transition: color 0.25s; }
a:hover { color: var(--text); }
::selection { background: var(--gold-dim); color: var(--text); }

/* ============================================
   NAVIGATION
   ============================================ */
.site-nav {
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo:hover { color: var(--gold); }
.nav-right { display: flex; align-items: center; gap: 1.5rem; }
.nav-links { list-style: none; display: flex; gap: 2rem; }
.nav-links a {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.2px;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--gold); }
/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.25s, border-color 0.25s, background 0.25s;
  flex-shrink: 0;
}
.theme-toggle:hover { color: var(--gold); border-color: var(--gold-dim); background: var(--gold-dim); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 18px; height: 1.5px; background: var(--text); margin: 4px 0; }

/* ============================================
   LAYOUT
   ============================================ */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
}

/* ============================================
   HERO — dramatic, not a dashboard header
   ============================================ */
.hero {
  text-align: center;
  padding: 8rem 0 5rem;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, var(--gold-glow) 0%, transparent 65%);
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  padding: 0.4rem 1.25rem;
  border-radius: var(--radius-pill);
  margin-bottom: 2rem;
  position: relative;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 400;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  position: relative;
}
.hero .subtitle {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 3rem;
  font-weight: 300;
  line-height: 1.75;
}
.hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 1rem 2.5rem;
  position: relative;
}
.hero-stat { text-align: center; }
.hero-stat-number {
  font-family: var(--font-display);
  font-size: 1.5rem;
  display: block;
  line-height: 1.2;
}
.hero-stat-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.hero-stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* ============================================
   PRESENTERS — row layout, not card grid
   ============================================ */
.presenters-section { margin-top: 2rem; }
.presenters-header {
  margin-bottom: 2rem;
}
.presenters-header h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
}
.presenters-header p { color: var(--text-muted); font-size: 0.9375rem; font-weight: 300; }

.presenter-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.25s, background 0.25s, transform 0.2s;
}
.presenter-row:hover {
  border-color: var(--border-hover);
  background: var(--bg-card);
  transform: translateX(4px);
  color: inherit;
}
.presenter-row.coming-soon { opacity: 0.45; pointer-events: none; }

.presenter-row-left { display: flex; align-items: center; gap: 1rem; flex: 1; min-width: 0; }

.presenter-initial {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  flex-shrink: 0;
  color: var(--bg);
  font-weight: 400;
}
/* Each presenter gets a unique color based on slug */
.presenter-initial[data-slug="liza-tarbuck"] { background: linear-gradient(135deg, #e8927c, #d4a853); }
.presenter-initial[data-slug="craig-charles"] { background: linear-gradient(135deg, #7c9de8, #53d4a8); }
.presenter-initial[data-slug="bob-harris-70s"] { background: linear-gradient(135deg, #d4a853, #e87c7c); }
.presenter-initial[data-slug="bob-harris-country"] { background: linear-gradient(135deg, #a8d453, #7ce8c9); }
.presenter-initial[data-slug="shaun-keaveny-6music"] { background: linear-gradient(135deg, #c97ce8, #537cd4); }
.presenter-initial[data-slug="shaun-keaveny-rock"] { background: linear-gradient(135deg, #e87ca8, #d4537c); }
.presenter-initial[data-slug="radcliffe-maconie"] { background: linear-gradient(135deg, #7ce8e8, #53a8d4); }
.presenter-initial.dimmed { background: var(--border) !important; color: var(--text-muted); }
.presenter-initial-lg { width: 72px; height: 72px; font-size: 2rem; }

/* Presenter hero (detail page) */
.presenter-hero {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.presenter-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.presenter-hero-meta {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 300;
  margin-top: 0.25rem;
}

.presenter-info h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.3;
}
.presenter-station {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.presenter-row-stats {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-shrink: 0;
}
.presenter-metric { text-align: right; min-width: 80px; }
.metric-value { font-size: 1rem; font-weight: 500; display: block; line-height: 1.2; }
.metric-label { font-size: 0.6875rem; color: var(--text-muted); }

.coverage-bar {
  width: 80px;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}
.coverage-fill { height: 100%; border-radius: 2px; transition: width 0.6s ease; }
.coverage-fill.spotify { background: var(--spotify); }

.presenter-row-arrow {
  font-size: 1.25rem;
  color: var(--text-muted);
  transition: color 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.presenter-row:hover .presenter-row-arrow { color: var(--gold); transform: translateX(4px); }

/* ============================================
   ABOUT — three-column grid
   ============================================ */
.about-section { margin-top: 5rem; }
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.about-block {
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.about-block h3 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
  color: var(--gold);
}
.about-block p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.75;
}

/* ============================================
   SECTION HEADINGS — reused across pages
   ============================================ */
.section-heading {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  margin: 4rem 0 1.5rem;
  letter-spacing: -0.5px;
}
.section-subheading {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: -0.75rem 0 2rem;
  font-weight: 300;
}

/* ============================================
   STAT ROW — presenter page
   ============================================ */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}
.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.stat-box::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--border);
}
.stat-box .number {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 400;
  display: block;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}
.stat-box .label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.stat-box.spotify .number { color: var(--spotify); }
.stat-box.spotify::after { background: linear-gradient(90deg, var(--spotify), transparent); }
.stat-box.youtube .number { color: var(--youtube); }
.stat-box.youtube::after { background: linear-gradient(90deg, var(--youtube), transparent); }

/* ============================================
   SPOTIFY EMBEDS
   ============================================ */
.spotify-embed {
  margin: 2rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.spotify-embed iframe { border: 0; width: 100%; border-radius: var(--radius); }

/* ============================================
   PLAYLIST PILLS
   ============================================ */
.playlist-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 3rem; }
.playlist-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text);
  transition: border-color 0.25s, background 0.25s;
}
.playlist-link:hover { border-color: var(--spotify); background: var(--spotify-dim); color: var(--text); }
.playlist-link .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--spotify); }

/* ============================================
   TABLES
   ============================================ */
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th {
  text-align: left;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}
th:hover { color: var(--text-secondary); }
th.sorted-asc::after { content: " \2191"; color: var(--gold); }
th.sorted-desc::after { content: " \2193"; color: var(--gold); }
td { padding: 0.875rem 1.25rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr { transition: background 0.15s; }
tr:nth-child(even) { background: var(--bg-table-alt); }
tr:hover { background: var(--bg-card-hover); }

.platform-links { display: flex; gap: 0.5rem; align-items: center; }
.platform-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: 0.3rem 0.625rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.platform-link.spotify { background: var(--spotify-dim); color: var(--spotify); }
.platform-link.spotify:hover { background: rgba(29, 185, 84, 0.25); }
.platform-link.youtube { background: var(--youtube-dim); color: var(--youtube); }
.platform-link.youtube:hover { background: rgba(255, 68, 68, 0.2); }

/* ============================================
   EPISODE LIST
   ============================================ */
.episode-year {
  font-family: var(--font-display);
  margin: 3rem 0 1rem;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-secondary);
}
.episode-list { list-style: none; }
.episode-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  border-radius: var(--radius-sm);
}
.episode-item:hover { background: var(--bg-card); }
.episode-date {
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 0.8125rem;
  color: var(--text-muted);
  min-width: 100px;
  letter-spacing: -0.3px;
}
.episode-title { flex: 1; font-size: 0.875rem; }
.episode-tracks { font-size: 0.75rem; color: var(--text-muted); min-width: 70px; text-align: right; }

/* ============================================
   EPISODE DETAIL
   ============================================ */
.episode-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.episode-header h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}
.episode-header .meta { color: var(--text-secondary); font-size: 0.9375rem; font-weight: 300; }
.episode-nav {
  display: flex;
  justify-content: space-between;
  margin: 3rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
}
.episode-nav a { color: var(--text-muted); }
.episode-nav a:hover { color: var(--gold); }
.track-num {
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 28px;
  text-align: right;
}

/* ============================================
   CALLOUTS
   ============================================ */
.callout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--youtube);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
}
.callout h3 { font-family: var(--font-display); font-size: 1.0625rem; font-weight: 400; margin-bottom: 0.375rem; }
.callout p { font-size: 0.875rem; color: var(--text-secondary); font-weight: 300; }

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 2rem; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { margin: 0 0.625rem; opacity: 0.4; }

/* ============================================
   FILTER
   ============================================ */
.filter-bar { display: flex; gap: 0.75rem; margin-bottom: 2rem; flex-wrap: wrap; }
.filter-input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.75rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  flex: 1;
  min-width: 200px;
  transition: border-color 0.25s;
}
.filter-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.filter-input::placeholder { color: var(--text-muted); }

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--gold-dim);
  color: var(--gold);
}
.badge.coming-soon { background: rgba(255,255,255,0.04); color: var(--text-muted); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer { border-top: 1px solid var(--border); margin-top: 6rem; }
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 300;
}
.footer-inner a { color: var(--text-secondary); }
.footer-inner p + p { margin-top: 0.5rem; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  main { padding: 2rem 1.25rem 4rem; }
  .hero { padding: 4rem 0 3rem; }
  .hero h1 { font-size: 2.25rem; }
  .hero-stats { flex-direction: column; gap: 1rem; padding: 1.25rem 2rem; border-radius: var(--radius); }
  .hero-stat-divider { width: 40px; height: 1px; }
  .section-heading { font-size: 1.375rem; margin-top: 3rem; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .presenter-row { flex-wrap: wrap; }
  .presenter-row-stats { width: 100%; justify-content: flex-start; gap: 1.5rem; padding-left: 60px; }
  .presenter-row-arrow { display: none; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 2rem;
    gap: 1rem;
  }
  .nav-links.open { display: flex; }
  .episode-item { flex-wrap: wrap; gap: 0.5rem; padding: 0.75rem; }
  .episode-date { min-width: auto; }
  table { font-size: 0.8125rem; }
  td, th { padding: 0.625rem 0.75rem; }
}

@media (max-width: 480px) {
  main { padding: 1.5rem 1rem 3rem; }
  .hero { padding: 2.5rem 0 2rem; }
  .hero h1 br { display: none; }
  .stat-row { gap: 0.75rem; }
  .stat-box { padding: 1.25rem 1rem; }
  .stat-box .number { font-size: 1.75rem; }
  .presenter-row { padding: 1rem; }
  .presenter-initial { width: 40px; height: 40px; font-size: 1rem; }
  .presenter-row-stats { padding-left: 52px; }
}

/* ============================================
   LIGHT THEME
   ============================================ */
[data-theme="light"] {
  --bg: #f8f6f3;
  --bg-warm: #f2efeb;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f3f0;
  --bg-table-alt: #faf9f7;
  --text: #1a1714;
  --text-secondary: #5c564e;
  --text-muted: #9a9389;
  --gold: #9a7730;
  --gold-dim: rgba(154, 119, 48, 0.1);
  --gold-glow: rgba(154, 119, 48, 0.05);
  --spotify-dim: rgba(29, 185, 84, 0.08);
  --youtube-dim: rgba(255, 68, 68, 0.06);
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
  --nav-bg: rgba(248, 246, 243, 0.9);
}

[data-theme="light"] body::after { opacity: 0.15; }

[data-theme="light"] .presenter-initial { color: #fff; }

[data-theme="light"] .card,
[data-theme="light"] .presenter-row,
[data-theme="light"] .about-block,
[data-theme="light"] .stat-box,
[data-theme="light"] .hero-stats {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .presenter-row:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .callout {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .platform-link.spotify { background: rgba(29, 185, 84, 0.08); }
[data-theme="light"] .platform-link.youtube { background: rgba(255, 68, 68, 0.06); }
