/* ConCafe Ministries
   Palette is sampled from the ConCafé logo: espresso #3b1f0c and gold #cd9036
   on a paper ground. Light is the default; dark mode re-tints the same roles.

   Two golds, deliberately: --gold is the logo's own value, used for fills and
   rules where it sits on dark ink or large areas. Gold on white only reaches
   about 2.8:1, so --accent carries a darkened version for anything that has to
   be read as text. */

:root {
  --paper:      #fdfaf4;
  --paper-2:    #f5ede0;
  --card:       #ffffff;
  --ink:        #3b1f0c;
  --ink-2:      #6b543f;
  --ink-3:      #9a8571;
  --line:       #e7d9c5;
  --gold:       #cd9036;
  --gold-2:     #d89f4d;
  --accent:     #8b5a1b;
  --accent-2:   #6f4614;
  --accent-of:  rgba(205, 144, 54, .34);
  --on-accent:  #3b1f0c;
  --shadow:     0 1px 2px rgba(59, 31, 12, .05), 0 8px 24px rgba(59, 31, 12, .07);
  --shadow-lg:  0 2px 6px rgba(59, 31, 12, .08), 0 18px 48px rgba(59, 31, 12, .14);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1080px;
  --radius: 12px;
  --player-h: 76px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #16100a;
    --paper-2:    #1f170f;
    --card:       #241b12;
    --ink:        #f7efe3;
    --ink-2:      #d3c2ac;
    --ink-3:      #9c8a75;
    --line:       #3a2c1d;
    --gold:       #e0a44a;
    --gold-2:     #f0bd6e;
    --accent:     #e8b055;
    --accent-2:   #f3c374;
    --accent-of:  rgba(224, 164, 74, .34);
    --on-accent:  #2a1708;
    --shadow:     0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
    --shadow-lg:  0 2px 6px rgba(0, 0, 0, .45), 0 18px 48px rgba(0, 0, 0, .45);
  }
}

:root[data-theme="dark"] {
  --paper:      #16100a;
  --paper-2:    #1f170f;
  --card:       #241b12;
  --ink:        #f7efe3;
  --ink-2:      #d3c2ac;
  --ink-3:      #9c8a75;
  --line:       #3a2c1d;
  --gold:       #e0a44a;
  --gold-2:     #f0bd6e;
  --accent:     #e8b055;
  --accent-2:   #f3c374;
  --accent-of:  rgba(224, 164, 74, .34);
  --on-accent:  #2a1708;
  --shadow:     0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  --shadow-lg:  0 2px 6px rgba(0, 0, 0, .45), 0 18px 48px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.has-player { padding-bottom: var(--player-h); }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; letter-spacing: -.01em; margin: 0; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

.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;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--gold); color: var(--on-accent); padding: 10px 16px;
  border-radius: 8px; text-decoration: none; font-weight: 600;
  transition: top .15s;
}
.skip:focus { top: 12px; }

/* ── top bar ─────────────────────────────────────────────── */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 62px; }

.brand {
  display: flex; align-items: center; gap: 11px;
  font-family: var(--serif); font-weight: 700; font-size: 1.06rem;
  text-decoration: none; letter-spacing: -.01em; white-space: nowrap;
}
.brand img { border-radius: 6px; border: 1px solid var(--line); }
.brand-sub { color: var(--accent); margin-left: .38em; }

.topbar nav { margin-left: auto; display: flex; gap: 4px; }
.topbar nav a {
  text-decoration: none; font-size: .93rem; font-weight: 500; color: var(--ink-2);
  padding: 7px 12px; border-radius: 8px; transition: background .15s, color .15s;
}
.topbar nav a:hover { color: var(--ink); background: var(--paper-2); }

.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none;
  background: none; border: 1px solid transparent; border-radius: 9px;
  color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }

#theme-toggle .moon { display: none; }
:root[data-theme="dark"] #theme-toggle .sun,
:root[data-theme="dark"] #theme-toggle .moon { display: revert; }
:root[data-theme="dark"] #theme-toggle .sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) #theme-toggle .moon { display: revert; }
}

