/* ==========================================================
   The Unclutter Method — site styles
   Palette: deep forest green + warm gold/amber + cream paper
   ========================================================== */

:root {
  --ink: #0E1F1A;
  --green-950: #0F2A22;
  --green-900: #143A30;
  --green-800: #1A4A3D;
  --green-700: #1E5F4F;   /* book cover */
  --green-500: #2F7E68;
  --green-300: #6FA597;
  --moss: #3E6B5A;
  --cream: #F2EBDA;
  --paper: #FAF5E8;
  --paper-2: #F6EFDB;
  --bone: #ECE3CC;
  --gold: #C99A4A;
  --gold-deep: #A57A2E;
  --amber: #E08338;
  --amber-soft: #E8A55F;
  --line: rgba(20, 58, 48, 0.14);
  --line-strong: rgba(20, 58, 48, 0.28);
  --shadow-card: 0 30px 60px -30px rgba(15, 42, 34, 0.35), 0 8px 16px -8px rgba(15, 42, 34, 0.18);
  --shadow-book: 0 40px 80px -30px rgba(8, 22, 18, 0.55), 0 16px 30px -16px rgba(8, 22, 18, 0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* Skip link for keyboard/screen-reader users */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  padding: 12px 22px;
  background: var(--green-900);
  color: var(--paper);
  font-weight: 600;
  font-size: 14px;
  border-radius: 999px;
  z-index: 999;
  transition: top .3s ease;
  white-space: nowrap;
}
.skip-link:focus { top: 16px; }

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Focus indicator */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible, .header-cta:focus-visible {
  outline-offset: 4px;
}

/* Scroll offset for sticky header */
.section, footer, #top {
  scroll-margin-top: 80px;
}

.serif {
  font-family: "Cormorant Garamond", "Cormorant", "EB Garamond", Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: "Manrope", sans-serif;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--moss);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.container {
  width: min(1240px, 100% - 48px);
  margin-inline: auto;
}

/* ===================== HEADER ===================== */
.site-header {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: min(1240px, calc(100% - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 12px 24px;
  background: rgba(250, 245, 232, 0.78);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  box-shadow: 0 10px 30px -20px rgba(15, 42, 34, 0.35);
  transition: background .35s ease, color .35s ease, border-color .35s ease;
}

.site-header.on-dark {
  background: rgba(14, 31, 26, 0.42);
  border-color: rgba(255, 255, 255, 0.14);
  color: #F6EFDB;
}
.site-header.on-dark .nav a { color: #EDE3CB; }
.site-header.on-dark .brand .mark { background: var(--paper); color: var(--green-700); }
.site-header.on-dark .brand .name { color: var(--paper); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}
.brand .mark {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--green-700);
  color: var(--paper);
  display: grid;
  place-items: center;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}
.brand .mark svg { display: block; width: 100%; height: 100%; }
.brand .mark .orbit-dot {
  transform-box: view-box;
  transform-origin: 50% 50%;
  animation: orbit-dot 8s linear infinite;
}
@keyframes orbit-dot {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.brand .name {
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--green-900);
  line-height: 1;
}
.brand .name small {
  display: block;
  font-family: "Manrope", sans-serif;
  font-size: 9.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--moss);
  margin-top: 4px;
  font-weight: 600;
}
.site-header.on-dark .brand .name small { color: rgba(246, 239, 219, 0.7); }

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 auto;
}
.nav a {
  position: relative;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--green-900);
  border-radius: 999px;
  transition: color .25s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 4px;
  width: 0; height: 2px;
  background: var(--amber);
  border-radius: 2px;
  transition: width .3s ease, left .3s ease;
}
.nav a:hover { color: var(--amber); }
.nav a:hover::after { width: 22px; left: calc(50% - 11px); }

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px 11px 20px;
  background: var(--green-700);
  color: var(--paper);
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  transition: background .25s ease, transform .25s ease;
}
.header-cta:hover { background: var(--amber); transform: translateY(-1px); }
.header-cta svg { transition: transform .3s ease; }
.header-cta:hover svg { transform: translateX(3px) rotate(-45deg); }

