/* =========================================================
   Save a Seat Podcast — styles
   Colors and fonts live in the :root block. Change them there
   and the whole site follows.
   ========================================================= */

/* Light theme (default) */
:root {
  color-scheme: light;
  --bg:        #f4efe6;   /* parchment, pulled from the cover art */
  --bg-alt:    #ebe4d6;   /* slightly deeper parchment for alternating sections */
  --card:      #fffdf8;   /* cards, player frame */
  --ink:       #1b1917;   /* near-black text */
  --ink-soft:  #5a544c;   /* secondary text */
  --line:      #d9d0bf;   /* borders */
  --accent:    #b08a3e;   /* the gold chair */
  --accent-ink:#7a5d22;   /* darker gold for text on light bg */
  --shadow:    rgba(27, 25, 23, .18);

  /* the dark "Watch" band and the solid buttons stay dark-on-light in both themes */
  --band-bg:   #1b1917;
  --band-text: #fffdf8;
  --band-muted:#cfc8bb;
  --btn-bg:    #1b1917;
  --btn-text:  #fffdf8;
  --btn-hover: #000000;

  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;

  --max: 1040px;
  --radius: 14px;
}

/* Dark theme: follows the OS setting unless the footer toggle overrides it. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg:        #161412;
    --bg-alt:    #1e1b18;
    --card:      #221f1b;
    --ink:       #f1ebe0;
    --ink-soft:  #a89f92;
    --line:      #363028;
    --accent:    #c9a35a;
    --accent-ink:#d6b46c;
    --shadow:    rgba(0, 0, 0, .5);
    --band-bg:   #0e0d0c;
    --btn-bg:    #f1ebe0;
    --btn-text:  #1b1917;
    --btn-hover: #ffffff;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:        #161412;
  --bg-alt:    #1e1b18;
  --card:      #221f1b;
  --ink:       #f1ebe0;
  --ink-soft:  #a89f92;
  --line:      #363028;
  --accent:    #c9a35a;
  --accent-ink:#d6b46c;
  --shadow:    rgba(0, 0, 0, .5);
  --band-bg:   #0e0d0c;
  --btn-bg:    #f1ebe0;
  --btn-text:  #1b1917;
  --btn-hover: #ffffff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  transition: background .2s ease, color .2s ease;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em;
  background: var(--bg-alt);
  padding: .1em .4em;
  border-radius: 4px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  white-space: nowrap;
  flex: none;
}
.wordmark-mark { display: none; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
  color: var(--ink-soft);
}
.site-nav a:hover { color: var(--ink); }

/* ---------- Layout ---------- */
main { width: 100%; }

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 20px;
}
.section-alt {
  max-width: none;
  background: var(--bg-alt);
}
.section-alt > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}
.section-heading { margin-bottom: 28px; }
.section-heading p { color: var(--ink-soft); max-width: 58ch; }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 20px 40px;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 40px;
  align-items: center;
}
.hero-art {
  border-radius: var(--radius);
  box-shadow: 0 20px 50px var(--shadow);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .75rem;
  font-weight: 600;
  color: var(--accent-ink);
  margin-bottom: 14px;
}
.lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 52ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0 14px; }
.meta { font-size: .9rem; color: var(--ink-soft); margin-top: 0; margin-bottom: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  border: 1.5px solid transparent;
  transition: transform .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--btn-bg); color: var(--btn-text); }
.btn-primary:hover { background: var(--btn-hover); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--card); }

/* ---------- Player ---------- */
.player {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: 0 10px 30px var(--shadow);
}
.player iframe, .player showfm-player { width: 100%; border: 0; border-radius: 10px; display: block; }
.player-placeholder {
  padding: 48px 20px;
  text-align: center;
  color: var(--ink-soft);
  border: 2px dashed var(--line);
  border-radius: 10px;
}
.player-placeholder p:last-child { margin: 0; }

/* Latest episode (home): info on the left, player on the right; stacks on phones. */
.latest.has-info {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px var(--shadow);
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 32px;
  align-items: start;
}
.latest.has-info .latest-player { padding: 0; border: 0; box-shadow: none; background: none; }
.latest-title { font-size: 1.5rem; line-height: 1.2; margin: 0 0 14px; }
.latest .episode-desc { margin-bottom: 16px; }
.latest-info:not(.is-expanded) .episode-desc > p:first-child { -webkit-line-clamp: 4; }   /* lines shown before "Show more" */

/* ---------- Watch (YouTube) ---------- */
.section-dark {
  max-width: none;
  background: var(--band-bg);
  color: var(--band-text);
}
.section-dark > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.section-dark .eyebrow { color: var(--accent); }
.watch-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 40px;
  align-items: center;
}
.watch-copy p { color: var(--band-muted); max-width: 40ch; }
.watch-copy .btn { margin-top: 6px; }
.btn-light { background: var(--band-text); color: var(--band-bg); }
.btn-light:hover { background: #fff; }
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 40px;
  align-items: start;
}
.about-copy p:first-child {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.35;
}
.hosts { display: grid; gap: 16px; }
.host {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: grid;
  grid-template-columns: 88px 1fr;
  column-gap: 18px;
  align-items: start;
}
.host h3 { margin: 4px 0 0; grid-column: 2; }
.host p { margin: 2px 0 0; grid-column: 2; color: var(--ink-soft); font-size: .95rem; }
.host-avatar {
  grid-row: 1 / span 2;
  width: 88px; height: 88px;
  border-radius: 50%;
  background: var(--accent);
  color: #fffdf8;
  font-family: var(--font-display);
  font-weight: 700;
  display: grid; place-items: center;
}
.host img.host-avatar { object-fit: cover; }

