/* ==========================================================================
   Hearts in Nature — Sally Fine
   Design tokens are sampled from the book cover:
     copper title lettering · heart-petal red · stem green · soil · misty sky
   ========================================================================== */

:root {
  /* Palette (from cover) */
  --copper: #9C6F4C;          /* title lettering — decorative / large type */
  --copper-700: #8A5E3E;      /* headings (AA on mist) */
  --copper-800: #7A5236;      /* links & small copper text (AA) */
  --petal: #B23A3E;           /* the heart petal — primary actions */
  --petal-600: #9E3135;       /* hover */
  --petal-soft: #D77476;      /* fallen petals — decoration */
  --stem: #4F5E45;            /* leaves & stem — secondary accent */
  --soil: #3A332E;            /* body text */
  --soil-600: #5F554D;        /* muted text */
  --mist: #F4F1EC;            /* page background (sky) */
  --mist-200: #E9E3DB;        /* alt section background */
  --mist-300: #E2DCD5;        /* borders, placeholders */
  --white: #FFFFFF;

  /* Semantic tokens */
  --bg: var(--mist);
  --bg-alt: var(--mist-200);
  --surface: #FBFAF7;
  --text: var(--soil);
  --text-muted: var(--soil-600);
  --heading: var(--copper-700);
  --link: var(--copper-800);
  --accent: var(--petal);
  --accent-hover: var(--petal-600);
  --on-accent: var(--white);
  --eyebrow: var(--petal);
  --border: rgba(58, 51, 46, 0.12);
  --deco: var(--copper);
  --header-bg: rgba(244, 241, 236, 0.86);

  /* Type */
  --font-display: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-300: clamp(0.82rem, 0.8rem + 0.1vw, 0.88rem);
  --fs-400: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  --fs-500: clamp(1.15rem, 1.08rem + 0.35vw, 1.3rem);
  --fs-600: clamp(1.4rem, 1.25rem + 0.7vw, 1.75rem);
  --fs-700: clamp(2rem, 1.6rem + 2vw, 3.1rem);
  --fs-800: clamp(2.35rem, 1.7rem + 3.2vw, 4.2rem);

  /* Space, radius, shadow */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --section-pad: clamp(4rem, 3rem + 5vw, 7.5rem);
  --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
  --radius-sm: 10px;
  --radius: 20px;
  --radius-lg: 32px;
  --radius-organic: 46% 54% 42% 58% / 52% 44% 56% 48%;
  --shadow-sm: 0 2px 8px rgba(58, 51, 46, 0.08);
  --shadow: 0 12px 32px -12px rgba(58, 51, 46, 0.25);
  --shadow-lg: 0 30px 60px -20px rgba(58, 51, 46, 0.35);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 76px;
}

/* Twilight (dark) theme — darker variant of the cover palette */
:root[data-theme="dark"] {
  --bg: #24201D;
  --bg-alt: #2B2622;
  --surface: #322C28;
  --text: #EDE7DF;
  --text-muted: #C9BFB4;
  --heading: #DDAE86;
  --link: #E7BB94;
  --accent: #C2474B;
  --accent-hover: #D0575B;
  --eyebrow: #EE9497;
  --border: rgba(237, 231, 223, 0.14);
  --deco: #C89670;
  --header-bg: rgba(36, 32, 29, 0.86);
  --shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-400);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; color: var(--heading); margin: 0 0 var(--space-2); letter-spacing: -0.005em; }
