/* ============================================================
   Wally Tales — Tales & Tides Publishing
   Static site stylesheet · Phase 1 MVP
   Colours, fonts and image specs follow Kelly A. Kline's
   "Wally Tales Website – Copy FINAL" and Page Brief (22 Nov 2026).
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Brand colours (01_Brand/Wally_Tales_Brand_Colors.png) */
  --royal: #2C62AF;         /* Book Royal Blue — Wally's body */
  --royal-deep: #1E4C8A;
  --mist: #C0CDD2;          /* Belly / Mist */
  --cranberry: #B0283A;     /* Book Red — CTA */
  --cranberry-deep: #8E1F2E;
  --gold: #D1B36F;          /* Series Gold */
  --star: #F0D48A;          /* Warm Star Gold */
  --navy: #07102A;          /* Deep Navy */
  --navy-mid: #0C1C3A;      /* Navy Mid */
  --cream: #E8E0C8;         /* Moon Cream */
  --white: #FFFFFF;

  /* Working neutrals derived from the palette */
  --paper: #F8F4E9;
  --paper-deep: #F1EAD8;
  --ink: #101B33;
  --ink-soft: #414D67;
  --line: rgba(7, 16, 42, 0.10);
  --line-strong: rgba(7, 16, 42, 0.22);

  /* Type */
  --font-display: "Cormorant SC", "Cormorant Garamond", Georgia, serif;
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-ui: "Baloo 2", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-script: "Allura", "Segoe Script", cursive;

  /* Layout */
  --wrap: 1140px;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --shadow: 0 18px 40px -24px rgba(7, 16, 42, 0.45);
  --shadow-lg: 0 44px 90px -48px rgba(7, 16, 42, 0.6);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 78px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 18px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 0.55vw + 0.95rem, 1.16rem);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: 0.005em;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--royal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--royal-deep); }

:focus-visible {
  outline: 3px solid rgba(44, 98, 175, 0.55);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: rgba(209, 179, 111, 0.45); }

/* ---------- 3. Utilities ---------- */
.wrap {
  width: min(100% - 2.6rem, var(--wrap));
  margin-inline: auto;
}
.wrap--narrow { width: min(100% - 2.6rem, 820px); }

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 200;
  padding: 0.7rem 1.2rem;
  background: var(--cream);
  color: var(--navy);
  border-radius: 0 0 10px 10px;
  font-family: var(--font-ui);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 0; }

.eyebrow {
  display: inline-block;
  margin: 0 0 0.9rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--royal);
}
.eyebrow--gold { color: var(--star); }
.eyebrow::after {
  content: "";
  display: block;
  width: 2.4rem;
  height: 1px;
  margin-top: 0.5rem;
  background: currentColor;
  opacity: 0.55;
}

.display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0.005em;
}

.title {
  font-family: var(--font-display);
  font-size: clamp(1.95rem, 3.6vw, 3rem);
  color: var(--navy);
}
.title--light { color: var(--cream); }

.lede {
  font-family: var(--font-serif);
  font-size: clamp(1.16rem, 1.5vw, 1.38rem);
  line-height: 1.6;
  color: var(--ink-soft);
}
.lede--light { color: rgba(232, 224, 200, 0.86); }

.script {
  font-family: var(--font-script);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.3;
  color: var(--gold);
  margin: 0 0 0.6rem;
}

