/* ───────────────────────────────────────────────────────────────
   Hartley Green — Stories Worth Remembering
   ─────────────────────────────────────────────────────────────── */

:root {
  --cream      : #FAF8F4;
  --cream-dark : #F0EBE3;
  --sage       : #6B8F6E;
  --sage-dark  : #4A6E4D;
  --brown      : #5C4A3A;
  --brown-dark : #3D2E24;
  --brown-mid  : #7A6350;
  --ink        : #3A3330;
  --ink-soft   : #5C534E;
  --rule       : rgba(90, 70, 50, .1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overscroll-behavior: none; }
body {
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Nav ───────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 84px;
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow .3s;
}
.nav.scrolled { box-shadow: 0 1px 8px rgba(60,50,40,.06); }
.nav-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; height: 100%; }
.nav-brand img { height: 100%; width: auto; }
.nav-links {
  display: flex; gap: 24px;
}
.nav-links a {
  font-size: 15px; font-weight: 700;
  color: var(--brown);
  text-decoration: none;
  transition: color .2s;
}
.nav-links a:hover { color: var(--sage-dark); }

.burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.burger span {
  display: block; width: 22px; height: 2px;
  background: var(--brown-dark); border-radius: 1px;
  transition: transform .3s, opacity .2s;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Carousel ──────────────────────────────────────────────── */
.carousel {
  position: relative;
  margin-top: 84px;
  overflow: hidden;
  background: var(--cream-dark);
}
.carousel-track {
  display: flex;
}
.carousel-slide {
  flex: 0 0 100%;
}
.carousel-slide img {
  width: 100%;
  height: 44vh;
  min-height: 260px;
  max-height: 420px;
  object-fit: cover;
}
.carousel-dots {
  position: absolute; bottom: 14px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 8px;
}
.carousel-dots button {
  width: 8px; height: 8px; border-radius: 50%;
  border: none; cursor: pointer;
  background: rgba(255,255,255,.5);
  transition: background .2s, transform .2s;
}
.carousel-dots button.active {
  background: rgba(255,255,255,.95);
  transform: scale(1.3);
}

/* ── Intro ─────────────────────────────────────────────────── */
.intro {
  text-align: center;
  padding: 36px 24px 28px;
}
.intro h1 {
  font-size: clamp(24px, 3.5vw, 34px);
  font-weight: 800;
  color: var(--brown-dark);
  letter-spacing: -.2px;
  margin-bottom: 4px;
}
.intro .strapline {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--ink-soft);
  font-style: italic;
}

/* ── Sections ──────────────────────────────────────────────── */
.section {
  padding: 36px 0;
  border-top: 1px solid var(--rule);
}
.section h2 {
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 800;
  color: var(--brown-dark);
  margin-bottom: 12px;
}
.section h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--sage-dark);
  margin-top: 22px;
  margin-bottom: 4px;
}
.section p {
  margin-bottom: 10px;
  color: var(--ink-soft);
}
.section .contact {
  margin-top: 16px;
}
.section .contact a {
  font-weight: 700;
  color: var(--sage-dark);
  text-decoration: none;
  border-bottom: 2px solid var(--sage);
  padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}
.section .contact a:hover {
  color: var(--brown-dark);
  border-color: var(--brown-dark);
}

/* ── Listen section ────────────────────────────────────────── */
.listen-section { background: var(--cream-dark); }
.wrap-wide {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}
.listen-intro { color: var(--ink-soft); margin-bottom: 16px; }

.episodes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Player card ──────────────────────────────────────────── */
.player {
  background: var(--cream);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(60,50,40,.06);
  display: flex;
  flex-direction: column;
}

.player-img {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--cream-dark);
}
.player-img .player-hero {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity .6s ease;
}
.player-img .player-hero.hidden { opacity: 0; }

.avatar-carousel {
  position: absolute; inset: 0;
  display: none;
  transition: transform 1.2s ease;
}
.avatar-carousel.active {
  display: flex;
}
.avatar-carousel img {
  flex: 0 0 100%;
  width: 100%; height: 100%;
  object-fit: cover;
}

.avatar-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 6px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.5));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  transition: opacity .4s;
}
.player.playing .avatar-caption { opacity: 1; }

.player-body {
  padding: 12px 14px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.player-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--brown-dark);
}
.player-synopsis {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft);
  flex: 1;
  margin-bottom: 8px;
}

.player-controls {
  display: flex; align-items: center; gap: 6px;
  height: 34px;
}
.player-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--brown-mid);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: color .2s;
}
.player-btn:hover { color: var(--brown-dark); }
.player-btn svg { width: 16px; height: 16px; }

.play-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--sage-dark);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s, transform .15s;
}
.play-btn:hover { background: var(--sage); transform: scale(1.05); }
.play-btn .icon-play { width: 12px; height: 12px; margin-left: 2px; }
.play-btn .icon-pause { width: 12px; height: 12px; display: none; }
.play-btn.playing .icon-play { display: none; }
.play-btn.playing .icon-pause { display: block; }

.player-time {
  font-size: 12px;
  font-weight: 700;
  color: var(--brown-mid);
  margin-left: auto;
}

.read-link {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 14px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--sage-dark);
  border: 1.5px solid var(--sage);
  border-radius: 20px;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.read-link:hover {
  background: var(--sage-dark);
  color: #fff;
}

/* ── Footer ─��──────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--rule);
  padding: 20px 0;
}
footer .wrap {
  display: flex; justify-content: space-between;
  font-size: 12.5px;
  color: var(--brown-mid);
}

/* ── Mobile overlay ─────────────────────────────────────────── */
.nav-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.3);
  z-index: 104;
}
.nav-overlay.open { display: block; }

.menu-close {
  display: none;
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px;
  background: none; border: none; cursor: pointer;
  color: var(--brown-dark);
}
.menu-close svg { width: 100%; height: 100%; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 600px) {
  .burger { display: flex; }
  .nav-links {
    position: fixed; top: 0; right: -100%; width: 220px; height: 100vh;
    flex-direction: column; align-items: flex-start;
    background: var(--cream);
    padding: 70px 24px 40px;
    gap: 16px;
    border-left: 1px solid var(--rule);
    transition: right .3s;
    z-index: 105;
  }
  .nav-links.open { right: 0; }
  .nav-links .menu-close { display: block; }
  .nav-links a { font-size: 17px; font-weight: 700; }
  .carousel-slide img { height: 36vh; min-height: 200px; }
}
