/* ==========================================================================
   Podcast home. Loaded after store.css and built on its tokens, surfaces,
   type and buttons: this file only adds what a store page never needs (the
   platform buttons, the episode list, the newsletter form and the player).
   ========================================================================== */

/* Without JavaScript (crawlers, link previews) the page shows the static
   fallback in index.html; the app replaces it. */
html.js .seo-fallback { display: none; }

/* ---------- Header -------------------------------------------------------- */

.topbar-nav { display: flex; align-items: center; gap: 18px; }
.topbar-link {
  color: var(--on-ink-muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  padding: 10px 0;
}
.topbar-link:hover { color: var(--on-ink); }

/* ---------- Hero ---------------------------------------------------------- */

.podcast-art {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 0 0 1px var(--line-ink),
    0 0 90px -18px rgba(232, 135, 95, 0.35),
    0 34px 80px rgba(0, 0, 0, 0.6);
}
.podcast-art img { width: 100%; height: auto; }

.listen-label { margin: 30px 0 12px; }

.platforms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 460px;
  margin: 0 auto;
}

.platform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 999px;
  background: var(--ink-raised);
  border: 1px solid var(--line-ink);
  color: var(--on-ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.platform:hover { transform: translateY(-2px); border-color: var(--clay-soft); }
.platform img { width: 20px; height: 20px; border-radius: 5px; flex-shrink: 0; }
/* Spotify's glyph is black: on ink it needs its green disc, as Spotify draws it. */
.platform--spotify img { background: #1db954; border-radius: 50%; }

.hero-more { margin-top: 26px; }
.hero-more .btn { color: var(--on-ink); }

@media (min-width: 900px) {
  .platforms { margin: 0; }
}

@media (max-width: 680px) {
  .podcast-art { max-width: 280px; }
}

/* ---------- Episodes ------------------------------------------------------ */

.episodes { list-style: none; display: flex; flex-direction: column; gap: 12px; }

.episode {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--cream-raised);
  border: 1px solid var(--line-cream);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.episode:hover { border-color: #cbbfa9; }
.episode.is-active {
  border-color: var(--clay);
  box-shadow: 0 14px 36px rgba(186, 79, 40, 0.12);
}

.play {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--clay-wash);
  color: var(--clay-strong);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.play:hover { transform: scale(1.06); }
.play:hover, .episode.is-active .play { background: var(--clay); color: #fff; }

.episode-main { flex: 1; min-width: 0; }

/* Meta and title are one button: it opens the description. */
.episode-toggle {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  text-align: left;
}
.episode-meta {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-cream-muted);
}
.episode-num { color: var(--clay); }
.episode-title {
  display: block;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.episode-chevron {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--on-cream-faint);
  transition: transform 0.2s ease;
}
.episode-toggle[aria-expanded='true'] .episode-chevron { transform: rotate(180deg); }

.episode-desc {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--on-cream-muted);
}
.episode-duration { display: block; font-weight: 700; color: var(--on-cream); margin-bottom: 6px; }

.episodes-empty { padding: 40px 0; text-align: center; }
.episodes-more { margin-top: 28px; display: flex; justify-content: center; }
.episodes-more .btn { color: var(--on-cream); }

/* ---------- Course -------------------------------------------------------- */

.course { display: grid; gap: 44px; align-items: center; }
.course-cover { width: 100%; max-width: 240px; margin: 0 auto; }
.course .list { margin: 24px 0 30px; }
.course-copy { text-align: center; }
.course-copy .list { text-align: left; max-width: 420px; margin-inline: auto; }

@media (min-width: 900px) {
  .course { grid-template-columns: 0.8fr 1.2fr; gap: 64px; }
  .course-cover { max-width: 280px; }
  .course-copy { text-align: left; }
  .course-copy .list { margin-inline: 0; }
  .course-copy .cta { align-items: flex-start; }
}

/* ---------- Newsletter ---------------------------------------------------- */

.subscribe { display: flex; gap: 10px; flex-wrap: wrap; max-width: 540px; margin: 0 auto; }
.subscribe input {
  flex: 1 1 240px;
  min-width: 0;
  height: 56px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1.5px solid var(--line-cream);
  background: var(--cream-raised);
  color: var(--on-cream);
  font: inherit;
}
.subscribe input:focus { outline: none; border-color: var(--clay); }
.subscribe input[aria-invalid='true'] { border-color: var(--alert); }
.subscribe .btn { flex: 0 0 auto; }
.subscribe-status { min-height: 24px; margin-top: 14px; font-size: 15px; font-weight: 600; text-align: center; }
.subscribe-status--ok { color: var(--moss); }
.subscribe-status--error { color: var(--alert); }
/* Brevo's honeypot: present for bots, invisible to people. */
.subscribe-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

@media (max-width: 520px) {
  .subscribe .btn { flex: 1 1 100%; }
}

/* ---------- Footer -------------------------------------------------------- */

.foot .wordmark { color: var(--on-ink); }
/* The fixed player covers the bottom of the page: the footer grows under it. */
.has-player .foot { padding-bottom: 140px; }
.foot-support { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 18px; }
.foot-support img { height: 40px; width: auto; }

.made-with {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  border-radius: 999px;
  background: var(--ink-raised);
  border: 1px solid var(--line-ink);
  color: var(--on-ink-muted);
  font-size: 13px;
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.made-with:hover { border-color: var(--clay-soft); }
.made-with strong { color: var(--on-ink); }
.made-with-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--clay);
  color: #fff;
}

/* ---------- Player -------------------------------------------------------- */

.player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: var(--ink-deep);
  color: var(--on-ink);
  border-top: 1px solid var(--line-ink);
  box-shadow: 0 -14px 36px rgba(11, 13, 20, 0.25);
}

