/* ==========================================================================
   Life Stories — design tokens
   ========================================================================== */
:root {
  --color-bg: #ffffff;
  --color-bg-soft: #f5f5f7;
  --color-ink: #1d1d1f;
  --color-ink-soft: #6e6e73;
  --color-ink-faint: #86868b;

  --color-primary: #c1622d;
  --color-primary-dark: #a34f21;
  --color-primary-tint: #f5e3d4;

  --color-border: #d2d2d7;
  --color-border-soft: #e8e8ed;

  --color-dark: #000000;
  --color-dark-surface: #1d1d1f;
  --color-graphite: #2a2724;
  --color-cream-on-dark: #f5f5f7;
  --color-ink-soft-on-dark: #a1a1a6;
  --color-border-on-dark: rgba(245, 245, 247, 0.16);

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Lora", Georgia, serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 7.5rem;

  --radius-sm: 10px;
  --radius-md: 28px;
  --radius-pill: 980px;

  --page-pad-x: 7vw;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-book: cubic-bezier(0.65, 0, 0.35, 1);
}

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

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

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

/* Slow, ambient zoom applied to every static photograph on the site so
   motion is present everywhere, not just in hero/closing video. */
.kenburns {
  animation: siteKenBurns 18s ease-in-out infinite alternate;
}

@keyframes siteKenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.07); }
}

@media (prefers-reduced-motion: reduce) {
  .kenburns {
    animation: none;
  }
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--color-ink);
}

p {
  margin: 0;
}

a {
  color: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font-family: inherit;
}

::selection {
  background: var(--color-primary);
  color: var(--color-cream-on-dark);
}

:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Reveal within a page, triggered when the page becomes active */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: transform, opacity;
}

.book-page.is-active .reveal,
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 2.2rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out),
    border-color 200ms var(--ease-out), transform 200ms var(--ease-out);
  min-height: 44px;
}

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

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-primary-dark);
}

.btn--block {
  width: 100%;
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

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

/* ==========================================================================
   Fixed header (persists across every page)
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  padding: 0.9rem var(--page-pad-x);
  background: rgba(10, 9, 8, 0.32);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: #fff;
  text-decoration: none;
  transition: opacity 300ms var(--ease-out);
}

.logo:hover {
  opacity: 0.8;
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.header-phone {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 300ms var(--ease-out);
}

.header-phone:hover {
  opacity: 0.8;
}

.header-cta {
  padding: 0.55rem 1.3rem;
  font-size: 0.85rem;
  min-height: 38px;
}

/* ==========================================================================
   Side progress bar — thin vertical indicator of scroll position through
   the book, replacing the old page counter / arrows / dots
   ========================================================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  width: 3px;
  background: rgba(120, 120, 128, 0.18);
  pointer-events: none;
}

.scroll-progress-fill {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 100%;
  transform: scaleY(0);
  transform-origin: top;
  background: var(--color-primary);
}

/* Bottom meta bar — current chapter number + section title, synced to the active page */
.book-meta-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.75rem var(--page-pad-x);
  background: rgba(10, 9, 8, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out);
  pointer-events: none;
}

.book-meta-bar.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.book-meta-chapter {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--color-primary);
  white-space: nowrap;
}

.book-meta-title {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  color: var(--color-ink-soft-on-dark);
}

/* ==========================================================================
   Book pages — plain vertical flow
   ========================================================================== */
.book-page {
  position: relative;
  width: 100%;
  overflow: hidden;
  scroll-margin-top: 90px;
  background: var(--color-bg);
}

/* Cover-style pages (hero / closing): full-bleed media, overlaid content,
   filling the first viewport the reader sees before they start scrolling. */
.book-page--cover {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--color-dark);
  color: var(--color-cream-on-dark);
}

.book-page--cover:not(.book-page--closing) {
  align-items: flex-start;
}

.book-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.book-media img,
.book-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-page--cover .book-media img,
.book-page--cover .book-media video {
  animation: bookKenBurns 20s ease-in-out infinite alternate;
}

@keyframes bookKenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  .book-page--cover .book-media img,
  .book-page--cover .book-media video {
    animation: none;
  }
}

/* Hero triptych — 3 videos crossfading in place of a single hero image */
.hero-video-stack {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.8s ease;
  animation: bookKenBurns 20s ease-in-out infinite alternate;
}

.hero-video.is-active {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero-video {
    animation: none;
  }
}

.book-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.book-scrim--cover {
  background:
    linear-gradient(180deg, rgba(26, 23, 20, 0.78) 0%, rgba(26, 23, 20, 0.6) 45%, rgba(26, 23, 20, 0.88) 100%),
    linear-gradient(90deg, rgba(26, 23, 20, 0) 0%, rgba(26, 23, 20, 0.5) 40%, rgba(26, 23, 20, 0.86) 100%);
}

