/* Samoa Headline — warm bookstore, editorial */

:root {
  --ink: #1c1410;
  --paper: #f7f0e4;
  --paper-dim: #e8dcc8;
  --page-bg: var(--paper);
  --footer-surface: #1c1410;
  --wood: #2c1f16;
  --wood-light: #3d2a1f;
  --accent: #b8860b;
  --accent-soft: #d4a84b;
  --sage: #5c6b5a;
  --cream: #fff9f0;
  --shadow: rgba(12, 8, 6, 0.45);
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  /* Fixed `.site-nav` clears section titles when using in-page scroll / ArrowDown */
  scroll-padding-top: 4.1rem;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--page-bg);
  overflow-x: hidden;
}

/* Ambient vignette + paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  background:
    radial-gradient(ellipse 85% 65% at 50% 0%, transparent 40%, rgba(28, 20, 16, 0.07) 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 1;
}

a {
  color: var(--wood-light);
  text-decoration-color: var(--accent-soft);
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
}

/* ——— Nav ——— */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 4vw;
  background: linear-gradient(to bottom, rgba(247, 240, 228, 0.92), rgba(247, 240, 228, 0.75) 70%, transparent);
  backdrop-filter: blur(8px);
  transition: padding 0.35s var(--ease-out), box-shadow 0.35s ease;
}

.site-nav.is-scrolled {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  box-shadow: 0 1px 0 rgba(44, 31, 22, 0.08);
}

.site-nav__logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.site-nav__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.site-nav__logo {
  height: 44px;
  width: auto;
  display: block;
  transition: transform 0.4s var(--ease-out);
}

.site-nav__brand:hover .site-nav__logo {
  transform: scale(1.03);
}

.site-nav__brand:hover .site-nav__wordmark {
  color: var(--accent);
}

.site-nav__wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--wood);
}

.site-nav__links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--wood);
  opacity: 0.85;
}

.site-nav__links a:hover {
  opacity: 1;
  color: var(--accent);
}

@media (max-width: 640px) {
  .site-nav__wordmark {
    display: none;
  }
  .site-nav__links {
    gap: 1rem;
  }
}

.theme-btn {
  flex-shrink: 0;
  border: 1px solid rgba(44, 31, 22, 0.18);
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  color: var(--wood);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color 0.2s var(--ease-out),
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.theme-btn svg {
  display: block;
  flex-shrink: 0;
}

html.dark .theme-btn {
  border-color: rgba(232, 224, 212, 0.22);
  background: color-mix(in srgb, var(--cream) 55%, var(--page-bg));
  color: var(--ink);
}

.theme-btn:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, rgba(44, 31, 22, 0.25));
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 14%, transparent);
}

html.dark .theme-btn:hover {
  border-color: color-mix(in srgb, var(--accent-soft) 55%, rgba(232, 224, 212, 0.2));
}

/* ——— Dark mode (toggle in header; tokens + key surfaces) ——— */
html.dark {
  color-scheme: dark;
  --ink: #e8e2da;
  --paper: #f4ede6;
  --paper-dim: #2a2620;
  --page-bg: #141210;
  --footer-surface: #0a0908;
  --wood: #261f1a;
  --wood-light: #3a3028;
  --accent: #d4a84b;
  --accent-soft: #e6bc5c;
  --sage: #9cab9a;
  --cream: #1c1916;
  --shadow: rgba(0, 0, 0, 0.55);
}

html.dark body::before {
  background:
    radial-gradient(ellipse 85% 65% at 50% 0%, transparent 40%, rgba(0, 0, 0, 0.35) 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.55;
}

html.dark .site-nav {
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--cream) 88%, transparent),
    color-mix(in srgb, var(--page-bg) 92%, transparent) 72%,
    transparent
  );
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

html.dark .site-nav.is-scrolled {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}

html.dark .site-nav__wordmark,
html.dark .site-nav__links a {
  color: rgba(242, 235, 227, 0.9);
}

html.dark .site-nav__links a {
  opacity: 0.88;
}

html.dark .site-nav__brand:hover .site-nav__wordmark {
  color: var(--accent-soft);
}

html.dark .hero__glow {
  background-image:
    linear-gradient(
      165deg,
      color-mix(in srgb, var(--page-bg) 82%, transparent) 0%,
      color-mix(in srgb, var(--cream) 55%, var(--page-bg)) 38%,
      color-mix(in srgb, var(--page-bg) 88%, transparent) 100%
    ),
    radial-gradient(ellipse 120% 80% at 50% 18%, rgba(212, 168, 75, 0.1), transparent 55%),
    radial-gradient(ellipse 90% 60% at 82% 58%, rgba(0, 0, 0, 0.18), transparent 50%),
    radial-gradient(ellipse 70% 50% at 14% 72%, rgba(0, 0, 0, 0.12), transparent 45%),
    url("../assets/ai/hero-bookstore.jpg"),
    url("../assets/reading-nook-atmosphere.png");
}

/* Hero type sits on photos + dark wash: must not use --wood (shelf brown is nearly black here). */
html.dark .hero__tagline {
  color: #f7f2ec;
  text-shadow:
    0 0 1.35rem rgba(8, 6, 5, 0.88),
    0 2px 14px rgba(8, 6, 5, 0.55),
    0 1px 0 rgba(0, 0, 0, 0.35);
}

html.dark .hero__lede {
  color: rgba(236, 230, 222, 0.94);
  text-shadow:
    0 0 1rem rgba(8, 6, 5, 0.78),
    0 1px 10px rgba(8, 6, 5, 0.45);
}

html.dark .hero__ribbon__note {
  color: rgba(236, 230, 222, 0.78);
}

html.dark .hero__ribbon__note a {
  color: rgba(248, 242, 234, 0.95);
  border-bottom-color: rgba(230, 188, 92, 0.45);
}

html.dark .hero__ribbon__note a:hover {
  color: var(--accent-soft);
  border-bottom-color: var(--accent-soft);
}

html.dark .hero__peek {
  background: color-mix(in srgb, var(--cream) 72%, transparent);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

html.dark .hero__peek:hover {
  background: color-mix(in srgb, var(--cream) 82%, transparent);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
}

html.dark .hero__peek-kicker {
  color: rgba(232, 226, 218, 0.82);
}

html.dark .hero__peek-amazon__label {
  color: rgba(228, 222, 214, 0.78);
}

html.dark .hero__peek-cta {
  color: #f7f2ec;
  text-shadow:
    0 0 1rem rgba(8, 6, 5, 0.82),
    0 1px 12px rgba(8, 6, 5, 0.5);
}

html.dark .nora-spotlight--hero .nora-spotlight__title,
html.dark .nora-spotlight--hero .nora-spotlight__title em {
  color: #f7f2ec;
  text-shadow:
    0 0 1.25rem rgba(8, 6, 5, 0.85),
    0 2px 14px rgba(8, 6, 5, 0.5);
}

html.dark .section--about .section__intro,
html.dark .section__intro {
  color: rgba(232, 224, 212, 0.78);
}

html.dark .about-panel p {
  color: rgba(232, 224, 212, 0.82);
}

html.dark .section--gallery::before {
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--page-bg) 88%, transparent) 0%,
      color-mix(in srgb, var(--page-bg) 55%, transparent) 22%,
      color-mix(in srgb, var(--page-bg) 18%, transparent) 48%,
      transparent 68%
    ),
    url("../assets/ai/gallery-atmosphere.jpg") center / cover no-repeat,
    url("../assets/reading-nook-atmosphere.png") center / cover no-repeat;
}