h2 { font-size: var(--fs-700); }
h3 { font-size: var(--fs-600); }
p { margin: 0 0 var(--space-2); }
a { color: var(--link); }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
em { font-style: italic; }
blockquote { margin: 0; }
.sprite { position: absolute; overflow: hidden; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.center { text-align: center; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: fixed; left: 1rem; top: 1rem; z-index: 200;
  background: var(--accent); color: var(--on-accent); padding: .6rem 1rem; border-radius: var(--radius-sm);
  transform: translateY(-200%); transition: transform .2s;
}
.skip-link:focus { transform: none; }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.container.narrow { max-width: 860px; }

.section { position: relative; padding-block: var(--section-pad); }

/* ---------- Section heading pattern: eyebrow + large heading ---------- */
.section-head { margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.section-head.center { text-align: center; max-width: 680px; margin-inline: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-body); font-size: var(--fs-300); font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--eyebrow);
  margin-bottom: var(--space-2);
}
.eyebrow::before { content: ""; flex: 0 0 auto; width: 26px; height: 1.5px; background: currentColor; opacity: .6; }
.eyebrow.center { display: flex; justify-content: center; }
.eyebrow.sm { font-size: .72rem; margin-bottom: .4rem; }
.eyebrow.sm::before { width: 16px; }
.section-sub { color: var(--text-muted); font-size: var(--fs-500); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: transparent; --btn-fg: var(--text); --btn-bd: transparent;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .8rem 1.6rem; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg); border: 1.5px solid var(--btn-bd);
  font-family: var(--font-body); font-weight: 700; font-size: .98rem; letter-spacing: .02em;
  text-decoration: none; overflow: hidden; isolation: isolate;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), color .3s, border-color .3s;
}
.btn svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--btn-fill, var(--accent-hover));
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:hover::before { transform: scaleX(1); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(0); }
.btn-primary { --btn-bg: var(--accent); --btn-fg: var(--on-accent); --btn-bd: var(--accent); }
.btn-ghost { --btn-fg: var(--link); --btn-bd: currentColor; --btn-fill: var(--accent); }
.btn-ghost:hover { --btn-fg: var(--on-accent); border-color: var(--accent); }
.btn-light { --btn-bg: var(--mist); --btn-fg: var(--petal-600); --btn-fill: var(--white); }
.btn-sm { min-height: 42px; padding: .55rem 1.15rem; font-size: .9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--border); background: transparent; color: var(--text);
  transition: background-color .25s, transform .25s var(--ease), border-color .25s;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--bg-alt); transform: translateY(-1px); }

.text-link { color: var(--link); font-weight: 700; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.text-link:hover { color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(140%) blur(12px); backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .35s var(--ease), border-color .35s, background-color .4s;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: var(--header-h); transition: height .35s var(--ease); }
.site-header.is-scrolled { box-shadow: 0 8px 24px -16px rgba(58, 51, 46, .35); border-color: var(--border); }
.site-header.is-scrolled .header-inner { height: 62px; }

.wordmark { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--heading); }
.wordmark-heart { width: 22px; height: 22px; fill: var(--accent); transition: transform .5s var(--ease); }
.wordmark:hover .wordmark-heart { transform: scale(1.15) rotate(-8deg); }
.wordmark-text { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.6rem; letter-spacing: .04em; line-height: 1; color: var(--heading); }

.main-nav { display: none; }
.main-nav ul { display: flex; gap: clamp(.9rem, .4rem + 1vw, 1.8rem); }
.main-nav a {
  position: relative; color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; padding-block: .4rem;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: center; transition: transform .35s var(--ease);
}
.main-nav a:hover::after, .main-nav a.is-active::after { transform: scaleX(1); }
.main-nav a.is-active { color: var(--heading); }

