:root {
  color-scheme: light;
  --bg: #f8efec;
  --bg-elevated: rgba(255, 248, 246, 0.78);
  --bg-strong: #fff7f4;
  --surface-line: rgba(98, 70, 93, 0.12);
  --surface-line-strong: rgba(98, 70, 93, 0.22);
  --text: #35243a;
  --muted: rgba(53, 36, 58, 0.74);
  --soft: rgba(53, 36, 58, 0.56);
  --accent: #cb7a67;
  --accent-strong: #b15c58;
  --accent-rgb: 203, 122, 103;
  --hero-shadow: rgba(19, 12, 25, 0.54);
  --page-shadow: rgba(62, 40, 62, 0.1);
  --font-sans: "Manrope", "Segoe UI", sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --radius: 1.25rem;
  --content-width: 76rem;
  --narrow-width: 46rem;
  --reader-width: 42rem;
  --reader-sidebar-width: 18rem;
  --reader-gap: clamp(2rem, 5vw, 5rem);
  --reader-layout-width: calc(var(--reader-width) + var(--reader-sidebar-width) + var(--reader-gap));
  --nav-height: 5rem;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #18111c;
  --bg-elevated: rgba(37, 24, 40, 0.82);
  --bg-strong: #211625;
  --surface-line: rgba(244, 224, 226, 0.12);
  --surface-line-strong: rgba(244, 224, 226, 0.22);
  --text: #f7eeef;
  --muted: rgba(247, 238, 239, 0.74);
  --soft: rgba(247, 238, 239, 0.58);
  --accent: #f2a27d;
  --accent-strong: #ffc094;
  --accent-rgb: 242, 162, 125;
  --hero-shadow: rgba(7, 5, 12, 0.74);
  --page-shadow: rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.site-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(circle at 16% 0%, rgba(197, 171, 222, 0.46), transparent 31%),
    radial-gradient(circle at 88% 10%, rgba(255, 211, 140, 0.42), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent 24%),
    var(--bg);
  transition: background-color 220ms ease, color 220ms ease;
}

body.site-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 2.5rem 2.5rem;
  opacity: 0.12;
  mix-blend-mode: soft-light;
}

main {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

p,
li,
input,
textarea,
button {
  font-family: inherit;
}

.site-nav {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 6;
}

.site-nav__inner,
.section__inner,
.site-footer__inner,
.reader-shell {
  width: min(calc(100% - 2rem), var(--content-width));
  margin: 0 auto;
}

.site-nav__inner {
  min-height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-nav__brand {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: #fff7ee;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(255, 247, 238, 0.2);
  background: rgba(255, 247, 238, 0.08);
  border-radius: 999px;
  cursor: pointer;
  color: rgba(255, 247, 238, 0.9);
  flex-shrink: 0;
  transition: background 180ms ease, border-color 180ms ease;
}

.nav-hamburger:hover,
.nav-hamburger:focus-visible {
  background: rgba(255, 247, 238, 0.14);
  border-color: rgba(255, 247, 238, 0.36);
}

.nav-hamburger__close {
  display: none;
}

.site-nav__links a,
.theme-toggle {
  color: rgba(255, 247, 238, 0.88);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.theme-toggle {
  border: 1px solid rgba(255, 247, 238, 0.2);
  background: rgba(255, 247, 238, 0.08);
  padding: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.theme-icon {
  display: block;
  flex-shrink: 0;
  transition: opacity 180ms ease;
}

.theme-icon--sun {
  display: none;
}

html[data-theme="dark"] .theme-icon--sun {
  display: block;
}

html[data-theme="dark"] .theme-icon--moon {
  display: none;
}

.theme-toggle:hover,
.theme-toggle:focus-visible,
.button:hover,
.button:focus-visible,
.site-nav__links a:hover,
.site-nav__links a:focus-visible,
.episode-river__body a:hover,
.episode-river__body a:focus-visible,
.episode-listing__item a:hover,
.episode-listing__item a:focus-visible,
.reader-toc a:hover,
.reader-toc a:focus-visible {
  color: #fff;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 247, 238, 0.14);
  border-color: rgba(255, 247, 238, 0.36);
}

.hero,
.page-hero {
  position: relative;
  min-height: 100svh;
  color: #fff8f3;
  background-image: var(--hero-image);
  background-position: center center;
  background-size: cover;
  overflow: hidden;
}

.hero--home {
  background-position: center 36%;
}

.page-hero {
  min-height: 34rem;
}

.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(58, 36, 74, 0.22), rgba(40, 25, 54, 0.12) 22%, rgba(20, 12, 29, 0.8) 100%),
    radial-gradient(circle at 72% 20%, rgba(255, 210, 136, 0.34), transparent 28%),
    radial-gradient(circle at 18% 2%, rgba(196, 163, 220, 0.28), transparent 24%);
  transform: scale(1.04);
  animation: heroPlane 1.6s ease forwards;
}

.hero--home::before {
  background:
    linear-gradient(180deg, rgba(73, 48, 88, 0.14), rgba(51, 31, 66, 0.1) 22%, rgba(23, 13, 32, 0.78) 100%),
    linear-gradient(90deg, rgba(24, 12, 30, 0.5), rgba(24, 12, 30, 0.18) 28%, rgba(24, 12, 30, 0) 55%),
    radial-gradient(circle at 78% 18%, rgba(255, 210, 128, 0.3), transparent 26%),
    radial-gradient(circle at 20% 2%, rgba(214, 181, 228, 0.24), transparent 22%);
}

.hero__backdrop,
.page-hero__backdrop {
  position: absolute;
  inset: auto 0 0;
  height: 12rem;
  background: linear-gradient(180deg, transparent, rgba(11, 8, 6, 0.72));
  z-index: 1;
}

.hero__content,
.page-hero__content {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 2rem), var(--content-width));
  margin: 0 auto;
  min-height: 100svh;
  padding: calc(var(--nav-height) + 4rem) 0 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 36rem;
  animation: heroCopy 900ms cubic-bezier(0.2, 0.8, 0.2, 1) 120ms both;
}

