/* Reading Between the Verses. Look from the cover: near-black ground, the greyed library shelves,
   white old-style serif, one highlighter yellow for the key word and every reader action,
   the open Bible's cool page tone, gilt edges, and the purple-navy table for the buy moment. */

@font-face { font-family: "EB Garamond"; src: url(/assets/fonts/eb-garamond.woff2) format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url(/assets/fonts/eb-garamond-italic.woff2) format("woff2"); font-weight: 400 800; font-style: italic; font-display: swap; }
/* Used only by the concept-preview tape, which is not part of the book's look. */
@font-face { font-family: "Source Sans 3"; src: url(/assets/fonts/source-sans-3.woff2) format("woff2"); font-weight: 200 900; font-display: swap; }

:root {
  --black: #050505;
  --shelf: #1a1a1a;
  --white: #f4f1ea;
  --grey: #a7a39b;
  --yellow: #fcd94b;
  --page: #a8aec2;
  --navy: #23222f;
  --navy-2: #292331;
  --gilt: #b7843a;
  --paper: #f1ebdd;
  --paper-2: #e9e1cf;
  --ink: #171514;
  --ink-soft: #4c463d;
  --serif: "EB Garamond", "Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Source Sans 3", system-ui, sans-serif;
  --col: min(1120px, calc(100vw - 48px));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--black); color: var(--white);
  font: 400 1.18rem/1.55 var(--serif);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-weight: 400; margin: 0; line-height: 1.05; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.col { width: var(--col); margin-inline: auto; }
.caps { text-transform: uppercase; letter-spacing: 0.2em; }
.small { font-size: 0.92rem; color: var(--grey); }

/* Placeholders look like placeholders, in the page's own type. */
.ph-tag {
  display: inline-block; font: italic 400 0.86em/1.3 var(--serif); letter-spacing: 0;
  text-transform: none; color: inherit; opacity: 0.86;
  border: 1px dashed currentColor; border-radius: 3px; padding: 0.08em 0.45em;
}