/* ===================== HERO ===================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  padding: 140px 0 80px;
  color: var(--paper);
}
.hero__bg {
  position: absolute; inset: 0;
  background-image: url("assets/hero-bg.png");
  background-size: cover;
  background-position: center 30%;
  transform: scale(1.06);
  will-change: transform;
  z-index: -2;
}
.hero__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(115deg, rgba(8, 22, 18, 0.78) 0%, rgba(8, 22, 18, 0.55) 38%, rgba(8, 22, 18, 0.25) 70%, rgba(8, 22, 18, 0.55) 100%),
    linear-gradient(180deg, rgba(8, 22, 18, 0.35) 0%, rgba(8, 22, 18, 0) 25%, rgba(8, 22, 18, 0) 70%, rgba(8, 22, 18, 0.6) 100%);
  z-index: -1;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  align-items: center;
  min-height: calc(100vh - 220px);
  min-height: calc(100svh - 220px);
}

.hero__copy { max-width: 640px; }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--paper);
}
.hero__eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(224, 131, 56, 0.25);
}

h1.hero__title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(48px, 8vw, 112px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin: 22px 0 18px;
  color: var(--paper);
}
.hero__title em {
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line > span {
  display: inline-block;
  transform: translateY(110%);
  animation: rise 1s cubic-bezier(.2,.7,.2,1) forwards;
}
.hero__title .line:nth-child(2) > span { animation-delay: .08s; }
.hero__title .line:nth-child(3) > span { animation-delay: .16s; }

@keyframes rise { to { transform: translateY(0); } }

.hero__subtitle {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(20px, 2vw, 26px);
  font-style: italic;
  color: rgba(246, 239, 219, 0.85);
  margin: 0 0 28px;
  font-weight: 400;
}

.hero__lede {
  max-width: 480px;
  font-size: 15.5px;
  line-height: 1.65;
  color: rgba(246, 239, 219, 0.82);
  margin: 0 0 36px;
}

.hero__actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  border-radius: 999px;
  font-family: "Manrope", sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 0;
  transition: transform .25s ease, background .25s ease, color .25s ease, box-shadow .25s ease;
  position: relative;
  overflow: hidden;
}
.btn--primary {
  background: var(--amber);
  color: #1a1208;
  box-shadow: 0 18px 30px -16px rgba(224, 131, 56, 0.6);
}
.btn--primary:hover { background: var(--paper); color: var(--green-900); transform: translateY(-2px); }
.btn--primary .arrow { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.12); transition: transform .3s ease; }
.btn--primary:hover .arrow { transform: translateX(4px); background: var(--green-700); color: var(--paper); }

.btn--ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(246, 239, 219, 0.45);
}
.btn--ghost:hover { background: rgba(246, 239, 219, 0.12); border-color: var(--paper); }

.btn--solid {
  background: var(--green-700);
  color: var(--paper);
}
.btn--solid:hover { background: var(--green-900); transform: translateY(-2px); }

.btn--outline {
  background: transparent;
  color: var(--green-900);
  border: 1px solid var(--line-strong);
}
.btn--outline:hover { background: var(--green-900); color: var(--paper); border-color: var(--green-900); }

/* hero book mount */
.hero__book {
  position: relative;
  display: grid;
  place-items: center;
  perspective: 1500px;
}
.hero__book img {
  width: min(480px, 100%);
  height: auto;
  filter: drop-shadow(0 40px 60px rgba(0,0,0,0.45)) drop-shadow(0 0 30px rgba(0,0,0,0.25));
  transform: rotate(-4deg) translateY(0);
  animation: bookFloat 7s ease-in-out infinite;
  will-change: transform;
}
@keyframes bookFloat {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50% { transform: rotate(-3deg) translateY(-14px); }
}