/* ── hero ────────────────────────────────────────────────── */

.hero {
  padding: 68px 0 60px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(60% 90% at 8% 0%, color-mix(in srgb, var(--gold) 7%, transparent), transparent 70%),
    var(--paper);
}
/* The logo is a wide lockup, not the square cover art it replaced, so the hero
   stacks it above the copy instead of setting it beside it in a narrow column. */
.hero-inner { display: block; }

.hero-art {
  max-width: 560px; margin: 0 0 38px;
  background: #fff;                 /* the logo ships on an opaque white field, */
  border-radius: var(--radius);     /* so it sits on its own plate rather than  */
  border: 1px solid var(--line);    /* punching a white box out of a dark page  */
  box-shadow: var(--shadow-lg);
  padding: 26px 30px;
}
.hero-art img { width: 100%; }

.eyebrow {
  margin: 0 0 14px; font-size: .77rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: var(--accent);
}
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.35rem); margin-bottom: 18px; }
.hero h1 .thin { font-weight: 400; font-style: italic; color: var(--ink-3); }

.lede {
  font-size: 1.13rem; color: var(--ink-2); max-width: 54ch;
  margin: 0 0 26px; text-wrap: pretty;
}

.platforms { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font: inherit; font-size: .93rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: transform .12s, box-shadow .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: var(--ink-3); }
.btn-primary {
  background: var(--gold); border-color: var(--gold); color: var(--on-accent);
}
.btn-primary:hover { background: var(--gold-2); border-color: var(--gold-2); }
.btn-wide { padding: 13px 30px; }

.stats { display: flex; flex-wrap: wrap; gap: 34px; margin: 0; }
.stats dt {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px;
}
.stats dd { margin: 0; font-family: var(--serif); font-size: 1.42rem; font-weight: 700; }

/* ── sections ────────────────────────────────────────────── */

.section { padding: 66px 0; }
.section-alt { background: var(--paper-2); border-block: 1px solid var(--line); }

.section-h {
  display: flex; align-items: center; gap: 16px;
  font-size: clamp(1.5rem, 3.4vw, 2rem); margin-bottom: 10px;
}
.section-h .rule { width: 34px; height: 5px; background: var(--gold); flex: none; border-radius: 2px; }

.section-note { color: var(--ink-2); margin: 0 0 26px; max-width: 62ch; }

.loading { color: var(--ink-3); font-style: italic; }

/* ── featured episode ────────────────────────────────────── */

.featured {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 32px;
  box-shadow: var(--shadow); margin-top: 16px;
}
.featured .f-date {
  font-size: .76rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 8px;
}
.featured h3 { font-size: clamp(1.4rem, 3.6vw, 2rem); margin-bottom: 12px; }
.featured p.f-blurb { color: var(--ink-2); margin: 0 0 22px; max-width: 62ch; font-size: 1.04rem; }
.featured .f-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.featured .f-len { color: var(--ink-3); font-size: .9rem; }

/* ── controls ────────────────────────────────────────────── */

.controls { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }

.search { position: relative; flex: 1 1 260px; display: flex; align-items: center; }
.search svg { position: absolute; left: 14px; color: var(--ink-3); pointer-events: none; }
.search input {
  width: 100%; padding: 12px 40px 12px 42px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--ink); font: inherit; font-size: .96rem;
  transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3.5px var(--accent-of);
}
.q-clear {
  position: absolute; right: 8px; width: 28px; height: 28px;
  border: 0; border-radius: 50%; background: var(--paper-2); color: var(--ink-2);
  font-size: 20px; line-height: 1; cursor: pointer;
}
.q-clear:hover { color: var(--ink); }

.controls select {
  padding: 12px 16px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--ink); font: inherit; font-size: .93rem;
  font-weight: 500; cursor: pointer;
}
.controls select:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }

.result-count { color: var(--ink-3); font-size: .88rem; margin: 0 0 14px; min-height: 1.3em; }

