/* Pranav's Rabbithole: the public show (hub, episode pages, Ask the show).
   Colours come from the cover: its violet, the cream of the wordmark, the sand and plum of the hole.
   The page darkens as you scroll, the way the cover's rings go down into the hole. */

:root {
  --violet: #5b3891;      /* the cover's top */
  --plum: #2a1a40;        /* the cover's bottom */
  --night: #150f1c;       /* the bottom of the hole: the page */
  --cream: #f3e6c9;       /* the wordmark */
  --sand: #c4b49d;        /* the hole's outer rings: quieter text */
  --line: rgba(243, 230, 201, 0.16);
  --serif: 'Young Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--night) linear-gradient(180deg, var(--violet) 0, var(--plum) 34rem, var(--night) 70rem) no-repeat;
  color: var(--cream);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

main, .top, .foot { width: 100%; max-width: 40rem; margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }
main { padding-top: 2.5rem; padding-bottom: 3rem; }

a { color: var(--cream); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { margin: 0; font-weight: 400; }
h1 { font: 400 clamp(2.6rem, 11vw, 4.25rem)/0.98 var(--serif); letter-spacing: -0.01em; }
h2 { font: 600 1.3rem/1.3 var(--sans); margin-bottom: 0.9rem; }
p { margin: 0 0 1rem; max-width: 34em; }

.top { padding-top: 1.1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font: 400 1.25rem/1 var(--serif); text-decoration: none; }
.mark { display: block; flex: none; }

section { margin-top: 3.25rem; }
.note, .byline { color: var(--sand); font-size: 0.95rem; }
.byline { margin: 0.6rem 0 0; }

/* ── the hub ── */
.intro { margin-top: 1.25rem; font-size: 1.15rem; color: var(--cream); }
.intro p:first-child { font-size: 1.3rem; line-height: 1.45; }
.intro p:last-child { color: var(--sand); }
.list .q { font: 400 1.15rem/1.35 var(--serif); }

.hole { position: relative; margin: 1.5rem -1.25rem 0; }
.hole svg { display: block; width: 100%; height: auto; }
.hole svg g { transform-box: fill-box; transform-origin: 50% 55%; transition: transform 1.2s ease-in-out; }
body.playing .hole svg g { animation: breathe 3.33s ease-in-out infinite; } /* one beat of the theme: 72 BPM, 4 beats */
@keyframes breathe { 50% { transform: scale(1.025); } }
.play {
  position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%);
  width: 4.75rem; height: 4.75rem; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--cream); color: var(--night);
  display: grid; place-items: center;
  transition: transform 150ms ease-out;
}
.play:active { transform: translate(-50%, -50%) scale(0.96); }
.play svg { width: 1.6rem; height: 1.6rem; }
.play .i-pause { display: none; }
body.playing .play .i-play { display: none; }
body.playing .play .i-pause { display: block; }
.trailer-line { text-align: center; margin: 0.4rem 0 0; color: var(--sand); font-size: 0.98rem; }
.trailer-line strong { color: var(--cream); font-weight: 600; }