.hero__book::before {
  content: "";
  position: absolute;
  inset: -40px -20px -40px -20px;
  background: radial-gradient(closest-side, rgba(201, 154, 74, 0.25), transparent 70%);
  z-index: -1;
  filter: blur(20px);
}

.hero__chips {
  display: flex;
  gap: 10px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(246, 239, 219, 0.10);
  border: 1px solid rgba(246, 239, 219, 0.22);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  font-size: 12.5px;
  color: rgba(246, 239, 219, 0.92);
  font-weight: 500;
}
.chip .num { color: var(--amber-soft); font-weight: 700; }

.hero__scroll {
  position: absolute;
  left: 50%; bottom: 28px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: rgba(246, 239, 219, 0.7);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.hero__scroll .line {
  width: 1px; height: 50px;
  background: linear-gradient(180deg, rgba(246,239,219,0) 0%, rgba(246,239,219,0.7) 100%);
  position: relative;
  overflow: hidden;
}
.hero__scroll .line::after {
  content: ""; position: absolute; left: 0; top: -50px;
  width: 100%; height: 50px;
  background: linear-gradient(180deg, var(--amber) 0%, transparent 100%);
  animation: scrollIndicator 2.2s ease-in-out infinite;
}
@keyframes scrollIndicator {
  0% { top: -50px; }
  60%, 100% { top: 100%; }
}

/* ===================== SECTION SHARED ===================== */
.section {
  padding: clamp(80px, 12vh, 140px) 0;
  position: relative;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 40px;
  margin-bottom: 60px;
}

h2.section-title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(40px, 5.5vw, 72px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 14px 0 0;
  color: var(--green-900);
  max-width: 720px;
}
.section-title em { font-style: italic; color: var(--amber); font-weight: 400; }

.section-sub {
  max-width: 360px;
  color: var(--moss);
  font-size: 15px;
  line-height: 1.6;
}

/* reveal-on-scroll base */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .4s; }

/* ===================== AUTHOR ===================== */
.author {
  background: var(--paper-2);
  position: relative;
  overflow: hidden;
}
.author::before {
  content: "";
  position: absolute;
  right: -200px; top: -200px;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 154, 74, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.author__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 80px;
  align-items: center;
}

.author__photo {
  position: relative;
  border-radius: 240px 240px 24px 24px;
  overflow: hidden;
  aspect-ratio: 4/5;
  background: linear-gradient(160deg, var(--green-700), var(--green-900));
  box-shadow: var(--shadow-card);
}
.author__photo .portrait-svg {
  width: 100%; height: 100%; display: block;
}
.author__photo .frame-badge {
  position: absolute;
  bottom: 18px; right: 18px;
  background: var(--paper);
  color: var(--green-900);
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: 22px;
  padding: 10px 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.author__photo .frame-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }

.author__photo .signature {
  position: absolute;
  left: 24px; bottom: 24px;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 38px;
  color: var(--paper);
  opacity: 0.85;
  transform: rotate(-6deg);
  letter-spacing: 0.01em;
}

.author__text p {
  color: var(--green-900);
  font-size: 17px;
  line-height: 1.7;
  margin: 0 0 18px;
  max-width: 580px;
}
.author__text p.lede {
  font-family: "Cormorant Garamond", serif;
  font-size: 26px;
  line-height: 1.4;
  font-style: italic;
  color: var(--green-800);
  border-left: 2px solid var(--amber);
  padding-left: 20px;
  margin: 28px 0 32px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.stat__num {
  font-family: "Cormorant Garamond", serif;
  font-size: 56px;
  line-height: 1;
  color: var(--green-800);
  font-weight: 500;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.stat__num .suffix { font-size: 28px; color: var(--amber); }
.stat__label { font-size: 12.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--moss); font-weight: 600; margin-top: 8px; }

/* ===================== ABOUT BOOK ===================== */
.about-book {
  background: var(--green-900);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.about-book::before {
  content: "";
  position: absolute;
  left: -10%; top: 20%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(224, 131, 56, 0.18) 0%, transparent 65%);
  filter: blur(20px);
}

.about-book .section-title { color: var(--paper); }
.about-book .eyebrow { color: var(--amber-soft); }
.about-book .section-sub { color: rgba(246, 239, 219, 0.7); }

.about-book__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 80px;
  align-items: center;
}

.pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 40px;
}
.pillar {
  padding: 24px;
  background: rgba(246, 239, 219, 0.04);
  border: 1px solid rgba(246, 239, 219, 0.10);
  border-radius: 20px;
  transition: background .3s ease, transform .3s ease, border-color .3s ease;
  cursor: default;
}
.pillar:hover {
  background: rgba(224, 131, 56, 0.08);
  border-color: rgba(224, 131, 56, 0.35);
  transform: translateY(-3px);
}
.pillar .num {
  font-family: "Cormorant Garamond", serif;
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--amber-soft);
  font-weight: 600;
}
.pillar h4 {
  font-family: "Cormorant Garamond", serif;
  font-size: 26px;
  font-weight: 500;
  margin: 8px 0 8px;
  letter-spacing: -0.01em;
}
.pillar p { color: rgba(246, 239, 219, 0.7); font-size: 14px; line-height: 1.55; margin: 0; }

.about-book__visual {
  position: relative;
  display: grid;
  place-items: center;
}
.about-book__visual img {
  width: 100%;
  max-width: 580px;
  height: auto;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.5));
  transform: rotate(2deg);
}
.about-book__visual .ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 110%;
  aspect-ratio: 1;
  border: 1px dashed rgba(201, 154, 74, 0.35);
  border-radius: 50%;
  animation: spinRing 60s linear infinite;
}
.about-book__visual .ring::before {
  content: "";
  position: absolute;
  top: -6px; left: 50%;
  transform: translateX(-50%);
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 20px rgba(224, 131, 56, 0.8);
}
@keyframes spinRing { to { transform: translate(-50%, -50%) rotate(360deg); } }

.about-book__quote {
  margin-top: 50px;
  padding: 32px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(224, 131, 56, 0.12), rgba(201, 154, 74, 0.06));
  border: 1px solid rgba(224, 131, 56, 0.25);
}
.about-book__quote blockquote {
  font-family: "Cormorant Garamond", serif;
  font-size: 32px;
  font-style: italic;
  line-height: 1.3;
  margin: 0;
  color: var(--paper);
}
.about-book__quote .by { font-size: 13px; color: var(--amber-soft); margin-top: 14px; letter-spacing: 0.15em; text-transform: uppercase; font-weight: 600; }

/* ===================== BOOK PREVIEW (page flip) ===================== */
.preview {
  background: var(--paper);
  position: relative;
  overflow: hidden;
}
.preview::after {
  content: "";
  position: absolute;
  left: 50%; top: 0;
  width: 1200px; height: 1200px;
  background: radial-gradient(circle, rgba(201, 154, 74, 0.10) 0%, transparent 60%);
  transform: translate(-50%, -40%);
  pointer-events: none;
}

.bookviewer-wrap {
  display: grid;
  place-items: center;
  margin-top: 40px;
}

.bookviewer {
  position: relative;
  width: min(960px, 100%);
  aspect-ratio: 16 / 10;
}

.book-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book {
  position: relative;
  width: 86%;
  height: 88%;
  display: flex;
}

/* book cast shadow — separate from 3D context so filter doesn't defeat preserve-3d */
.bookviewer::before {
  content: '';
  position: absolute;
  left: 9%; right: 9%; bottom: 2%;
  height: 64px;
  background: rgba(8, 22, 18, 0.42);
  filter: blur(32px);
  border-radius: 50%;
  pointer-events: none;
}