/* ── episode list ────────────────────────────────────────── */

.episodes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.ep {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.ep:hover { border-color: var(--ink-3); box-shadow: var(--shadow); }
.ep.is-playing { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }

.ep-head {
  display: grid; grid-template-columns: auto 1fr auto auto;
  align-items: center; gap: 14px;
  width: 100%; padding: 15px 18px;
  background: none; border: 0; color: inherit; font: inherit;
  text-align: left; cursor: pointer;
}
.ep-play {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 50%; border: 1px solid var(--line);
  background: var(--paper-2); color: var(--accent);
  transition: background .15s, color .15s, transform .12s;
}
.ep-head:hover .ep-play { background: var(--gold); color: var(--on-accent); transform: scale(1.06); }
.ep.is-playing .ep-play { background: var(--gold); color: var(--on-accent); }

.ep-title {
  font-family: var(--serif); font-size: 1.07rem; font-weight: 700;
  line-height: 1.3; margin: 0 0 2px;
}
.ep-sub { font-size: .82rem; color: var(--ink-3); margin: 0; }
.ep-len {
  font-variant-numeric: tabular-nums; font-size: .84rem;
  color: var(--ink-3); white-space: nowrap;
}
.ep-caret { color: var(--ink-3); transition: transform .2s; }
.ep[open] .ep-caret, .ep.is-open .ep-caret { transform: rotate(180deg); }

.ep-body {
  padding: 0 18px 18px 72px;
  color: var(--ink-2); font-size: .96rem;
}
.ep-body p { margin: 0 0 14px; max-width: 62ch; text-wrap: pretty; }
.ep-body .ep-links { display: flex; flex-wrap: wrap; gap: 8px; }
.ep-body .mini {
  font-size: .84rem; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper-2);
  text-decoration: none; color: var(--ink-2); font-weight: 600;
}
.ep-body .mini:hover { color: var(--ink); border-color: var(--ink-3); }

mark { background: color-mix(in srgb, var(--gold) 24%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }

.more-wrap { display: flex; justify-content: center; margin-top: 26px; }

.empty { text-align: center; color: var(--ink-3); padding: 44px 0; }
.empty strong { color: var(--ink); display: block; font-family: var(--serif); font-size: 1.2rem; margin-bottom: 6px; }

/* ── about ───────────────────────────────────────────────── */

.about-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 44px; align-items: start; margin-top: 20px; }
.about-copy p { color: var(--ink-2); margin: 0 0 16px; text-wrap: pretty; }
.about-copy .first {
  font-family: var(--serif); font-size: 1.22rem; line-height: 1.5; color: var(--ink);
}
.about-copy .first em { color: var(--accent); font-style: italic; }

.video { margin: 0; }
.video-embed {
  position: relative; display: block; width: 100%; padding: 0;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: #000; cursor: pointer; line-height: 0;
  box-shadow: var(--shadow);
}
.video-embed img { width: 100%; opacity: .82; transition: opacity .2s, transform .3s; }
.video-embed:hover img { opacity: 1; transform: scale(1.03); }
.play-badge {
  position: absolute; inset: 0; margin: auto;
  width: 62px; height: 62px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold); color: var(--on-accent);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
  transition: transform .18s;
}
.video-embed:hover .play-badge { transform: scale(1.09); }
.video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); display: block; }
.video figcaption { font-size: .84rem; color: var(--ink-3); margin-top: 10px; line-height: 1.5; }

/* ── subscribe cards ─────────────────────────────────────── */

.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px;
}
.cards a {
  display: block; height: 100%; padding: 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; transition: transform .14s, box-shadow .16s, border-color .16s;
}
.cards a:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--gold); }
.cards strong { display: block; font-family: var(--serif); font-size: 1.1rem; margin-bottom: 4px; }
.cards span { font-size: .87rem; color: var(--ink-3); }

