/* =====================================================================
   Phapano Press — For Such a Time as This
   Warm, light editorial theme (background = logo cream)
   ===================================================================== */

/* ---------- Custom properties ---------- */
:root {
  /* Master brand palette */
  --terracotta: #B25D3E;
  --terracotta-dark: #96482f;
  --black: #000000;

  /* Warm cream family (main = logo background colour) */
  --cream: #F0EFEC;        /* page background — matches the logo */
  --cream-deep: #E7E1D6;   /* alternating sections */
  --panel: #FBFAF7;        /* cards / form surfaces */

  /* Book accent (use sparingly, book-specific only) */
  --gold: #B69255;         /* decorative rules, dots, borders */
  --gold-text: #8c6a34;    /* accessible gold for small text/labels */

  /* Ink / text */
  --ink: #16110d;
  --ink-soft: #4a413a;
  --muted: #766c63;
  --on-dark: #F0EFEC;

  /* Borders */
  --line: #d8ccbe;
  --line-strong: #16110d;
  --radius: 3px;

  /* Typography */
  --font-serif: "Cormorant Garamond", "Libre Baskerville", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", "Helvetica Neue", Arial, sans-serif;

  /* Spacing scale */
  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2rem;
  --sp-5: 3rem;
  --sp-6: 4.5rem;
  --sp-7: 6.5rem;

  /* Layout */
  --content-width: 1160px;
  --content-narrow: 760px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  /* Motion */
  --speed: 220ms;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --header-h: 112px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--terracotta); text-decoration: none; transition: color var(--speed) var(--ease); }
a:hover { color: var(--terracotta-dark); }

h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; line-height: 1.08; margin: 0 0 var(--sp-2); letter-spacing: 0.2px; }

p { margin: 0 0 var(--sp-2); }

em { font-style: italic; }

.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  left: var(--sp-2);
  top: -60px;
  background: var(--black);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  z-index: 200;
  transition: top var(--speed) var(--ease);
}
.skip-link:focus { top: var(--sp-2); color: #fff; }

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

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 var(--sp-2);
}
.eyebrow-gold { color: var(--gold-text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease),
              border-color var(--speed) var(--ease), transform var(--speed) var(--ease);
  text-align: center;
}
.btn-sm { padding: 0.6rem 1.1rem; font-size: 0.85rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--terracotta); color: #fff; border-color: var(--terracotta); }
.btn-primary:hover { background: var(--terracotta-dark); border-color: var(--terracotta-dark); color: #fff; }

.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--cream); }

.btn:active { transform: translateY(1px); }

/* ---------- Header / nav (light) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  transition: padding var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-block: 1rem;
  transition: padding var(--speed) var(--ease);
}
.site-header.scrolled .header-inner { padding-block: 0.5rem; }
.site-header.scrolled { box-shadow: 0 2px 14px rgba(0,0,0,0.08); }

.brand { display: inline-flex; align-items: center; }
.brand-logo {
  height: 84px; width: auto;
  transition: height var(--speed) var(--ease);
}
.site-header.scrolled .brand-logo { height: 64px; }

.primary-nav { display: flex; align-items: center; }
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.01em;
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
}
.nav-menu a:hover { color: var(--terracotta); border-bottom-color: var(--terracotta); }
.nav-cta-item a { color: #fff; border-bottom: none; }
.nav-cta-item a:hover { border-bottom: none; color: #fff; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.nav-toggle-bar { position: relative; width: 18px; height: 2px; background: var(--ink); display: inline-block; }
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink);
  transition: transform var(--speed) var(--ease);
}
.nav-toggle-bar::before { top: -5px; }
.nav-toggle-bar::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Sections ---------- */
.section { padding-block: var(--sp-7); }
.section-head { max-width: var(--content-narrow); margin-bottom: var(--sp-5); }
.section-title { font-size: clamp(1.9rem, 4vw, 2.9rem); color: var(--ink); }
.section-lede { font-size: 1.18rem; color: var(--ink-soft); line-height: 1.6; }