/* the static "base" — open book showing underlying spread */
.book__base {
  position: absolute;
  inset: 0;
  display: flex;
  border-radius: 4px 12px 12px 4px;
  background:
    radial-gradient(ellipse at right, rgba(0,0,0,0.18), transparent 50%),
    linear-gradient(90deg, #efe6cf 0%, #f6efd9 6%, #fbf6e7 50%, #f6efd9 94%, #efe6cf 100%);
  box-shadow:
    inset 0 0 0 1px rgba(15, 42, 34, 0.05),
    inset 12px 0 30px -20px rgba(0,0,0,0.25),
    inset -12px 0 30px -20px rgba(0,0,0,0.25);
  overflow: hidden;
}
.book__base::before {
  content: "";
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 20px;
  transform: translateX(-50%);
  background:
    linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.10) 40%, rgba(0,0,0,0.18) 50%, rgba(0,0,0,0.10) 60%, transparent 100%);
  filter: blur(1px);
  pointer-events: none;
  z-index: 1;
}

/* book "edges" — visible page stack thickness */
.book__base::after {
  content: "";
  position: absolute;
  right: -4px; top: 4px; bottom: 4px;
  width: 8px;
  background: repeating-linear-gradient(180deg, #e2d7b8 0 1px, #f4ecd2 1px 3px);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}
.book__base .left-edge {
  position: absolute;
  left: -4px; top: 4px; bottom: 4px;
  width: 8px;
  background: repeating-linear-gradient(180deg, #e2d7b8 0 1px, #f4ecd2 1px 3px);
  border-radius: 4px 0 0 4px;
}

/* the spine — removed */

/* page area is split into two halves; each "page" pivots from the spine */
.pages {
  position: absolute;
  inset: 14px;
  display: flex;
}
.flip-overlay .page-half { transform-style: preserve-3d; }
.page-half { flex: 1; position: relative; }

.pages-base {
  position: absolute;
  inset: 14px;
  display: flex;
  z-index: 2;
  will-change: transform;
  transform: translateZ(0);
}

.page {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform-origin: right center;
  transition: transform 1.1s cubic-bezier(.55, .03, .35, 1);
  will-change: transform;
}
.page.right { transform-origin: left center; }

.page__face {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at right center, rgba(0,0,0,0.13), transparent 40%),
    linear-gradient(180deg, #fbf6e7 0%, #f6efd9 100%);
  overflow: hidden;
  padding: 38px 44px;
  box-shadow: inset 0 0 0 1px rgba(15, 42, 34, 0.03);
}
.page__face--front,
.page__face--back {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.page.right .page__face {
  background:
    radial-gradient(ellipse at left center, rgba(0,0,0,0.13), transparent 40%),
    linear-gradient(180deg, #fbf6e7 0%, #f6efd9 100%);
}

.page__face--back {
  transform: rotateY(180deg);
}

.page--flipping {
  z-index: 100;
}
.page--flipped {
  transform: rotateY(-180deg);
}
.page.right.page--flipped {
  transform: rotateY(180deg);
}

/* page content typography */
.page-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  z-index: 1;
  font-family: "Cormorant Garamond", serif;
  color: var(--ink);
  position: relative;
}
.page-content .chapter {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-family: "Manrope", sans-serif;
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 14px;
}
.page-content h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--green-900);
  margin: 0 0 18px;
}
.page-content p {
  font-family: "Cormorant Garamond", serif;
  font-size: 16px;
  line-height: 1.55;
  color: #2a2a2a;
  margin: 0 0 12px;
  text-align: justify;
  hyphens: auto;
}
.page-content p:first-letter {
  font-size: 1em;
}
.page-content .dropcap::first-letter {
  font-family: "Cormorant Garamond", serif;
  font-size: 56px;
  float: left;
  line-height: 0.9;
  padding: 6px 10px 0 0;
  color: var(--green-700);
  font-weight: 600;
}
.page-content .page-num {
  margin-top: auto;
  text-align: center;
  font-family: "Cormorant Garamond", serif;
  font-size: 14px;
  color: var(--moss);
  padding-top: 16px;
}
.page-content .figure {
  margin: 16px 0;
  padding: 18px;
  border: 1px solid rgba(20, 58, 48, 0.18);
  border-radius: 6px;
  background: rgba(201, 154, 74, 0.06);
  display: grid;
  place-items: center;
  font-family: "Manrope", sans-serif;
  font-size: 11px;
  color: var(--moss);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.page-content .pullquote {
  font-style: italic;
  font-size: 22px;
  line-height: 1.35;
  color: var(--green-800);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  margin: 18px 0;
}

/* paper grain / subtle line */
.page__face::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 30% 20%, rgba(201,154,74,0.08), transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(46, 125, 106, 0.05), transparent 50%);
  pointer-events: none;
}

/* overflow fade — added by JS when page content is taller than the face */
.page-fade {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, #f6efd9);
  pointer-events: none;
  z-index: 5;
}

/* page-flip controls */
.flip-ctrls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.flip-btn {
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--green-900);
  display: grid; place-items: center;
  cursor: pointer;
  transition: all .25s ease;
}
.flip-btn:hover { background: var(--green-900); color: var(--paper); transform: translateY(-2px); border-color: var(--green-900); }
.flip-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; background: transparent; color: var(--green-900); }