.player-seek {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--line-ink);
  cursor: pointer;
}
.player-seek-fill { height: 100%; background: var(--clay-soft); pointer-events: none; transition: width 0.1s linear; }

.player-info { flex: 1; min-width: 0; }
.player-info-num { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--clay-soft); }
.player-info-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.player-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-ink);
  color: var(--on-ink-muted);
  display: grid;
  place-items: center;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.player-btn:hover { color: var(--on-ink); border-color: var(--on-ink-faint); }
.player-btn--main { width: 44px; height: 44px; background: var(--clay); border-color: var(--clay); color: #fff; }
.player-btn--main:hover { background: var(--clay-strong); color: #fff; border-color: var(--clay-strong); }
.player-btn--main.needs-tap { animation: player-pulse 1.5s ease-in-out infinite; }
.player-btn--small { width: 32px; height: 32px; }

.player-time { flex-shrink: 0; font-size: 14px; color: var(--on-ink-muted); font-variant-numeric: tabular-nums; }

.player-rate {
  flex-shrink: 0;
  height: 32px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line-ink);
  background: var(--ink-raised);
  color: var(--on-ink-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.player-rate.is-changed { color: var(--clay-soft); }

.player-volume { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.player-volume input { width: 80px; accent-color: var(--clay-soft); cursor: pointer; }

.player-close { flex-shrink: 0; padding: 6px; font-size: 18px; line-height: 1; color: var(--on-ink-muted); }
.player-close:hover { color: var(--on-ink); }

.eq { display: flex; align-items: flex-end; gap: 2px; height: 20px; }
.eq span { width: 3px; height: 4px; border-radius: 2px; background: var(--clay-soft); }
.eq.is-playing span { animation: eq-bar 0.5s ease-in-out infinite alternate; }
.eq.is-playing span:nth-child(2) { animation-duration: 0.65s; animation-delay: 0.1s; }
.eq.is-playing span:nth-child(3) { animation-duration: 0.8s; animation-delay: 0.2s; }
.eq.is-playing span:nth-child(4) { animation-duration: 0.95s; animation-delay: 0.3s; }

@keyframes eq-bar {
  from { height: 6px; }
  to { height: 20px; }
}
@keyframes player-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 135, 95, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(232, 135, 95, 0); }
}

@media (max-width: 720px) {
  .player { padding: 12px 12px 14px; gap: 10px; flex-wrap: wrap; justify-content: space-between; padding-right: 44px; }
  .player .eq, .player-volume { display: none; }
  .player-info { order: -1; flex-basis: 100%; padding-right: 32px; }
  .player-info-title { font-size: 14px; }
  .player-time { font-size: 12px; }
  .player-close { position: absolute; top: 10px; right: 10px; }
}
@media (max-width: 420px) {
  .player-time { display: none; }
}

@media (max-width: 520px) {
  .topbar-link { display: none; }
}