html.dark .section--kdp {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--cream) 55%, var(--page-bg)) 0%,
    var(--page-bg) 35%,
    color-mix(in srgb, var(--paper-dim) 65%, var(--page-bg)) 100%
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html.dark .nora-spotlight:not(.nora-spotlight--hero) {
  background: linear-gradient(
    168deg,
    color-mix(in srgb, var(--cream) 92%, var(--page-bg)) 0%,
    color-mix(in srgb, var(--paper-dim) 40%, var(--page-bg)) 45%,
    color-mix(in srgb, var(--page-bg) 95%, #000) 100%
  );
  border-top-color: rgba(255, 255, 255, 0.08);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

html.dark .hero__peek-arrow {
  border-top-color: rgba(232, 224, 212, 0.42);
}

html.dark .hero__peek-arrow:nth-child(2) {
  border-top-color: rgba(232, 224, 212, 0.32);
}

html.dark .hero__peek-arrow:nth-child(3) {
  border-top-color: rgba(232, 224, 212, 0.22);
}

html.dark .nora-spotlight--hero .nora-spotlight__eyebrow {
  color: rgba(242, 235, 227, 0.78);
}

html.dark .nora-spotlight--hero .nora-spotlight__lede {
  color: rgba(242, 235, 227, 0.88);
}

html.dark .nora-spotlight--hero .nora-spotlight__promo-arrow {
  color: rgba(242, 235, 227, 0.78);
  text-shadow:
    0 0 0.5rem color-mix(in srgb, var(--page-bg) 65%, transparent),
    0 1px 0 color-mix(in srgb, var(--page-bg) 75%, transparent);
}

html.dark .nora-spotlight--hero .nora-spotlight__promo-inner {
  background: color-mix(in srgb, var(--cream) 75%, transparent);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--ink);
}

html.dark .nora-spotlight--hero .nora-spotlight__promo-cta {
  color: var(--ink);
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.25rem, 3.5vh, 2.25rem);
  padding: 6rem 4vw clamp(6rem, 14svh, 10rem);
  text-align: center;
  box-sizing: border-box;
}

.hero__glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* AI plate (``scripts/generate_samoa_headline_site_art.py``) under warm washes for legible type */
  background-image:
    linear-gradient(
      165deg,
      rgba(255, 249, 240, 0.88) 0%,
      rgba(247, 240, 228, 0.78) 38%,
      rgba(232, 220, 200, 0.9) 100%
    ),
    radial-gradient(ellipse 120% 80% at 50% 18%, rgba(212, 168, 75, 0.16), transparent 55%),
    radial-gradient(ellipse 90% 60% at 82% 58%, rgba(139, 90, 60, 0.1), transparent 50%),
    radial-gradient(ellipse 70% 50% at 14% 72%, rgba(92, 107, 90, 0.06), transparent 45%),
    url("../assets/ai/hero-bookstore.jpg"),
    url("../assets/reading-nook-atmosphere.png");
  background-size: auto, auto, auto, auto, cover, cover;
  background-position: center, center, center, center, center 38%, center;
  background-repeat: no-repeat;
}

.hero__lamp {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: min(90vw, 520px);
  height: 70vh;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 55% 35% at 50% 100%,
    rgba(255, 230, 180, 0.35) 0%,
    rgba(255, 220, 160, 0.12) 35%,
    transparent 70%
  );
  opacity: 0.85;
  mix-blend-mode: multiply;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero__logo-main {
  width: min(360px, 70vw);
  height: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 12px 28px var(--shadow));
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-weight: 500;
  font-style: italic;
  color: var(--wood);
  line-height: 1.35;
  margin: 0 0 1rem;
  opacity: 1;
  transform: translateY(0);
  text-shadow:
    0 0 1.25rem rgba(255, 249, 240, 0.95),
    0 1px 2px rgba(255, 249, 240, 0.9);
}

.hero__lede {
  font-size: 1.1rem;
  max-width: 34em;
  margin: 0 auto;
  color: var(--sage);
  opacity: 1;
  transform: translateY(0);
  text-shadow:
    0 0 1rem rgba(255, 249, 240, 0.88),
    0 1px 1px rgba(255, 249, 240, 0.75);
}

.hero__layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1rem, 2.5vh, 1.75rem);
  width: 100%;
  position: relative;
  z-index: 2;
}

.hero__primary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.85rem, 2vh, 1.35rem);
  width: 100%;
  max-width: min(56rem, 100%);
}

/* Hero: interior preview strip (Nora plates → gallery) */
.hero__ribbon {
  position: relative;
  z-index: 3;
  width: min(56rem, 100%);
  margin: 0;
  padding: 0 0.5rem;
  opacity: 1;
  transform: translateY(0);
}

.hero__ribbon__list {
  position: relative;
  z-index: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(0.55rem, 2vw, 1rem);
  list-style: none;
  margin: 0;
  padding: 0 0 0.65rem;
}

/* Ground shadow under the row of covers (shelf / contact shadow) */
.hero__ribbon__list::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 0;
  width: min(44rem, 90%);
  height: 1.1rem;
  transform: translateX(-50%) scaleY(0.55);
  transform-origin: center top;
  pointer-events: none;
  background: radial-gradient(
    ellipse 50% 100% at 50% 0%,
    rgba(28, 20, 16, 0.32) 0%,
    rgba(28, 20, 16, 0.12) 48%,
    transparent 72%
  );
  filter: blur(1.5px);
}

.hero__ribbon__list > li {
  position: relative;
  z-index: 1;
}

.hero__ribbon__plate {
  --hero-plate-tilt: 0deg;
  display: block;
  width: clamp(4.02rem, 13.2vw, 6.42rem);
  padding: 0.32rem 0.32rem 0.42rem;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(165deg, #fffef9 0%, #f2ebe0 100%);
  border: 1px solid rgba(44, 31, 22, 0.1);
  border-radius: 3px;
  box-shadow:
    0 12px 26px rgba(28, 20, 16, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.85) inset;
  transform: rotate(var(--hero-plate-tilt)) translateY(0);
  transition:
    transform 0.35s var(--ease-out),
    box-shadow 0.3s ease,
    background 0.25s ease;
}

.hero__ribbon__list li:nth-child(5n + 1) .hero__ribbon__plate {
  --hero-plate-tilt: -2.5deg;
}

.hero__ribbon__list li:nth-child(5n + 2) .hero__ribbon__plate {
  --hero-plate-tilt: 1.5deg;
}

.hero__ribbon__list li:nth-child(5n + 3) .hero__ribbon__plate {
  --hero-plate-tilt: -1deg;
}

.hero__ribbon__list li:nth-child(5n + 4) .hero__ribbon__plate {
  --hero-plate-tilt: 2deg;
}

.hero__ribbon__list li:nth-child(5n) .hero__ribbon__plate {
  --hero-plate-tilt: -1.25deg;
}

.hero__ribbon__plate:hover {
  transform: rotate(var(--hero-plate-tilt)) translateY(-4px);
  box-shadow:
    0 18px 34px rgba(28, 20, 16, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.92) inset;
  background: linear-gradient(165deg, #fffefb 0%, #f6efe4 100%);
}

.hero__ribbon__plate:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.hero__ribbon__plate img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  object-position: center top;
  border-radius: 1px;
}

.hero__ribbon__note {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(44, 31, 22, 0.55);
}

.hero__ribbon__note-sep {
  margin: 0 0.35rem;
  opacity: 0.65;
}

.hero__ribbon__note a {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  text-decoration: none;
  color: var(--wood-light);
  border-bottom: 1px solid rgba(184, 134, 11, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.hero__ribbon__note a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent-soft);
}

/* Wraps both peek CTAs; narrow screens keep them in-flow on the start edge. */
.hero__peek-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(0.65rem, 2vh, 1rem);
  align-self: flex-start;
  width: 100%;
  max-width: min(72rem, 100%);
  margin-top: clamp(1rem, 2.5vh, 1.75rem);
}