.small {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.small--light { color: rgba(232, 224, 200, 0.7); }

.rule {
  border: 0;
  height: 1px;
  margin: 2.4rem 0;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.82rem 1.55rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease),
    border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--cranberry {
  background: var(--cranberry);
  color: var(--white);
  box-shadow: 0 14px 26px -16px rgba(176, 40, 58, 0.85);
}
.btn--cranberry:hover { background: var(--cranberry-deep); color: var(--white); }

.btn--gold {
  background: transparent;
  border-color: rgba(209, 179, 111, 0.7);
  color: var(--star);
}
.btn--gold:hover {
  background: rgba(209, 179, 111, 0.14);
  border-color: var(--star);
  color: var(--cream);
}

.btn--navy {
  background: var(--navy);
  color: var(--cream);
}
.btn--navy:hover { background: var(--navy-mid); color: var(--white); }

.btn--outline {
  border-color: var(--line-strong);
  color: var(--navy);
  background: transparent;
}
.btn--outline:hover { border-color: var(--royal); color: var(--royal); }

.btn--sm { padding: 0.6rem 1.1rem; font-size: 0.86rem; }

.btn[disabled],
.btn.is-disabled {
  background: rgba(7, 16, 42, 0.1);
  border-color: transparent;
  color: var(--ink-soft);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.text-link {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--royal);
  text-decoration: none;
  border-bottom: 1px solid rgba(44, 98, 175, 0.35);
  padding-bottom: 1px;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.text-link:hover { border-color: var(--royal); color: var(--royal-deep); }

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 16, 42, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(209, 179, 111, 0.22);
}
@supports not (backdrop-filter: blur(10px)) {
  .site-header { background: var(--navy); }
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 0.05rem;
  text-decoration: none;
  color: var(--cream);
}
.brand__word {
  font-family: var(--font-display);
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1.1;
}
.brand__sub {
  font-family: var(--font-ui);
  font-size: 0.6rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(232, 224, 200, 0.6);
}

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav ul {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a {
  position: relative;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: rgba(232, 224, 200, 0.85);
  text-decoration: none;
  padding: 0.35rem 0;
  transition: color 0.2s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--white); }
.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav .btn { color: var(--white); }
.nav .btn::after { display: none; }

.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(209, 179, 111, 0.45);
  border-radius: 12px;
  cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle__bars { position: relative; margin-inline: auto; }
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(560px, 88svh, 860px);
  padding: calc(var(--header-h) + 3rem) 0 clamp(3rem, 7vw, 5.5rem);
  background: var(--navy);
  color: var(--cream);
  overflow: hidden;
}

/* Night sky: layered star field, no image needed */
.hero__sky {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(120% 90% at 78% 6%, rgba(44, 98, 175, 0.5) 0%, transparent 58%),
    radial-gradient(90% 70% at 12% 100%, rgba(12, 28, 58, 0.9) 0%, transparent 62%),
    linear-gradient(180deg, #08152f 0%, #07102a 55%, #050c1f 100%);
}
.hero__sky::before,
.hero__sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
}
.hero__sky::before {
  background-image:
    radial-gradient(1.6px 1.6px at 12% 22%, rgba(240, 212, 138, 0.9), transparent),
    radial-gradient(1.2px 1.2px at 28% 12%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1.8px 1.8px at 46% 28%, rgba(240, 212, 138, 0.75), transparent),
    radial-gradient(1.2px 1.2px at 63% 9%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(2px 2px at 76% 24%, rgba(240, 212, 138, 0.85), transparent),
    radial-gradient(1.3px 1.3px at 88% 14%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 34% 40%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1.4px 1.4px at 91% 36%, rgba(240, 212, 138, 0.5), transparent);
}
.hero__sky::after {
  background-image:
    radial-gradient(2.6px 2.6px at 20% 70%, rgba(240, 212, 138, 0.55), transparent),
    radial-gradient(1.6px 1.6px at 68% 58%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1.4px 1.4px at 82% 76%, rgba(240, 212, 138, 0.35), transparent);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__poster {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__media video { position: relative; z-index: 1; }

.hero__media img,
.hero__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 16, 42, 0.55) 0%, rgba(7, 16, 42, 0.18) 32%, rgba(7, 16, 42, 0.82) 88%),
    linear-gradient(90deg, rgba(7, 16, 42, 0.85) 0%, rgba(7, 16, 42, 0.25) 55%, rgba(7, 16, 42, 0.05) 100%);
}

.hero__content { position: relative; z-index: 1; max-width: 40rem; }

.hero__title {
  font-size: clamp(2.6rem, 7.4vw, 5.2rem);
  color: var(--gold);
  text-wrap: balance;
  margin-bottom: 0.35em;
  text-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
}

.hero__tag {
  font-family: var(--font-serif);
  font-size: clamp(1.16rem, 2.1vw, 1.5rem);
  line-height: 1.5;
  color: var(--cream);
  max-width: 34rem;
}
.hero__sub {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(232, 224, 200, 0.78);
  max-width: 30rem;
  margin-top: 0.4rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}
.hero__note {
  margin-top: 1.8rem;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(232, 224, 200, 0.55);
}