.page-hero__content {
  min-height: 34rem;
}

.hero__content--home {
  justify-content: flex-end;
  padding-bottom: 5rem;
  max-width: 34rem;
}

.hero__content--home-centered {
  max-width: min(calc(100% - 2rem), var(--content-width));
  align-items: center;
}

.hero__content--reader {
  width: min(calc(100% - 2rem), var(--reader-layout-width));
  max-width: var(--reader-layout-width);
  justify-content: flex-end;
  padding-bottom: 8rem;
}

.hero__content--reader .hero__brand {
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  max-width: 8ch;
}

.hero__content--reader .hero__headline {
  font-size: clamp(1.6rem, 2.6vw, 2.45rem);
  max-width: 16ch;
}

.hero__brand,
.hero__eyebrow,
.page-hero__eyebrow {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 247, 238, 0.76);
}

.section__eyebrow,
.reader-entry__eyebrow,
.reader-sidebar__eyebrow,
.episode-listing__count {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.episode-river__meta,
.reader-entry__meta,
.site-footer__copy {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--soft);
}

.hero__eyebrow {
  color: rgba(255, 244, 239, 0.86);
}

.hero__brand,
.page-hero h1,
.hero__headline,
.section h2,
.episode-river__body h3,
.episode-listing__item h3,
.reader-entry__header h2,
.reader-sidebar h2,
.page-copy h1,
.page-copy h2,
.page-copy h3,
.site-footer__brand {
  font-family: var(--font-serif);
}

.hero__brand {
  font-size: clamp(2.8rem, 9vw, 6.5rem);
  font-weight: 700;
  line-height: 0.92;
  max-width: 10ch;
  color: #fff7ee;
}

.hero__headline,
.page-hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.6rem);
  line-height: 1.02;
  max-width: 11ch;
  text-wrap: balance;
}

.hero__summary,
.page-hero__content p,
.section__heading p,
.section__body,
.episode-river__body p,
.episode-listing__item p,
.reader-intro p,
.reader-loader p,
.page-copy p,
.page-copy li,
.site-footer p {
  margin: 1rem 0 0;
  line-height: 1.75;
  font-size: 1.04rem;
}

