/* WePray: step into the book. Colours from Coptic icons: lapis, night, gold leaf, madder red. */
:root {
  --lapis: #1d3461;
  --night: #0f1d3a;
  --gold: #c9a23f;
  --gold-soft: #ead9a0;
  --madder: #8e2c2a;
  --ink: #1f1d2b;
  --stone: #f1f4f9;
  --measure: 34rem;
  --vh: 100vh;
}
@supports (height: 100svh) { :root { --vh: 100svh; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 400 1.0625rem/1.65 "Literata", Georgia, serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--lapis); text-underline-offset: 0.18em; }
a:focus-visible, .pages:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, .mark, .say { font-family: "Marcellus", "Literata", serif; font-weight: 400; line-height: 1.15; }
cite { font-style: italic; }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 50; background: #fff; padding: 0.5rem 0.8rem; }

/* Header floats over the scenes */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
  background: linear-gradient(rgba(15, 29, 58, 0.55), rgba(15, 29, 58, 0));
  pointer-events: none;
}
.top a { pointer-events: auto; }
.top .mark { color: var(--gold-soft); font-size: 1.5rem; text-decoration: none; }
.top-cta { color: #fff; text-decoration: none; border: 1px solid rgba(234, 217, 160, 0.7); border-radius: 999px; padding: 0.3rem 0.95rem; font-size: 0.95rem; }
.top-cta:hover { background: rgba(234, 217, 160, 0.15); }

/* A ribbon bookmark down the side: where you are in the book */
.ribbon {
  position: fixed; z-index: 30; left: clamp(0.6rem, 2vw, 1.5rem); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 0.9rem;
  opacity: 0; transition: opacity 0.4s;
}
.past-intro .ribbon { opacity: 1; }
.ribbon { background: rgba(15, 29, 58, 0.62); backdrop-filter: blur(6px); padding: 0.9rem 0.9rem 0.9rem 0.2rem; border-radius: 0 10px 10px 0; left: 0 !important; }
.ribbon a {
  color: rgba(255, 255, 255, 0.78); text-decoration: none; font-size: 0.85rem;
  padding-left: 0.8rem; border-left: 2px solid rgba(234, 217, 160, 0.3);
}
.ribbon a.on { color: #fff; border-left-color: var(--gold); }
@media (max-width: 900px) { .ribbon { display: none; } }

/* Sticky stages: each scroll section holds one full screen while you scroll through it */
[data-scroll] { position: relative; }
.stage { position: sticky; top: 0; height: var(--vh); overflow: hidden; }
.journey { height: calc(var(--vh) * 7.6); }
.journey .stage { background: radial-gradient(ellipse at 50% 30%, var(--lapis), var(--night) 70%); }
.story { height: calc(var(--vh) * 6); background: #2a2116; }
.story.soon { height: calc(var(--vh) * 3.6); background: var(--night); }

/* The art box keeps the painting's own proportions and always covers the screen,
   so twinkles, glows and the cut-out layer stay aligned with the painting. */
.art {
  position: absolute; left: 50%; top: 50%;
  aspect-ratio: var(--ar);
  width: max(100vw, calc(var(--vh) * var(--ar)));
  transform: translate(-50%, -50%);
}
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- The opening: the closed book ---------- */
.motes { position: absolute; inset: 0; width: 100%; height: 100%; opacity: calc(1 - var(--zoom, 0)); }
.intro-text {
  position: absolute; left: 0; right: 0; top: clamp(4.2rem, 10vh, 8rem); z-index: 2;
  text-align: center; color: #fff; padding: 0 1.2rem;
  opacity: calc(1 - var(--open, 0) * 1.6);
}
.intro-title { font-size: clamp(2.2rem, 6vw, 4rem); margin: 0 0 0.5rem; color: var(--gold-soft); }
.intro-text p { margin: 0 auto; max-width: 26rem; color: #dfe5f1; font-size: 1.08rem; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5); }
.hint {
  position: absolute; bottom: 1.6rem; left: 0; right: 0; text-align: center; margin: 0;
  color: rgba(234, 217, 160, 0.85); font-size: 0.9rem; letter-spacing: 0.02em;
  opacity: calc(1 - var(--p, 0) * 8);
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(6px); } }

.book {
  /* sized to the space left under the title and above the hint, so nothing ever overlaps */
  --bw: min(56vw, calc(var(--vh) * 0.44 * 0.647), 20rem);
  position: absolute; left: 50%; top: 62%;
  width: var(--bw); aspect-ratio: 1649 / 2549;
  margin-left: calc(var(--bw) / -2);
  translate: 0 -50%;
  perspective: 2200px;
  will-change: transform;
}
.page-right {
  position: absolute; inset: 0; overflow: hidden; border-radius: 2px 4px 4px 2px;
  background: #f4ecda;
  box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.8);
}
.page-right .art { width: auto; height: 100%; }
.page-right .art img { object-fit: cover; }
.cover {
  position: absolute; inset: 0; transform-origin: 0 50%; transform-style: preserve-3d;
  will-change: transform;
}
.cover-front, .cover-back {
  position: absolute; inset: 0; width: 100%; height: 100%;
  backface-visibility: hidden; border-radius: 2px 5px 5px 2px;
}
.cover-front { box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.85), inset 6px 0 10px -6px rgba(0, 0, 0, 0.4); }
.cover-back {
  transform: rotateY(180deg);
  background: #efe5cf; display: grid; place-items: center;
  color: #8c7546; font-family: "Marcellus", serif; font-size: 1.2rem;
}

/* ---------- Frames: scenes that cross-fade on one stage, with depth ---------- */
.frame { position: absolute; inset: 0; margin: 0; opacity: 0; z-index: 4; }
.frame .bg { transform: translateY(calc(var(--p, 0) * -2.5%)) scale(calc(1.08 - var(--p, 0) * 0.05)); }
.frame .fg { transform: translateY(calc(var(--p, 0) * -6%)) scale(calc(1.02 + var(--p, 0) * 0.05)); }
.frame .bg, .frame .fg { will-change: transform; }

.caption {
  position: absolute; left: 0; right: 0; z-index: 3;
  padding: clamp(1.2rem, 4vw, 3rem) clamp(1.2rem, 6vw, 5rem);
  color: #fff; text-align: center;
}
.top-cap { top: 0; padding-top: clamp(4.5rem, 10vh, 7rem); background: linear-gradient(rgba(10, 18, 36, 0.78), rgba(10, 18, 36, 0.35) 70%, rgba(10, 18, 36, 0)); }
.bottom-cap { bottom: 0; padding-bottom: clamp(2rem, 7vh, 4.5rem); background: linear-gradient(rgba(10, 18, 36, 0), rgba(10, 18, 36, 0.72) 45%); }
.say {
  margin: 0 auto 0.6rem; max-width: 22ch;
  font-size: clamp(1.9rem, 5vw, 3.6rem);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}
.say span { display: inline-block; will-change: opacity, transform; }
.from { margin: 0; color: #fff3cf; font-size: 1rem; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 14px rgba(0, 0, 0, 0.6); }
.soon-tag { margin: 0 0 0.6rem; color: var(--gold-soft); font-size: 1rem; }

/* Light in the paintings */
.rays {
  position: absolute; left: 57%; top: 36%; width: 120%; aspect-ratio: 1; translate: -50% -50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 236, 170, 0.18) 0 4deg, rgba(255, 236, 170, 0) 4deg 16deg);
  -webkit-mask: radial-gradient(circle, #000 0 8%, transparent 46%);
  mask: radial-gradient(circle, #000 0 8%, transparent 46%);
  animation: turn 90s linear infinite; mix-blend-mode: screen;
}
@keyframes turn { to { rotate: 360deg; } }
.twinkle {
  position: absolute; width: 0.55%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 25%, rgba(255, 240, 190, 0.6) 40%, transparent 70%);
  animation: twinkle 2.6s ease-in-out infinite;
}
@keyframes twinkle { 50% { transform: scale(2.2); opacity: 0.5; } }
.glow {
  position: absolute; left: 70%; top: 34%; width: 45%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 230, 160, 0.35), transparent 65%);
  animation: breathe 5s ease-in-out infinite; mix-blend-mode: screen;
}
@keyframes breathe { 50% { opacity: 0.45; transform: scale(1.08); } }
.lamp {
  position: absolute; left: 74%; top: 43%; width: 22%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 196, 92, 0.55), rgba(255, 170, 60, 0.12) 45%, transparent 70%);
  animation: flicker 3.2s steps(1) infinite; mix-blend-mode: screen;
}
@keyframes flicker { 0% { opacity: 0.9; } 18% { opacity: 0.7; } 31% { opacity: 1; } 47% { opacity: 0.78; } 63% { opacity: 0.95; } 80% { opacity: 0.72; } }
.starglow {
  position: absolute; left: 45%; top: 21%; width: 16%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 6%, rgba(255, 238, 180, 0.45) 18%, transparent 65%);
  animation: breathe 3.4s ease-in-out infinite; mix-blend-mode: screen;
}
.story .frame:first-of-type { opacity: 1; }
.story .bg { transform: scale(calc(1.12 - var(--p, 0) * 0.1)); transform-origin: 50% 45%; }
.story-dots { position: absolute; right: clamp(0.8rem, 3vw, 2rem); top: 50%; translate: 0 -50%; display: grid; gap: 0.6rem; z-index: 4; }
.story-dots i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--gold-soft); }
.story-dots i.on { background: var(--gold-soft); }