.hero__play {
  position: absolute;
  right: max(1.3rem, calc((100vw - var(--wrap)) / 2));
  bottom: 1.6rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(232, 224, 200, 0.35);
  border-radius: var(--radius-pill);
  background: rgba(7, 16, 42, 0.55);
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.hero__play:hover { border-color: var(--gold); color: var(--white); }
.hero__play svg { width: 13px; height: 13px; }

/* Compact page hero (inner pages) */
.page-hero {
  position: relative;
  isolation: isolate;
  padding: clamp(3.4rem, 7vw, 6rem) 0 clamp(2.6rem, 5vw, 4rem);
  background: var(--navy);
  color: var(--cream);
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(80% 90% at 82% 0%, rgba(44, 98, 175, 0.45) 0%, transparent 60%),
    radial-gradient(70% 80% at 0% 100%, rgba(12, 28, 58, 0.9) 0%, transparent 65%),
    linear-gradient(180deg, #08152f, #07102a 70%, #060f24);
}
.page-hero__inner { max-width: 46rem; }
.page-hero .title {
  color: var(--cream);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin-bottom: 0.35em;
}
.page-hero .lede { color: rgba(232, 224, 200, 0.84); margin-bottom: 0; }
.page-hero .eyebrow { color: var(--gold); }

/* ---------- 7. Sections ---------- */
.section { padding: clamp(3.2rem, 6.5vw, 6rem) 0; }
.section--tight { padding: clamp(2.2rem, 4.5vw, 3.6rem) 0; }
.section--paper { background: var(--paper); }
.section--deep { background: var(--paper-deep); }
.section--navy { background: var(--navy); color: var(--cream); }
.section--navy .title { color: var(--cream); }
.section--navy .lede { color: rgba(232, 224, 200, 0.84); }

.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p:last-child { margin-bottom: 0; }

.split {
  display: grid;
  gap: clamp(1.8rem, 4vw, 3.6rem);
  align-items: center;
}
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide-left { grid-template-columns: 1.15fr 0.85fr; }
  .split--wide-right { grid-template-columns: 0.85fr 1.15fr; }
}

.stack > * + * { margin-top: 1rem; }

/* ---------- 8. Media slots & placeholders ---------- */
/* Each slot expects Kelly's file at the given path. Until it lands the
   styled placeholder shows; drop the file in and it appears untouched. */
.media {
  position: relative;
  display: block;
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 70% 8%, rgba(44, 98, 175, 0.42) 0%, transparent 62%),
    linear-gradient(160deg, #0c1c3a 0%, #07102a 62%, #050c1f 100%);
  border: 1px solid rgba(209, 179, 111, 0.32);
  box-shadow: var(--shadow);
}
.media--1x1 { aspect-ratio: 1 / 1; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--3x4 { aspect-ratio: 3 / 4; }
.media--4x5 { aspect-ratio: 4 / 5; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--wide { aspect-ratio: 3 / 2; }

.media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.media--contain img { object-fit: contain; padding: 5%; }
.media--cutout img { object-fit: contain; padding: 4%; }
.media.is-missing > img { display: none; }

.media__ph {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.85rem;
  padding: 1.8rem;
  text-align: center;
}
.media__ph::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(209, 179, 111, 0.34);
  border-radius: calc(var(--radius) - 6px);
  pointer-events: none;
}
.media__ph img,
.media__ph svg {
  position: static;
  width: clamp(38px, 12%, 64px);
  height: auto;
  opacity: 0.8;
}
.media__label {
  position: static;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  line-height: 1.7;
  text-transform: uppercase;
  color: rgba(232, 224, 200, 0.72);
  max-width: 22ch;
}
.media__label em {
  display: block;
  margin-top: 0.35rem;
  font-style: normal;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: none;
  color: rgba(232, 224, 200, 0.42);
  word-break: break-word;
}

/* Publisher logo swap: shows text until the transparent PNG arrives */
.logo-swap {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 46px;
}
.logo-swap img { height: 72px; width: auto; }
.logo-swap.is-missing img { display: none; }
.logo-swap__text {
  display: none;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream);
}
.logo-swap.is-missing .logo-swap__text { display: inline; }
.logo-swap__fallback-star { display: none; }
.logo-swap.is-missing .logo-swap__fallback-star { display: block; }

/* ---------- 9. Cards ---------- */
.grid {
  display: grid;
  gap: 1.4rem;
}
@media (min-width: 700px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

.book-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.book-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.book-card .media {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  aspect-ratio: 1 / 1;
}
.book-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
  padding: 1.3rem 1.35rem 1.5rem;
}
.book-card__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--navy);
  margin: 0;
}
.book-card__meta {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}
.book-card__text {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}
.book-card__actions { margin-top: auto; padding-top: 0.9rem; }

