/* ============================================================
   Sanvi Shrivastava — Writer's Workshop
   Aesthetic: Storybook-Editorial (warm paper, ink type, pastel tints)
   Type: Fraunces (display) + Newsreader (reading)
   ============================================================ */

:root {
  /* Surfaces — warm ivory paper */
  --paper: #f4eee1;
  --paper-2: #ebe1cd;
  --card: #fbf6ea;
  --ink: #2b2620;
  --ink-soft: #574f43;
  --ink-faint: #8a7f6e;

  /* Accents — printed ink + muted terracotta + sage */
  --clay: #b5573a;
  --clay-deep: #97432b;
  --sage: #6f7a5c;
  --sage-deep: #566145;

  /* Warm literary tints */
  --sand: #ece1c9;
  --tint-clay: #f0dccf;
  --tint-sage: #e5e7d6;
  --tint-sand: #efe6d0;

  /* Lines & effects */
  --line: #ded1b6;
  --line-strong: #cbb995;
  --shadow-sm: 0 1px 2px rgba(43, 38, 32, 0.06), 0 2px 8px rgba(43, 38, 32, 0.05);
  --shadow-md: 0 10px 30px -14px rgba(43, 38, 32, 0.3);
  --shadow-lg: 0 26px 54px -24px rgba(43, 38, 32, 0.38);
  --shadow-color: 0 16px 34px -20px rgba(181, 87, 58, 0.4);

  /* System */
  --radius: 22px;
  --radius-sm: 14px;
  --radius-pill: 999px;
  --container: 1140px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Newsreader", Georgia, serif;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font-body);
  font-optical-sizing: auto;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(1100px 560px at 8% -10%, rgba(111, 122, 92, 0.1), transparent 60%),
    radial-gradient(900px 520px at 100% 4%, rgba(181, 87, 58, 0.08), transparent 58%);
  background-attachment: fixed;
  font-size: 1.075rem;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Paper grain overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--clay);
  color: #fff;
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 200;
  background: var(--clay);
  transition: width 0.1s linear;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(251, 246, 236, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease),
    background 0.3s var(--ease);
}

.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px -22px rgba(43, 37, 64, 0.6);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--clay);
  color: #fbf6ea;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  box-shadow: var(--shadow-color);
  transform: rotate(-4deg);
  transition: transform 0.35s var(--ease);
}

.brand:hover .brand-mark {
  transform: rotate(4deg) scale(1.05);
}

.main-nav {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.main-nav a {
  position: relative;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.32rem;
  height: 2px;
  border-radius: 2px;
  background: var(--clay);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.main-nav a:hover {
  color: var(--ink);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.main-nav a.active {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  width: 44px;
  height: 44px;
  border-radius: 14px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-toggle:active {
  transform: scale(0.94);
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.nav-toggle__bars {
  position: relative;
  transition: background 0.2s var(--ease);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  transition: transform 0.25s var(--ease);
}

.nav-toggle__bars::before {
  top: -6px;
}

.nav-toggle__bars::after {
  top: 6px;
}

.nav-toggle.is-open .nav-toggle__bars {
  background: transparent;
}

.nav-toggle.is-open .nav-toggle__bars::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.is-open .nav-toggle__bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Layout primitives ---------- */
main {
  position: relative;
  z-index: 2;
}

.band {
  position: relative;
  padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1.15rem, 5vw, 2.5rem);
}

.band > * {
  max-width: var(--container);
  margin-inline: auto;
}

.soft-blue {
  background: linear-gradient(180deg, transparent, var(--tint-sage) 12%, var(--tint-sage) 88%, transparent);
}
.soft-pink {
  background: linear-gradient(180deg, transparent, var(--tint-clay) 12%, var(--tint-clay) 88%, transparent);
}
.soft-mint {
  background: linear-gradient(180deg, transparent, var(--tint-sand) 12%, var(--tint-sand) 88%, transparent);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--clay);
  margin-bottom: 0.85rem;
}

.section-heading {
  margin-bottom: 2.5rem;
  max-width: 46rem;
}

.section-heading.centered {
  margin-inline: auto;
  text-align: center;
}

.section-heading.centered .eyebrow {
  justify-content: center;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.06;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3.1rem);
}

h3 {
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.2;
}

.prose p + p {
  margin-top: 1.1rem;
}

.prose {
  color: var(--ink-soft);
  font-size: 1.12rem;
  line-height: 1.85;
}

.prose.wide {
  max-width: 60ch;
}

.two-column {
  columns: 2;
  column-gap: 2.6rem;
}

.two-column p {
  break-inside: avoid;
  margin-bottom: 1.1rem;
}

/* ---------- Buttons ---------- */
.button {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease), color 0.25s var(--ease);
  will-change: transform;
}

.button.primary {
  --btn-bg: var(--clay);
  box-shadow: var(--shadow-color);
}

.button.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 44px -18px rgba(176, 53, 106, 0.6);
}

