:root {
  --ink: #26302c;
  --muted: #626c67;
  --paper: #f7f2e9;
  --paper-deep: #eee5d7;
  --warm: #b66c4a;
  --warm-dark: #8b4e35;
  --sage: #788d7e;
  --line: rgba(38, 48, 44, 0.14);
  --white: #fffdf8;
  --shadow: 0 18px 50px rgba(43, 40, 34, 0.10);
  --radius: 1.4rem;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 6%, rgba(182, 108, 74, 0.13), transparent 28rem),
    radial-gradient(circle at 8% 34%, rgba(120, 141, 126, 0.12), transparent 26rem),
    var(--paper);
  font-family: "Aptos", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  padding: .7rem 1rem; background: var(--ink); color: white;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.wrap { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }

header { padding: 1.2rem 0; border-bottom: 1px solid var(--line); }

.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.brand { font-weight: 700; letter-spacing: -.02em; text-decoration: none; }

.nav-links { display: flex; gap: 1.4rem; align-items: center; }

.nav-links a { color: var(--muted); font-size: .95rem; text-decoration-thickness: 1px; text-underline-offset: .25rem; }
.nav-links a.current { color: var(--ink); font-weight: 700; }

.hero { min-height: 79vh; display: grid; place-items: center; padding: 5.5rem 0 4rem; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 6.5rem);
}

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem; margin: 0 0 1rem;
  color: var(--warm-dark); font-weight: 700; font-size: .84rem;
  letter-spacing: .12em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 2.4rem; height: 1px; background: currentColor; }

h1, h2, blockquote { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }

h1 {
  margin: 0; max-width: 11ch;
  font-size: clamp(3.8rem, 10vw, 7.7rem);
  line-height: .92; letter-spacing: -.055em;
}

.hero-copy { max-width: 42rem; margin: 1.7rem 0 0; color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.35rem); }

.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: .78rem 1.25rem;
  border: 1px solid var(--ink); border-radius: 999px;
  font-weight: 700; text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  background: none; cursor: pointer; font-size: 1rem; font-family: inherit;
}
.button:hover, .button:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(38, 48, 44, .14); }
.button-primary { background: var(--ink); color: white; }
.button-secondary { background: rgba(255,255,255,.35); }
.button-small { min-height: 2.4rem; padding: .5rem .9rem; font-size: .88rem; }

.launch-note { margin-top: 1rem; color: var(--muted); font-size: .92rem; }