.badge {
  align-self: flex-start;
  padding: 0.28rem 0.65rem;
  border-radius: var(--radius-pill);
  background: rgba(44, 98, 175, 0.1);
  color: var(--royal);
  font-family: var(--font-ui);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.badge--gold { background: rgba(209, 179, 111, 0.24); color: #6f5620; }
.badge--dark {
  background: rgba(232, 224, 200, 0.14);
  color: var(--cream);
}
.badge--soon { background: rgba(7, 16, 42, 0.08); color: var(--ink-soft); }

/* Horizontal shelf on small screens */
.shelf {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(232px, 78%);
  gap: 1.1rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.9rem;
  margin-inline: -1.3rem;
  padding-inline: 1.3rem;
  scrollbar-width: thin;
}
.shelf > * { scroll-snap-align: start; }
.shelf::-webkit-scrollbar { height: 6px; }
.shelf::-webkit-scrollbar-thumb {
  background: rgba(7, 16, 42, 0.22);
  border-radius: 99px;
}
@media (min-width: 900px) {
  .shelf {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(4, 1fr);
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
    padding-bottom: 0;
  }
}

/* Quiet feature strip */
.strip {
  display: grid;
  gap: 1.6rem;
  align-items: center;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(135deg, rgba(44, 98, 175, 0.94), rgba(12, 28, 58, 0.96));
  color: var(--cream);
  box-shadow: var(--shadow-lg);
}
@media (min-width: 780px) {
  .strip { grid-template-columns: 220px 1fr; gap: 2.4rem; }
}
.strip .media {
  border-color: rgba(232, 224, 200, 0.24);
  background:
    radial-gradient(120% 90% at 70% 8%, rgba(44, 98, 175, 0.55) 0%, transparent 62%),
    rgba(7, 16, 42, 0.55);
  box-shadow: none;
}
.strip .media__label { color: rgba(232, 224, 200, 0.7); }
.strip h2, .strip h3 { color: var(--cream); }
.strip p { color: rgba(232, 224, 200, 0.88); }

/* ---------- 10. Newsletter / forms ---------- */
.newsletter {
  position: relative;
  isolation: isolate;
  padding: clamp(2rem, 4.5vw, 3.4rem);
  border-radius: calc(var(--radius) + 8px);
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(44, 98, 175, 0.5) 0%, transparent 60%),
    linear-gradient(150deg, #0c1c3a 0%, #07102a 70%);
  color: var(--cream);
  border: 1px solid rgba(209, 179, 111, 0.3);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.newsletter::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -60px;
  width: 240px;
  height: 240px;
  z-index: -1;
  opacity: 0.16;
  background: url("../img/motif.svg") center / contain no-repeat;
}
.newsletter h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  color: var(--gold);
}
.newsletter .small { color: rgba(232, 224, 200, 0.68); }
.newsletter__layout { display: grid; gap: clamp(1.4rem, 3vw, 2.6rem); }
@media (min-width: 880px) {
  .newsletter__layout { grid-template-columns: 0.9fr 1.1fr; align-items: start; }
}

.form { display: grid; gap: 1rem; }
.form__row { display: grid; gap: 1rem; }
@media (min-width: 560px) {
  .form__row--2 { grid-template-columns: 1fr 1fr; }
}

.field { display: grid; gap: 0.4rem; }
.field label,
.fieldset__legend {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}
.field--light label { color: rgba(232, 224, 200, 0.82); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.78rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.04rem;
  line-height: 1.5;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field textarea { min-height: 8.5rem; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(65, 77, 103, 0.55); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--royal);
  box-shadow: 0 0 0 4px rgba(44, 98, 175, 0.16);
}
.field--light input,
.field--light select,
.field--light textarea {
  background: rgba(255, 255, 255, 0.96);
}

.fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.fieldset__legend { padding: 0; margin-bottom: 0.2rem; }
.checks {
  display: grid;
  gap: 0.45rem 0.9rem;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) { .checks { grid-template-columns: 1fr 1fr; } }
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-family: var(--font-serif);
  font-size: 0.98rem;
  line-height: 1.45;
  color: rgba(232, 224, 200, 0.88);
  cursor: pointer;
}
.check input {
  width: 17px; height: 17px;
  margin-top: 0.22rem;
  accent-color: var(--cranberry);
  flex: none;
}
.check--dark { color: var(--ink-soft); }