/* Hero corner: shelf peek → scroll to catalog */
.hero__peek {
  position: relative;
  z-index: 4;
  align-self: flex-start;
  margin-top: 0;
  margin-right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  max-width: min(17rem, 92vw);
  padding: 0.65rem 1rem 0.55rem;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  background: rgba(255, 249, 240, 0.42);
  border: 1px solid rgba(44, 31, 22, 0.1);
  box-shadow: 0 12px 32px rgba(28, 20, 16, 0.12);
  backdrop-filter: blur(10px);
  transition:
    transform 0.35s var(--ease-out),
    box-shadow 0.35s ease,
    background 0.25s ease;
}

.hero__peek:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(28, 20, 16, 0.16);
  background: rgba(255, 249, 240, 0.58);
}

.hero__peek:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.hero__peek-fan {
  position: relative;
  width: 11.5rem;
  height: 5.5rem;
  margin-bottom: 0.15rem;
}

.hero__peek-cover {
  position: absolute;
  bottom: 0;
  width: 4.75rem;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 3px;
  box-shadow:
    0 10px 22px rgba(12, 8, 6, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.35) inset;
  transition: transform 0.35s var(--ease-out);
}

.hero__peek-cover--nora {
  left: 0;
  transform: rotate(-10deg);
  z-index: 1;
}

.hero__peek-cover--clara {
  left: 50%;
  transform: translateX(-50%) rotate(0deg) translateY(-4px);
  z-index: 2;
  width: 5.1rem;
}

.hero__peek-cover--sunny {
  right: 0;
  transform: rotate(10deg);
  z-index: 1;
}

.hero__peek-cover--milo {
  right: 50%;
  transform: translateX(50%) rotate(0deg) translateY(-8px);
  z-index: 3;
  width: 5.35rem;
}

.hero__peek:hover .hero__peek-cover--nora {
  transform: rotate(-12deg) translateY(-2px);
}

.hero__peek:hover .hero__peek-cover--clara {
  transform: translateX(-50%) rotate(0deg) translateY(-7px);
}

.hero__peek:hover .hero__peek-cover--sunny {
  transform: rotate(12deg) translateY(-2px);
}

.hero__peek:hover .hero__peek-cover--milo {
  transform: translateX(50%) rotate(0deg) translateY(-11px);
}

.hero__peek-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  text-align: center;
}

.hero__peek-kicker {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(44, 31, 22, 0.55);
}

.hero__peek-amazon {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  margin: 0.1rem 0 0.05rem;
  padding: 0;
  line-height: 1.2;
}

.hero__peek-amazon__logo {
  display: block;
  width: auto;
  height: clamp(17px, 2.6vw, 22px);
  max-width: 100%;
  opacity: 0.95;
  padding: 0.16rem 0.38rem;
  border-radius: 999px;
  background: rgba(44, 31, 22, 0.68);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.hero__peek-amazon__label {
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(44, 31, 22, 0.5);
  white-space: nowrap;
}

.hero__peek-cta {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4.2vw, 2.05rem);
  font-weight: 600;
  font-style: italic;
  line-height: 1.15;
  color: var(--wood);
  text-shadow:
    0 0 0.75rem rgba(255, 249, 240, 0.9),
    0 1px 1px rgba(255, 249, 240, 0.85);
}

.hero__peek-arrows {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-top: 0.15rem;
}

.hero__peek-arrow {
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 10px solid rgba(44, 31, 22, 0.38);
}

.hero__peek-arrow:nth-child(2) {
  border-top-color: rgba(44, 31, 22, 0.28);
}

.hero__peek-arrow:nth-child(3) {
  border-top-color: rgba(44, 31, 22, 0.18);
}

@media (min-width: 720px) {
  /*
   * Fixed to the viewport left/bottom so peeks read as a true corner control (not flex-centered).
   * Visibility while scrolling is toggled in main.js via IntersectionObserver on .hero so they
   * do not sit over About / catalog / rest of the site.
   */
  .hero__peek-stack {
    position: fixed;
    left: 0.65rem;
    left: max(0.65rem, env(safe-area-inset-left));
    bottom: 1.1rem;
    bottom: max(1.1rem, env(safe-area-inset-bottom));
    right: auto;
    top: auto;
    z-index: 4;
    width: auto;
    max-width: min(18rem, calc(100% - 1.25rem));
    margin-top: 0;
    align-self: auto;
    flex-direction: column-reverse;
  }

  /* Set by main.js when .hero is off-screen (fixed peeks would otherwise cover the page). */
  .hero__peek-stack.hero__peek-stack--off-screen {
    visibility: hidden;
    pointer-events: none;
  }

  .hero__peek {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin-top: 0;
    align-self: stretch;
  }
}

@media (min-width: 900px) {
  .hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(15.5rem, 21rem);
    gap: clamp(1.25rem, 3.5vw, 2.75rem);
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: min(72rem, 100%);
    margin-left: auto;
    margin-right: auto;
  }

  .hero__primary {
    align-items: flex-start;
    text-align: left;
    max-width: none;
  }

  .hero__content {
    max-width: 38rem;
    margin-right: 0;
  }

  .hero__lede {
    margin-left: 0;
    margin-right: 0;
  }

  .hero__ribbon {
    width: 100%;
    max-width: 56rem;
    margin-left: 0;
    margin-right: 0;
  }

  .hero__ribbon__list {
    justify-content: flex-start;
  }

  .hero__ribbon__note {
    text-align: left;
  }

  .nora-spotlight--hero {
    max-width: none;
    margin: 0;
    padding: 0.35rem 0 0.5rem;
    justify-self: center;
    align-self: center;
  }

  .nora-spotlight--hero .nora-spotlight__inner {
    max-width: min(34rem, 100%);
    margin: 0;
  }

  .nora-spotlight--hero .nora-spotlight__cover {
    width: min(17.5rem, 100%);
  }
}

@media (min-width: 1100px) {
  .hero__peek-fan {
    width: 12.5rem;
    height: 6rem;
  }

  .hero__peek-cover {
    width: 5.25rem;
  }

  .hero__peek-cover--clara {
    width: 5.65rem;
  }

  .hero__peek-cover--milo {
    width: 5.95rem;
  }
}

/* ——— Nora spotlight (home) ——— */
.nora-spotlight {
  position: relative;
  padding: clamp(2.5rem, 6vw, 4.25rem) 4vw clamp(3rem, 7vw, 4.75rem);
  background:
    linear-gradient(
      168deg,
      rgba(255, 249, 240, 0.97) 0%,
      rgba(247, 236, 216, 0.88) 45%,
      rgba(232, 212, 188, 0.55) 100%
    );
  border-top: 1px solid rgba(44, 31, 22, 0.08);
  border-bottom: 1px solid rgba(44, 31, 22, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

/* Nora feature embedded in hero: sits on atmosphere art, cover slightly tilted */
.nora-spotlight--hero {
  z-index: 2;
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(0.85rem, 2.5vh, 1.65rem) 0 clamp(0.35rem, 1.2vh, 0.85rem);
  background: transparent;
  border: none;
  box-shadow: none;
}

.nora-spotlight--hero .nora-spotlight__eyebrow {
  color: rgba(44, 31, 22, 0.62);
  text-shadow: 0 0 0.55rem rgba(255, 249, 240, 0.92);
}

.nora-spotlight--hero .nora-spotlight__title {
  text-shadow:
    0 0 1.25rem rgba(255, 249, 240, 0.95),
    0 1px 2px rgba(255, 249, 240, 0.85);
}

.nora-spotlight--hero .nora-spotlight__lede {
  margin-bottom: 1.15rem;
  color: rgba(28, 20, 16, 0.84);
  text-shadow:
    0 0 0.85rem rgba(255, 249, 240, 0.88),
    0 1px 1px rgba(255, 249, 240, 0.75);
}

.nora-spotlight--hero .nora-spotlight__cover {
  width: min(20.125rem, 92vw);
}

.nora-spotlight--hero .nora-spotlight__book-wrap {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: clamp(0.45rem, 1.5vw, 0.75rem);
  box-shadow: none;
  border: none;
}

.nora-spotlight--hero .nora-spotlight__promo-cta-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(0.3rem, 1vw, 0.55rem);
}

.nora-spotlight--hero .nora-spotlight__cover-stack {
  position: relative;
  flex: 0 0 auto;
  border-radius: 6px;
  box-shadow:
    0 4px 6px rgba(12, 8, 6, 0.08),
    0 18px 38px rgba(12, 8, 6, 0.18),
    0 0 0 1px rgba(44, 31, 22, 0.06);
  transform: rotate(-2.85deg);
  transition:
    transform 0.45s var(--ease-out),
    box-shadow 0.35s ease;
}

.nora-spotlight--hero .nora-spotlight__book-wrap:hover .nora-spotlight__cover-stack,
.nora-spotlight--hero .nora-spotlight__book-wrap:focus-within .nora-spotlight__cover-stack {
  transform: rotate(-1.1deg);
  box-shadow:
    0 6px 10px rgba(12, 8, 6, 0.1),
    0 22px 44px rgba(12, 8, 6, 0.2),
    0 0 0 1px rgba(44, 31, 22, 0.07);
}

@keyframes nora-spotlight-promo-nudge {
  0%,
  100% {
    transform: translate(0, 0);
  }
  40% {
    transform: translate(4px, -3px);
  }
  70% {
    transform: translate(-2px, 2px);
  }
}

@keyframes nora-spotlight-promo-arrow {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.26rem);
  }
}