/* The highlighter: the cover's yellow bar, sitting low behind the word. */
.hl { position: relative; z-index: 0; white-space: nowrap; }
.hl::before {
  content: ""; position: absolute; z-index: -1; left: -0.06em; right: -0.1em; bottom: 0.1em; height: 0.36em;
  background: var(--yellow); transform-origin: left center; transform: scaleX(var(--hl, 1));
}
.hl-ink::before { height: 0.42em; bottom: 0.08em; opacity: 0.85; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0.6rem 1.5rem;
  font: 500 1.08rem/1 var(--serif); letter-spacing: 0.04em; text-decoration: none; border-radius: 2px;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-yellow { background: var(--yellow); color: var(--black); }
.btn-yellow:hover { background: #ffe57a; }
.btn-line { border-color: #f4f1ea8c; color: var(--white); background: transparent; }
.btn-line:hover { border-color: var(--white); background: #ffffff12; }

/* Top bar: a small Get the book pill that stays for the whole page. */
.topbar {
  position: fixed; z-index: 40; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  padding: 14px max(22px, env(safe-area-inset-right)) 14px max(22px, env(safe-area-inset-left));
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.topbar-title {
  font: 400 0.82rem/1 var(--serif); letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none;
  color: var(--white); opacity: 0; transition: opacity 0.3s ease;
}
.scrolled .topbar-title { opacity: 0.8; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.topbar-skip { font-size: 0.95rem; color: var(--white); opacity: 0.8; text-underline-offset: 4px; mix-blend-mode: difference; }
.topbar-skip:hover { opacity: 1; }
.pill {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 1.1rem; border-radius: 99px;
  background: var(--yellow); color: var(--black); text-decoration: none; font: 500 1rem/1 var(--serif); letter-spacing: 0.03em;
  box-shadow: 0 4px 18px #0006;
}
.pill:hover { background: #ffe57a; }
.scrolled .topbar { background: linear-gradient(#050505d0, #05050500); }
.on-paper .topbar { background: none; }
.on-paper .topbar-title { color: var(--ink); }
.on-paper .topbar-skip { color: var(--ink); mix-blend-mode: normal; }

/* ---------- 1. The promise ---------- */
.hero { position: relative; min-height: 100svh; padding: 96px 0 64px; overflow: hidden; isolation: isolate; }
.hero-shelves {
  position: absolute; inset: 0 0 auto; height: 112%; z-index: -1;
  background: url(/assets/shelves.webp) center top / cover no-repeat;
  opacity: 0.62; will-change: transform;
  -webkit-mask-image: linear-gradient(#000 0 40%, transparent 92%); mask-image: linear-gradient(#000 0 40%, transparent 92%);
}
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 60% at 62% 40%, #05050588, transparent 70%); }
.hero-inner {
  width: var(--col); margin-inline: auto; display: grid; column-gap: clamp(32px, 5vw, 80px);
  grid-template-columns: minmax(260px, 0.8fr) 1.2fr;
  grid-template-areas: "book sub" "book title" "book for" "book by" "book buttons" "book proof";
  grid-template-rows: auto auto auto auto auto 1fr;
  align-content: center; min-height: calc(100svh - 160px);
}
.hero-sub { grid-area: sub; font-size: clamp(1rem, 1.35vw, 1.3rem); letter-spacing: 0.12em; color: #e9e5dc; margin-bottom: 18px; }
.hero-title { grid-area: title; font-size: clamp(3.4rem, 7.4vw, 7.4rem); line-height: 0.96; letter-spacing: -0.005em; color: #fff; }
.hero-title .tl { display: block; }
.hero-for { grid-area: for; margin-top: 26px; font-size: clamp(1.2rem, 1.6vw, 1.5rem); font-style: italic; color: #ece8df; max-width: 30ch; }
.hero-by { grid-area: by; margin-top: 26px; font-size: 1.02rem; color: #d7d2c8; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.hero-by .caps { color: #fff; letter-spacing: 0.24em; }
.hero-buttons { grid-area: buttons; margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-proof { grid-area: proof; margin-top: 22px; color: #cfcac0; }
.hero-book { grid-area: book; align-self: center; height: min(76vh, 700px); margin: 0 -4% 0 -8%; }
.book-stage { position: relative; }
.book-stage > img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 24px 40px #000a); }
.hero-book > img { padding: 6% 12%; }

/* Arrival: the book turns in and settles, then the highlighter sweeps under Verses. */
.js .hero-book { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 1s cubic-bezier(.2, .8, .2, 1); }
.js .hero.arrived .hero-book { opacity: 1; transform: none; }
.js .hl-hero::before { transform: scaleX(0); transition: transform 0.6s cubic-bezier(.6, .05, .3, 1); }
.js .hero.swept .hl-hero::before { transform: scaleX(1); }

/* ---------- 2. The problem ---------- */
.problem { position: relative; padding: 40px 0 0; background: linear-gradient(var(--black), #0a0910 60%, #100e18); }
.problem-words { width: var(--col); margin: 0 auto; padding: 4vh 0 2vh; max-width: 760px; }
.problem-lead { font-size: clamp(1.25rem, 1.8vw, 1.6rem); color: var(--grey); font-style: italic; }
.problem-title { margin-top: 8px; font-size: clamp(2.6rem, 5vw, 4.6rem); color: #fff; }
.problem-title em { font-style: normal; color: var(--yellow); }
.hard-list { list-style: none; padding: 0; margin: 26px 0 0; font-size: clamp(1.3rem, 1.9vw, 1.7rem); line-height: 1.5; }
.hard-list li { color: #f0ece4; }
.bible { position: relative; width: min(1400px, 100vw); margin: 0 auto; container-type: inline-size; }
.bible img { width: 100%; -webkit-mask-image: radial-gradient(75% 85% at 50% 52%, #000 60%, transparent 100%); mask-image: radial-gradient(75% 85% at 50% 52%, #000 60%, transparent 100%); }
.bubble {
  position: absolute; margin: 0; padding: 0.55em 0.9em; border-radius: 0.55em;
  background: var(--yellow); color: #1b1a17; font: italic 400 1.75cqw/1.2 var(--serif); text-align: center;
  box-shadow: 0 0.4em 1.2em #0005;
}
.bubble::after { content: ""; position: absolute; bottom: -0.7em; right: 18%; border: 0.4em solid transparent; border-top: 0.75em solid var(--yellow); border-bottom: 0; }
.bubble.tail-left::after { right: auto; left: 18%; }
.b1 { left: 21%; top: 6%; width: 16.5%; }
.b2 { left: 53%; top: 12%; width: 15.5%; }
.b3 { left: 17.5%; top: 33%; width: 15.5%; }
.b4 { left: 68.5%; top: 36%; width: 16.5%; }

/* One plain fade the first time a calm part is seen. */
.js .fade-in { opacity: 0; transform: translateY(18px); transition: opacity 0.9s ease, transform 0.9s ease; }
.js .fade-in.seen { opacity: 1; transform: none; }

/* ---------- 3. The key idea ---------- */
.method { position: relative; height: 350vh; background: #100e18; }
.method-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; place-items: center;
  background:
    linear-gradient(#100e18, #100e1800 22%, #100e1800 78%, #100e18),
    url(/assets/bible.webp) center 70% / cover no-repeat;
  --light: 0; --paper-in: 0;
}
.method-stage::before { content: ""; position: absolute; inset: 0; background: #0b0a12d9; }
.method-stage::after { content: ""; position: absolute; inset: 0; background: var(--paper); opacity: var(--paper-in); pointer-events: none; z-index: 3; }
.method-light {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(calc(30% + var(--light) * 40%) calc(28% + var(--light) * 36%) at 50% 62%, #e7a64a55, #b7843a22 55%, transparent 75%);
}
.method-head { position: absolute; z-index: 2; top: clamp(76px, 11vh, 110px); left: max(24px, calc(50% - 560px)); right: max(24px, calc(50% - 560px)); display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.method-head h2 { font-size: clamp(1.9rem, 3vw, 2.8rem); color: #fff; }
.skip-past { font-size: 1rem; color: var(--grey); text-underline-offset: 4px; }
.skip-past:hover { color: #fff; }
.spread {
  position: relative; z-index: 2; width: min(980px, calc(100vw - 300px)); aspect-ratio: 16 / 8.6; margin-top: 7vh; margin-right: 200px;
  display: grid; grid-template-columns: 1fr 1fr; perspective: 1800px;
  filter: drop-shadow(0 30px 50px #000c);
}
.spread::before { /* the gilt page edges under the spread */
  content: ""; position: absolute; left: 1%; right: 1%; bottom: -10px; height: 12px; border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, #6b4a1f, var(--gilt) 30%, #e2b467 50%, var(--gilt) 70%, #6b4a1f);
}
.leaf-left, .notes {
  background: linear-gradient(90deg, #d9dbe3, #e7e6e4 70%, #c9c8cf); padding: 8% 9%;
}
.leaf-left { border-radius: 6px 0 0 6px; display: flex; flex-direction: column; justify-content: space-evenly; box-shadow: inset -26px 0 30px -18px #0005; }
.notes {
  margin: 0; list-style: none; border-radius: 0 6px 6px 0; color: var(--ink);
  background: linear-gradient(90deg, #c9c8cf, #e7e6e4 30%, #dcdde4); box-shadow: inset 26px 0 30px -18px #0005;
  display: flex; flex-direction: column; justify-content: center; gap: 1.1em; padding-left: 10%;
}
.ln { display: block; height: 0.42em; border-radius: 2px; background: #8d909c; opacity: 0.6; position: relative; font-size: clamp(14px, 1.5vw, 20px); }
.ln.short { width: 62%; }
.ln.mark { opacity: 1; background: #7b7e8a; }
.mark-bar { position: absolute; left: -2%; right: -2%; top: -0.35em; bottom: -0.35em; background: var(--yellow); opacity: 0.8; z-index: -1; transform-origin: left; transform: scaleX(var(--mark, 1)); border-radius: 1px; }
.ln.mark { z-index: 0; }
.note { font: italic 400 clamp(1.1rem, 1.75vw, 1.6rem)/1.25 var(--serif); }
.note-num { font-style: normal; color: var(--gilt); margin-right: 0.15em; }
.timeline { display: flex; align-items: center; gap: 0; margin-top: 0.45em; height: 10px; width: 70%; background: linear-gradient(#5a5248, #5a5248) center / 100% 1px no-repeat; justify-content: space-between; }
.timeline i { width: 7px; height: 7px; border-radius: 50%; background: var(--gilt); }
.room { position: relative; z-index: 0; font-weight: 500; }
.room::before { content: ""; position: absolute; z-index: -1; left: -0.08em; right: -0.1em; bottom: 0.02em; height: 0.5em; background: var(--yellow); }
.ruled { position: relative; display: grid; gap: 1.05em; margin-top: 0.8em; }
.ruled i { display: block; height: 1px; background: #7c766c66; }
.pencil { position: absolute; left: 0; top: 1.06em; height: 1.5px; width: 46%; background: #5b5650; transform-origin: left; transform: scaleX(var(--pencil, 1)); border-radius: 1px; }
.tabs { position: absolute; z-index: 1; right: -198px; top: 6%; bottom: 6%; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; justify-content: space-between; }
.tab {
  width: 210px; padding: 0.55em 0.9em 0.55em 1.1em; border-radius: 0 6px 6px 0; background: #cdb24a; color: #1b1a17;
  font: 500 clamp(0.95rem, 1.05vw, 1.05rem)/1.15 var(--serif); box-shadow: 0 6px 14px #0006;
  transform: translateX(var(--lift, 0px)); transition: background-color 0.35s ease, transform 0.35s ease;
}
.tab.on { background: var(--yellow); --lift: 14px; }
.turn {
  position: absolute; z-index: 4; top: 0; bottom: 0; left: 50%; width: 50%; transform-origin: left center;
  background: linear-gradient(90deg, #e6dfcf, var(--paper)); border-radius: 0 6px 6px 0;
  transform: rotateY(calc(-180deg + var(--turn, 0) * 180deg)); opacity: var(--turn-o, 0); pointer-events: none;
}
.method-stage > .method-head, .method-stage > .spread { opacity: calc(1 - var(--paper-in)); }

/* Before the script runs, and without it, the scene shows every note in place. */
.js .method.armed .note { clip-path: inset(-0.3em calc(100% - var(--w, 0) * 100%) -0.3em -0.3em); }

/* ---------- Paper sections: inside, author, proof, try ---------- */
.paper { background: var(--paper); color: var(--ink); }
.paper h2 { font-size: clamp(2.3rem, 4vw, 3.4rem); }
.paper .small { color: var(--ink-soft); }
.paper .col { position: relative; }
.inside { padding: 14vh 0 10vh; }
.inside .col, .proof .col { max-width: 820px; }
.chapters { list-style: none; counter-reset: ch; padding: 0; margin: 40px 0 0; }
.chapters li { position: relative; padding: 22px 0 22px 64px; border-top: 1px solid #b7843a55; counter-increment: ch; }
.chapters li:last-child { border-bottom: 1px solid #b7843a55; }
.chapters li::before { /* the index tab */
  content: counter(ch); position: absolute; left: 0; top: 24px; width: 40px; height: 30px; border-radius: 0 5px 5px 0;
  background: var(--yellow); color: var(--ink); font: 500 1rem/30px var(--serif); text-align: center;
}
.chapters h3 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); }
.chapters p { margin-top: 6px; color: var(--ink-soft); max-width: 58ch; }
.side-note { margin-top: 28px; font-style: italic; font-size: 1.25rem; color: var(--ink-soft); padding-left: 64px; }

.author { padding: 8vh 0 6vh; }
.author .col::before, .proof .col::before, .try .col::before { /* gilt hairline, like a page edge */
  content: ""; position: absolute; top: -6vh; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gilt), transparent);
}
.author-grid { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.portrait {
  margin: 0; aspect-ratio: 4 / 5; display: grid; place-items: center; padding: 20px; text-align: center; color: var(--ink-soft);
  background: repeating-linear-gradient(135deg, #e4dccb 0 12px, #ebe4d5 12px 24px); border: 1px solid #b7843a77;
}
.author-name { margin-top: 18px; font-size: clamp(2.4rem, 4vw, 3.4rem); line-height: 1; }
.author-role { margin-top: 10px; font-size: 1.4rem; font-style: italic; }
.creds { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 10px; color: var(--ink-soft); }
.author-why { margin-top: 22px; color: var(--ink-soft); max-width: 50ch; }
.js .author .creds li { opacity: 0; transform: translateX(-8px); transition: opacity 0.4s ease, transform 0.4s ease; }
.js .author.seen .creds li { opacity: 1; transform: none; }
.js .author.seen .creds li:nth-child(2) { transition-delay: 0.15s; }
.js .author.seen .creds li:nth-child(3) { transition-delay: 0.3s; }
.js .hl-ink::before { transform: scaleX(0); transition: transform 0.5s cubic-bezier(.6, .05, .3, 1) 0.45s; }
.js .author.seen .hl-ink::before { transform: scaleX(1); }

.proof { padding: 8vh 0 6vh; }
.quotes { margin-top: 34px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.quotes blockquote { margin: 0; padding: 26px 24px; border-left: 2px solid var(--gilt); background: #ebe3d2; font-style: italic; color: var(--ink-soft); display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 170px; }
.quotes footer { font-style: normal; font-size: 0.95rem; }

.try { padding: 8vh 0 26vh; background: linear-gradient(var(--paper) 0 62%, #8f8794 80%, var(--navy) 100%); }
.try-grid { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.loose-page {
  aspect-ratio: 3 / 4; background: #faf6ec; padding: 14% 12%; display: flex; flex-direction: column; justify-content: space-evenly;
  transform: rotate(-3deg); box-shadow: 0 18px 40px #3a2e1c33, 0 2px 4px #3a2e1c22; font-size: 16px;
}
.lp-head { display: block; height: 0.9em; width: 55%; background: #3f3a33; opacity: 0.7; border-radius: 2px; margin-bottom: 0.6em; }
.loose-page .ln { background: #9a958c; font-size: 16px; }
.try-words p { margin-top: 14px; max-width: 46ch; }
.form { margin-top: 26px; display: grid; gap: 12px; max-width: 460px; }
.form label { display: grid; gap: 4px; font-size: 0.98rem; }
.form input {
  min-height: 48px; padding: 0 14px; font: 400 1.1rem var(--serif); color: var(--ink); background: #fffdf7;
  border: 1px solid #9c907b; border-radius: 2px;
}
.form .btn { justify-self: start; margin-top: 6px; }
.form-msg { min-height: 1.4em; font-style: italic; font-size: 1rem; }

/* ---------- 8. The buy moment ---------- */
.buy { position: relative; overflow: hidden; isolation: isolate; padding: 12vh 0 12vh; background: radial-gradient(120% 90% at 30% 50%, var(--navy-2), var(--navy) 55%, #17161f); }
.buy-glow {
  position: absolute; z-index: -1; left: 6%; top: 10%; width: 52%; height: 85%; opacity: 0.25;
  background: radial-gradient(closest-side, #f2b75bcc, #b7843a55 45%, transparent 100%); transition: opacity 1.4s ease;
}
.buy.open .buy-glow { opacity: 1; }
.buy-inner { width: var(--col); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 70px); align-items: center; }
.buy-book { height: min(62vh, 560px); margin: 0; }
.buy-book > img { padding: 6% 18%; }
/* Warm light spilling from the opened pages, like the cover's lit Bible. */
.buy-book::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; opacity: 0; transition: opacity 1.6s ease 0.5s;
  background: radial-gradient(28% 40% at 62% 46%, #f6c26a66, #b7843a22 60%, transparent 100%);
}
.buy.open .buy-book::after { opacity: 1; }
.buy-title { font-size: clamp(2.6rem, 4.6vw, 4.4rem); color: #fff; }
.js .hl-buy::before { transform: scaleX(0); transition: transform 0.6s cubic-bezier(.6, .05, .3, 1) 0.6s; }
.js .buy.open .hl-buy::before { transform: scaleX(1); }
.hl-buy { color: #fff; }
.formats { position: relative; border: 0; padding: 0; margin: 30px 0 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.formats label { position: relative; cursor: pointer; font-size: 1.2rem; padding: 6px 2px; }
.formats input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.formats label span { position: relative; z-index: 1; }
.formats label:has(input:focus-visible) { outline: 2px solid var(--yellow); outline-offset: 2px; }
.format-bar { position: absolute; z-index: 0; bottom: 8px; height: 0.5em; background: var(--yellow); opacity: 0.85; left: 0; width: 0; transition: left 0.35s cubic-bezier(.4, 0, .2, 1), width 0.35s cubic-bezier(.4, 0, .2, 1); pointer-events: none; }
html:not(.js) .formats label:has(input:checked) span { box-shadow: inset 0 -0.45em 0 #fcd94bd0; }
.formats label:has(input:checked) { color: #fff; }
.formats label:not(:has(input:checked)) { color: #c9c4d4; }
.price { margin-top: 16px; color: #d8d3e0; display: flex; gap: 10px; align-items: center; }
.stores { margin-top: 26px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 520px; }
.store {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 0 16px;
  background: var(--yellow); color: var(--black); text-decoration: none; font-size: 1.1rem; border-radius: 2px;
  transition: background-color 0.2s ease, transform 0.15s ease;
}
.store:first-child { grid-column: 1 / -1; font-size: 1.2rem; }
.store:not(:first-child) { background: transparent; color: #fff; border: 1px solid #ffffff55; }
.store:hover { background: #ffe57a; }
.store:not(:first-child):hover { background: #ffffff14; border-color: #fff; }
.store:active { transform: translateY(1px); }
.store .ph-tag { font-size: 0.78rem; }
.sample-note { margin-top: 20px; font-style: italic; color: #e2dde9; max-width: 44ch; scroll-margin-top: 40vh; }

/* ---------- 9 and 10: groups and questions, calm on the dark ---------- */
.groups { background: linear-gradient(#17161f, var(--black) 60%); padding: 10vh 0 6vh; }
.groups h2, .questions h2 { font-size: clamp(2rem, 3.4vw, 3rem); color: #fff; }
.group-cols { margin-top: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 70px); }
.group-cols > div { display: grid; gap: 14px; align-content: start; border-top: 1px solid #b7843a77; padding-top: 22px; }
.text-link { color: var(--yellow); text-underline-offset: 5px; display: inline-flex; gap: 10px; align-items: center; }
.text-link .ph-tag { color: var(--grey); font-size: 0.8rem; }
.questions { padding: 6vh 0 10vh; }
.questions .col { max-width: 820px; }
.questions h2 { margin-bottom: 20px; }
details { border-top: 1px solid #ffffff22; }
details:last-of-type { border-bottom: 1px solid #ffffff22; }
summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative; font-size: 1.32rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font-size: 1.6rem; color: var(--yellow); transition: transform 0.25s ease; }
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 0 0 20px; color: #d7d2c8; max-width: 62ch; }

/* ---------- 11. The end ---------- */
.end { position: relative; overflow: hidden; padding: 8vh 0 0; background: var(--black); border-top: 1px solid #b7843a44; }
.end-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: end; position: relative; z-index: 1; }
.news { margin-top: 0; max-width: 520px; }
.news h2 { font-size: clamp(1.8rem, 2.6vw, 2.4rem); }
.news p { color: #d7d2c8; }
.news-row { display: flex; gap: 10px; flex-wrap: wrap; }
.news-row label { flex: 1 1 220px; }
.news input { width: 100%; background: #111; color: var(--white); border-color: #555; }
.end-notes { display: grid; gap: 10px; color: #d7d2c8; }
.end-shelves {
  height: 200px; margin-top: 40px; background: url(/assets/shelves-800.webp) center 30% / cover no-repeat; opacity: 0.35;
  -webkit-mask-image: linear-gradient(transparent, #000 70%); mask-image: linear-gradient(transparent, #000 70%);
}
.has-preview-notice .end-shelves { height: calc(200px + 46px + env(safe-area-inset-bottom)); }

/* ---------- Tablets and phones ---------- */
@media (max-width: 1100px) {
  .spread { width: min(760px, calc(100vw - 260px)); margin-right: 180px; }
  .tabs { right: -178px; }
  .tab { width: 190px; }
}
@media (max-width: 900px) {
  .hero { padding-top: 76px; }
  .hero-inner {
    grid-template-columns: 1fr; grid-template-areas: "sub" "title" "for" "book" "by" "buttons" "proof";
    grid-template-rows: none; min-height: 0; text-align: left;
  }
  .hero-book { height: min(46vh, 420px); margin: 18px 0 4px; }
  .hero-book > img { padding: 4% 26%; }
  .buy-inner, .author-grid, .try-grid, .group-cols, .end-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 300px; }
  .loose-page { width: min(320px, 78%); margin-inline: auto; }
  .quotes { grid-template-columns: 1fr; }
  .quotes blockquote { min-height: 0; }
}
/* Tablets and phones: the key idea is not pinned; it plays once as it comes into view. */
@media (max-width: 900px), (max-height: 560px) {
  .method { height: auto; }
  .method-stage { position: relative; height: auto; display: block; padding: 70px 0 80px; background: #100e18; }
  .method-stage::before, .method-stage::after { display: none; }
  .method-light { background: radial-gradient(70% 40% at 50% 60%, #e7a64a33, transparent 75%); }
  .method-head { position: static; width: var(--col); margin: 0 auto; }
  .spread { width: var(--col); margin: 22px auto 0; aspect-ratio: auto; grid-template-columns: 1fr; display: flex; flex-direction: column; }
  .spread::before { display: none; }
  .tabs { position: static; order: -1; flex-direction: row; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
  .tab { width: auto; border-radius: 4px; padding: 0.4em 0.7em; font-size: 0.95rem; --lift: 0px; }
  .tab.on { --lift: 0px; transform: translateY(-3px); }
  .leaf-left { border-radius: 6px 6px 0 0; min-height: 190px; gap: 12px; padding: 26px 24px; box-shadow: inset 0 -20px 26px -18px #0005; }
  .notes { border-radius: 0 0 6px 6px; padding: 26px 24px 30px; box-shadow: none; }
  .ln { font-size: 16px; }
  .turn { display: none; }
  .js .method.armed .note { transition: clip-path 1s ease; }
}
@media (max-width: 600px) {
  :root { --col: calc(100vw - 40px); }
  body { font-size: 1.12rem; }
  .topbar { padding: 10px 14px; }
  .topbar-title { display: none; }
  .topbar-skip { font-size: 0.88rem; }
  .pill { min-height: 38px; font-size: 0.95rem; }
  .hero { padding: 64px 0 40px; }
  .hero-sub { font-size: 0.92rem; letter-spacing: 0.08em; margin-bottom: 10px; }
  .hero-title { font-size: clamp(2.7rem, 12.4vw, 3.5rem); }
  .hero-for { margin-top: 14px; font-size: 1.12rem; }
  .hero-book { height: 30vh; min-height: 220px; margin: 14px 0 0; }
  .hero-book > img { padding: 2% 28%; }
  .hero-by { margin-top: 12px; font-size: 0.92rem; }
  .hero-buttons { margin-top: 16px; display: grid; grid-template-columns: 1fr; gap: 10px; }
  .hero-buttons .btn { min-height: 48px; }
  .hero-proof { font-size: 0.95rem; margin-top: 16px; }
  .bubble { font-size: 3.4cqw; padding: 0.45em 0.6em; }
  .hero-title .tl { display: inline; }
  .buy-glow { left: 0; width: 100%; top: 0; height: 55%; }
  .b1 { left: 4%; top: -4%; width: 34%; }
  .b2 { left: 56%; top: 0%; width: 36%; }
  .b3 { left: 8%; top: 36%; width: 33%; }
  .b4 { left: 58%; top: 40%; width: 36%; }
  .bible { margin-top: 40px; }
  .chapters li { padding-left: 54px; }
  .side-note { padding-left: 0; }
  .stores { grid-template-columns: 1fr; }
  .buy-book { height: 40vh; }
  .buy-book > img { padding: 4% 24%; }
  .method-head { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .js .hero-book, .js .fade-in, .js .author .creds li { opacity: 1; transform: none; transition: none; }
  .js .hl::before, .js .hl-hero::before, .js .hl-ink::before, .js .hl-buy::before { transform: none; transition: none; }
  .buy-glow { opacity: 1; transition: none; }
  .tab, .format-bar, .btn, .store { transition: none; }
}

/* Concept-preview tape. The server adds it to the page (lib/preview-notice.mjs).
   Slim and translucent at the bottom so it never takes space from the page; only its controls take clicks. */
.preview-notice {
  position: fixed; z-index: 45; inset: auto 0 0;
  height: calc(44px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  pointer-events: none;
  background: #f3cf45ed; color: #111;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid #111;
}
.preview-notice::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: repeating-linear-gradient(115deg, #111 0 12px, transparent 12px 22px);
}
.preview-tape {
  position: absolute; inset: 4px 260px auto 0; height: 39px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 25px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 25px), transparent);
}
.preview-notice[data-preview-notice="neutral"] .preview-tape { right: 64px; }
.preview-tape-track { display: flex; width: max-content; animation: preview-tape-flow 34s linear infinite; }
.preview-tape-group { display: flex; flex-shrink: 0; }
.preview-tape-group > span {
  display: flex; align-items: center; gap: 1.8rem; padding-right: 1.8rem; height: 39px; white-space: nowrap;
  font: 700 0.74rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase;
}
.preview-tape-group i { font-style: normal; font-size: 0.9rem; }
@keyframes preview-tape-flow { to { transform: translateX(-50%); } }
.preview-tape-controls {
  position: absolute; top: 0; right: max(12px, env(safe-area-inset-right));
  display: flex; gap: 0.5rem; align-items: center; pointer-events: auto;
}
.preview-tape-controls a, .preview-tape-pause {
  display: inline-flex; justify-content: center; gap: 0.65rem; align-items: center;
  min-height: 44px; padding: 0.4rem 0.65rem; border: 0; background: transparent; color: #111;
  text-decoration: none; font: 700 0.78rem/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer;
}
.preview-tape-controls a { border-left: 1px solid #1115; }
.preview-cta-copy { display: flex; flex-direction: column; gap: 4px; }
.preview-cta-copy small { font: 500 0.66rem/1 var(--sans); letter-spacing: 0.08em; }
.preview-tape-controls a:hover, .preview-tape-pause:hover { background: #1111; }
.preview-tape-controls a:focus-visible, .preview-tape-pause:has(input:focus-visible) { outline: 2px solid #111; outline-offset: -4px; }
.preview-tape-pause { position: relative; width: 44px; }
.preview-tape-pause svg { fill: currentColor; }
.preview-tape-pause input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.preview-tape-pause .i-play, .preview-notice:has(input:checked) .i-pause { display: none; }
.preview-notice:has(input:checked) .i-play { display: inline; }
.preview-notice:has(input:checked) .preview-tape-track { animation-play-state: paused; }
@media (max-width: 760px) {
  .preview-tape { right: 195px; }
  .preview-notice[data-preview-notice="neutral"] .preview-tape { right: 52px; }
  .preview-tape-group > span { font-size: 0.66rem; gap: 1.2rem; padding-right: 1.2rem; }
  .preview-tape-controls { right: max(4px, env(safe-area-inset-right)); gap: 0; }
  .preview-tape-controls a { font-size: 0.7rem; padding-inline: 0.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .preview-tape-track { animation: none; }
  .preview-tape-pause { display: none; }
}