/* ---------- Book panels: the books themselves, with the Amazon links ---------- */
.book-panel {
  position: relative; z-index: 5;
  display: grid; grid-template-columns: minmax(0, 19rem) minmax(0, 1fr);
  grid-template-areas: "cover body" "pages pages";
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 6vw, 5rem);
  background: #fff;
  box-shadow: 0 -30px 60px -30px rgba(0, 0, 0, 0.6);
}
.panel-cover { grid-area: cover; }
.panel-cover img { width: 100%; height: auto; border-radius: 3px; box-shadow: 0 18px 36px -14px rgba(20, 38, 74, 0.55); }
.panel-body { grid-area: body; max-width: var(--measure); }
.book-panel h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: 0 0 0.6rem; color: var(--lapis); }
.lede { font-size: 1.25rem; font-style: italic; margin: 0 0 1rem; color: var(--madder); }
.inside { padding-left: 1.2rem; margin: 0 0 1rem; }
.inside li { margin: 0.25rem 0; }
.inside li::marker { color: var(--gold); }
.facts { color: #555a6b; margin: 0 0 1.2rem; }
blockquote { margin: 0 0 1.6rem; padding: 0 0 0 1rem; border-left: 3px solid var(--gold); }
blockquote p { margin: 0 0 0.3rem; font-style: italic; }
blockquote footer { font-size: 0.92rem; color: #555a6b; }

.buy { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-block; padding: 0.8rem 1.35rem; border-radius: 999px;
  background: var(--madder); color: #fff; text-decoration: none; font-weight: 600; font-size: 1rem;
}
.btn:hover { background: #7a2422; }
.btn.alt { background: transparent; color: var(--madder); box-shadow: inset 0 0 0 2px var(--madder); }
.btn.alt:hover { background: #f6e9e8; }
.btn.ghost { margin-top: 1.1rem; background: rgba(15, 29, 58, 0.35); color: #fff; box-shadow: inset 0 0 0 1.5px var(--gold-soft); backdrop-filter: blur(4px); }
.btn.ghost:hover { background: rgba(234, 217, 160, 0.2); }

.pages {
  grid-area: pages; display: grid; grid-auto-flow: column; grid-auto-columns: clamp(9.5rem, 21vw, 13.5rem);
  gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0.3rem 0.2rem 1rem;
}
.pages img { scroll-snap-align: start; width: 100%; height: auto; border-radius: 3px; box-shadow: 0 8px 18px -10px rgba(20, 38, 74, 0.5); }

/* ---------- The shelf ---------- */
.shelf { position: relative; z-index: 5; background: linear-gradient(var(--lapis), var(--night)); color: #fff; padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 6vw, 5rem); }
.shelf h2 { font-size: clamp(2rem, 4.5vw, 3rem); color: var(--gold-soft); margin: 0 0 2rem; }
.screen { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2.2rem); max-width: 72rem; }
.niche {
  display: block; padding: 26% 0.6rem 0.6rem; margin-bottom: 0.9rem;
  border: 2px solid var(--gold); border-radius: 50% 50% 6px 6px / 22% 22% 6px 6px;
  background: rgba(201, 162, 63, 0.08);
}
.niche img { width: 100%; height: auto; border-radius: 2px; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.6); }
.soon .niche { border-style: dashed; }
.screen h3 { font-size: 1.25rem; margin: 0 0 0.3rem; }
.screen p { margin: 0 0 0.4rem; color: #dfe5f1; font-size: 0.95rem; }
.links { display: flex; gap: 1rem; flex-wrap: wrap; }
.links a { color: var(--gold-soft); font-weight: 600; }
.works { max-width: var(--measure); color: #dfe5f1; margin: 2.5rem 0 0; }

.bottom { position: relative; z-index: 5; background: var(--night); color: #dfe5f1; padding: 2.5rem clamp(1rem, 6vw, 5rem) 3rem; border-top: 1px solid rgba(234, 217, 160, 0.2); }
.bottom .mark { color: var(--gold-soft); font-size: 1.5rem; margin: 0 0 0.4rem; }
.bottom p { margin: 0.2rem 0; }
.bottom a { color: #fff; }
.small { font-size: 0.88rem; opacity: 0.8; margin-top: 1rem !important; }

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  .book-panel { grid-template-columns: minmax(0, 1fr); grid-template-areas: "cover" "body" "pages"; gap: 1.4rem; }
  .panel-cover { max-width: 11rem; }
  .screen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .say { max-width: 18ch; }
}

/* ---------- Reduced motion (and before the script runs): a still, readable page ---------- */
html:not(.moving) .journey, html:not(.moving) .story { height: auto; }
html:not(.moving) .stage { position: relative; height: auto; min-height: 70vh; }
html:not(.moving) .journey .stage { min-height: 100vh; }
html:not(.moving) .frame { position: relative; opacity: 1; height: 80vh; overflow: hidden; }
html:not(.moving) .hint, html:not(.moving) .motes { display: none; }
html:not(.moving) .story-dots { display: none; }
.still .rays, .still .twinkle, .still .glow, .still .lamp, .still .starglow { animation: none; }
html:not(.moving) .say span { opacity: 1 !important; transform: none !important; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Welcome: who we are, before the first book ---------- */
.welcome {
  position: relative; z-index: 5;
  min-height: var(--vh);
  padding: clamp(5.5rem, 12vh, 8rem) clamp(1.2rem, 6vw, 5rem) clamp(2.5rem, 6vh, 4rem);
  background: linear-gradient(var(--lapis), #172b52 70%, var(--night));
  color: #fff;
  display: flex; flex-direction: column; gap: clamp(1.8rem, 4vh, 3rem);
}
.welcome-inner { max-width: 46rem; }
.welcome h1 { font-size: clamp(2.1rem, 5.4vw, 3.8rem); margin: 0 0 1rem; color: #fff; }
.welcome-lede { margin: 0; max-width: var(--measure); color: #dfe5f1; font-size: 1.1rem; }
.kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2.5rem); margin-top: 1.8rem; max-width: 44rem; }
.kinds h2 { font-size: 1.35rem; color: var(--gold-soft); margin: 0 0 0.35rem; }
.kinds p { margin: 0; color: #dfe5f1; font-size: 0.98rem; }
.welcome-shelf { max-width: 60rem; }
.welcome-shelf a { display: block; color: inherit; text-decoration: none; }
.welcome-shelf .cap { display: block; font-family: "Marcellus", serif; font-size: 1.02rem; line-height: 1.3; }
.welcome-shelf .cap em { display: block; font-family: "Literata", serif; font-size: 0.85rem; color: var(--gold-soft); }
.welcome-shelf a:hover .niche { border-color: var(--gold-soft); background: rgba(201, 162, 63, 0.16); }
.welcome-next {
  align-self: center; color: var(--gold-soft); text-decoration: none; font-size: 1rem;
  padding: 0.6rem 1.2rem; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(234, 217, 160, 0.6);
}
.welcome-next::after { content: ""; display: block; width: 1px; height: 1.6rem; margin: 0.5rem auto -2.2rem; background: linear-gradient(var(--gold-soft), transparent); }
.welcome-next:hover { background: rgba(234, 217, 160, 0.12); }

/* One entrance moment: the four books rise into their niches, one after another */
.moving .now-book { animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(0.2s + var(--i) * 0.14s); }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

@media (max-width: 760px) {
  .kinds { grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-top: 1.4rem; }
}

/* ---------- The choice after the welcome ---------- */
.choice { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; margin-top: 1.4rem; }
.btn { border: 0; cursor: pointer; font-family: "Literata", Georgia, serif; }
.step-in { background: var(--gold); color: var(--night); font-size: 1.05rem; padding: 0.9rem 1.6rem; }
.step-in:hover { background: var(--gold-soft); }
.btn.quiet { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(234, 217, 160, 0.7); }
.btn.quiet:hover { background: rgba(234, 217, 160, 0.12); }
.choice-note { margin: 0.7rem 0 0; color: #c9d2e4; font-size: 0.92rem; max-width: var(--measure); }
.experience[hidden] { display: none; }
.exp-end { margin: 0; padding: 2.5rem 1rem 3rem; text-align: center; background: var(--night); position: relative; z-index: 5; }

/* A small pill to jump to the books from anywhere in the walk-through */
.get-books {
  position: fixed; z-index: 40; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom));
  transform: translate(-50%, 140%); transition: transform 0.35s ease;
  background: var(--madder); color: #fff; text-decoration: none; font-weight: 600;
  padding: 0.7rem 1.3rem; border-radius: 999px; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.6);
}
.in-exp .get-books { transform: translate(-50%, 0); }
.get-books[hidden] { display: none; }
.ribbon { visibility: hidden; }
.immersed.past-intro .ribbon { visibility: visible; }

/* Coming soon, for everyone */
.coming-cards { position: relative; z-index: 5; background: var(--stone); padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 6vw, 5rem); }
.coming-cards h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); color: var(--lapis); margin: 0 0 1.4rem; }
.coming-cards h2.next-h { margin-top: clamp(2.2rem, 5vw, 3.4rem); }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2.5rem); max-width: 72rem; }
.cards article { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.cards img { width: 100%; height: auto; border-radius: 3px; box-shadow: 0 12px 26px -14px rgba(20, 38, 74, 0.6); }
.cards h3 { font-size: 1.3rem; color: var(--lapis); margin: 0 0 0.4rem; }
.cards p { margin: 0; color: #3b3f50; }
.btn.follow { margin-top: 1.8rem; background: var(--lapis); }
.btn.follow:hover { background: var(--night); }
@media (max-width: 760px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .cards article { grid-template-columns: minmax(0, 7rem) minmax(0, 1fr); }
}

/* ---------- Header turns solid once you scroll ---------- */
.top { transition: background 0.25s; }
.top.scrolled { background: rgba(15, 29, 58, 0.96); box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.6); }

/* ---------- Welcome: the two books you can buy today ---------- */
.now { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2.5rem); max-width: 60rem; }
.now-book { display: grid; grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr); gap: 1rem; align-items: start; }
.now-cover img { width: 100%; height: auto; border-radius: 3px; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.8); outline: 2px solid rgba(201, 162, 63, 0.55); outline-offset: 4px; }
.now-book h2 { font-size: 1.45rem; margin: 0 0 0.2rem; color: #fff; }
.now-book p { margin: 0 0 0.8rem; color: #dfe5f1; font-size: 0.98rem; }
.buy.small .btn { padding: 0.65rem 1.1rem; font-size: 0.95rem; }
.alt-store { align-self: center; color: inherit; opacity: 0.85; font-size: 0.92rem; }
.welcome .alt-store { color: var(--gold-soft); }
.more { display: inline-block; margin-top: 0.6rem; color: var(--gold-soft); font-size: 0.92rem; }
.iab-note { margin: 0.6rem 0 0; font-size: 0.88rem; color: inherit; opacity: 0.85; max-width: var(--measure); }
.iab-note[hidden] { display: none; }
.welcome .choice { margin-top: 0; padding-top: 1.4rem; border-top: 1px solid rgba(234, 217, 160, 0.25); max-width: 60rem; }
.welcome .choice-note { margin: 0; flex: 1 1 14rem; }
.soon-line { margin: 0; color: #c9d2e4; font-size: 0.95rem; }
.soon-line a { color: var(--gold-soft); }
@media (max-width: 760px) {
  .now { grid-template-columns: minmax(0, 1fr); }
  .now-book { grid-template-columns: minmax(0, 6.5rem) minmax(0, 1fr); }
}

/* ---------- Book panels ---------- */
.inside-title { font-size: 1.15rem; color: var(--lapis); margin: 1.6rem 0 0.4rem; }
.buy .alt-store { color: var(--madder); font-weight: 600; }
.chapter-tag { margin: 0 0 0.5rem; color: var(--gold-soft); font-size: 0.95rem; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7); }
.pages img[data-large] { cursor: zoom-in; }

/* ---------- Gift band ---------- */
.gift { position: relative; z-index: 5; background: linear-gradient(135deg, #f7efe0, #f1f4f9); padding: clamp(2.2rem, 5vw, 3.5rem) clamp(1rem, 6vw, 5rem); }
.gift h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); color: var(--madder); margin: 0 0 0.6rem; }
.gift > p { max-width: var(--measure); margin: 0 0 1.4rem; }
.gift-buy { display: flex; flex-wrap: wrap; gap: 1.2rem 3rem; }
.gift-buy span { display: block; font-family: "Marcellus", serif; font-size: 1.2rem; color: var(--lapis); margin-bottom: 0.5rem; }
.meanwhile { margin-top: 0.8rem !important; font-size: 0.95rem; color: var(--lapis) !important; }

/* ---------- Questions ---------- */
.faq { position: relative; z-index: 5; background: #fff; padding: clamp(2.5rem, 6vw, 4rem) clamp(1rem, 6vw, 5rem); }
.faq h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); color: var(--lapis); margin: 0 0 1rem; }
.faq details { max-width: 44rem; border-top: 1px solid #dde2ea; padding: 0.9rem 0; }
.faq details:last-of-type { border-bottom: 1px solid #dde2ea; }
.faq summary { cursor: pointer; font-family: "Marcellus", serif; font-size: 1.15rem; color: var(--lapis); }
.faq details p { margin: 0.6rem 0 0; max-width: var(--measure); }

/* ---------- Page viewer ---------- */
.viewer { border: 0; padding: 0; background: transparent; max-width: min(94vw, 40rem); max-height: 94vh; }
.viewer::backdrop { background: rgba(10, 16, 32, 0.88); }
.viewer img { width: 100%; height: auto; max-height: 92vh; object-fit: contain; border-radius: 4px; }
.viewer .close { position: fixed; top: 0.8rem; right: 0.8rem; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 0; background: #fff; color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; }

/* ---------- Release-day sign-up ---------- */
.signup { margin-top: 2.2rem; max-width: 44rem; background: #fff; border-radius: 12px; padding: 1.3rem 1.4rem; box-shadow: 0 12px 30px -18px rgba(20, 38, 74, 0.45); }
.signup h3 { font-size: 1.35rem; color: var(--lapis); margin: 0 0 0.3rem; }
.signup > p { margin: 0 0 0.9rem; color: #3b3f50; font-size: 0.97rem; }
.signup-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.signup input[type=email], .signup select {
  font: inherit; font-size: 1rem; padding: 0.7rem 0.9rem; border-radius: 10px; border: 1.5px solid #c7cfdc; background: #fff; color: var(--ink);
}
.signup input[type=email] { flex: 1 1 14rem; min-width: 0; }
.signup select { flex: 0 1 auto; }
.signup input:focus-visible, .signup select:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }
.signup .btn { background: var(--madder); }
.signup .btn[disabled] { opacity: 0.6; }
.signup-msg { margin: 0.7rem 0 0 !important; min-height: 1.2em; color: var(--lapis) !important; font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.follow-line { margin: 1rem 0 0; color: #3b3f50; }
.out-when { color: var(--madder) !important; font-weight: 600; margin: 0 0 0.4rem !important; }
.ask { margin: 1.4rem 0 0; }
.ask .btn { background: var(--lapis); }

/* anchors land below the fixed header */
[id] { scroll-margin-top: 4.5rem; }

/* ---------- Book pages and the Kiahk guide (Nov 26 2026; built by _src/build_pages.py) ---------- */
.page-hero { background: radial-gradient(ellipse at 50% -20%, var(--lapis), var(--night) 72%); color: #fff; padding: clamp(5.5rem, 12vw, 8rem) clamp(1rem, 6vw, 5rem) clamp(2.2rem, 5vw, 3.4rem); }
.crumbs { margin: 0 0 1rem; font-size: 0.92rem; color: #c3cde2; }
.crumbs a { color: var(--gold-soft); }
.page-hero h1 { font-size: clamp(2rem, 5.2vw, 3.3rem); color: var(--gold-soft); margin: 0 0 0.7rem; max-width: 22ch; }
.page-hero p { max-width: 36rem; margin: 0; color: #dfe5f1; font-size: 1.15rem; }
.subpage .book-panel { box-shadow: none; }
.prose { position: relative; z-index: 5; background: #fff; padding: 0 clamp(1rem, 6vw, 5rem) clamp(2.5rem, 6vw, 4rem); }
.prose > * { max-width: 40rem; }
.prose h2 { font-size: clamp(1.55rem, 3vw, 2.05rem); color: var(--lapis); margin: 2.4rem 0 0.7rem; }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.2rem; }
.prose li { margin: 0.35rem 0; }
.prose li::marker { color: var(--gold); }
.guide { padding-top: clamp(2rem, 5vw, 3rem); }
.guide .intro { font-size: 1.2rem; }
.glance { margin: 1.6rem 0 0.4rem; padding: 1.2rem 1.3rem; background: #f7efe0; border-left: 4px solid var(--gold); border-radius: 4px; }
.glance h2 { margin: 0 0 0.6rem; font-size: 1.35rem; }
.glance dl { margin: 0; display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 0.45rem 1rem; }
.glance dt { font-weight: 600; }
.glance dd { margin: 0; }
@media (max-width: 560px) { .glance dl { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; } .glance dd { margin-bottom: 0.5rem; } }
.guide-art { margin: 2rem 0; max-width: 24rem !important; }
.guide-art img { width: 100%; height: auto; border-radius: 4px; box-shadow: 0 16px 34px -16px rgba(20, 38, 74, 0.55); }
.guide-art figcaption { margin-top: 0.5rem; font-size: 0.92rem; color: #555a6b; }
.ways li { margin: 0.6rem 0; }
.stories { margin: 0 0 1.2rem; }
.stories dt { font-family: "Marcellus", serif; font-size: 1.2rem; color: var(--madder); margin-top: 0.9rem; }
.stories dd { margin: 0.15rem 0 0; }
.timeline { list-style: none; padding: 0 !important; border-left: 2px solid var(--gold-soft); }
.timeline li { position: relative; padding: 0 0 0.9rem 1.2rem; margin: 0 !important; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 0.55rem; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.timeline .yr { font-family: "Marcellus", serif; font-size: 1.15rem; color: var(--lapis); margin-right: 0.35rem; }
.bookbox { display: grid; grid-template-columns: minmax(0, 8rem) minmax(0, 1fr); gap: 1.2rem; align-items: start; margin: 2.6rem 0 0; padding: 1.3rem; background: var(--stone); border-radius: 8px; }
.bookbox img { width: 100%; height: auto; border-radius: 3px; box-shadow: 0 12px 26px -14px rgba(20, 38, 74, 0.6); }
.bookbox h2 { margin: 0 0 0.4rem; font-size: 1.4rem; }
.bookbox p { margin: 0; }
.prose .signup { margin-top: 2rem; }
.more-books { position: relative; z-index: 5; background: var(--stone); padding: clamp(2.5rem, 6vw, 4rem) clamp(1rem, 6vw, 5rem); }
.more-books h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); color: var(--lapis); margin: 0 0 1.4rem; }
.more-books ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2rem); max-width: 72rem; }
.more-books li a { display: block; text-decoration: none; color: var(--lapis); font-family: "Marcellus", serif; font-size: 1.2rem; line-height: 1.2; }
.more-books li img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; box-shadow: 0 12px 26px -14px rgba(20, 38, 74, 0.6); margin-bottom: 0.7rem; }
.more-books li a:hover span { text-decoration: underline; }
.more-books li p { margin: 0.35rem 0 0; font-size: 0.95rem; color: #3b3f50; }
@media (max-width: 760px) { .more-books ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.foot-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem 1.3rem; margin: 0.9rem 0 1rem; padding: 0; }
.foot-nav a { color: var(--gold-soft); }
.page-link { margin: 0.4rem 0 0 !important; font-weight: 600; }
.gift .page-link { margin-top: 1.4rem !important; font-weight: 400; }
.screen h3 a { color: inherit; text-decoration-color: rgba(234, 217, 160, 0.5); }

.welcome .buy .alt-store { color: var(--gold-soft); }