/* Hero Nora: ↑ beside the pill, pointing up toward the cover; motion nudges toward the book. */
.nora-spotlight--hero .nora-spotlight__promo-arrow {
  flex: 0 0 auto;
  align-self: center;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 600;
  line-height: 1;
  color: rgba(44, 31, 22, 0.55);
  text-shadow:
    0 0 0.65rem rgba(255, 249, 240, 0.9),
    0 1px 0 rgba(255, 249, 240, 0.85);
  display: inline-block;
  animation: nora-spotlight-promo-arrow 1.35s ease-in-out infinite;
}

.nora-spotlight--hero .nora-spotlight__promo-cta {
  position: relative;
  z-index: 4;
  flex: 0 1 auto;
  align-self: center;
  display: block;
  text-decoration: none;
  color: var(--wood);
  line-height: 1;
}

.nora-spotlight--hero .nora-spotlight__promo-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.38rem 0.75rem 0.4rem;
  font-size: clamp(0.62rem, 1.35vw, 0.72rem);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: rgba(255, 249, 240, 0.94);
  border: 1px solid rgba(44, 31, 22, 0.14);
  border-radius: 999px;
  box-shadow: 0 5px 16px rgba(12, 8, 6, 0.14);
  animation: nora-spotlight-promo-nudge 2.6s ease-in-out infinite;
}

.nora-spotlight--hero .nora-spotlight__promo-cta:hover .nora-spotlight__promo-inner,
.nora-spotlight--hero .nora-spotlight__promo-cta:focus-visible .nora-spotlight__promo-inner {
  background: #fffefb;
  border-color: rgba(184, 134, 11, 0.45);
  color: var(--wood-light);
}

.nora-spotlight--hero .nora-spotlight__promo-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 999px;
}

@media (max-width: 719px) {
  .nora-spotlight--hero .nora-spotlight__book-wrap {
    gap: 0.45rem 0.55rem;
  }

  .nora-spotlight--hero .nora-spotlight__promo-cta-row {
    gap: 0.35rem 0.45rem;
  }

  .nora-spotlight--hero .nora-spotlight__promo-inner {
    padding: 0.32rem 0.62rem 0.34rem;
  }
}

.nora-spotlight__inner {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}

.nora-spotlight__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
}

.nora-spotlight__title {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4.2vw, 2.45rem);
  font-weight: 600;
  font-style: normal;
  line-height: 1.2;
  margin: 0 0 0.65rem;
  letter-spacing: -0.02em;
  color: var(--wood);
}

.nora-spotlight__title em {
  font-style: italic;
}

.nora-spotlight__lede {
  margin: 0 auto 1.75rem;
  max-width: 42ch;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(28, 20, 16, 0.78);
}

.nora-spotlight__book-wrap {
  position: relative;
  display: inline-block;
  margin: 0 auto;
  border-radius: 6px;
  box-shadow:
    0 4px 6px rgba(12, 8, 6, 0.08),
    0 18px 38px rgba(12, 8, 6, 0.18),
    0 0 0 1px rgba(44, 31, 22, 0.06);
}

.nora-spotlight__cover-link {
  display: block;
  line-height: 0;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  overflow: hidden;
  outline-offset: 4px;
}

.nora-spotlight__cover-link:hover .nora-spotlight__cover,
.nora-spotlight__cover-link:focus-visible .nora-spotlight__cover {
  transform: scale(1.02);
}

.nora-spotlight__cover-link:focus-visible {
  outline: 2px solid var(--accent);
}

.nora-spotlight__cover {
  display: block;
  width: min(22rem, 88vw);
  height: auto;
  vertical-align: middle;
  transition: transform 0.45s var(--ease-out);
}

.nora-spotlight__amazon {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  background: rgba(28, 20, 16, 0.88);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  line-height: 0;
  text-decoration: none;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.25s ease,
    transform 0.25s var(--ease-out),
    background 0.2s ease;
  pointer-events: none;
}

.nora-spotlight__amazon-logo {
  display: block;
  width: auto;
  height: clamp(22px, 5vw, 28px);
  max-width: min(5.5rem, 28vw);
}

.nora-spotlight__book-wrap:hover .nora-spotlight__amazon,
.nora-spotlight__book-wrap:focus-within .nora-spotlight__amazon {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nora-spotlight__amazon:hover,
.nora-spotlight__amazon:focus-visible {
  background: rgba(44, 31, 22, 0.95);
}

.nora-spotlight__amazon:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .nora-spotlight__cover {
    transition: none;
  }

  .nora-spotlight__amazon {
    transition: opacity 0.2s ease;
    transform: none;
  }

  .nora-spotlight__book-wrap:hover .nora-spotlight__amazon,
  .nora-spotlight__book-wrap:focus-within .nora-spotlight__amazon {
    transform: none;
  }

  .nora-spotlight--hero .nora-spotlight__cover-stack,
  .nora-spotlight--hero .nora-spotlight__book-wrap:hover .nora-spotlight__cover-stack,
  .nora-spotlight--hero .nora-spotlight__book-wrap:focus-within .nora-spotlight__cover-stack {
    transform: none;
  }

  .nora-spotlight__promo-inner,
  .nora-spotlight__promo-arrow {
    animation: none;
  }
}

@media (hover: none) {
  .nora-spotlight__amazon {
    position: static;
    margin: 1rem auto 0;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .nora-spotlight__book-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .nora-spotlight--hero .nora-spotlight__book-wrap {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 0.65rem;
  }

  .nora-spotlight--hero .nora-spotlight__cover-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

/* ——— Sections ——— */
.section {
  position: relative;
  padding: clamp(3.5rem, 8vw, 6rem) 4vw;
}

.section--shelf {
  position: relative;
  background: linear-gradient(180deg, var(--wood) 0%, var(--wood-light) 100%);
  color: var(--paper);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.section--shelf::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(28, 20, 16, 0.6) 0%, rgba(28, 20, 16, 0.72) 100%),
    radial-gradient(ellipse 90% 60% at 50% 20%, rgba(212, 168, 75, 0.12), transparent 62%),
    url("../assets/ai/gallery-atmosphere.jpg") center / cover no-repeat;
  opacity: 0.7;
}

.section--shelf .section__title {
  color: var(--paper);
}

.section--shelf .section__intro {
  color: rgba(247, 240, 228, 0.78);
}

.section__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 600;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

#about-heading.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 2.85rem);
  font-weight: 600;
  font-style: italic;
  letter-spacing: -0.01em;
}