.book-scrim--closing {
  background:
    linear-gradient(180deg, rgba(26, 23, 20, 0.86) 0%, rgba(32, 26, 20, 0.72) 45%, rgba(26, 23, 20, 0.9) 100%),
    radial-gradient(60% 60% at 50% 0%, rgba(193, 98, 45, 0.28), transparent 65%);
}

.book-page-inner {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding: 0 var(--page-pad-x);
}

/* Hero copy leans on the right side of the frame, where the generated
   scene leaves empty dark space — the scrim keeps it legible even where
   it overlaps the book image itself, so the column doesn't need to be
   squeezed narrow to avoid the art. */
.book-page--cover:not(.book-page--closing) .book-page-inner {
  max-width: min(880px, 62vw);
  padding-top: clamp(6.5rem, 20vh, 10rem);
}

.book-page--cover:not(.book-page--closing) .page-eyebrow {
  margin-bottom: var(--space-md);
}

.book-page--cover:not(.book-page--closing) h1 {
  margin-bottom: var(--space-md);
}

.book-page--cover:not(.book-page--closing) .page-lede {
  margin-top: 0;
  margin-bottom: var(--space-lg);
}

.book-page--cover:not(.book-page--closing) .page-actions {
  margin-top: 0;
}

/* .book-page--plain already applies the page's own horizontal gutter
   (padding: var(--space-2xl) var(--page-pad-x)) — this variant must not
   add a second var(--page-pad-x) on top of it, or wide grids (pricing,
   addons) end up squeezed to roughly half their intended width. */
.book-page-inner--wide {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  padding: 0;
}

.book-page-inner--center {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.page-eyebrow {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.book-page--plain .page-eyebrow {
  color: var(--color-primary-dark);
}

.page-title {
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 30ch;
}

.page-subtitle {
  margin-top: var(--space-xs);
  font-size: 1.05rem;
  color: var(--color-ink-soft);
  max-width: 52ch;
}

.book-page--cover h1 {
  font-size: clamp(2rem, 3.1vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.14;
  color: #fff;
}

.book-page--cover h1 em {
  color: var(--color-primary);
  font-style: normal;
}

.page-lede {
  margin-top: var(--space-sm);
  font-size: 1.1rem;
  color: var(--color-ink-soft-on-dark);
  max-width: 48ch;
}

.page-lede p + p {
  margin-top: 0.5rem;
}

.page-actions {
  margin-top: var(--space-sm);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.page-actions--center {
  justify-content: center;
}

.page-note {
  font-size: 0.9rem;
  color: var(--color-ink-soft-on-dark);
  font-style: italic;
}

.page-hint {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 2rem;
  text-align: center;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--color-ink-soft-on-dark);
}

@media (max-height: 700px) {
  .page-hint {
    display: none;
  }
}

/* ==========================================================================
   Spread pages — two columns with a book spine gutter
   ========================================================================== */
.book-page--spread {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-2xl);
  padding: var(--space-2xl) var(--page-pad-x);
}

.book-page--spread .book-media {
  position: relative;
  inset: auto;
  /* aspect-ratio is set inline per section, matching that photo/video's
     real pixel dimensions exactly — see comment on item 1 fix. */
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg);
}

/* Portrait-shot source media (archive photo, interview video) would tower
   over its text column at full column width — cap the width so its exact
   aspect ratio yields a sane height instead, and centre it in its column. */
.book-media--portrait {
  max-width: min(100%, 380px);
  margin-inline: auto;
}

.book-spine {
  position: absolute;
  left: 50%;
  top: 12%;
  bottom: 12%;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, var(--color-border) 15%, var(--color-border) 85%, transparent);
  box-shadow: 0 0 24px 6px rgba(0, 0, 0, 0.05);
}

.book-page--spread .book-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.book-copy .why-quote {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.1vw, 1.7rem);
  line-height: 1.4;
  color: var(--color-ink);
}

.why-quote .accent {
  color: var(--color-primary);
}

.book-copy .lead {
  font-size: 1.1rem;
  color: var(--color-ink);
  margin-top: var(--space-xs);
}

.book-copy p {
  color: var(--color-ink-soft);
  font-size: 1.02rem;
}

.process-numeral {
  display: inline-block;
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.book-copy h3 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  margin-top: var(--space-xs);
}

.book-copy > p {
  margin-top: var(--space-xs);
  font-size: 1.1rem;
  max-width: 42ch;
}

/* Process media: book-page-open reveal, keyed off the page's active state */
.book-media--reveal {
  clip-path: inset(0 50% 0 50%);
  transition: clip-path 1100ms var(--ease-book);
}