.places { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.places li { border-bottom: 1px solid var(--line); }
.places a, .places button {
  display: flex; align-items: center; gap: 0.85rem; width: 100%;
  padding: 0.95rem 0.1rem; min-height: 3.25rem;
  font: 600 1.08rem/1.2 var(--sans); color: var(--cream); text-decoration: none;
  background: none; border: 0; cursor: pointer; text-align: left;
}
.places svg { width: 1.35rem; height: 1.35rem; flex: none; color: var(--sand); }
.places .soon { margin-left: auto; font-weight: 400; font-size: 0.9rem; color: var(--sand); }
.places a:hover .name, .places button:hover .name { text-decoration: underline; text-underline-offset: 0.22em; }

.eps { list-style: none; margin: 0; padding: 0; }
.eps li { padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.eps li:first-child { padding-top: 0; }
.eps a { font: 400 1.2rem/1.3 var(--serif); text-decoration: none; }
.eps a:hover { text-decoration: underline; }
.eps .note { display: block; margin-top: 0.2rem; }

.me img { display: block; width: 7.5rem; height: 7.5rem; border-radius: 50%; object-fit: cover; margin: 0.25rem 0 1.1rem; }
.me .more { margin-top: 1.25rem; }
.places .soon { overflow-wrap: anywhere; }

/* ── forms ── */
label { display: block; font-weight: 600; margin: 1.1rem 0 0.4rem; }
input[type="text"], textarea {
  width: 100%; font: inherit; color: var(--cream);
  background: rgba(243, 230, 201, 0.06); border: 1px solid var(--line); border-radius: 10px;
  padding: 0.7rem 0.85rem; min-height: 3rem;
}
textarea { min-height: 8rem; resize: vertical; }
input:focus, textarea:focus { border-color: var(--sand); outline: none; }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }
button.primary, .write button {
  margin-top: 1.25rem; font: 600 1.05rem/1 var(--sans);
  padding: 0.9rem 1.5rem; min-height: 3rem; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--cream); color: var(--night);
}
.write .note { margin: 1.1rem 0 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { background: rgba(243, 230, 201, 0.1); border-radius: 10px; padding: 0.8rem 1rem; }
.row { display: flex; gap: 0.5rem; }
.row input { flex: 1 1 auto; min-width: 0; }
.row button { margin-top: 0; flex: none; padding: 0 1.1rem; min-height: 3rem; border-radius: 10px; border: 1px solid var(--line); background: none; color: var(--cream); font: 600 1rem var(--sans); cursor: pointer; }

/* ── episode pages ── */
article h1 { font-size: clamp(2rem, 8vw, 3rem); line-height: 1.05; }
.player { margin: 1.75rem 0 1.5rem; }
.player audio { width: 100%; }
.player-controls { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; align-items: center; }
.player-controls button, .player-controls select {
  font: 600 0.95rem var(--sans); color: var(--cream); background: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 0.55rem 1rem; min-height: 2.75rem; cursor: pointer;
}
.player-controls .speed { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-weight: 400; color: var(--sand); }
.player-controls select { background: var(--night); }
.chapters, .sources { padding-left: 1.25rem; }
.chapters { list-style: none; padding: 0; }
.ch-play { display: flex; justify-content: space-between; gap: 1rem; width: 100%; padding: 0.7rem 0; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--cream); font: inherit; text-align: left; cursor: pointer; }
.ch-play .ch-time { color: var(--sand); font-variant-numeric: tabular-nums; }
li.now .ch-title { text-decoration: underline; text-underline-offset: 0.22em; }
.sources li { margin-bottom: 0.4rem; }
.sources .note { margin-left: 0.3rem; }
.colophon { margin-top: 3rem; color: var(--sand); font-size: 0.95rem; }
.colophon a { color: var(--sand); }
.colophon p { margin-bottom: 0.4rem; }

/* ── footer ── */
.foot { padding-top: 1.5rem; padding-bottom: 2.5rem; border-top: 1px solid var(--line); color: var(--sand); font-size: 0.92rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin-bottom: 1rem; }
.foot a { color: var(--sand); }
.foot p { margin: 0 0 0.4rem; }
.foot .sign { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.1rem; font: 400 1.15rem/1.25 var(--serif); color: var(--cream); }
.foot .sign .note { font: 400 0.92rem/1.4 var(--sans); color: var(--sand); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (min-width: 48rem) {
  main { padding-top: 4rem; }
  .hole { margin-left: -3rem; margin-right: -3rem; }
}

@media (prefers-reduced-motion: reduce) {
  body.playing .hole svg g { animation: none; }
  .hole svg g, .play { transition: none; }
}

.me .more + p { margin-top: 1.5rem; }