.section--about .section__intro,
.section--about .about-panel p {
  font-family: var(--font-display);
  font-size: clamp(1.03rem, 1.7vw, 1.14rem);
  line-height: 1.72;
  letter-spacing: 0.005em;
}

.section--about .section__intro {
  color: rgba(28, 20, 16, 0.82);
}

.section__intro {
  max-width: 52ch;
  margin: 0 0 2.5rem;
  font-size: 1.08rem;
  color: rgba(28, 20, 16, 0.75);
}

.section--shelf .section__intro {
  margin-top: -0.6rem;
  margin-bottom: 1.55rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  max-width: 66ch;
}

@media (min-width: 820px) {
  .section--shelf .section__intro {
    margin-top: -5.2rem;
  }
}

.section--shelf .section__inner {
  position: relative;
  z-index: 1;
  max-width: 1340px;
}

.catalog-heading-row {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 0.85rem;
}

.catalog-heading-row .section__title {
  margin-bottom: 0;
}

#catalog-heading.section__title {
  display: block;
}

@media (min-width: 820px) {
  .catalog-heading-row {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem 2rem;
  }

  .catalog-heading-row .section__title {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 0.15rem;
  }
}

.catalog-amazon-note {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 20rem;
  margin: 0 auto;
  padding: 0.35rem;
  border: 1px solid rgba(255, 249, 240, 0.12);
  border-radius: 8px;
  background: rgba(255, 249, 240, 0.055);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
  text-align: center;
}

@media (min-width: 820px) {
  .catalog-amazon-note {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    margin: 0;
    align-self: flex-start;
  }
}

.catalog-amazon-note__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  line-height: 0;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s var(--ease-out);
}

.catalog-amazon-note__link:hover {
  background: rgba(255, 249, 240, 0.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.catalog-amazon-note__link:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 3px;
}

.catalog-amazon-note__brand {
  flex-shrink: 0;
  line-height: 0;
}

.catalog-amazon-note__logo {
  display: block;
  width: auto;
  height: clamp(28px, 4.5vw, 38px);
  max-width: 100%;
  opacity: 0.97;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

/* reveal on scroll — static (no motion); IO may still add .is-visible */
.reveal {
  opacity: 1;
  transform: none;
}

.reveal-stagger > * {
  opacity: 1;
  transform: none;
}

/* ——— About ——— */
.section--about {
  position: relative;
  background: linear-gradient(
    165deg,
    rgba(255, 244, 228, 0.55) 0%,
    var(--paper) 38%,
    rgba(237, 220, 198, 0.35) 100%
  );
}

.section--about::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background:
    linear-gradient(
      165deg,
      rgba(247, 240, 228, 0.84) 0%,
      rgba(247, 240, 228, 0.68) 42%,
      rgba(232, 220, 200, 0.76) 100%
    ),
    radial-gradient(ellipse 88% 58% at 50% 18%, rgba(212, 168, 75, 0.16), transparent 65%),
    url("../assets/ai/gallery-atmosphere.jpg") center 40% / cover no-repeat,
    url("../assets/reading-nook-atmosphere.png") 12% 30% / min(520px, 55vw) no-repeat;
  mix-blend-mode: multiply;
}

.section--about .section__inner {
  position: relative;
  z-index: 1;
}

.about-illus {
  margin: 0 0 2.25rem;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(44, 31, 22, 0.1);
  box-shadow:
    0 22px 50px rgba(44, 31, 22, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.45) inset;
}

.about-illus img {
  display: block;
  width: 100%;
  height: clamp(168px, 32vw, 280px);
  object-fit: cover;
  object-position: 50% 42%;
  filter: saturate(1.06) contrast(0.97);
}

.about-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
    gap: 3rem;
  }
}

.about-panel {
  background: linear-gradient(160deg, #fffaf3 0%, #f6ecdc 100%);
  border: 1px solid rgba(184, 134, 11, 0.12);
  border-radius: 4px;
  padding: 1.75rem 2rem;
  box-shadow:
    0 14px 42px rgba(44, 31, 22, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.about-panel h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 0.75rem;
}

.about-panel p {
  margin: 0;
  color: rgba(28, 20, 16, 0.82);
}

/* ——— Illustrations marquee ——— */
.section--gallery {
  position: relative;
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

/* Atmosphere lived under the marquee track (z-index 1) and was fully covered by opaque cards — paint it on the section instead so gaps + margins show the art. */
.section--gallery::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(247, 240, 228, 0.9) 0%,
      rgba(247, 240, 228, 0.45) 22%,
      rgba(247, 240, 228, 0.12) 48%,
      transparent 68%
    ),
    url("../assets/ai/gallery-atmosphere.jpg") center / cover no-repeat,
    url("../assets/reading-nook-atmosphere.png") center / cover no-repeat;
}

.section--gallery .section__intro {
  margin-bottom: 1.75rem;
}

.section--gallery .section__inner {
  position: relative;
  z-index: 1;
}

.gallery-marquee {
  position: relative;
  z-index: 1;
  width: min(94vw, 1240px);
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  padding: 1.25rem 0 2rem;
  /* Fade frames in at 1/4 of the width on the right, out at 1/4 from the left */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 25%,
    #000 75%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 25%,
    #000 75%,
    transparent 100%
  );
}

.gallery-marquee__track {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  gap: 0;
  animation: gallery-marquee 90s linear infinite;
}

.gallery-marquee:hover .gallery-marquee__track,
.gallery-marquee:focus-within .gallery-marquee__track {
  animation-play-state: paused;
}

@keyframes gallery-marquee {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

.gallery-marquee__set {
  display: flex;
  flex-shrink: 0;
  align-items: flex-end;
  gap: clamp(0.75rem, 2vw, 1.35rem);
  padding: 0 clamp(0.375rem, 1vw, 0.675rem);
}

.illus-frame {
  position: relative;
  flex: 0 0 auto;
  width: clamp(148px, 28vw, 200px);
  margin: 0;
  padding: 0.4rem 0.4rem 1.5rem;
  background: linear-gradient(165deg, #fffef9 0%, #f2ebe0 100%);
  border: 1px solid rgba(44, 31, 22, 0.1);
  border-radius: 3px;
  box-shadow:
    0 18px 36px rgba(28, 20, 16, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.85) inset;
  transform: rotate(var(--tilt, 0deg));
}

.illus-frame:nth-child(3n + 1) {
  --tilt: -2deg;
}
.illus-frame:nth-child(3n + 2) {
  --tilt: 1.2deg;
}
.illus-frame:nth-child(3n) {
  --tilt: -1deg;
}

.illus-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  border-radius: 1px;
}

.illus-frame__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.35rem;
  text-align: center;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(44, 31, 22, 0.55);
  font-weight: 600;
}

/* Duplicate set is a screen-reader-hidden clone that keeps the loop seamless. */
.gallery-marquee__set[aria-hidden="true"] {
  display: flex;
}

@media (prefers-reduced-motion: reduce) {
  .gallery-marquee__track {
    animation: none;
  }
  .gallery-marquee {
    -webkit-mask-image: none;
    mask-image: none;
    overflow-x: auto;
  }
}

/* ——— Books ——— */
.bookshelf-rail {
  height: 10px;
  background: linear-gradient(180deg, #1a120e 0%, #2c1f16 40%, #3d2a1f 100%);
  border-radius: 2px;
  margin-top: -4px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.book-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .book-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(2rem, 3vw, 3rem);
  }
}

@media (min-width: 1180px) {
  .book-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(0.9rem, 1.6vw, 1.4rem);
    align-items: stretch;
    perspective: 1300px;
  }
}