.follow-h {
  font-size: 1.12rem; margin: 34px 0 12px;
  display: flex; align-items: center; gap: 10px;
}
.follow-h::before { content: ""; width: 20px; height: 3px; background: var(--gold); border-radius: 2px; }

.socials {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 12px;
}
.socials a {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 22px 14px 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  text-decoration: none; color: var(--ink);
  transition: transform .14s, box-shadow .16s, border-color .16s;
}
.socials a:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--gold); }
.socials svg { color: var(--accent); flex: none; }
.socials span { display: block; line-height: 1.3; }
.socials strong { display: block; font-family: var(--serif); font-size: 1rem; }
.socials .handle { font-size: .82rem; color: var(--ink-3); }

/* ── footer ──────────────────────────────────────────────── */

.footer { padding: 40px 0; border-top: 1px solid var(--line); background: var(--paper); }
.footer p { margin: 0 0 6px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px !important; }
.footer-links a { font-size: .88rem; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }
.footer .fine { font-size: .82rem; color: var(--ink-3); max-width: 68ch; line-height: 1.6; }
.footer .credit { color: var(--ink-2); font-weight: 600; }
.footer .credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ── sticky player ───────────────────────────────────────── */

.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: var(--player-h);
  background: color-mix(in srgb, var(--card) 94%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 28px rgba(23, 18, 14, .09);
}
.player-inner { display: flex; align-items: center; gap: 16px; height: var(--player-h); }

.player-art { border-radius: 7px; border: 1px solid var(--line); flex: none; }
.player-meta { min-width: 0; flex: 0 1 240px; }
.player-title {
  margin: 0; font-family: var(--serif); font-weight: 700; font-size: .97rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-date { margin: 0; font-size: .78rem; color: var(--ink-3); }

.player-controls { display: flex; align-items: center; gap: 4px; flex: none; }
.play-btn {
  display: grid; place-items: center; width: 46px; height: 46px;
  border: 0; border-radius: 50%; background: var(--gold); color: var(--on-accent);
  cursor: pointer; transition: transform .12s, background .15s;
}
.play-btn:hover { background: var(--gold-2); transform: scale(1.05); }

.player-seek { flex: 1 1 auto; display: flex; align-items: center; gap: 11px; min-width: 120px; }
.player-seek .t {
  font-family: var(--mono); font-size: .76rem; color: var(--ink-3);
  font-variant-numeric: tabular-nums; flex: none;
}

#p-range {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 5px; border-radius: 3px; background: var(--line);
  cursor: pointer; outline-offset: 6px;
}
#p-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
#p-range::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--card);
  background: var(--gold); box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}

.rate-btn {
  flex: none; min-width: 46px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper-2); color: var(--ink-2);
  font: inherit; font-size: .82rem; font-weight: 700;
  font-variant-numeric: tabular-nums; cursor: pointer;
}
.rate-btn:hover { color: var(--ink); border-color: var(--ink-3); }

/* ── responsive ──────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero-art { max-width: 460px; }
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .player-meta { flex-basis: 150px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .topbar nav { display: none; }
  .hero { padding: 40px 0 44px; }
  .hero-art { max-width: 100%; margin-bottom: 28px; padding: 18px 20px; }
  .stats { gap: 24px; }
  .section { padding: 48px 0; }
  .featured { padding: 22px; }
  .ep-head { grid-template-columns: auto 1fr auto; gap: 12px; padding: 13px 14px; }
  .ep-len { display: none; }
  .ep-body { padding: 0 14px 16px 14px; }
  .controls { flex-direction: column; }
  .controls select { width: 100%; }
}

@media (max-width: 640px) {
  :root { --player-h: 128px; }
  .player-inner { flex-wrap: wrap; gap: 10px 12px; padding-top: 10px; align-content: center; }
  .player-art { width: 40px; height: 40px; }
  .player-meta { flex: 1 1 auto; order: 1; }
  #p-close { order: 2; }
  .player-seek { order: 4; flex: 1 1 100%; }
  .player-controls { order: 3; }
  .rate-btn { order: 3; margin-left: auto; }
}