.art {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: 50% 50% 1.4rem 1.4rem;
  background: linear-gradient(to bottom, #d8c5aa 0 29%, #e9d8bc 29% 48%, #8e9b86 48% 64%, #65775f 64%);
  box-shadow: var(--shadow); isolation: isolate;
}
.sun { position: absolute; width: 34%; aspect-ratio: 1; left: 13%; top: 15%; border-radius: 50%; background: #e9a76d; box-shadow: 0 0 70px rgba(233, 167, 109, .42); }
.hill { position: absolute; width: 125%; height: 37%; left: -12%; bottom: 12%; background: #788973; border-radius: 50% 52% 0 0; transform: rotate(-5deg); }
.path { position: absolute; width: 27%; height: 53%; left: 38%; bottom: -11%; background: #d5bd99; clip-path: polygon(44% 0, 60% 0, 100% 100%, 0 100%); transform: rotate(2deg); opacity: .92; }
.person { position: absolute; width: 10px; height: 50px; left: 53%; bottom: 21%; border-radius: 8px; background: #27312d; transform: rotate(3deg); }
.person::before { content: ""; position: absolute; width: 16px; height: 16px; left: -3px; top: -13px; border-radius: 50%; background: #27312d; }
.dog { position: absolute; width: 31px; height: 15px; left: 60%; bottom: 20.5%; border-radius: 55% 45% 50% 45%; background: #39433d; }
.dog::before { content: ""; position: absolute; width: 11px; height: 12px; right: -6px; top: -3px; border-radius: 50%; background: #39433d; }
.dog::after { content: ""; position: absolute; width: 14px; height: 4px; left: -10px; top: 4px; border-radius: 4px; background: #39433d; transform: rotate(-24deg); transform-origin: right; }

.art-label {
  position: absolute; right: 1rem; bottom: 1rem; max-width: 15rem; margin: 0;
  padding: .75rem .9rem; border-radius: .8rem; background: rgba(255, 253, 248, .87);
  backdrop-filter: blur(7px); font-family: Georgia, "Times New Roman", serif; font-size: .95rem; line-height: 1.4;
}

section { padding: clamp(3rem, 9vw, 7rem) 0; }

.section-label { color: var(--warm-dark); font-size: .83rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }

h2 { margin: .45rem 0 1.2rem; max-width: 22ch; font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.06; letter-spacing: -.035em; }

.large-copy { margin: 0; font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.55; }

.soft-section { background: rgba(255, 253, 248, .58); border-block: 1px solid var(--line); }

.quote-wrap { max-width: 900px; margin-inline: auto; text-align: center; }
blockquote { margin: 0; font-size: clamp(1.8rem, 4.5vw, 3.4rem); line-height: 1.16; letter-spacing: -.03em; }
.quote-wrap p { margin: 1.4rem auto 0; max-width: 42rem; color: var(--muted); }

.listen { text-align: center; padding-bottom: 5rem; }
.listen h2 { margin-inline: auto; }
.listen p { max-width: 40rem; margin-inline: auto; color: var(--muted); font-size: 1.08rem; }

.platforms { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 2rem; }
.platforms a { min-width: 9.7rem; }
.platform-icons { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .9rem; margin-top: 1.2rem; }
.platform-icons a { color: var(--muted); line-height: 0; transition: color .18s ease, transform .18s ease; }
.platform-icons a:hover, .platform-icons a:focus-visible { color: var(--warm-dark); transform: translateY(-2px); }
.platform-icons svg { width: 1.35rem; height: 1.35rem; fill: currentColor; }

.footer-listen { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.footer-listen span { color: var(--muted); }
.footer-listen .platform-icons { margin-top: 0; justify-content: flex-start; gap: .8rem; }
.footer-listen .platform-icons svg { width: 1.1rem; height: 1.1rem; }

/* Archive grid */
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 2.5rem; }
.episode-card {
  display: block; padding: 1.6rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(255,255,255,.4); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease;
}
.episode-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.episode-card .ep-date { color: var(--warm-dark); font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.episode-card h3 { font-family: Georgia, serif; font-weight: 400; font-size: 1.5rem; margin: .5rem 0 .6rem; letter-spacing: -.02em; }
.episode-card p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Single episode page */
.episode-hero { padding-bottom: 2rem; }
.episode-hero .ep-date { color: var(--warm-dark); font-weight: 700; font-size: .84rem; letter-spacing: .1em; text-transform: uppercase; }
.episode-hero h1 { max-width: 18ch; font-size: clamp(2.6rem, 6vw, 4.6rem); margin-top: .6rem; }
.episode-hero .large-copy { margin-top: 1.4rem; max-width: 42rem; }
audio { width: 100%; max-width: 42rem; margin-top: 2rem; }
.episode-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.6rem; }

footer { padding: 2rem 0 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.footer-grid { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.footer-grid p { margin: 0; }

:focus-visible { outline: 3px solid rgba(182, 108, 74, .55); outline-offset: 4px; }

/* Admin */
.admin-box { max-width: 480px; margin: 4rem auto; padding: 2.5rem; background: rgba(255,255,255,.5); border: 1px solid var(--line); border-radius: var(--radius); }
.admin-box label { display: block; font-weight: 700; margin-bottom: .3rem; font-size: .9rem; }
.admin-box input[type=text], .admin-box input[type=password], .admin-box input[type=number], .admin-box textarea, .admin-box select {
  width: 100%; padding: .7rem .9rem; margin-bottom: 1.1rem; border: 1px solid var(--line);
  border-radius: .6rem; font-family: inherit; font-size: 1rem; background: var(--white);
}
.admin-box textarea { min-height: 6rem; resize: vertical; }
.flash { padding: .9rem 1.1rem; border-radius: .6rem; margin-bottom: 1.5rem; font-size: .95rem; }
.flash-ok { background: rgba(120,141,126,.18); border: 1px solid var(--sage); }
.flash-error { background: rgba(182,108,74,.14); border: 1px solid var(--warm); }
table.admin-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
table.admin-table th, table.admin-table td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--line); font-size: .92rem; vertical-align: top; }
.status-pill { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.status-published { background: rgba(120,141,126,.25); color: #3d4a41; }
.status-queued { background: rgba(182,108,74,.18); color: var(--warm-dark); }

@media (max-width: 850px) {
  .hero { min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; }
  .art { max-width: 30rem; width: 100%; margin-inline: auto; }
}

@media (max-width: 560px) {
  h1 { font-size: clamp(3.5rem, 20vw, 5.2rem); }
  .hero { padding-top: 3.8rem; }
  .button { width: 100%; }
  .nav-links a:not(.current) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