.button.ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--line-strong);
}

.button.ghost:hover {
  transform: translateY(-3px);
  background: var(--card);
  border-color: var(--clay);
  color: var(--clay);
  box-shadow: var(--shadow-md);
}

.button:active {
  transform: translateY(-1px) scale(0.99);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr minmax(300px, 440px);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
}

.hero-copy {
  min-width: 0;
}

.hero-copy h1 {
  font-size: clamp(2.7rem, 6.4vw, 4.6rem);
  margin: 0.4rem 0 1.1rem;
}

.hero-copy h1 .accent {
  font-style: italic;
  color: var(--clay);
  position: relative;
  white-space: nowrap;
  padding-bottom: 0.08em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='24' viewBox='0 0 300 24' fill='none'%3E%3Cpath d='M4 15 C 60 6, 120 20, 180 10 S 260 18, 296 8' stroke='%23b5573a' stroke-width='4' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 92%;
  background-size: 100% 0.5em;
}

.hero-copy > p {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 42ch;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.8rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.8rem;
  margin-top: 2.4rem;
  padding-top: 1.6rem;
  border-top: 1px dashed var(--line-strong);
}

.hero-stats .stat {
  display: flex;
  flex-direction: column;
}

.hero-stats .num {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}

.hero-stats .label {
  font-size: 0.86rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  margin-top: 0.35rem;
}

/* Hero art — layered book stack */
.hero-art {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 40% 60% 58% 42% / 50% 44% 56% 50%;
  background: radial-gradient(circle at 40% 35%, var(--tint-clay), var(--tint-sand) 70%);
  filter: blur(2px);
  animation: blob 14s ease-in-out infinite;
}

/* Book stack illustration */
.book-stack {
  position: relative;
  width: min(78%, 320px);
  z-index: 2;
  transform: rotate(-2deg);
  transition: transform 0.5s var(--ease);
}

.hero-art:hover .book-stack {
  transform: rotate(0);
}

.book-stack .vol {
  position: relative;
  height: 58px;
  border-radius: 10px;
  margin-top: -8px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  padding-left: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: transform 0.4s var(--ease);
}

.book-stack .vol span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(43, 37, 64, 0.72);
}

.book-stack .vol::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.75);
}

.book-stack .v1 {
  background: var(--tint-sand);
  width: 96%;
  transform: rotate(-3deg);
}
.book-stack .v2 {
  background: var(--tint-sage);
  width: 104%;
  margin-left: -4%;
  transform: rotate(2deg);
}
.book-stack .v3 {
  background: var(--tint-clay);
  width: 98%;
  transform: rotate(-1.5deg);
}

.book-stack:hover .v1 { transform: rotate(-6deg) translateX(-4px); }
.book-stack:hover .v2 { transform: rotate(4deg) translateX(4px); }
.book-stack:hover .v3 { transform: rotate(-3deg); }

.book-top {
  position: relative;
  margin-top: 14px;
  height: 132px;
  border-radius: 8px;
  background: var(--ink);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(251, 246, 234, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0 1.5rem;
  transform: rotate(2deg);
  overflow: hidden;
}

.book-top::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: rgba(251, 246, 234, 0.22);
}

.book-top::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(251, 246, 234, 0.25);
  border-radius: 5px;
  pointer-events: none;
}

.book-top__rule {
  width: 34px;
  height: 1px;
  background: var(--clay);
}

.book-top__label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  color: #f3ead6;
}

.floaty {
  position: absolute;
  font-family: var(--font-display);
  color: var(--clay);
  opacity: 0.85;
  animation: float 6s ease-in-out infinite;
}

.floaty.s1 {
  top: 4%;
  right: 12%;
  font-size: 1.6rem;
  color: var(--clay);
}
.floaty.s2 {
  bottom: 8%;
  left: 4%;
  font-size: 1.3rem;
  color: var(--sage);
  animation-delay: 1.5s;
}
.floaty.s3 {
  top: 42%;
  right: 0;
  font-size: 1.1rem;
  animation-delay: 0.8s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-12px) rotate(8deg); }
}

@keyframes blob {
  0%, 100% { border-radius: 40% 60% 58% 42% / 50% 44% 56% 50%; }
  50% { border-radius: 58% 42% 44% 56% / 44% 58% 42% 56%; }
}

/* ---------- Scan band ---------- */
.scan-band {
  padding-top: clamp(1rem, 3vw, 2rem);
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
}

.scan-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 4vw, 2.6rem);
  box-shadow: var(--shadow-md);
}

.scan-intro {
  max-width: 34ch;
}

.scan-intro h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 0.6rem;
}

.scan-cards {
  display: flex;
  gap: 1.2rem;
}