.hero__summary,
.page-hero__content p {
  color: rgba(255, 244, 239, 0.9);
  max-width: 32rem;
  text-shadow: 0 0.65rem 2.2rem rgba(16, 8, 22, 0.24);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.hero__actions--center {
  width: 100%;
  justify-content: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.button--primary {
  background: var(--accent);
  color: #fff8f0;
  border: 1px solid transparent;
  box-shadow: 0 1rem 2rem rgba(var(--accent-rgb), 0.22);
}

.button--ghost {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
}

.hero--home .button--ghost {
  background: rgba(255, 247, 238, 0.08);
  backdrop-filter: blur(10px);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.section {
  padding: 6rem 0;
}

.section--home {
  padding: 2.5rem 0;
}

.section-rule {
  border: 0;
  border-top: 1px solid var(--surface-line);
  width: min(calc(100% - 2rem), var(--content-width));
  margin: 0 auto;
}

.section__inner--narrow {
  max-width: var(--narrow-width);
  margin-left: max(1rem, calc((100% - var(--content-width)) / 2));
  margin-right: auto;
}

.section__heading {
  max-width: 38rem;
  margin-bottom: 3rem;
}

.section__heading--left {
  margin-left: 0;
}

.section h2,
.reader-sidebar h2,
.reader-entry__header h2,
.page-copy h1,
.page-copy h2,
.page-copy h3 {
  margin: 0;
  font-size: clamp(2rem, 3.2vw, 3.1rem);
  line-height: 1.05;
}

.section__body {
  color: var(--muted);
}

.section__body p:first-child,
.page-copy p:first-child {
  margin-top: 0;
}

.section--intro,
.section--closing,
.section--page,
.section--episodes-list {
  position: relative;
}

.episode-river,
.episode-listing,
.reader-toc {
  list-style: none;
  margin: 0;
  padding: 0;
}

.episode-river__item,
.episode-listing__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  padding: 1.75rem 0;
  border-top: 1px solid var(--surface-line);
}

.episode-listing__item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.episode-river__count,
.episode-listing__count {
  color: var(--accent);
  font-size: 0.88rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 0.45rem;
}

.episode-river__body h3,
.episode-listing__item h3 {
  margin: 0;
  font-size: clamp(1.7rem, 2.5vw, 2.4rem);
}

.episode-river__body a,
.episode-listing__item a,
.page-copy a,
.reader-prose a {
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.14em;
}

.episode-listing__meta {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.75rem;
  padding-bottom: 0.5rem;
  align-items: flex-end;
  color: var(--soft);
  font-size: 0.95rem;
}

.episodes-landing {
  position: relative;
  min-height: 100svh;
  color: #fff8f3;
  background-image: var(--hero-image);
  background-position: center center;
  background-size: cover;
  overflow: hidden;
}

.episodes-landing::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(24, 18, 11, 0.18), rgba(18, 14, 9, 0.16) 26%, rgba(12, 8, 4, 0.84) 100%),
    linear-gradient(90deg, rgba(27, 16, 9, 0.68), rgba(27, 16, 9, 0.22) 44%, rgba(27, 16, 9, 0.06) 72%),
    radial-gradient(circle at 76% 18%, rgba(255, 218, 141, 0.32), transparent 24%);
  transform: scale(1.03);
  animation: heroPlane 1.6s ease forwards;
}

.episodes-landing__backdrop {
  position: absolute;
  inset: auto 0 0;
  height: 12rem;
  background: linear-gradient(180deg, transparent, rgba(13, 10, 7, 0.74));
  z-index: 1;
}

.episodes-landing__content {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 2rem), var(--content-width));
  min-height: 100svh;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 4rem) 0 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 36rem;
  animation: heroCopy 900ms cubic-bezier(0.2, 0.8, 0.2, 1) 120ms both;
}

.episodes-landing__brand {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: clamp(3rem, 9vw, 6.75rem);
  line-height: 0.9;
  color: #fff7ee;
  max-width: 9ch;
}

.episodes-landing h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.02;
  max-width: 10ch;
}

.episodes-landing__summary {
  margin: 1rem 0 0;
  max-width: 30rem;
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(255, 244, 239, 0.9);
  text-shadow: 0 0.65rem 2.2rem rgba(16, 8, 22, 0.24);
}

.section--episodes-guide {
  padding-top: 6.5rem;
  padding-bottom: 3.5rem;
}

.section--episodes-sequence {
  padding-top: 1.5rem;
  padding-bottom: 6.5rem;
}

.section__inner--episodes-guide {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--surface-line);
}

.episodes-guide__intro {
  max-width: 32rem;
}

.episodes-guide__intro h2,
.episodes-sequence__header h2 {
  max-width: 12ch;
}

.episodes-guide__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

.episodes-guide__steps li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--surface-line-strong);
}

.episodes-guide__steps span {
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 0.35rem;
}

.episodes-guide__steps h3,
.episodes-sequence__header h2 {
  margin: 0;
  font-family: var(--font-serif);
}

.episodes-guide__steps h3 {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.06;
}

.episodes-guide__steps p,
.episodes-sequence__header p {
  margin: 0.75rem 0 0;
  color: var(--muted);
}

.episodes-sequence__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 30rem);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: end;
  margin-bottom: 2rem;
}

.episode-listing--sequence {
  border-top: 1px solid var(--surface-line);
}

.episode-listing__content {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.reader-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  z-index: 12;
  background: rgba(0, 0, 0, 0.08);
}