.book-card {
  --cover-max: min(360px, 92vw);
  perspective: 1200px;
}

@media (min-width: 1200px) {
  .book-card {
    --cover-max: min(280px, 23vw);
  }
}

@media (min-width: 1180px) {
  .book-card {
    transition:
      transform 0.38s var(--ease-out),
      opacity 0.26s ease,
      filter 0.3s ease;
    transform-style: preserve-3d;
  }

  .book-card:nth-child(odd) {
    transform: rotateY(8deg) scale(0.94);
  }

  .book-card:nth-child(even) {
    transform: rotateY(-8deg) scale(0.94);
  }

  .book-grid:has(.book-card:hover) .book-card,
  .book-grid:has(.book-card:focus-within) .book-card {
    opacity: 0.78;
    filter: saturate(0.88);
    transform: scale(0.9);
  }

  .book-grid .book-card:hover,
  .book-grid .book-card:focus-within {
    opacity: 1;
    filter: saturate(1.05);
    transform: rotateY(0deg) scale(1.02) translateY(-8px);
    z-index: 3;
  }
}

.book-card__tilt {
  transform-style: preserve-3d;
  transform-origin: center center;
  transition: transform 0.18s ease-out;
  will-change: transform;
}

.book-card__inner {
  position: relative;
  background: linear-gradient(145deg, rgba(255, 249, 240, 0.08) 0%, rgba(0, 0, 0, 0.15) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  padding: 1.45rem 1.15rem 1.55rem;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

@media (min-width: 1180px) {
  .book-card__inner {
    padding: 1.35rem 1.05rem 1.55rem;
  }
}

.book-card__cover-wrap {
  position: relative;
  width: 100%;
  max-width: var(--cover-max);
  margin-bottom: 0.95rem;
  border-radius: 2px;
  overflow: hidden;
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.45),
    0 2px 0 rgba(255, 255, 255, 0.1) inset;
}

.book-card__cover {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
  transform: translateZ(20px);
  transition: transform 0.5s var(--ease-out);
}

.book-card:hover .book-card__cover {
  transform: translateZ(20px) scale(1.02);
}

.book-card__shine {
  position: absolute;
  inset: -50%;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.12) 48%,
    rgba(255, 255, 255, 0.22) 50%,
    rgba(255, 255, 255, 0.08) 52%,
    transparent 60%
  );
  transform: translateX(-100%) rotate(12deg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.book-card:hover .book-card__shine {
  opacity: 1;
  transform: translateX(100%) rotate(12deg);
}

.book-card__series {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 0.4rem;
}

.book-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.12rem, 2.65vw, 1.42rem);
  font-weight: 600;
  margin: 0 0 0.38rem;
  color: var(--paper);
  line-height: 1.2;
}

@media (min-width: 1180px) {
  .book-card__title {
    font-size: clamp(1rem, 1.3vw, 1.16rem);
  }
}

.book-card__tagline {
  font-style: italic;
  font-size: 1.06rem;
  color: rgba(247, 240, 228, 0.88);
  margin: 0 0 0.52rem;
}

@media (min-width: 1180px) {
  .book-card__tagline {
    font-size: 0.94rem;
    margin-bottom: 0.55rem;
  }
}

.book-card__samples {
  display: flex;
  gap: 7px;
  width: 100%;
  max-width: var(--cover-max);
  margin: 0 0 0.72rem;
  justify-content: center;
}

.book-card__samples img {
  width: calc(33.333% - 4px);
  flex: 1 1 0;
  min-width: 0;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
  opacity: 0.9;
  transition:
    opacity 0.3s ease,
    transform 0.35s var(--ease-out);
}

.book-card:hover .book-card__samples img {
  opacity: 1;
}

.book-card__samples img:nth-child(2) {
  transform: translateY(-3px);
}

.book-card:hover .book-card__samples img:nth-child(2) {
  transform: translateY(-5px);
}

.book-card__blurb {
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(247, 240, 228, 0.72);
  margin: 0;
  text-align: left;
}

@media (min-width: 1180px) {
  .book-card__blurb {
    font-size: 0.92rem;
    line-height: 1.5;
  }
}

/* ——— KDP / in-development lines ——— */
.section--kdp {
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(255, 250, 242, 0.65) 0%,
    var(--paper) 18%,
    rgba(230, 215, 195, 0.35) 100%
  );
  box-shadow: inset 0 1px 0 rgba(44, 31, 22, 0.06);
}

.section--kdp .section__inner {
  max-width: 1160px;
}

.section--kdp .section__intro {
  max-width: 62ch;
  margin-bottom: 2.25rem;
}

.kdp-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 720px) {
  .kdp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem 1.35rem;
  }
}

@media (min-width: 1100px) {
  .kdp-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.kdp-series {
  display: flex;
  gap: 1rem 1.15rem;
  align-items: flex-start;
  margin: 0;
  padding: 1.15rem 1.2rem 1.2rem;
  background: linear-gradient(155deg, #fffcf7 0%, #f3e8d4 100%);
  border: 1px solid rgba(184, 134, 11, 0.15);
  border-radius: 6px;
  box-shadow:
    0 10px 28px rgba(44, 31, 22, 0.07),
    0 0 0 1px rgba(255, 255, 255, 0.55) inset;
}

.kdp-series__cover {
  flex: 0 0 auto;
  width: 5.5rem;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(44, 31, 22, 0.1);
  box-shadow: 0 6px 16px rgba(44, 31, 22, 0.12);
}

@media (min-width: 480px) {
  .kdp-series__cover {
    width: 6.25rem;
  }
}

.kdp-series__body {
  min-width: 0;
  flex: 1 1 auto;
}

.kdp-series__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--wood);
}

.kdp-series__author {
  margin: 0 0 0.5rem;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--sage);
}

.kdp-series__pitch {
  margin: 0 0 0.7rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(28, 20, 16, 0.78);
}

.kdp-series__now {
  margin: 0;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(44, 31, 22, 0.1);
  font-size: 0.86rem;
  line-height: 1.5;
  color: rgba(28, 20, 16, 0.82);
}

.kdp-series__label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wood-light);
  opacity: 0.9;
}

.kdp-series__now em {
  font-style: normal;
  font-weight: 600;
  color: var(--ink);
}

.kdp-series__now cite {
  font-style: normal;
  color: rgba(28, 20, 16, 0.72);
}

.kdp-series--clickable {
  cursor: pointer;
  transition:
    box-shadow 0.25s var(--ease-out),
    transform 0.25s var(--ease-out),
    border-color 0.2s ease;
}

.kdp-series--clickable:hover {
  box-shadow:
    0 14px 40px rgba(44, 31, 22, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.65) inset;
  transform: translateY(-2px);
  border-color: rgba(184, 134, 11, 0.28);
}

@media (prefers-reduced-motion: reduce) {
  .kdp-series--clickable:hover {
    transform: none;
  }
}

.kdp-series--clickable:focus {
  outline: none;
}

.kdp-series--clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.kdp-series__hint {
  margin: 0.75rem 0 0;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(28, 20, 16, 0.38);
}

/* ——— KDP detail dialog (wider) ——— */
.kdp-modal {
  z-index: 1250;
  width: min(70rem, 98vw);
  max-height: min(92vh, 900px);
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.kdp-modal::backdrop {
  background: rgba(12, 8, 6, 0.55);
  backdrop-filter: blur(4px);
}

.kdp-modal__panel {
  position: relative;
  max-height: min(92vh, 900px);
  overflow: auto;
  background: linear-gradient(165deg, var(--cream) 0%, var(--paper) 45%, var(--paper-dim) 100%);
  border: 1px solid rgba(44, 31, 22, 0.12);
  border-radius: 4px;
  box-shadow: 0 28px 80px var(--shadow);
}

.kdp-modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(44, 31, 22, 0.15);
  border-radius: 3px;
  background: rgba(255, 249, 240, 0.9);
  color: var(--wood);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.kdp-modal__close:hover {
  background: var(--wood);
  color: var(--cream);
}

.kdp-modal__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 800px) {
  .kdp-modal__layout {
    grid-template-columns: minmax(200px, 0.9fr) minmax(0, 1.5fr);
  }
}