.header-actions { display: flex; align-items: center; gap: .6rem; }
.header-cta { display: none; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.burger { display: grid; gap: 5px; width: 20px; }
.burger span { height: 2px; background: currentColor; border-radius: 2px; }
.burger span:nth-child(2) { width: 70%; justify-self: end; }

/* Mobile menu */
.menu-backdrop {
  position: fixed; inset: 0; z-index: 90; background: rgba(36, 32, 29, .45);
  opacity: 0; transition: opacity .35s var(--ease);
}
.menu-backdrop.is-open { opacity: 1; }
.mobile-menu {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
  width: min(86vw, 360px); padding: 1.25rem 1.5rem 2rem;
  display: flex; flex-direction: column; gap: 1.5rem;
  background: var(--surface); box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform .45s var(--ease);
  overflow-y: auto;
}
.mobile-menu.is-open { transform: none; }
.mobile-menu-head { display: flex; justify-content: space-between; align-items: center; }
.mobile-menu nav a {
  display: block; padding: .85rem 0; border-bottom: 1px solid var(--border);
  font-family: var(--font-display); font-size: 1.55rem; font-weight: 600; color: var(--heading); text-decoration: none;
  opacity: 0; transform: translateX(24px); transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.mobile-menu.is-open nav a { opacity: 1; transform: none; }
.mobile-menu.is-open li:nth-child(2) a { transition-delay: .04s; }
.mobile-menu.is-open li:nth-child(3) a { transition-delay: .08s; }
.mobile-menu.is-open li:nth-child(4) a { transition-delay: .12s; }
.mobile-menu.is-open li:nth-child(5) a { transition-delay: .16s; }
.mobile-menu.is-open li:nth-child(6) a { transition-delay: .2s; }
body.menu-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(2.5rem, 1.5rem + 5vw, 6rem) clamp(3.5rem, 2rem + 5vw, 6.5rem);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-mist {
  position: absolute; inset: -20% -10% auto auto; width: 75%; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(215, 116, 118, .16), transparent 70%),
              radial-gradient(closest-side at 30% 70%, rgba(156, 111, 76, .12), transparent 70%);
  border-radius: 50%;
}
.hero-inner { position: relative; text-align: center; }
.hero-copy { max-width: 1080px; margin-inline: auto; }
.hero-title { font-size: clamp(2.3rem, 1rem + 4.2vw, 4.1rem); font-weight: 600; margin-bottom: var(--space-3); text-wrap: balance; }
.br-md { display: none; }
@media (max-width: 767px) { .hero .eyebrow::before { display: none; } }
.hero-lead { font-size: var(--fs-500); color: var(--text-muted); max-width: 40em; margin-inline: auto; }
.hero .btn-row, .hero .badges { justify-content: center; }
.epigraph {
  margin: var(--space-3) auto var(--space-4); max-width: 40em;
  font-family: var(--font-display); font-style: italic; font-size: var(--fs-500); color: var(--text);
}
.epigraph p { margin-bottom: .3rem; }
.epigraph::before { content: ""; display: block; width: 48px; height: 2px; margin: 0 auto var(--space-2); background: var(--petal-soft); border-radius: 2px; }
.epigraph footer { font-family: var(--font-body); font-style: normal; font-size: var(--fs-300); color: var(--text-muted); }

.badges { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: var(--space-4); }
.badges li {
  display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .9rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  font-size: .86rem; font-weight: 600; color: var(--text);
}
.badges svg { width: 15px; height: 15px; fill: var(--accent); }
.badges li:nth-child(2) svg { fill: var(--stem); }
:root[data-theme="dark"] .badges li:nth-child(2) svg { fill: #93A585; }

.story-grid { display: grid; gap: clamp(2.5rem, 2rem + 3vw, 5rem); align-items: center; }
.story-book { display: grid; place-items: center; padding-block: 1rem 2rem; }
.book-tilt { perspective: 1400px; animation: float 7s ease-in-out infinite; }
.book-3d {
  position: relative; width: min(62vw, 340px);
  transform: rotateY(var(--ry, -16deg)) rotateX(var(--rx, 4deg));
  transform-style: preserve-3d; transition: transform .6s var(--ease);
  border-radius: 3px 8px 8px 3px;
  box-shadow: 30px 36px 60px -20px rgba(58, 51, 46, .5), 8px 10px 20px -8px rgba(58, 51, 46, .35);
}
.book-3d img { border-radius: 3px 8px 8px 3px; }
/* spine highlight */
.book-3d::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 14px; z-index: 1; border-radius: 3px 0 0 3px;
  background: linear-gradient(90deg, rgba(0,0,0,.25), rgba(255,255,255,.25) 45%, rgba(0,0,0,.08));
}
/* page edges */
.book-3d::after {
  content: ""; position: absolute; top: 3px; bottom: 3px; right: -12px; width: 12px;
  background: repeating-linear-gradient(90deg, #f3eee6 0 1px, #ddd5ca 1px 2px);
  transform: rotateY(90deg); transform-origin: left;
}

.float-deco { position: absolute; opacity: .22; animation: drift 14s ease-in-out infinite; }
.deco-1 { display: none; width: 54px; height: 54px; left: 3%; top: 10%; fill: var(--stem); }
.deco-2 { width: 34px; height: 34px; right: 8%; bottom: 16%; fill: var(--petal-soft); animation-duration: 11s; animation-delay: -4s; }
.deco-3 { width: 40px; height: 40px; right: 42%; top: 6%; fill: var(--petal-soft); animation-duration: 16s; animation-delay: -8s; }

/* Seasonal particles */
.hero-particles { position: absolute; inset: 0; overflow: hidden; }
.particle {
  position: absolute; top: -40px; left: var(--x);
  width: var(--size); height: var(--size); opacity: var(--o, .5);
  animation: fall var(--dur) linear var(--delay) infinite;
  will-change: transform;
}
.particle svg { width: 100%; height: 100%; animation: sway calc(var(--dur) / 3) ease-in-out infinite alternate; }
.particle.winter { color: #fff; filter: drop-shadow(0 0 2px rgba(122, 82, 54, .5)); }
.particle.winter svg { fill: currentColor; }
.particle.spring svg, .particle.summer svg { fill: var(--petal-soft); }
.particle.autumn svg { fill: var(--copper); }

/* Hero entrance sequence */
.hero-in { animation: rise .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 110ms + 80ms); }

/* ---------- Story ---------- */
.story-body { font-size: var(--fs-500); }
.story-body p { margin-bottom: var(--space-3); }
.dropcap::first-letter {
  float: left; font-family: var(--font-display); font-weight: 700; color: var(--accent);
  font-size: 4.2em; line-height: .78; padding: .08em .1em 0 0;
}

/* Self-drawing heart divider (signature motif) */
.heart-divider { width: min(320px, 80%); margin: var(--space-5) auto 0; overflow: visible; }
.heart-divider .draw {
  fill: none; stroke: var(--deco); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
}
.heart-divider .heart-path { stroke: var(--accent); stroke-width: 2; }
.heart-divider.is-visible .draw { transition: stroke-dashoffset 1.8s var(--ease); stroke-dashoffset: 0; }
.heart-divider.is-visible .heart-path { transition-delay: .5s; transition-duration: 2.2s; }

/* ---------- Cards ---------- */
.inside { background: var(--bg-alt); }
.card-grid { display: grid; gap: clamp(1rem, .6rem + 1.5vw, 1.75rem); }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: .6rem; }
.card p { color: var(--text-muted); margin: 0; }
.card-icon {
  display: grid; place-items: center; width: 76px; height: 76px; margin-bottom: var(--space-3);
  border-radius: var(--radius-organic); background: color-mix(in srgb, var(--petal-soft) 18%, transparent); color: var(--accent);
  transition: border-radius .8s var(--ease), transform .45s var(--ease);
}
.card-icon svg { width: 42px; height: 42px; }
.card:hover .card-icon { border-radius: 58% 42% 55% 45% / 45% 55% 45% 55%; transform: rotate(-6deg); }
.card-icon.sm { width: 60px; height: 60px; background: color-mix(in srgb, var(--stem) 14%, transparent); color: var(--stem); }
:root[data-theme="dark"] .card-icon.sm { color: #A9BB9B; }
.card-icon.sm svg { width: 30px; height: 30px; fill: currentColor; }
.card-icon.sm svg[viewBox] { fill: none; }
.mini-card h3 { font-size: 1.45rem; }

/* ---------- Gallery (masonry via columns) ---------- */
.gallery-section { overflow: hidden; }
.gallery { columns: 2; column-gap: clamp(.6rem, .4rem + 1vw, 1.2rem); }
.gallery li { break-inside: avoid; margin-bottom: clamp(.6rem, .4rem + 1vw, 1.2rem); }
.gallery-item {
  display: block; width: 100%; padding: 0; border: 0; background: var(--mist-300);
  border-radius: var(--radius); overflow: hidden; position: relative;
}
.gallery-item img { width: 100%; transition: transform .8s var(--ease); }
.gallery-item::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(58, 51, 46, .35));
  opacity: 0; transition: opacity .45s;
}
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.06); }
.gallery-item:hover::after { opacity: 1; }