.book-page.is-active .book-media--reveal {
  clip-path: inset(0 0 0 0);
}

.book-media--reveal img {
  object-fit: contain;
  transform: scale(1.18);
  transition: transform 1400ms var(--ease-book);
}

.book-page.is-active .book-media--reveal img {
  transform: scale(1);
}

/* Drop cap — illuminated-manuscript style initial letter on lead paragraphs */
.dropcap-block .lead::first-letter {
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 700;
  float: left;
  line-height: 0.82;
  padding: 0.05em 0.1em 0 0;
  color: var(--color-primary);
}

/* ==========================================================================
   Chapter dividers — book-style chapter-opener pages between sections
   ========================================================================== */
/* Dividers hold far less content than a regular spread (a centred numeral
   + title + one line), so the same padding-2xl used elsewhere leaves them
   looking mostly empty — a shorter block here keeps the same rhythm without
   the dead air. */
.book-page--divider {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--color-bg-soft);
  padding: var(--space-xl) var(--page-pad-x);
}

.book-page--divider-dark {
  background: var(--color-dark);
  color: var(--color-cream-on-dark);
}

.chapter-divider-inner {
  max-width: 560px;
  padding: 0 var(--page-pad-x);
}

.chapter-numeral {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 6.5rem);
  line-height: 1;
  color: var(--color-primary);
}

.chapter-title {
  margin-top: var(--space-sm);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.book-page--divider-dark .chapter-title {
  color: #fff;
}

.chapter-blurb {
  margin-top: var(--space-md);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--color-ink-soft);
}

.book-page--divider-dark .chapter-blurb {
  color: var(--color-ink-soft-on-dark);
}

.chapter-price-callout {
  margin-top: var(--space-md);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 700;
  color: var(--color-ink);
}

.chapter-price-callout span {
  display: block;
  margin-top: 0.3rem;
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  color: var(--color-ink-soft);
}

.chapter-ornament {
  margin: var(--space-lg) auto 0;
  width: 64px;
  height: 1px;
  background: var(--color-primary);
}

/* Chapter divider with a frontispiece photo — same spread grid as process
   pages, but keeping the divider's typographic chapter-opener treatment. */
.book-page--divider-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  justify-content: stretch;
  gap: var(--space-2xl);
  padding: var(--space-xl) var(--page-pad-x);
  text-align: left;
}

.book-page--divider-media .chapter-divider-inner {
  max-width: 460px;
  padding: 0;
}

.book-page--divider-media .chapter-ornament {
  margin: var(--space-lg) 0 0;
}

.divider-media {
  position: relative;
  /* aspect-ratio is set inline, matching the photo's real pixel dimensions. */
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg);
}

.divider-media img {
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   Plain content pages
   ========================================================================== */
.book-page--plain {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl) var(--page-pad-x);
}

.audience-number {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--color-primary);
  letter-spacing: 0.08em;
}

.audience-tags {
  margin-top: var(--space-sm);
  padding-top: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.98rem;
  color: var(--color-ink-soft);
}

.audience-tags li:not(:last-child)::after {
  content: "·";
  color: var(--color-ink-faint);
  margin: 0 0.5em;
}

.audience-closing {
  margin-top: var(--space-md);
  font-style: italic;
  color: var(--color-ink-soft);
  font-size: 1rem;
  max-width: 42ch;
}

/* Pricing */
.pricing-grid {
  margin-top: var(--space-lg);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-lg);
  align-items: stretch;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.plan-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-md) var(--space-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 300ms var(--ease-out);
}

.plan-card:hover {
  border-color: var(--color-primary);
}

.plan-card--popular {
  background: var(--color-dark);
  border-color: var(--color-dark);
  color: var(--color-cream-on-dark);
}

.plan-card--popular:hover {
  border-color: var(--color-primary);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: var(--space-sm);
  background: var(--color-primary);
  color: #fff;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
}

.plan-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.plan-tagline {
  font-style: italic;
  color: var(--color-ink-soft);
  margin-top: 0.3rem;
  font-size: 0.88rem;
}

.plan-card--popular .plan-tagline {
  color: var(--color-ink-soft-on-dark);
}

.plan-desc {
  color: var(--color-ink-soft);
  margin-top: 0.5rem;
  font-size: 0.86rem;
  line-height: 1.5;
}

.plan-card--popular .plan-desc {
  color: var(--color-ink-soft-on-dark);
}

.plan-price {
  font-family: var(--font-display);
  font-size: 1.7rem;
  margin-top: var(--space-sm);
  font-variant-numeric: tabular-nums;
}

.plan-features {
  margin-top: var(--space-sm);
  flex-grow: 1;
}

.plan-features li {
  display: flex;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.88rem;
}

