/* Layout idea: late-night radio zine. Ink-blue ground, a hot coral accent, chunky
   grotesque headlines, sticker-like topic chips. Light mode is a warm paper version. */
:root {
  --bg: #F6F3EE;
  --bg-2: #ECE6DC;
  --ink: #15172B;
  --muted: #565A72;
  --line: #D9D1C4;
  --coral: #E4502F;
  --coral-ink: #FFFFFF;
  --lilac: #6D5BD0;
  --card: #FFFFFF;
  --font-display: 'Bricolage Grotesque', 'Arial Black', system-ui, sans-serif;
  --font-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1160px;
  color-scheme: light;
}
:root[data-mode="dark"] {
  --bg: #11131F;
  --bg-2: #181B2B;
  --ink: #F1EEF8;
  --muted: #A7A9C2;
  --line: #2A2E45;
  --coral: #FF6B4A;
  --coral-ink: #11131F;
  --lilac: #A99BFF;
  --card: #1C1F31;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.6; padding-bottom: 96px; transition: background 0.3s ease, color 0.3s ease; }
svg { display: block; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; line-height: 1; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
a { color: var(--lilac); }
button { font: inherit; color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--lilac); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 24px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 600; text-decoration: none; }
.btn-coral { background: var(--coral); color: var(--coral-ink); }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }

/* Header */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 24px; color: var(--ink); text-decoration: none; letter-spacing: -0.03em; }
.logo-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--coral); display: grid; place-items: center; transform: rotate(-6deg); }
.nav-right { display: flex; align-items: center; gap: 22px; }
.nav-right a { color: var(--ink); text-decoration: none; font-weight: 500; }
.mode-toggle { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); cursor: pointer; display: grid; place-items: center; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; padding-top: 40px; padding-bottom: 80px; }
.hero h1 { font-size: clamp(56px, 9vw, 120px); font-weight: 800; letter-spacing: -0.05em; line-height: 0.88; }
.hero h1 span { color: var(--coral); }
.hero-copy { display: flex; flex-direction: column; gap: 24px; }
.hero-copy > p { font-size: 21px; color: var(--muted); max-width: 32ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.listen-on { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); align-items: center; }
.listen-on span { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; }
.cover { position: relative; aspect-ratio: 1; border-radius: 28px; background: var(--ink); overflow: hidden; transform: rotate(2deg); box-shadow: 0 30px 60px -30px rgba(17, 19, 31, 0.6); }
.cover svg { width: 100%; height: 100%; }
.cover-sticker { position: absolute; right: -10px; top: 24px; background: var(--lilac); color: #fff; font-family: var(--font-display); font-weight: 700; padding: 10px 18px; border-radius: 999px; transform: rotate(8deg); font-size: 15px; }

/* Episodes */
.episodes { background: var(--bg-2); padding: 88px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background 0.3s ease; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(42px, 6vw, 72px); font-weight: 800; letter-spacing: -0.04em; }
.tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; cursor: pointer; font-weight: 600; font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.search { position: relative; }
.search input { min-height: 44px; width: 260px; max-width: 100%; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 0 16px 0 42px; font: 15px var(--font-body); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.ep-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ep { background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; transition: background 0.3s ease; }
.ep-main { display: grid; grid-template-columns: auto 64px 1fr auto; gap: 18px; align-items: center; padding: 16px 20px; }
.ep-num { font-family: var(--font-display); font-weight: 800; font-size: 28px; color: var(--muted); min-width: 44px; font-variant-numeric: tabular-nums; }
.ep-art { width: 64px; height: 64px; border-radius: 14px; overflow: hidden; }
.ep-art svg { width: 100%; height: 100%; }
.ep-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ep-info h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.ep-meta { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.ep-tag { color: var(--lilac); font-weight: 600; }
.ep-actions { display: flex; gap: 8px; align-items: center; }
.play-ep { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--coral); color: var(--coral-ink); cursor: pointer; display: grid; place-items: center; }
.notes-btn { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 14px; font-weight: 600; }
.ep-notes { display: none; padding: 0 20px 20px 146px; gap: 14px; flex-direction: column; }
.ep.open .ep-notes { display: flex; }
.ep-notes p { color: var(--muted); max-width: 64ch; }
.chapters { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.chapters button { display: flex; gap: 14px; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.chapters button:hover { background: var(--bg-2); }
.chapters time { font-variant-numeric: tabular-nums; color: var(--coral); font-weight: 600; min-width: 44px; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

/* Blog */
.blog { padding: 88px 0; }
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.post { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 26px; display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); transition: transform 0.2s ease, background 0.3s ease; }
.post:hover { transform: translateY(-3px) rotate(-0.4deg); }
.post-meta { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; }
.post h3 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; }
.post p { color: var(--muted); font-size: 16px; }
.post .more { margin-top: auto; font-weight: 600; color: var(--lilac); }

/* Newsletter */
.letter { padding: 0 0 88px; }
.letter-box { background: var(--coral); color: var(--coral-ink); border-radius: 32px; padding: 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.letter-box h2 { font-size: clamp(36px, 5vw, 56px); font-weight: 800; letter-spacing: -0.04em; }
.letter-box p { font-size: 18px; opacity: 0.9; margin-top: 10px; }
.letter-form { display: flex; flex-wrap: wrap; gap: 10px; }
.letter-form input { flex: 1 1 220px; min-height: 52px; border-radius: 999px; border: 0; padding: 0 20px; font: 16px var(--font-body); color: #15172B; background: #fff; }
.letter-form button { min-height: 52px; padding: 0 24px; border-radius: 999px; border: 0; background: #15172B; color: #fff; font-weight: 600; cursor: pointer; }
.letter-msg { flex-basis: 100%; font-weight: 600; min-height: 1.4em; }

footer { padding: 32px 0 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* Sticky player */
.player {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; max-width: 980px; margin: 0 auto;
  background: #15172B; color: #F1EEF8; border-radius: 22px; padding: 12px 16px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.6);
}
.p-controls { display: flex; align-items: center; gap: 6px; }
.p-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: #F1EEF8; cursor: pointer; display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.p-btn:hover { background: rgba(255,255,255,0.08); }
.p-play { width: 52px; height: 52px; background: #FF6B4A; color: #11131F; }
.p-play:hover { background: #FF8466; }
.p-mid { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.p-title { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.p-title strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.p-title span { color: #A7A9C2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.p-mid input[type=range] { width: 100%; accent-color: #FF6B4A; margin: 0; }
.p-speed { min-width: 52px; height: 36px; border-radius: 999px; border: 1px solid #3A3E58; background: transparent; color: #F1EEF8; cursor: pointer; font-weight: 600; font-variant-numeric: tabular-nums; }
.p-note { font-size: 11px; color: #A7A9C2; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .cover { max-width: 380px; }
  .posts { grid-template-columns: 1fr; }
  .letter-box { grid-template-columns: 1fr; padding: 32px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; padding-bottom: 150px; }
  .nav-right a { display: none; }
  .ep-main { grid-template-columns: 52px 1fr auto; gap: 12px; padding: 14px; }
  .ep-num { display: none; }
  .ep-art { width: 52px; height: 52px; }
  .ep-info h3 { font-size: 18px; }
  .notes-btn { display: none; }
  .ep-main { cursor: pointer; }
  .ep-notes { padding: 0 14px 16px; }
  .search input { width: 100%; }
  .search { flex: 1 1 100%; }
  .episodes, .blog { padding: 64px 0; }
  .player { grid-template-columns: 1fr auto; grid-template-areas: "mid speed" "ctrl ctrl"; gap: 8px 12px; }
  .p-mid { grid-area: mid; }
  .p-speed { grid-area: speed; }
  .p-controls { grid-area: ctrl; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body, .ep, .post, .episodes { transition: none; }
}