.reader-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transform-origin: left center;
  transition: width 100ms linear;
}

.reader-shell {
  display: grid;
  width: min(calc(100% - 2rem), var(--reader-layout-width));
  margin: 0 auto;
  grid-template-columns: minmax(0, var(--reader-width)) minmax(15rem, var(--reader-sidebar-width));
  grid-template-areas: "main sidebar";
  justify-content: center;
  gap: var(--reader-gap);
  padding: 5rem 0 7rem;
}

.reader-sidebar {
  grid-area: sidebar;
}

.reader-sidebar__inner {
  position: sticky;
  top: 2.5rem;
}

.reader-sidebar h2 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}

.reader-toc {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.reader-toc a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 0.9rem 0;
  text-decoration: none;
  border-top: 1px solid var(--surface-line);
  color: var(--muted);
}

.reader-toc a span {
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-top: 0.22rem;
}

.reader-toc a strong {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.2;
  font-weight: 600;
}

.reader-toc a.is-active,
.reader-toc a.is-loaded {
  color: var(--text);
}

.reader-main {
  grid-area: main;
  min-width: 0;
}

.reader-intro {
  max-width: 34rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

.reader-flow {
  max-width: var(--reader-width);
}

.reader-entry {
  padding: 0 0 4rem;
}

.reader-entry + .reader-entry {
  margin-top: 4rem;
  padding-top: 4rem;
  border-top: 1px solid var(--surface-line-strong);
}

.reader-entry__header {
  margin-bottom: 2rem;
}

.reader-entry__header h2 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
}

.reader-entry__meta {
  display: flex;
  margin-top: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--soft);
}

.reader-prose {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.2vw, 1.68rem);
  line-height: 1.7;
  color: var(--text);
}

.reader-prose > p:first-of-type::first-letter {
  float: left;
  font-size: 4.4em;
  line-height: 0.8;
  padding: 0.1em 0.08em 0 0;
  color: var(--accent);
}

.reader-prose p,
.reader-prose blockquote,
.reader-prose ul,
.reader-prose ol,
.reader-prose h2,
.reader-prose h3,
.reader-prose h4 {
  margin: 0;
}

.reader-prose p + p,
.reader-prose p + blockquote,
.reader-prose blockquote + p,
.reader-prose h2 + p,
.reader-prose h3 + p,
.reader-prose ul + p,
.reader-prose ol + p,
.reader-prose p + h2,
.reader-prose p + h3,
.reader-prose p + ul,
.reader-prose p + ol,
.reader-prose hr + p {
  margin-top: 1.35rem;
}

.reader-prose h2,
.reader-prose h3,
.reader-prose h4 {
  font-size: 1.5em;
  line-height: 1.08;
  padding-top: 1.2rem;
}

.reader-prose blockquote {
  margin-left: 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--surface-line-strong);
  color: var(--muted);
  font-style: italic;
}

.reader-prose hr {
  border: 0;
  border-top: 1px solid var(--surface-line-strong);
  margin: 2.5rem 0;
}

.reader-loader {
  max-width: var(--reader-width);
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--surface-line);
  color: var(--muted);
}

.reader-loader[hidden] {
  display: none;
}

.page-copy,
.section__body,
.page-copy li {
  color: var(--muted);
}

.page-copy {
  font-size: 1.1rem;
  line-height: 1.9;
}

.page-copy h1,
.page-copy h2,
.page-copy h3 {
  color: var(--text);
  margin-top: 2.5rem;
}

.page-copy form {
  margin-top: 2rem;
}

.page-copy label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--text);
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-copy input,
.page-copy textarea {
  width: 100%;
  border: 1px solid var(--surface-line-strong);
  background: rgba(255, 255, 255, 0.32);
  color: var(--text);
  padding: 1rem 1.05rem;
  border-radius: 1rem;
}

.page-copy textarea {
  min-height: 10rem;
  resize: vertical;
}

.page-copy input[type="submit"] {
  width: auto;
  min-width: 10rem;
  cursor: pointer;
  background: var(--accent);
  color: #fff8f0;
  border-color: transparent;
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--surface-line);
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem 0 2.5rem;
}

.site-footer__brand {
  display: inline-block;
  text-decoration: none;
  font-size: 1.8rem;
  color: var(--text);
}

.site-footer__copy,
.site-footer__meta p {
  color: var(--soft);
}

.site-footer__meta {
  text-align: right;
}