/* ---------- Subscribe ---------- */
.platforms {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.platforms a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  transition: border-color .12s ease, transform .12s ease;
}
.platforms a:hover { border-color: var(--accent); transform: translateY(-1px); }
.platforms svg { width: 22px; height: 22px; fill: var(--accent-ink); flex: none; }

/* ---------- Contact ---------- */
.contact-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 20px 48px;
  font-size: .9rem;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer p { margin: 0; }
.footer-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-links a { margin-left: 16px; text-decoration: none; }
.footer-links a:first-child { margin-left: 0; }
.footer-links a:hover { color: var(--ink); }

/* Theme toggle (footer): three small icon buttons */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
}
.theme-toggle button {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}
.theme-toggle svg { width: 14px; height: 14px; fill: currentColor; }
.theme-toggle button:hover { color: var(--ink); }
.theme-toggle button[aria-pressed="true"] {
  background: var(--btn-bg);
  color: var(--btn-text);
}

/* ---------- Episodes page ---------- */
.recent-heading { margin: 44px 0 16px; font-size: 1.35rem; }
.more-link { margin: 20px 0 0; font-weight: 600; }
.more-link a { color: var(--accent-ink); text-decoration: none; }
.more-link a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--ink); }

.episodes-page h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.episode-list { display: grid; gap: 16px; }
.episode-status { color: var(--ink-soft); }
.episode {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px 20px;
  align-items: start;
  scroll-margin-top: 80px;   /* keeps a linked episode clear of the sticky header */
}
.episode-art { width: 96px; height: 96px; border-radius: 10px; object-fit: cover; }
.episode-meta {
  margin: 0 0 4px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.episode-title { font-size: 1.3rem; line-height: 1.25; margin: 0 0 8px; }
.episode-desc { color: var(--ink-soft); font-size: .95rem; margin: 0 0 14px; }
.episode-desc p { margin: 0 0 .75em; }
.episode-desc ul { margin: 0 0 .75em; padding-left: 1.2em; }
.episode-desc li { margin: .15em 0; }
.episode-desc li::marker { color: var(--accent); }
.episode-desc > :last-child { margin-bottom: 0; }
.episode-desc a { color: var(--accent-ink); }
/* Collapsed: only the first paragraph, cut off after 3 lines. "Show more" opens the rest. */
.is-collapsible:not(.is-expanded) .episode-desc > :not(:first-child) { display: none; }
.is-collapsible:not(.is-expanded) .episode-desc > p:first-child {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;       /* lines shown before "Show more" */
  overflow: hidden;
  margin-bottom: 0;
}
.episode-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.btn-sm { padding: 8px 16px; font-size: .9rem; cursor: pointer; font-family: inherit; }
.text-btn {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  color: var(--accent-ink);
  text-decoration: none;
  cursor: pointer;
}
.text-btn:hover { text-decoration: underline; }
.episode-player { grid-column: 1 / -1; }
.episode-player:empty { display: none; }
.episode-player showfm-player { width: 100%; border-radius: 10px; }
.episode-more { margin: 24px 0 0; text-align: center; }
.episode-more .btn { cursor: pointer; font-family: inherit; background: none; }

/* ---------- Transcript page ---------- */
.back-link { margin: 0 0 20px; font-weight: 600; font-size: .95rem; }
.back-link a { color: var(--accent-ink); text-decoration: none; }
.back-link a:hover { text-decoration: underline; }
.transcript-page { max-width: 760px; }
.transcript-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-top: 6px; }
.transcript-player { margin: 24px 0 16px; }
.transcript-note { font-size: .85rem; color: var(--ink-soft); margin: 0 0 32px; }
.turn { margin: 0 0 22px; }
.turn-who { display: flex; align-items: baseline; gap: 10px; margin: 0 0 2px; }
.turn-name { font-weight: 600; font-size: .95rem; }
.turn-time {
  font-size: .8rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.turn-text { margin: 0; line-height: 1.7; }
.turn-text + .turn-text { margin-top: .8em; }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; gap: 28px; }
  .hero-art { max-width: 320px; }
  .about-grid, .watch-grid { grid-template-columns: 1fr; }
  .latest.has-info { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 20px; }
  .latest.has-info .latest-player { order: -1; }   /* phones: player first, details below */
  .latest-title { font-size: 1.3rem; }
  .section { padding: 56px 20px; }
  /* Phones: one row. Wordmark left, links right; the links scroll sideways
     on very narrow screens instead of wrapping onto a second line. */
  .site-header { padding: 8px 16px; gap: 12px; }
  /* On phones the wordmark becomes the round cover art so all five links fit on one row. */
  .wordmark-text { display: none; }
  .wordmark-mark { display: block; }
  .site-nav {
    min-width: 0;
    margin-left: auto;
    flex-wrap: nowrap;
    gap: 11px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0;
    margin: -4px 0;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { font-size: .84rem; white-space: nowrap; }
  /* Phones: artwork sits beside the title; description and buttons use the full card width. */
  .episode { grid-template-columns: 64px minmax(0, 1fr); gap: 0 14px; padding: 16px; }
  .episode-body { display: contents; }
  .episode-art { width: 64px; height: 64px; grid-row: 1 / span 2; }
  .episode-meta { grid-column: 2; align-self: end; }
  .episode-title { grid-column: 2; font-size: 1.15rem; margin: 0; }
  .episode-desc, .episode-actions { grid-column: 1 / -1; }
  .episode-actions { gap: 14px; }
  .episode-desc { margin-top: 12px; }
  .episode-player:not(:empty) { margin-top: 14px; }
}