.form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 0.3rem;
}
.form__status {
  display: none;
  margin: 0;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  background: rgba(176, 40, 58, 0.1);
  border: 1px solid rgba(176, 40, 58, 0.3);
  color: var(--cranberry-deep);
}
.form__status.is-visible { display: block; }

.honeypot {
  position: absolute !important;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* Compact footer newsletter */
.footer__news .form { gap: 0.7rem; }
.footer__news .form__footer { gap: 0.6rem; }
.footer__news input { padding: 0.65rem 0.85rem; font-size: 0.98rem; }
.footer__news .btn { padding: 0.65rem 1.2rem; font-size: 0.86rem; }

/* ---------- 11. Book detail blocks ---------- */
.book-detail {
  display: grid;
  gap: clamp(1.6rem, 4vw, 3.2rem);
  align-items: start;
  padding-block: clamp(2rem, 4vw, 3.2rem);
  border-top: 1px solid var(--line);
}
.book-detail:first-of-type { border-top: 0; padding-top: 0; }
@media (min-width: 820px) {
  .book-detail { grid-template-columns: 380px 1fr; }
  .book-detail--flip .book-detail__media { order: 2; }
}
.book-detail__media .media { box-shadow: var(--shadow-lg); }
.book-detail h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  color: var(--navy);
  margin-bottom: 0.25em;
}
.book-detail__meta {
  font-family: var(--font-ui);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
}
.book-detail__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.1rem;
  margin-top: 1.4rem;
}
.isbn {
  font-family: var(--font-ui);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- 12. Why a Series ---------- */
.story {
  position: relative;
  isolation: isolate;
  padding: clamp(3.2rem, 7vw, 6rem) 0;
  background-color: #07102a;
  background-image: url("../img/Why_Series_Treasure_Chest_BG_Faded_Mobile.png");
  background-size: cover;
  background-position: center 20%;
  color: var(--cream);
  overflow: hidden;
}
@media (min-width: 800px) {
  .story {
    background-image: url("../img/Why_Series_Treasure_Chest_BG_Faded.png");
    background-position: center right;
  }
}
.story::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 16, 42, 0.72) 0%, rgba(7, 16, 42, 0.55) 45%, rgba(7, 16, 42, 0.92) 100%),
    linear-gradient(90deg, rgba(7, 16, 42, 0.85) 0%, rgba(7, 16, 42, 0.35) 60%, rgba(7, 16, 42, 0.1) 100%);
}
.story .title { color: var(--gold); }
.story__copy {
  max-width: 38rem;
  color: rgba(238, 232, 216, 0.92);
  font-size: clamp(1.06rem, 1.2vw, 1.16rem);
  line-height: 1.78;
}
.story__copy p { margin-bottom: 1.05em; }
.story__copy strong { color: var(--white); font-weight: 600; }
.story__copy ul {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 1.2em;
  padding-left: 1.1rem;
}
.story__copy li { padding-left: 0.2rem; }
.story__copy li::marker { color: var(--gold); }
.story__figure {
  max-width: 380px;
  margin: clamp(1.6rem, 4vw, 2.6rem) 0 0;
}
.story__figure .media { box-shadow: var(--shadow-lg); }

/* Cream call-to-action card with gold border */
.cta-card {
  margin-top: clamp(2rem, 4.5vw, 3.4rem);
  padding: clamp(1.6rem, 3.6vw, 2.8rem);
  border-radius: calc(var(--radius) + 6px);
  background: #f5efdf;
  border: 1.5px solid #e8c978;
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}
.cta-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  color: #2c62af;
  margin-bottom: 0.4em;
}
.cta-card > p { color: var(--ink-soft); max-width: 46rem; }
.cta-card .check { color: var(--ink-soft); }
.cta-card .field label,
.cta-card .fieldset__legend { color: var(--ink-soft); }