/* ---------- Hero (light, book is the focal point) ---------- */
.hero {
  background: var(--cream);
  color: var(--ink);
  padding-block: clamp(3rem, 7vw, 6rem);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.hero-copy .eyebrow-gold { margin-bottom: var(--sp-3); }
.hero-title {
  font-size: clamp(2.6rem, 6.5vw, 5rem);
  color: var(--ink);
  margin-bottom: var(--sp-3);
}
.hero-lede {
  font-size: 1.22rem;
  color: var(--ink-soft);
  max-width: 34ch;
  margin-bottom: var(--sp-4);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-4); }

.hero-release {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin: 0;
}
.release-dot { width: 8px; height: 8px; background: var(--gold); border-radius: 50%; display: inline-block; }

/* ---------- 3D book render (pre-rendered image, gently floating) ---------- */
.book-scene {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(1rem, 3vw, 2.5rem);
  perspective: 1600px;
}
.book-3d-render {
  width: min(360px, 76vw);
  /* transparent PNG floats on the cream; layered shadow keeps it grounded */
  filter:
    drop-shadow(-6px 14px 16px rgba(0, 0, 0, 0.24))
    drop-shadow(-16px 34px 42px rgba(0, 0, 0, 0.20));
  transform-style: preserve-3d;
  animation: bookFloat 7s ease-in-out infinite;
  will-change: transform;
}
.book-3d-render:hover { animation-play-state: paused; }
@keyframes bookFloat {
  0%   { transform: perspective(1600px) rotateY(-4deg) translateY(0); }
  50%  { transform: perspective(1600px) rotateY(-11deg) translateY(-14px); }
  100% { transform: perspective(1600px) rotateY(-4deg) translateY(0); }
}

/* ---------- About / features ---------- */
.about { background: var(--cream); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.feature {
  padding: var(--sp-5) var(--sp-5) var(--sp-5) 0;
  border-bottom: 1px solid var(--line);
}
.feature:nth-child(odd) { border-right: 1px solid var(--line); padding-left: 0; }
.feature:nth-child(even) { padding-left: var(--sp-5); }
.feature-index {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--terracotta);
  display: block;
  margin-bottom: var(--sp-2);
}
.feature-title { font-size: 1.6rem; margin-bottom: 0.6rem; }
.feature p { color: var(--ink-soft); margin: 0; }

/* ---------- Inside the book ---------- */
.inside { background: var(--cream-deep); }
.seasons-grid {
  list-style: none;
  margin: 0 0 var(--sp-6);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.season {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: var(--sp-3);
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.4rem;
  background: var(--panel);
}
.season-num {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.season-name { font-family: var(--font-serif); font-size: 1.4rem; line-height: 1.15; color: var(--ink); }

/* Sample preview (light panel with gold accents) */
.sample-preview {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 4rem);
}
.sample-preview-body { max-width: 720px; }
.sample-preview-title { color: var(--ink); font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-bottom: var(--sp-3); }
.sample-excerpt {
  margin: 0 0 var(--sp-4);
  padding-left: var(--sp-3);
  border-left: 2px solid var(--gold);
}
.sample-excerpt p { font-family: var(--font-serif); font-size: 1.4rem; line-height: 1.4; color: var(--ink); font-style: italic; }
.sample-excerpt cite { font-family: var(--font-sans); font-style: normal; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.sample-week { border-top: 1px solid var(--line); padding-top: var(--sp-3); margin-bottom: var(--sp-3); }
.sample-week-label { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-text); margin-bottom: 0.4rem; }
.sample-week-text { color: var(--ink-soft); margin: 0; }
.sample-note { color: var(--ink-soft); font-size: 0.98rem; margin-bottom: var(--sp-4); }
.sample-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* ---------- Author ---------- */
.author { background: var(--cream); }
.author-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.author-photo img {
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 24px 52px rgba(22, 17, 13, 0.22);
}
.author-copy p { font-size: 1.1rem; color: var(--ink-soft); }

/* ---------- Phapano Press (light) ---------- */
.press { background: var(--cream-deep); color: var(--ink); text-align: center; }
.press-inner { max-width: var(--content-narrow); margin-inline: auto; }
.press .eyebrow { color: var(--terracotta); }
.press .section-title { color: var(--ink); }
.press-copy { font-size: 1.15rem; color: var(--ink-soft); margin-bottom: var(--sp-5); }
.press-logo { height: 116px; width: auto; margin: 0 auto var(--sp-3); }
.press-motto {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--terracotta);
  margin: 0;
}