.flip-progress {
  display: flex; align-items: center; gap: 14px;
  font-family: "Manrope", sans-serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--moss);
  font-weight: 600;
}
.flip-progress .bar {
  width: 220px; height: 4px;
  background: var(--bone);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.flip-progress .bar i {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--green-700), var(--amber));
  transition: width .8s cubic-bezier(.2,.7,.2,1);
  border-radius: 2px;
}

.preview-hint {
  text-align: center;
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--moss);
  letter-spacing: 0.04em;
}

/* ===================== TESTIMONIALS ===================== */
.testimonials {
  background: var(--cream);
  position: relative;
  overflow: hidden;
}

.t-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 1.8%;
  row-gap: 20px;
}
.t-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px;
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  overflow: hidden;
  margin: 0;
}
.t-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
  border-color: var(--gold);
}
.t-card::before {
  content: "";
  position: absolute;
  right: -50px; top: -50px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(201, 154, 74, 0.15), transparent 70%);
  border-radius: 50%;
}
.t-card .quote-mark {
  font-family: "Cormorant Garamond", serif;
  font-size: 70px;
  line-height: 0.5;
  color: var(--amber);
  height: 30px;
}
.t-card blockquote {
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  line-height: 1.35;
  margin: 0;
  color: var(--green-900);
  flex: 1;
}
.t-card .stars {
  display: flex; gap: 3px;
  color: var(--amber);
  font-size: 13px;
}
.t-card .person {
  display: flex; align-items: center; gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.t-card .avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--paper);
}
.t-card .who { font-weight: 600; font-size: 14.5px; color: var(--green-900); }
.t-card .role { font-size: 12px; color: var(--moss); margin-top: 2px; }

/* mobile slider container */
.t-slider {
  display: none;
  position: relative;
}
.t-slider__track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 24px 8px;
  margin: 0 -24px;
  cursor: grab;
}
.t-slider__track::-webkit-scrollbar { display: none; }
.t-slider__track.dragging { cursor: grabbing; scroll-snap-type: none; }
.t-slider__track > * {
  flex: 0 0 85%;
  scroll-snap-align: center;
}
.t-slider__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 26px;
}
.t-dots { display: flex; gap: 8px; align-items: center; }
.t-dots button {
  width: 8px; height: 8px;
  background: var(--line-strong);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: all .3s ease;
  padding: 0;
}
.t-dots button.active {
  background: var(--green-700);
  width: 24px;
  border-radius: 4px;
}
.t-slider__btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--green-900);
  cursor: pointer;
  display: grid; place-items: center;
  transition: all .25s ease;
  flex-shrink: 0;
}
.t-slider__btn:hover { background: var(--green-900); color: var(--paper); }
.t-slider__btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ===================== BUY ===================== */
.buy {
  background: var(--green-900);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.buy .section-title { color: var(--paper); }
.buy .eyebrow { color: var(--amber-soft); }
.buy .section-sub { color: rgba(246, 239, 219, 0.7); }

.editions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 16px;
}
.edition {
  position: relative;
  padding: 36px 32px;
  background: rgba(246, 239, 219, 0.04);
  border: 1px solid rgba(246, 239, 219, 0.10);
  border-radius: 28px;
  transition: all .35s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.edition::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(224, 131, 56, 0.6), transparent);
  opacity: 0;
  transition: opacity .35s ease;
}
.edition:hover {
  background: rgba(224, 131, 56, 0.06);
  border-color: rgba(224, 131, 56, 0.4);
  transform: translateY(-6px);
}
.edition:hover::before { opacity: 1; }