/* ---------- 13. About ---------- */
.about-copy {
  max-width: 40rem;
  font-size: clamp(1.06rem, 1.2vw, 1.18rem);
  line-height: 1.78;
}
.about-copy p + p { margin-top: 1.05em; }
.about-copy .drop::first-letter {
  initial-letter: 3;
  -webkit-initial-letter: 3;
  font-family: var(--font-display);
  color: var(--royal);
  padding-right: 0.5rem;
}
@supports not (initial-letter: 3) {
  .about-copy .drop::first-letter {
    float: left;
    font-family: var(--font-display);
    font-size: 3.6rem;
    line-height: 0.82;
    color: var(--royal);
    padding: 0.08em 0.5rem 0 0;
  }
}
.credit-line {
  font-family: var(--font-ui);
  font-size: 0.86rem;
  line-height: 1.7;
  color: var(--ink-soft);
  padding-left: 1rem;
  border-left: 2px solid var(--gold);
  margin-top: 1.6rem;
}

/* Contact rows */
.contact-list {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.contact-list li {
  display: grid;
  gap: 0.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.contact-list span {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.contact-list a { font-family: var(--font-serif); font-size: 1.1rem; }

/* ---------- 14. Footer ---------- */
.site-footer {
  position: relative;
  isolation: isolate;
  background: #050c1f;
  color: rgba(232, 224, 200, 0.78);
  padding: clamp(2.6rem, 5vw, 4rem) 0 1.6rem;
  border-top: 1px solid rgba(209, 179, 111, 0.22);
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(70% 90% at 88% 0%, rgba(44, 98, 175, 0.22) 0%, transparent 62%),
    linear-gradient(180deg, rgba(7, 16, 42, 0.4), transparent 40%);
}
.footer__grid {
  display: grid;
  gap: clamp(1.8rem, 4vw, 3rem);
}
@media (min-width: 820px) {
  .footer__grid { grid-template-columns: 1.1fr 0.7fr 1.1fr; }
}
.footer__brand { display: grid; gap: 0.9rem; justify-items: start; }
.footer__brand .brand__word { font-size: 1.3rem; }
.footer__line {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(232, 224, 200, 0.62);
  max-width: 30ch;
  margin: 0;
}
.footer__motif { width: 44px; height: 44px; opacity: 0.85; }

.footer__heading {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
}
.footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.footer__links a {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  color: rgba(232, 224, 200, 0.78);
  text-decoration: none;
}
.footer__links a:hover { color: var(--white); text-decoration: underline; }
.footer__social { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.3rem; }
.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 0.7rem;
  border: 1px solid rgba(232, 224, 200, 0.22);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(232, 224, 200, 0.78);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.footer__social a:hover { border-color: var(--gold); color: var(--white); }

.footer__bottom {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.3rem;
  border-top: 1px solid rgba(232, 224, 200, 0.14);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: rgba(232, 224, 200, 0.55);
}
.footer__bottom a { color: rgba(232, 224, 200, 0.8); text-decoration: none; }
.footer__bottom a:hover { color: var(--gold); text-decoration: underline; }

/* ---------- 15. Motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__sky::after { animation: none; }
}

/* ---------- 16. Responsive header ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    padding: 1.2rem 1.3rem 1.6rem;
    background: #07102a;
    border-bottom: 1px solid rgba(209, 179, 111, 0.25);
    box-shadow: 0 30px 50px -30px rgba(0, 0, 0, 0.6);
  }
  .nav.is-open { display: flex; }
  .nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav ul li { border-bottom: 1px solid rgba(232, 224, 200, 0.1); }
  .nav ul a {
    display: block;
    padding: 0.85rem 0.2rem;
    font-size: 1rem;
  }
  .nav a::after { display: none; }
  .nav .nav__cta { margin-top: 1rem; justify-content: center; }
  .header__inner { position: relative; }
}

@media (max-width: 520px) {
  .hero { min-height: 82svh; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__play { display: none; }
  .newsletter { padding: 1.5rem; }
}

/* ---------- 17. Print ---------- */
@media print {
  .site-header, .site-footer, .hero__play, .newsletter { display: none; }
  body { background: #fff; color: #000; }
  .hero, .page-hero, .section--navy, .story { background: #fff !important; color: #000 !important; }
}