.plan-features li::before {
  content: "✓";
  color: var(--color-primary);
  font-weight: 600;
  flex-shrink: 0;
}

.plan-card--popular .plan-features li::before {
  color: var(--color-primary);
}

.plan-cta {
  margin-top: var(--space-sm);
}

.pricing-consult {
  margin-top: var(--space-xl);
  text-align: center;
}

.pricing-consult-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: var(--space-sm);
}

/* Feature layout — one accent card (headline benefit) + a grid of compact
   cards alongside it. Generic component, reused wherever a set of selling
   points needs a hierarchy instead of a flat list. */
.feature-layout {
  margin-top: var(--space-xl);
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 2fr;
  gap: var(--space-lg);
  align-items: stretch;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.feature-grid .feature-card:last-child {
  grid-column: 1 / -1;
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-md);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}

.feature-index {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--color-primary);
  letter-spacing: 0.04em;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}

.feature-card p {
  font-family: var(--font-body);
  font-size: 0.96rem;
  line-height: 1.4;
  color: var(--color-ink-soft);
}

.feature-card--accent {
  justify-content: center;
  padding: var(--space-xl) var(--space-lg);
  background: var(--color-graphite);
  border-color: var(--color-graphite);
}

.feature-card--accent h3 {
  font-size: clamp(1.5rem, 2.2vw, 1.9rem);
  color: #fff;
}

.feature-card--accent p {
  font-size: 1.05rem;
  color: var(--color-ink-soft-on-dark);
}

/* Closing page */
.book-page--closing h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.book-page--closing p {
  margin-top: var(--space-xl);
  font-size: 1.05rem;
  color: var(--color-ink-soft-on-dark);
}

.closing-footer {
  margin-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.closing-copyright {
  font-size: 0.82rem;
  color: var(--color-ink-soft-on-dark);
  opacity: 0.7;
}

.closing-phone {
  font-size: 0.85rem;
  color: var(--color-ink-soft-on-dark);
  text-decoration: none;
  transition: color 300ms var(--ease-out);
}

.closing-phone:hover {
  color: #fff;
}

/* ==========================================================================
   Order form modal
   ========================================================================== */
body.modal-open {
  overflow: hidden;
}

.form-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm);
}

.form-modal.is-open {
  display: flex;
}

.form-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 9, 8, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.form-modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.form-modal-close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--color-ink-soft);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: background-color 200ms var(--ease-out);
}

.form-modal-close:hover {
  background: var(--color-bg-soft);
}

.form-modal-title {
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  padding-right: var(--space-lg);
}

.form-modal-subtitle {
  margin-top: 0.5rem;
  font-size: 0.98rem;
  color: var(--color-ink-soft);
  max-width: 42ch;
}

.form-modal-success {
  text-align: center;
}

.form-modal-success .form-modal-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.form-modal-success .btn {
  margin-top: var(--space-md);
}

.order-form {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-ink);
}

.form-field em {
  color: var(--color-primary);
  font-style: normal;
}

.form-field input,
.form-field select {
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 400;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-ink);
}

.form-field input:focus-visible,
.form-field select:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.form-field--checks {
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  gap: 0.55rem;
}

.form-field--checks legend {
  padding: 0 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.form-field--checks label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-ink-soft);
}

.form-field--checks input {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
}

.form-error {
  font-size: 0.86rem;
  color: #b3261e;
}

.form-error a {
  color: inherit;
  text-decoration: underline;
}

.form-submit {
  margin-top: 0.3rem;
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .header-phone {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .form-modal-dialog {
    padding: var(--space-md);
    border-radius: var(--radius-sm);
  }
}

/* ==========================================================================
   Narrow viewports — stack spreads into a single column, declutter chrome
   ========================================================================== */
@media (max-width: 900px) {
  .site-header {
    position: absolute;
    background: rgba(10, 9, 8, 0.45);
  }

  .book-meta-bar,
  .page-hint {
    display: none;
  }

  .book-page--spread,
  .book-page--divider-media {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    padding: 4rem var(--page-pad-x);
    text-align: center;
  }

  .book-page--spread .book-media,
  .divider-media {
    order: -1;
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
  }

  .book-page--divider-media .chapter-divider-inner {
    max-width: 100%;
  }

  .book-page--divider-media .chapter-ornament {
    margin: var(--space-lg) auto 0;
  }

  .book-spine {
    display: none;
  }

  .book-page--plain {
    padding: 4rem var(--page-pad-x);
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .feature-layout,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid .feature-card:last-child {
    grid-column: auto;
  }

  .book-page--cover:not(.book-page--closing) .book-page-inner {
    max-width: 100%;
  }

  .book-page--cover h1 {
    font-size: clamp(1.8rem, 6.6vw, 2.5rem);
  }

  .header-cta {
    display: none;
  }
}