.edition--featured {
  background: linear-gradient(160deg, rgba(224, 131, 56, 0.14), rgba(201, 154, 74, 0.06));
  border-color: rgba(224, 131, 56, 0.5);
}
.edition__tag {
  position: absolute;
  top: 24px; right: 24px;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: #1a1208;
  background: var(--amber);
  padding: 6px 12px;
  border-radius: 999px;
}
.edition__name {
  font-family: "Cormorant Garamond", serif;
  font-size: 32px;
  line-height: 1;
  margin: 0 0 8px;
  font-weight: 500;
}
.edition__desc {
  color: rgba(246, 239, 219, 0.6);
  font-size: 13.5px;
  margin: 0 0 26px;
}
.edition__price {
  font-family: "Cormorant Garamond", serif;
  font-size: 56px;
  line-height: 1;
  margin: 0 0 8px;
  font-weight: 500;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.edition__price .cur { font-size: 22px; color: var(--amber-soft); }
.edition__price .strike { font-size: 22px; color: rgba(246, 239, 219, 0.4); text-decoration: line-through; margin-left: 8px; font-weight: 400; }
.edition__incl {
  list-style: none;
  padding: 0;
  margin: 22px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.edition__incl li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: rgba(246, 239, 219, 0.88);
}
.edition__incl li svg { flex-shrink: 0; margin-top: 3px; color: var(--amber-soft); }
.edition__incl li.muted { color: rgba(246, 239, 219, 0.35); text-decoration: line-through; }
.edition__incl li.muted svg { color: rgba(246, 239, 219, 0.2); }

.edition .btn--primary { width: 100%; justify-content: center; }
.edition .btn--ghost { width: 100%; justify-content: center; }

.buy__extras {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-top: 40px;
  border-top: 1px solid rgba(246, 239, 219, 0.12);
}
.extra { display: flex; align-items: flex-start; gap: 14px; font-size: 13.5px; color: rgba(246, 239, 219, 0.78); }
.extra svg { flex-shrink: 0; color: var(--amber-soft); }
.extra strong { color: var(--paper); display: block; margin-bottom: 4px; font-weight: 600; }

/* ===================== FOOTER ===================== */
.footer {
  background: var(--ink);
  color: rgba(246, 239, 219, 0.7);
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: "";
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 90%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 154, 74, 0.4), transparent);
}

.footer__big {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(56px, 9vw, 140px);
  line-height: 0.95;
  text-align: center;
  color: var(--paper);
  letter-spacing: -0.03em;
  margin: 0 0 80px;
  font-weight: 500;
}
.footer__big em { font-style: italic; color: var(--amber); font-weight: 400; }

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}
.footer h5 {
  font-family: "Manrope", sans-serif;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber-soft);
  margin: 0 0 18px;
  font-weight: 700;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { font-size: 14px; transition: color .2s ease; }
.footer ul a:hover { color: var(--paper); }