.kdp-modal__col {
  padding: 1.35rem 1.25rem 1.75rem;
}

@media (min-width: 800px) {
  .kdp-modal__col--media {
    padding: 1.75rem 0.25rem 1.75rem 1.5rem;
  }
  .kdp-modal__col--text {
    padding: 1.75rem 1.75rem 1.75rem 0.5rem;
  }
}

.kdp-modal__cover {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  margin: 0 auto 0.5rem;
  border-radius: 3px;
  box-shadow: 0 12px 36px rgba(12, 8, 6, 0.22);
}

.kdp-modal__kicker {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
}

.kdp-modal__title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.4rem;
  color: var(--wood);
}

.kdp-modal__subtitle {
  font-style: italic;
  margin: 0 0 0.5rem;
  color: var(--wood-light);
  font-size: 1.04rem;
  line-height: 1.45;
}

.kdp-modal__author {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(28, 20, 16, 0.78);
}

.kdp-modal__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.55rem;
  margin: 0 0 1rem;
  padding: 0;
}

.kdp-modal__tag {
  display: inline-block;
  font-size: 0.78rem;
  padding: 0.22rem 0.5rem;
  background: rgba(44, 31, 22, 0.06);
  border-radius: 2px;
  color: var(--wood-light);
}

.kdp-modal__h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  margin: 1.1rem 0 0.4rem;
  color: var(--wood);
}

.kdp-modal__sections .kdp-modal__h3:first-child {
  margin-top: 0;
}

.kdp-modal__p {
  margin: 0 0 0.65rem;
  line-height: 1.62;
  color: var(--ink);
}

.kdp-modal__status {
  margin: 1.1rem 0 0;
  padding: 0.75rem 0.9rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--wood-light);
  background: rgba(44, 31, 22, 0.05);
  border-radius: 3px;
  border-left: 3px solid var(--accent-soft);
}

/* ——— Contact ——— */
.section--contact .contact-panel {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.section--contact .contact-panel__intro {
  margin-left: auto;
  margin-right: auto;
}

.contact-panel__email {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
}

/* ——— Footer / contact ——— */
.footer {
  padding: 3rem 4vw;
  background: var(--footer-surface);
  color: rgba(247, 240, 228, 0.75);
  text-align: center;
}

.footer__logo {
  height: 40px;
  width: auto;
  margin-bottom: 1rem;
  opacity: 0.92;
  /* Dark ink on transparent PNG reads muddy on --ink; remap to soft cream */
  filter: grayscale(1) brightness(2.05) invert(1) sepia(0.4) saturate(1.6) hue-rotate(8deg) brightness(0.98)
    contrast(0.92);
}

.footer p {
  margin: 0;
  font-size: 0.92rem;
}

.footer small {
  display: block;
  margin-top: 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.5;
}

.footer__brand-link {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.footer__brand-link:hover {
  color: var(--accent-soft);
}

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

/* ——— Book detail dialog (data/books-detail.json + optional Storymaker API) ——— */
.book-card--clickable {
  cursor: pointer;
}

.book-card--clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.book-card__hint {
  margin: 0.85rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247, 240, 228, 0.45);
}

.book-card__preview-btn {
  appearance: none;
  position: absolute;
  right: 0.45rem;
  bottom: 0.45rem;
  z-index: 8;
  pointer-events: auto;
  border: 1px solid rgba(255, 249, 240, 0.3);
  border-radius: 999px;
  background: rgba(28, 20, 16, 0.55);
  color: rgba(255, 249, 240, 0.95);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.44rem 0.8rem;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
  transform: translateZ(60px);
}

.book-card__preview-btn:hover {
  background: rgba(255, 249, 240, 0.86);
  color: var(--wood);
  border-color: rgba(255, 249, 240, 0.7);
  transform: translateY(-1px);
}

.book-card__cover-wrap[data-action="preview"] {
  cursor: pointer;
}

.book-card__preview-overlay {
  position: absolute;
  right: 0.45rem;
  bottom: 0.45rem;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.36rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 249, 240, 0.42);
  background: rgba(28, 20, 16, 0.58);
  color: rgba(255, 249, 240, 0.96);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) translateZ(60px);
  transition:
    opacity 0.24s ease,
    transform 0.28s var(--ease-out),
    background 0.2s ease;
}

.book-card__preview-arrow {
  display: inline-block;
}

.book-card__cover-wrap[data-action="preview"]:hover .book-card__preview-overlay,
.book-card__cover-wrap[data-action="preview"]:focus-within .book-card__preview-overlay {
  opacity: 1;
  transform: translateY(0) translateZ(60px);
  background: rgba(28, 20, 16, 0.68);
}

.book-card__cover-wrap[data-action="preview"]:hover .book-card__preview-arrow,
.book-card__cover-wrap[data-action="preview"]:focus-within .book-card__preview-arrow {
  transform: translateX(0);
}

.book-modal {
  z-index: 1200;
  width: min(66rem, 98vw);
  max-height: min(97vh, 1120px);
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.book-modal::backdrop {
  background: rgba(12, 8, 6, 0.55);
  backdrop-filter: blur(4px);
}

.book-modal__panel {
  position: relative;
  max-height: min(97vh, 1120px);
  overflow: hidden;
  background-image: linear-gradient(
    165deg,
    rgba(255, 249, 240, 0.72) 0%,
    rgba(247, 240, 228, 0.64) 45%,
    rgba(232, 220, 200, 0.74) 100%
  );
  background-repeat: no-repeat, no-repeat;
  background-position: center, center;
  background-size: auto, 390%;
  background-blend-mode: normal, multiply;
  border: 1px solid rgba(44, 31, 22, 0.12);
  border-radius: 4px;
  box-shadow: 0 28px 80px var(--shadow);
}

.book-modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(44, 31, 22, 0.15);
  border-radius: 3px;
  background: rgba(255, 249, 240, 0.9);
  color: var(--wood);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.book-modal__close:hover {
  background: var(--wood);
  color: var(--cream);
}

.book-modal__layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 720px) {
  .book-modal__layout {
    grid-template-columns: minmax(260px, 1.05fr) minmax(0, 1.45fr);
  }
}

.book-modal__col {
  padding: 1.35rem 1.25rem 1.75rem;
}

@media (min-width: 720px) {
  .book-modal__col--media {
    padding: 1.5rem 0 1.5rem 1.35rem;
  }
  .book-modal__col--text {
    padding: 1.5rem 1.35rem 1.5rem 0.5rem;
  }
}

.book-modal__cover {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto 1rem;
  border-radius: 2px;
  box-shadow: 0 12px 36px rgba(12, 8, 6, 0.22);
}

.book-modal__samples {
  display: flex;
  gap: 8px;
  max-width: 320px;
  margin: 0 auto;
  justify-content: center;
  flex-wrap: wrap;
}

.book-modal__sample-img {
  width: 31%;
  min-width: 0;
  flex: 1 1 0;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 4px 12px rgba(12, 8, 6, 0.2);
  border: 1px solid rgba(44, 31, 22, 0.1);
}

.book-modal__series {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
}

.book-modal__title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.4rem;
  color: var(--wood);
}

.book-modal__tagline {
  font-style: italic;
  margin: 0 0 0.9rem;
  color: var(--wood-light);
  font-size: 1.05rem;
}

.book-modal__actions {
  margin: 0 0 0.9rem;
}