/* Lightbox */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(24, 21, 19, .94); color: #fff;
}
.lightbox[open] { display: grid; place-items: center; animation: fade .3s var(--ease); }
.lightbox::backdrop { background: transparent; }
.lightbox figure { margin: 0; padding: 4rem 1rem 3rem; display: grid; justify-items: center; gap: 1rem; max-width: 100%; touch-action: pan-y; }
.lightbox img { max-width: min(92vw, 1000px); max-height: 76vh; width: auto; height: auto; border-radius: var(--radius-sm); transition: opacity .25s; }
.lightbox figcaption { font-family: var(--font-display); font-style: italic; font-size: 1.2rem; text-align: center; max-width: 40ch; }
.lb-btn {
  position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); color: #fff;
  transition: background-color .25s;
}
.lb-btn:hover { background: rgba(255,255,255,.2); }
.lb-btn svg { width: 22px; height: 22px; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-prev svg { transform: scaleX(-1); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lb-close { right: 1rem; top: 1rem; }
.lb-count { position: absolute; left: 1rem; top: 1.4rem; margin: 0; font-size: .9rem; opacity: .8; }

/* ---------- Stats ---------- */
.stats { position: relative; overflow: hidden; padding-block: clamp(3.5rem, 2.5rem + 4vw, 6rem); background: var(--stem); color: #F4F1EC; }
:root[data-theme="dark"] .stats { background: #2F3729; }
.stats-bg {
  position: absolute; inset: -30% 0; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 32 32'%3E%3Cpath fill='%23F4F1EC' d='M16 28.5S3.2 20.9 2.3 12.6C1.7 7.4 5.1 3.6 9.4 3.6c2.9 0 5 1.5 6.6 3.9 1.6-2.4 3.7-3.9 6.6-3.9 4.3 0 7.7 3.8 7.1 9C28.8 20.9 16 28.5 16 28.5z' transform='translate(8 8) scale(.5) rotate(-12 16 16)'/%3E%3C/svg%3E");
  background-size: 120px;
}
.stats-grid { position: relative; display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; text-align: center; }
.stat-num { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(2.8rem, 2rem + 3vw, 4.5rem); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.stat-label { display: block; margin-top: .5rem; font-size: .95rem; opacity: .92; max-width: 18ch; margin-inline: auto; }

/* ---------- Reviews carousel ---------- */
.carousel { position: relative; }
.carousel-viewport { overflow: hidden; border-radius: var(--radius-lg); }
.carousel-track { display: flex; transition: transform .7s var(--ease); }
.slide { flex: 0 0 100%; padding: .25rem; }
.review {
  position: relative; text-align: center; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: clamp(2.5rem, 2rem + 2vw, 3.5rem) clamp(1.25rem, 1rem + 3vw, 3.5rem);
}
.review::before {
  content: "“"; position: absolute; top: -.15em; left: 50%; transform: translateX(-50%);
  font-family: var(--font-display); font-size: 7rem; line-height: 1; color: var(--petal-soft); opacity: .5;
}
.review p { position: relative; font-family: var(--font-display); font-style: italic; font-size: var(--fs-600); line-height: 1.4; color: var(--text); }
.review footer { font-weight: 700; color: var(--link); font-size: .95rem; }
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.5rem; }
.carousel-controls .flip { transform: scaleX(-1); }
.carousel-dots { display: flex; gap: .2rem; }
.carousel-dots button {
  width: 32px; height: 32px; padding: 0; border: 0; background: transparent; display: grid; place-items: center;
}
.carousel-dots button::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--mist-300); border: 1.5px solid var(--copper);
  transition: transform .3s var(--ease), background-color .3s;
}
.carousel-dots button[aria-current="true"]::before { background: var(--accent); border-color: var(--accent); transform: scale(1.25); }
.review-cta { margin-top: var(--space-4); }

/* ---------- Poem spotlight ---------- */
.spotlight { position: relative; overflow: hidden; padding-block: var(--section-pad); background: var(--bg-alt); text-align: center; }
.spotlight-bg {
  position: absolute; inset: -25% -5%; pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(215, 116, 118, .18), transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(79, 94, 69, .16), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .25 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.spotlight .container { position: relative; }
.poem p {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: clamp(1.45rem, 1.1rem + 1.6vw, 2.35rem); line-height: 1.55; color: var(--text);
}
.poem strong { font-weight: 600; color: var(--heading); }
.poem footer { margin-top: var(--space-3); font-size: var(--fs-300); letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.poem cite { font-style: normal; }

/* ---------- Look Inside flip-book ---------- */
/* Pages come from the print PDF: 405 × 630 pt each, so a two-page spread is 810 × 630. */
.flipbook { --book-w: min(100%, 760px); }
.book-pages {
  position: relative; width: var(--book-w); margin-inline: auto; aspect-ratio: 810 / 630;
  perspective: 2200px; transition: transform .8s var(--ease); cursor: pointer;
}
.flipbook[data-state="cover"] .book-pages { transform: translateX(-25%); }
.flipbook[data-state="end"] .book-pages { transform: translateX(25%); }
.leaf {
  position: absolute; top: 0; left: 50%; width: 50%; height: 100%;
  transform-origin: left center; transform-style: preserve-3d;
  transition: transform 1s var(--ease);
}
.leaf.is-flipped { transform: rotateY(-180deg); }
.page {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: #FFFFFF; color: #3A332E; overflow: hidden;
  display: grid; place-content: center; text-align: center; padding: clamp(.6rem, .3rem + 2vw, 2.25rem);
  box-shadow: inset 0 0 0 1px rgba(58, 51, 46, .08);
}
.page.front { border-radius: 2px 8px 8px 2px; }
.page.back { transform: rotateY(180deg); border-radius: 8px 2px 2px 8px; }
/* soft shading along the spine, drawn over the page image */
.page::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.page.front::after { background: linear-gradient(90deg, rgba(58,51,46,.18), rgba(58,51,46,.04) 5%, transparent 10%); }
.page.back::after { background: linear-gradient(270deg, rgba(58,51,46,.18), rgba(58,51,46,.04) 5%, transparent 10%); }
.page-img, .page-cover { display: block; padding: 0; }
.page-img picture, .page-cover picture { width: 100%; height: 100%; }
.page-img img { width: 100%; height: 100%; object-fit: cover; }
/* The cover is slightly narrower than an interior page: show all of it (like a hardcover) on page paper */
.page-cover { background: #EDE8E1; }
.page-cover img { width: 100%; height: 100%; object-fit: contain; }
.page-end { background: #FBF8F3; }
.page-end p { font-family: var(--font-display); font-style: italic; font-size: clamp(.9rem, .6rem + 1.2vw, 1.5rem); color: #3A332E; }
.page-end .btn { justify-self: center; }
.flipbook[data-state="cover"] .book-pages::after { left: 52%; }
.flipbook[data-state="end"] .book-pages::after { right: 52%; }
.book-pages::after {
  content: ""; position: absolute; left: 5%; right: 5%; bottom: -18px; height: 24px; z-index: -1;
  background: radial-gradient(ellipse, rgba(58, 51, 46, .3), transparent 70%);
}
.flip-controls { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-top: 2rem; }
.flip-status { min-width: 12ch; text-align: center; font-weight: 600; color: var(--text-muted); font-size: .95rem; }
.flip-controls .btn[disabled] { opacity: .4; pointer-events: none; }
.flip-zoom-row { text-align: center; margin: 1rem 0 0; }
.flip-zoom { background: none; border: 0; padding: .5rem .75rem; font: inherit; font-weight: 700; }

/* ---------- Author ---------- */
.author { background: var(--bg-alt); }
.author-grid { display: grid; gap: clamp(2.5rem, 2rem + 3vw, 5rem); align-items: center; }
.author-photo { position: relative; max-width: 440px; margin-inline: auto; width: 100%; }
.photo-frame {
  border-radius: 48% 52% 46% 54% / 38% 40% 60% 62%; overflow: hidden; box-shadow: var(--shadow-lg);
  border: 8px solid var(--surface);
}
.photo-leaf { position: absolute; width: 90px; height: 90px; right: 0; bottom: 6%; fill: var(--stem); opacity: .85; transform: rotate(18deg); }
.author-role { font-weight: 700; color: var(--link); letter-spacing: .03em; }
.author-copy .btn-row { margin-top: var(--space-4); }

/* ---------- Watch / video ---------- */
.video-grid { display: grid; gap: clamp(1.25rem, 1rem + 1.5vw, 2rem); }
.video-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.video-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.video-embed { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; background: #1d1a18; overflow: hidden; }
.video-embed img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.video-embed:hover img { transform: scale(1.05); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play {
  position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.35);
  transition: transform .35s var(--ease);
}
.play svg { width: 30px; height: 30px; fill: currentColor; margin-left: 4px; }
.video-embed:hover .play { transform: scale(1.1); }
.video-meta { padding: 1.25rem 1.5rem 1.5rem; }
.video-meta h3 { font-size: 1.45rem; margin: 0; }

/* ---------- Gift banner ---------- */
.gift { padding-block: 0 var(--section-pad); }
.watch + .gift { margin-top: calc(var(--section-pad) * -0.4); }
.gift-card {
  position: relative; overflow: hidden; display: grid; gap: 1.5rem; align-items: center;
  padding: clamp(2rem, 1.5rem + 3vw, 3.5rem); border-radius: var(--radius-lg);
  background: linear-gradient(120deg, var(--petal) 0%, #8E2F33 100%); color: #FFF7F2;
}
.gift-card h2 { color: #fff; font-size: clamp(1.9rem, 1.5rem + 1.8vw, 2.8rem); margin-bottom: .5rem; }
.gift-card p { margin: 0; opacity: .95; }
.gift-heart { position: absolute; right: -40px; top: -50px; width: 260px; height: 260px; fill: #fff; opacity: .08; transform: rotate(14deg); }
.gift-card .btn { justify-self: start; }

/* ---------- Newsletter ---------- */
.newsletter-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: clamp(2rem, 1.5rem + 3vw, 3.5rem) clamp(1.25rem, 1rem + 3vw, 3.5rem); box-shadow: var(--shadow-sm);
}
.newsletter-card .section-head { margin-bottom: 2rem; }
.signup-form { display: grid; gap: 1rem; max-width: 560px; margin-inline: auto; }
.field label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: .35rem; }
.field input {
  width: 100%; min-height: 50px; padding: .7rem 1rem; border-radius: var(--radius-sm);
  border: 1.5px solid color-mix(in srgb, var(--text) 30%, transparent); background: var(--bg); color: var(--text); font: inherit;
  transition: border-color .25s, box-shadow .25s;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.field input[aria-invalid="true"] { border-color: var(--accent); }
.field-error { min-height: 1.2em; margin: .3rem 0 0; font-size: .86rem; font-weight: 600; color: var(--accent); }
:root[data-theme="dark"] .field-error { color: var(--eyebrow); }
.signup-form .btn { justify-self: start; }
.form-status { margin: 0; font-weight: 600; color: var(--stem); }
:root[data-theme="dark"] .form-status { color: #A9BB9B; }
.form-status.is-error { color: var(--accent); }
.hp { position: absolute; left: -9999px; }

/* Share */
.share { display: flex; flex-direction: column; align-items: center; gap: .75rem; margin-top: var(--space-5); }
.share-label { margin: 0; font-weight: 700; color: var(--text-muted); }
.share-buttons { display: flex; gap: .6rem; }
.share-btn {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--link);
  transition: transform .3s var(--ease), background-color .3s, color .3s;
}
.share-btn svg { width: 20px; height: 20px; fill: currentColor; }
.share-btn[data-share="copy"] svg { fill: none; }
.share-btn:hover { transform: translateY(-3px); background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { background: #2B2622; color: #E9E3DB; padding-top: clamp(3.5rem, 2.5rem + 3vw, 5rem); }
:root[data-theme="dark"] .site-footer { background: #1A1715; }
.site-footer .wordmark-text { color: #E7BB94; }
.site-footer a { color: #E9E3DB; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-grid { position: relative; display: grid; gap: 2.5rem; padding-bottom: 3rem; }
.footer-brand p { margin-top: 1rem; font-family: var(--font-display); font-style: italic; font-size: 1.25rem; max-width: 26ch; color: #D8CFC4; }
.footer-title { font-family: var(--font-body); font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #EE9497; margin-bottom: 1rem; }
.footer-col li { margin-bottom: .55rem; }
.footer-col a { display: inline-flex; align-items: center; gap: .45rem; }
.inline-icon { width: 18px; height: 18px; fill: currentColor; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
  padding-block: 1.5rem; border-top: 1px solid rgba(233, 227, 219, .14); font-size: .88rem; color: #C9BFB4;
}
.footer-bottom p { margin: 0; }

/* ---------- Easter-egg hearts ---------- */
.hidden-heart {
  position: absolute; left: var(--x); top: var(--y); z-index: 3;
  width: 30px; height: 30px; padding: 6px; border: 0; background: none; color: var(--petal-soft);
  opacity: .4; transition: opacity .3s, transform .4s var(--ease);
}
.hidden-heart.in-flow { position: relative; left: auto; top: auto; margin-top: .5rem; color: #8F6A5A; }
.hidden-heart svg { width: 100%; height: 100%; fill: currentColor; }
.hidden-heart:hover, .hidden-heart:focus-visible { opacity: 1; transform: scale(1.35); }
.hidden-heart.is-found { opacity: 1; color: var(--accent); animation: pop .6s var(--ease); pointer-events: none; }

.toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 120; max-width: calc(100vw - 2rem);
  padding: .85rem 1.3rem; border-radius: 999px; background: var(--soil); color: #F4F1EC;
  font-weight: 600; box-shadow: var(--shadow-lg); text-align: center;
  opacity: 0; transform: translate(-50%, 20px); pointer-events: none; transition: opacity .35s var(--ease), transform .35s var(--ease);
}
:root[data-theme="dark"] .toast { background: #F4F1EC; color: #24201D; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Back to top (heart) ---------- */
.to-top {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 60; width: 54px; height: 54px;
  display: grid; place-items: center; color: #fff;
  opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
  filter: drop-shadow(0 6px 12px rgba(58, 51, 46, .3));
}
.to-top > svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--accent); transition: transform .35s var(--ease); }
.to-top-arrow { position: relative; width: 22px; height: 22px; margin-top: -4px; }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover > svg:first-child { transform: scale(1.1); }

/* ---------- Cookie consent ---------- */
.consent {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 110; max-width: 520px;
  padding: 1.25rem 1.5rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.consent p { font-size: .94rem; }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .heart-divider.reveal { transform: none; }

/* ---------- Keyframes ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(14px, -18px) rotate(12deg); }
  66% { transform: translate(-10px, 10px) rotate(-8deg); }
}
@keyframes fall { from { transform: translate3d(0, 0, 0) rotate(0deg); } to { transform: translate3d(var(--drift, 30px), var(--fall, 110vh), 0) rotate(var(--spin, 240deg)); } }
@keyframes sway { from { transform: translateX(-8px); } to { transform: translateX(8px); } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.8); } 100% { transform: scale(1.2); } }

/* ==========================================================================
   Breakpoints (mobile-first): 480 / 768 / 1024 / 1280
   ========================================================================== */
@media (min-width: 480px) {
  .header-cta { display: inline-flex; }
  .card-grid.four { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .card-grid.three { grid-template-columns: repeat(3, 1fr); }
  .gallery { columns: 3; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .author-grid { grid-template-columns: .85fr 1.15fr; }
  .story-grid { grid-template-columns: auto 1fr; }
  .book-3d { width: 300px; }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .gift-card { grid-template-columns: 1fr auto; }
  .gift-card .btn { justify-self: end; }
  .signup-form { grid-template-columns: 1fr 1fr; align-items: start; }
  .signup-form .btn, .signup-form .form-status { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .to-top { right: 1.5rem; bottom: 1.5rem; }
}

@media (min-width: 1024px) {
  .main-nav { display: block; }
  .deco-1 { display: block; }
  .menu-toggle { display: none; }
  .hero { min-height: calc(100vh - var(--header-h)); display: grid; align-items: center; }
  .br-md { display: inline; }
  .book-3d { width: 340px; }
  .card-grid.four { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1280px) {
  .gallery { columns: 4; }
}

/* ==========================================================================
   Reduced motion: keep simple fades only
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .hero-particles, .float-deco { display: none; }
  .book-tilt { animation: none; }
  .book-3d { transition: none; }
  .js .reveal { transform: none; transition: opacity .6s linear; }
  .hero-in { animation: none; }
  .carousel-track, .leaf, .book-pages { transition-duration: .01ms; }
  .card:hover, .video-card:hover, .btn:hover { transform: none; }
}

@media print {
  .site-header, .hero-bg, .to-top, .toast, .consent, .hidden-heart, .share, .newsletter, .flip-controls { display: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