/* ---------- Pre-order ---------- */
.preorder { background: var(--cream); }
.preorder-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.preorder-meta {
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: var(--sp-4);
  background: var(--panel);
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}
.preorder-cover {
  width: 100%;
  max-width: 240px;
  margin: 0 auto var(--sp-3);
  box-shadow: 0 14px 34px rgba(0,0,0,0.20);
  border-radius: 2px;
}
.preorder-book-title { font-size: 1.5rem; margin-bottom: 0.2rem; text-align: center; }
.preorder-subtitle { font-size: 0.92rem; color: var(--muted); text-align: center; margin-bottom: 0.2rem; }
.preorder-author { font-size: 0.92rem; text-align: center; letter-spacing: 0.04em; text-transform: uppercase; color: var(--terracotta); margin-bottom: var(--sp-3); }
.preorder-details { margin: 0 0 var(--sp-2); border-top: 1px solid var(--line); }
.preorder-details > div {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.6rem 0; border-bottom: 1px solid var(--line);
}
.preorder-details dt { font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.preorder-details dd { margin: 0; font-weight: 600; color: var(--ink); }
.preorder-price dd { color: var(--gold-text); font-size: 1.1rem; }
.preorder-delivery-note { font-size: 0.88rem; color: var(--muted); margin: var(--sp-2) 0 0; }
.preorder-price-note { font-size: 0.85rem; color: var(--muted); text-align: center; margin: var(--sp-2) 0 0; }

/* Where-to-buy panel */
.buy-panel { align-self: start; }
.buy-heading { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: var(--sp-2); }
.buy-intro { color: var(--ink-soft); margin-bottom: var(--sp-4); max-width: 46ch; }
.retailer-list { display: flex; flex-direction: column; gap: 1.25rem; max-width: 440px; margin-bottom: var(--sp-4); }
.retailer-btn { font-size: 1rem; padding: 1.05rem 1.4rem; }
.buy-note { font-size: 0.92rem; color: var(--muted); max-width: 46ch; margin-bottom: var(--sp-3); }

/* ---------- Forms ---------- */
.form { max-width: 560px; }
.field { margin-bottom: var(--sp-3); border: 0; padding: 0; }
fieldset.field { min-width: 0; }
.field > label,
.field > legend {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
  padding: 0;
  color: var(--ink);
}
.optional { font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: 0; }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field textarea,
.field select {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 2px rgba(178,93,62,0.18);
  outline: none;
}
.field textarea { resize: vertical; }
.field.invalid input,
.field.invalid textarea,
.field.invalid select { border-color: #b3261e; box-shadow: 0 0 0 2px rgba(179,38,30,0.15); }

.field-error {
  display: block;
  min-height: 1.1em;
  font-size: 0.82rem;
  color: #a11c15;
  margin-top: 0.35rem;
}
.field.invalid .field-error::before { content: "\26A0  "; }

.checkbox { display: flex; align-items: flex-start; gap: 0.55rem; font-weight: 400; letter-spacing: 0; cursor: pointer; }
.checkbox input { margin-top: 0.2rem; accent-color: var(--terracotta); width: 18px; height: 18px; flex: none; }
.field-check .field-error { margin-left: 0; }
.checkbox span { font-size: 0.92rem; line-height: 1.5; color: var(--ink-soft); }

/* Quantity control */
.qty-control {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.qty-btn {
  width: 44px;
  border: none;
  background: var(--cream-deep);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}
.qty-btn:hover { background: var(--terracotta); color: #fff; }
.qty-control input {
  width: 70px !important;
  text-align: center;
  border: none !important;
  border-left: 1px solid var(--line) !important;
  border-right: 1px solid var(--line) !important;
  border-radius: 0 !important;
  -moz-appearance: textfield;
}
.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Honeypot */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-message { font-size: 0.95rem; margin-top: var(--sp-2); min-height: 1.2em; }
.form-message.success { color: var(--terracotta-dark); font-weight: 600; }

/* ---------- Mailing list ---------- */
.mailing { background: var(--cream-deep); }
.mailing-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.mailing-copy p { font-size: 1.12rem; color: var(--ink-soft); }
.mailing-form { max-width: 460px; }

/* ---------- Contact ---------- */
.contact { background: var(--cream); }
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.contact-line {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: var(--sp-2) 0;
  border-top: 1px solid var(--line);
}
.contact-label { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.contact-line a { font-size: 1.15rem; }

/* ---------- Footer (light, grounded with a strong rule) ---------- */
.site-footer { background: var(--cream-deep); color: var(--ink); padding-block: var(--sp-6) var(--sp-3); border-top: 2px solid var(--ink); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 1fr;
  gap: var(--sp-4);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line);
}
.footer-logo { height: 76px; width: auto; margin-bottom: var(--sp-2); }
.footer-tagline { font-family: var(--font-serif); font-style: italic; font-size: 1.2rem; color: var(--terracotta); margin: 0; }
.footer-nav { display: flex; gap: var(--sp-5); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-nav a { color: var(--ink-soft); font-size: 0.92rem; }
.footer-nav a:hover { color: var(--terracotta); }
.footer-contact { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-contact a { color: var(--ink); font-size: 0.95rem; }
.footer-contact a:hover { color: var(--terracotta); }
.footer-bottom { padding-top: var(--sp-3); }
.footer-bottom p { font-size: 0.85rem; color: var(--muted); margin: 0; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  background: var(--terracotta);
  color: #fff;
  border-radius: var(--radius);
  font-size: 1.2rem;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--speed) var(--ease), transform var(--speed) var(--ease), visibility var(--speed), background var(--speed);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--terracotta-dark); color: #fff; }

/* ---------- Sticky mobile pre-order bar (light) ---------- */
.mobile-preorder-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 95;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  background: var(--panel);
  color: var(--ink);
  padding: 0.7rem var(--gutter);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(0,0,0,0.10);
  transform: translateY(110%);
  transition: transform var(--speed) var(--ease);
}
.mobile-preorder-bar.visible { transform: translateY(0); }
.mobile-preorder-info { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.mobile-preorder-title { font-family: var(--font-serif); font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.mobile-preorder-sub { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-text); }

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
}
.modal[hidden] { display: none; }
.modal-overlay { position: absolute; inset: 0; background: rgba(20,14,10,0.55); }
.modal-dialog {
  position: relative;
  background: var(--panel);
  color: var(--ink);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: clamp(1.75rem, 4vw, 3rem);
  border-radius: var(--radius);
  border-top: 3px solid var(--gold);
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
}
.modal-close {
  position: absolute;
  top: 0.75rem; right: 0.9rem;
  width: 40px; height: 40px;
  border: none; background: transparent;
  font-size: 1.8rem; line-height: 1;
  cursor: pointer;
  color: var(--ink);
  border-radius: var(--radius);
}
.modal-close:hover { color: var(--terracotta); }
.modal-title { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: var(--sp-3); }
.modal-body p { font-size: 1.1rem; color: var(--ink-soft); line-height: 1.65; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .book-3d-render { width: min(280px, 66vw); }
  .author-grid,
  .preorder-grid,
  .mailing-inner,
  .contact-grid { grid-template-columns: 1fr; }
  .preorder-meta { position: static; max-width: 420px; }
  .seasons-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 800px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(320px, 84vw);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: var(--sp-2);
    background: var(--panel);
    padding: calc(var(--header-h) + 1rem) var(--sp-4) var(--sp-4);
    transform: translateX(100%);
    transition: transform var(--speed) var(--ease);
    box-shadow: -10px 0 40px rgba(0,0,0,0.18);
    overflow-y: auto;
  }
  .nav-menu.open { transform: translateX(0); }
  .nav-menu a { font-size: 1.05rem; padding: 0.5rem 0; }
  .nav-cta-item { margin-top: var(--sp-2); }
  .nav-cta-item a { width: 100%; }

  .section { padding-block: var(--sp-6); }
  .feature-grid { grid-template-columns: 1fr; }
  .feature { padding: var(--sp-4) 0 !important; border-right: none !important; }
  .mobile-preorder-bar { display: flex; }
}

@media (max-width: 520px) {
  body { font-size: 1rem; }
  .seasons-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-nav { gap: var(--sp-4); }
  .hero-actions .btn,
  .sample-actions .btn { width: 100%; }
  .back-to-top { bottom: 5rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .book-3d-render { animation: none; transform: perspective(1600px) rotateY(-6deg); }
}