.book-modal__preview-btn {
  appearance: none;
  border: 1px solid rgba(44, 31, 22, 0.25);
  border-radius: 3px;
  background: rgba(255, 249, 240, 0.78);
  color: var(--wood);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.38rem 0.62rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.book-modal__preview-btn:hover {
  background: var(--wood);
  color: var(--cream);
  border-color: rgba(44, 31, 22, 0.65);
}

.book-modal__meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  margin: 0 0 1.1rem;
  padding: 0;
}

.book-modal__meta-item {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  background: rgba(44, 31, 22, 0.06);
  border-radius: 2px;
  color: var(--wood-light);
}

/* Main copy + “grown-ups” side note */
.book-modal__body-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.25rem;
  margin-top: 0.2rem;
}

@media (max-width: 599px) {
  .book-modal__grownups-rail:not([hidden]) {
    max-width: 24rem;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }
}

@media (min-width: 600px) {
  .book-modal__body-row {
    flex-direction: row;
    align-items: flex-start;
    gap: 1.15rem 1.35rem;
  }

  .book-modal__sections {
    flex: 1 1 0;
    min-width: 0;
  }

  .book-modal__grownups-rail {
    display: block;
    flex: 0 0 min(14.5rem, 38%);
    max-width: 16.5rem;
  }
}

.book-modal__sections {
  min-width: 0;
}

.book-modal__grownups-rail[hidden] {
  display: none !important;
}

@media (min-width: 600px) {
  .book-modal__grownups-rail {
    position: relative;
  }
}

.book-modal__paper-note {
  position: relative;
  margin: 0.35rem 0.2rem 0.5rem 0.15rem;
  padding: 0.9rem 0.95rem 1rem;
  background: linear-gradient(150deg, #fff7df 0%, #fff2d0 50%, #f5edd4 100%);
  border: 1px solid rgba(44, 31, 22, 0.1);
  box-shadow: 0 3px 10px rgba(12, 8, 6, 0.1), 0 1px 0 rgba(255, 255, 255, 0.5) inset;
  transform: rotate(-2.1deg);
  z-index: 0;
}

@media (prefers-reduced-motion: reduce) {
  .book-modal__paper-note {
    transform: none;
  }
}

/* Masking-tape corner tabs */
.book-modal__tape {
  position: absolute;
  z-index: 2;
  width: 1.1rem;
  height: 0.42rem;
  border-radius: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(230, 220, 200, 0.55));
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

.book-modal__tape--tl {
  top: -0.18rem;
  left: 0.35rem;
  transform: rotate(-28deg);
}

.book-modal__tape--tr {
  top: -0.18rem;
  right: 0.35rem;
  transform: rotate(24deg);
}

.book-modal__tape--bl {
  bottom: -0.18rem;
  left: 0.3rem;
  transform: rotate(32deg);
}

.book-modal__tape--br {
  bottom: -0.18rem;
  right: 0.3rem;
  transform: rotate(-30deg);
}

@media (prefers-reduced-motion: reduce) {
  .book-modal__tape--tl,
  .book-modal__tape--tr,
  .book-modal__tape--bl,
  .book-modal__tape--br {
    transform: none;
  }
}

.book-modal__h3--grownups {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wood-light);
  margin: 0 0 0.45rem;
  font-weight: 600;
}

.book-modal__p--grownups {
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
  color: var(--ink);
  opacity: 0.95;
}

.book-modal__h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.15rem 0 0.45rem;
  color: var(--wood);
}

.book-modal__sections .book-modal__h3:first-child {
  margin-top: 0;
}

.book-modal__p {
  margin: 0 0 0.6rem;
  line-height: 1.6;
  color: var(--ink);
}

.book-modal__source {
  font-size: 0.8rem;
  color: var(--sage);
  margin: 1rem 0 0;
  font-style: italic;
}

/* ——— Full book preview dialog ——— */
.book-preview-modal {
  z-index: 1300;
  width: min(80rem, 99vw);
  max-height: 96vh;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
}

.book-preview-modal::backdrop {
  background: rgba(12, 8, 6, 0.62);
  backdrop-filter: blur(6px);
}

.book-preview-modal__panel {
  position: relative;
  max-height: 96vh;
  overflow: auto;
  background-color: #f7efe0;
  background-image:
    linear-gradient(
      165deg,
      rgba(255, 248, 235, 0.78) 0%,
      rgba(248, 239, 224, 0.74) 48%,
      rgba(239, 224, 201, 0.82) 100%
    ),
    var(--preview-cover-image, none);
  background-repeat: no-repeat, no-repeat;
  background-position: center, center top;
  background-size: cover, cover;
  border: 1px solid rgba(44, 31, 22, 0.14);
  border-radius: 4px;
  box-shadow: 0 28px 80px var(--shadow);
  padding: 1.25rem clamp(0.85rem, 2vw, 1.6rem) 1.65rem;
  isolation: isolate;
}

.book-preview-modal__panel > * {
  position: relative;
  z-index: 1;
}

.book-preview-modal__close {
  position: sticky;
  top: 0.35rem;
  float: right;
  z-index: 2;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(44, 31, 22, 0.15);
  border-radius: 3px;
  background: rgba(255, 249, 240, 0.92);
  color: var(--wood);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.book-preview-modal__header {
  clear: both;
  text-align: center;
  margin: 0 auto 1.15rem;
  max-width: 48rem;
}

.book-preview-modal__kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 600;
}

.book-preview-modal__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  color: var(--wood);
}

.book-preview-modal__subtitle {
  margin: 0.35rem 0 0;
  font-size: 1rem;
  color: var(--wood-light);
  font-style: italic;
}

.book-preview-modal__pages {
  display: flex;
  gap: 0.8rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.2rem 0.15rem 0.5rem;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.book-preview-modal__pages::-webkit-scrollbar {
  display: none;
}

.book-preview-modal__viewer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
}

.book-preview-modal__nav {
  appearance: none;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(44, 31, 22, 0.18);
  border-radius: 999px;
  background: rgba(255, 249, 240, 0.92);
  color: var(--wood);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(12, 8, 6, 0.12);
}

.book-preview-modal__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.book-preview-page {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  background: rgba(255, 252, 245, 0.72);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: 1px solid rgba(44, 31, 22, 0.12);
  border-radius: 3px;
  padding: 0.65rem;
  min-width: 100%;
  width: 100%;
  scroll-snap-align: start;
  box-shadow: 0 6px 22px rgba(12, 8, 6, 0.12);
}

@media (min-width: 860px) {
  .book-preview-page {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 0.85rem 1rem;
    padding: 0.8rem;
  }
}

.book-preview-page__spread {
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(44, 31, 22, 0.08);
  border-radius: 2px;
  padding: 0.45rem;
}

.book-preview-page--blurred .book-preview-page__spread {
  filter: blur(5px);
}

@media (min-width: 860px) {
  .book-preview-page--image-right .book-preview-page__spread--text {
    order: 1;
  }
  .book-preview-page--image-right .book-preview-page__spread--image {
    order: 2;
  }
  .book-preview-page--image-left .book-preview-page__spread--image {
    order: 1;
  }
  .book-preview-page--image-left .book-preview-page__spread--text {
    order: 2;
  }
}

.book-preview-page__img {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  border-radius: 2px;
  border: 1px solid rgba(44, 31, 22, 0.08);
  box-shadow: 0 8px 22px rgba(12, 8, 6, 0.16);
}

.book-preview-page__text {
  margin: 0.45rem 0 0;
  white-space: pre-line;
  font-family: "Alegreya", "Fraunces", "Georgia", serif;
  font-weight: 700;
  font-size: clamp(1.28rem, 1.95vw, 1.72rem);
  line-height: 1.28;
  letter-spacing: 0.01em;
  color: rgba(28, 20, 16, 0.95);
}