.footer__bottom {
  border-top: 1px solid rgba(246, 239, 219, 0.12);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
}
.credit {
  font-family: "Cormorant Garamond", serif;
  font-size: 16px;
  color: rgba(246, 239, 219, 0.85);
  font-style: italic;
}
.credit a {
  color: var(--amber);
  font-weight: 600;
  font-style: normal;
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  letter-spacing: 0.01em;
}
.credit a:hover { border-color: var(--amber); }

/* ===================== MOBILE BOTTOM NAV ===================== */
.bottom-nav {
  display: none;
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 60;
  background: rgba(14, 31, 26, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(246, 239, 219, 0.10);
  border-radius: 28px;
  padding: 10px;
  box-shadow: 0 20px 40px -16px rgba(0,0,0,0.5);
}
.bottom-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  color: rgba(246, 239, 219, 0.65);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 18px;
  transition: all .25s ease;
}
.bottom-nav a:hover, .bottom-nav a.active {
  color: var(--paper);
  background: rgba(224, 131, 56, 0.18);
}
.bottom-nav a svg { width: 22px; height: 22px; }
.bottom-nav a.cta {
  background: var(--amber);
  color: #1a1208;
}
.bottom-nav a.cta:hover { background: var(--paper); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 980px) {
  .nav, .header-cta { display: none; }
  .site-header { padding: 10px 14px 10px 18px; }
  .brand .name { font-size: 18px; }
  .brand .name small { font-size: 8.5px; letter-spacing: 0.28em; }
  .brand .mark { width: 34px; height: 34px; font-size: 19px; }

  .hero { padding: 110px 0 110px; }
  .hero__inner { grid-template-columns: 1fr; gap: 30px; text-align: center; }
  .hero__copy { margin: 0 auto; }
  .hero__eyebrow, .hero__actions, .hero__chips { justify-content: center; margin-inline: auto; }
  .hero__chips { display: inline-flex; }
  .hero__actions { display: inline-flex; }
  .hero__lede { margin-inline: auto; }
  .hero__book img { width: min(320px, 70%); }

  .section-head { grid-template-columns: 1fr; gap: 16px; }
  .section { padding: 80px 0; }
  .author__grid, .about-book__grid { grid-template-columns: 1fr; gap: 40px; }
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
  .stat__num { font-size: 40px; }

  .pillars { grid-template-columns: 1fr; }
  .editions { grid-template-columns: 1fr; }
  .buy__extras { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }

  .t-grid { display: none; }
  .t-slider { display: block; }

  .bottom-nav { display: block; }
  .footer { padding-bottom: 120px; }

  .bookviewer { aspect-ratio: 4/3; }
  .page__face { padding: 22px 24px; }
  .page-content h3 { font-size: 22px; }
  .page-content p { font-size: 13.5px; }
  .flip-ctrls { flex-wrap: nowrap; }
  .flip-progress { flex-direction: column; align-items: center; gap: 6px; }
  .flip-progress .bar { width: 140px; }
}

@media (max-width: 520px) {
  .container { width: calc(100% - 32px); }
  h1.hero__title { font-size: clamp(40px, 12vw, 64px); }
  .hero__subtitle { font-size: 18px; }
  .stats { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .buy__extras { grid-template-columns: 1fr; }
  .page-content .pullquote, .page-content .figure { display: none; }

  /* book viewer — more vertical room on small phones */
  .bookviewer { aspect-ratio: auto; height: clamp(380px, 115vw, 480px); }
  .page__face { padding: 14px 16px; }
  .page-content .chapter { font-size: 9px; letter-spacing: 0.1em; margin-bottom: 4px; }
  .page-content h3 { font-size: 16px; line-height: 1.2; margin: 0 0 8px; }
  .page-content p { font-size: 10.5px; line-height: 1.4; margin-bottom: 5px; }
  .page-content .page-num { font-size: 10px; }
  /* disable dropcap float on tiny screens — reclaims ~60px vertical space */
  .page-content .dropcap::first-letter {
    font-size: 1.15em; float: none; line-height: inherit; padding: 0;
  }
}