.scan-card {
  margin: 0;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.8rem 0.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.scan-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.scan-card img {
  width: 116px;
  height: 116px;
  border-radius: 8px;
}

.scan-card figcaption {
  margin-top: 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- About ---------- */
.about .prose {
  color: var(--ink-soft);
}

.facts {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}

.facts li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.facts li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clay);
}

/* ---------- Speech / statement ---------- */
.statement {
  position: relative;
  max-width: 52rem;
  margin-inline: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.8rem, 4vw, 3rem);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.statement::before {
  content: "\201C";
  position: absolute;
  top: -0.35em;
  left: 0.35em;
  font-family: var(--font-display);
  font-size: 6rem;
  line-height: 1;
  color: var(--tint-clay);
  z-index: 0;
}

.statement > * {
  position: relative;
  z-index: 1;
}

.statement p {
  font-size: 1.2rem;
  color: var(--ink-soft);
  line-height: 1.8;
}

.statement p + p {
  margin-top: 1.1rem;
}

.statement h3 {
  margin-top: 1.8rem;
  color: var(--clay);
}

.sparkle {
  margin-top: 1.6rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--sage);
}

/* ---------- Film / explainer card ---------- */
#film .section-heading,
#plays .section-heading {
  max-width: 40rem;
}

.explainer-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--clay);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 3.5vw, 2.6rem);
  box-shadow: var(--shadow-md);
}

/* ---------- Stories reader ---------- */
.genre-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.genre-tab {
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.genre-tab:hover {
  transform: translateY(-2px);
  border-color: var(--clay);
  color: var(--clay);
}

.genre-tab.active {
  background: var(--clay);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-color);
}

.reader {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 4vw, 3rem);
  box-shadow: var(--shadow-lg);
  max-width: 52rem;
  margin-inline: auto;
  overflow: hidden;
}

.reader::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--clay);
}

/* Accent variants driven by data-accent */
.reader[data-accent="mint"]::before { background: var(--sage); }
.reader[data-accent="blush"]::before,
.reader[data-accent="pink"]::before { background: var(--clay); }
.reader[data-accent="sky"]::before,
.reader[data-accent="blue"]::before { background: var(--sage); }
.reader[data-accent="butter"]::before,
.reader[data-accent="gold"]::before { background: var(--clay-deep); }
.reader[data-accent="lilac"]::before { background: var(--sage-deep); }

.reader-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.4rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px dashed var(--line-strong);
}

.reader-genre {
  margin-bottom: 0.4rem;
}

.reader-title {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
}

.reader-byline {
  color: var(--ink-faint);
  font-style: italic;
  margin-top: 0.35rem;
}

.reader-body {
  font-size: 1.14rem;
  line-height: 1.9;
  color: var(--ink-soft);
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.reader-body p:first-child:first-letter {
  initial-letter: 2;
  -webkit-initial-letter: 2;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--clay);
  margin-right: 0.6rem;
}

.reader-body::-webkit-scrollbar {
  width: 8px;
}
.reader-body::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 8px;
}

/* ---------- Plays ---------- */
.play-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3.5vw, 2.4rem);
  box-shadow: var(--shadow-md);
}

.play-preview h3 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: 0.02em;
}

.play-preview .eyebrow {
  margin-bottom: 0.5rem;
}

.play-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.script-reader {
  margin-top: 1.5rem;
  background: #fffdf6;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  box-shadow: inset 0 0 0 1px #fff, var(--shadow-md);
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--ink-soft);
  white-space: pre-wrap;
  max-height: 65vh;
  overflow-y: auto;
  animation: fadeUp 0.5s var(--ease);
}

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

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2.4rem clamp(1.15rem, 5vw, 2.5rem);
  max-width: var(--container);
  margin-inline: auto;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 0.98rem;
}

.site-footer a {
  color: var(--clay);
  text-decoration: none;
  font-weight: 600;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 120;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: var(--ink);
  color: #fbf6ea;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(18px) scale(0.8);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.to-top.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.to-top:hover {
  transform: translateY(-3px) scale(1.06);
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].in {
  opacity: 1;
  transform: none;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-copy > p {
    margin-inline: auto;
  }
  .hero-actions,
  .hero-stats {
    justify-content: center;
  }
  .hero-art {
    max-width: 380px;
    margin-inline: auto;
    order: -1;
  }
  .two-column {
    columns: 1;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: grid;
  }
  .main-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: clamp(1rem, 4vw, 2.5rem);
    left: clamp(1rem, 4vw, 2.5rem);
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    padding: 0.6rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }
  .main-nav.open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .main-nav a {
    padding: 0.75rem 1rem;
  }
  .main-nav a::after {
    display: none;
  }
  .main-nav a.active {
    background: var(--tint-clay);
  }
  .reader-top {
    flex-direction: column;
  }
  .play-preview {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