.site-footer .ananke-socials {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

.site-footer .ananke-social-link {
  color: var(--soft);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(1.4rem);
  transition: opacity 680ms ease, transform 680ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.page-copy--immediate {
  opacity: 1;
  transform: none;
}

@keyframes heroPlane {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1.02);
  }
}

@keyframes heroCopy {
  from {
    opacity: 0;
    transform: translateY(1.8rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .reader-shell,
  .episode-listing__item,
  .section__inner--episodes-guide,
  .episodes-sequence__header {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }

  .reader-sidebar__inner {
    position: static;
  }

  .reader-toc {
    border-bottom: 1px solid var(--surface-line);
    padding-bottom: 1rem;
  }

  .episode-listing__meta {
    align-items: flex-start;
  }

  .episodes-landing__content {
    max-width: 32rem;
  }
}

@media (max-width: 720px) {
  /* Containers — generous side breathing room */
  .site-nav__inner,
  .section__inner,
  .site-footer__inner,
  .reader-shell,
  .hero__content,
  .page-hero__content,
  .episodes-landing__content {
    width: min(calc(100% - 2.5rem), var(--content-width));
  }

  /* Nav bar — horizontal, brand left, actions right */
  .site-nav__inner {
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 0.75rem;
    min-height: var(--nav-height);
    position: relative;
    z-index: 20;
  }

  .site-nav__brand {
    flex: 1 1 auto;
    font-size: clamp(1.05rem, 4.5vw, 1.55rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    z-index: 20;
  }

  .site-nav__actions {
    position: relative;
    z-index: 20;
  }

  /* Hamburger visible on mobile */
  .nav-hamburger {
    display: flex;
  }

  /* Nav links hidden — shown as full-screen overlay */
  .site-nav__links {
    position: fixed;
    inset: 0;
    z-index: 15;
    background: rgba(13, 6, 19, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: nowrap;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-0.75rem);
    transition: opacity 220ms ease, transform 220ms ease;
  }

  .site-nav.nav-is-open .site-nav__links {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  /* Hamburger icon swap when open */
  .site-nav.nav-is-open .nav-hamburger__open {
    display: none;
  }

  .site-nav.nav-is-open .nav-hamburger__close {
    display: block;
  }

  /* Overlay nav links — large serif type */
  .site-nav__links a {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 8vw, 3rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    color: rgba(255, 247, 238, 0.85);
    padding: 1rem 2rem;
    width: 100%;
    text-align: center;
    border-top: 1px solid rgba(255, 247, 238, 0.06);
    transition: color 140ms ease;
  }

  .site-nav__links a:first-child {
    border-top: none;
  }

  .site-nav__links a:hover,
  .site-nav__links a:focus-visible {
    color: #fff;
  }

  /* Footer */
  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Hero action buttons */
  .hero__actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero__actions--center {
    align-items: center;
  }

  /* Hero content: standard pages get padding below sticky nav */
  .hero__content,
  .page-hero__content,
  .episodes-landing__content {
    padding-top: 7.5rem;
    max-width: 100%;
  }

  .hero,
  .page-hero,
  .episodes-landing {
    min-height: auto;
  }

  /* Home hero — shorter so the full logo image is legible */
  /* Image is 1607×656 (2.45:1). At ~260px height, cover shows ~60% of width — logo visible */
  .hero--home {
    min-height: 0;
    background-position: center 42%;
  }

  .hero--home .hero__content {
    min-height: 0;
    /* Push CTA below the image's natural visible area */
    padding-top: calc(var(--nav-height) + 38vw);
    padding-bottom: 2rem;
  }

  /* Sections */
  .section {
    padding: 3.5rem 0;
  }

  .section__heading {
    margin-bottom: 2rem;
  }

  /* Episode lists */
  .episode-river__item {
    grid-template-columns: 1fr;
    gap: 0.4rem;
    padding: 1.4rem 0;
  }

  .episode-listing__content,
  .episodes-guide__steps li {
    grid-template-columns: 1fr;
  }

  /* Reader */
  .reader-shell {
    padding: 3.5rem 0 5rem;
  }

  .reader-prose {
    font-size: 1.2rem;
    line-height: 1.72;
  }

  .reader-prose > p:first-of-type::first-letter {
    font-size: 3.8em;
  }

  /* Footer meta */
  .site-footer__meta {
    text-align: left;
  }

  .site-footer .ananke-socials {
    justify-content: flex-start;
  }
}

/* Extra-small phones */
@media (max-width: 400px) {
  .site-nav__brand {
    font-size: 1rem;
  }

  .section {
    padding: 3rem 0;
  }

  .hero__brand {
    font-size: clamp(2.4rem, 10vw, 3.2rem);
  }
}
