/* The Book page (v3). Same rule as the homepage: without .pinmode (reduced motion, no JS)
   every chapter is a plain stacked section; .pinmode turns on the pinned, scroll-driven layout. */

.page-book main { position: relative; background: #0f0f18; }

/* ---------------------------------------------------------------- 01 the book, turning */
.bh { position: relative; color: var(--on-dark); background: #0f0f18; overflow: hidden; }
.bh__pin { position: relative; min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center;
  gap: 2rem; padding: calc(var(--nav-h) + 2rem) var(--gutter) 4rem; overflow: hidden; }
.bh__bg { position: absolute; inset: 0; overflow: hidden; }
.bh__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 78%; transform: scale(1.18); }
/* a picture chosen in WordPress is not pre-softened like the theme's own, so it is softened here (once, not animated) */
.bh__bg img[data-custom] { filter: blur(10px) brightness(.55); }
.bh__bg::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 70% at 72% 55%, rgba(217, 154, 50, .16), transparent 70%), linear-gradient(90deg, rgba(15, 15, 24, .92) 0%, rgba(15, 15, 24, .55) 45%, rgba(15, 15, 24, .25) 100%); }
.bh__embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bh__big { position: absolute; left: 0; top: 50%; transform: translateY(-50%); margin: 0; white-space: nowrap; pointer-events: none; display: none;
  font-family: var(--f-display); font-size: clamp(9rem, 22vw, 26rem); line-height: 1; letter-spacing: -.03em; color: transparent; -webkit-text-stroke: 1px rgba(244, 235, 221, .1); }
.bh__stage { position: relative; z-index: 1; grid-column: 2; grid-row: 1; height: min(80vh, 780px); display: grid; place-items: center; }
.bh__stage .book__still { position: relative; width: min(62%, 320px); transform: perspective(1400px) rotateY(-18deg) rotateX(4deg); box-shadow: 30px 40px 60px -20px rgba(0, 0, 0, .75); border-radius: 2px 5px 5px 2px; overflow: hidden; }
.bh__stage canvas { position: absolute; inset: -10% -20%; width: 140%; max-width: none; height: 120%; opacity: 0; transition: opacity 1s var(--ease); }
.bh__stage.gl-on canvas { opacity: 1; }
.bh__stage.gl-on .book__still { opacity: 0; }
.bh__copy { position: relative; z-index: 2; grid-column: 1; grid-row: 1; max-width: 40rem; }
.bh__title { font-family: var(--f-display); font-weight: 500; font-size: clamp(3.6rem, 1.6rem + 7vw, 9.5rem); line-height: .9; letter-spacing: -.025em; margin: 1.25rem 0 1.5rem; color: var(--cream); }
.bh__title em { font-style: italic; font-weight: 400; color: var(--amber-hi); }
.bh__w { display: inline-block; }
.bh__sub { font-family: var(--f-display); font-style: italic; font-size: var(--fs-lede); color: var(--amber-hi); line-height: 1.35; max-width: 30rem; margin-bottom: 1rem; }
.bh__intro { color: var(--on-dark-soft); max-width: 30rem; }
.bh__copy .btn-row { margin-top: 2.25rem; }
.bh__back { position: relative; z-index: 2; grid-column: 1 / -1; max-width: 36rem; }
.bh__backline { font-family: var(--f-display); font-size: clamp(2rem, 1.2rem + 2.6vw, 3.6rem); line-height: 1.08; color: var(--cream); margin-top: 1rem; }
.bh__backline em { color: var(--amber-hi); }
.bh__cue { display: none; }

.pinmode .bh__pin { height: 100vh; height: 100svh; display: block; padding: 0; }
.pinmode .bh__big { display: block; }
.pinmode .bh__stage { position: absolute; right: 2vw; top: 50%; width: 50vw; height: 88vh; transform: translateY(-50%); }
.pinmode .bh__copy { position: absolute; left: var(--gutter); top: 50%; transform: translateY(-50%); padding-top: calc(var(--nav-h) * .5); }
.pinmode .bh__back { position: absolute; left: var(--gutter); top: 50%; transform: translateY(-50%); opacity: 0; visibility: hidden; }
.pinmode .bh__cue { display: flex; position: absolute; left: 50%; bottom: 1.5rem; transform: translateX(-50%); flex-direction: column; align-items: center; gap: .75rem; z-index: 2;
  font: 600 .625rem/1 var(--f-ui); letter-spacing: .22em; text-transform: uppercase; color: var(--on-dark-soft); }
.bh__cue i { width: 1px; height: 44px; background: linear-gradient(var(--amber), transparent); animation: bh-cue 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes bh-cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

@media (max-width: 860px) {
  .bh__pin { grid-template-columns: 1fr; }
  .bh__stage, .bh__copy { grid-column: 1; grid-row: auto; }
  .bh__stage { height: 52vh; }
  .pinmode .bh__stage { left: 0; right: 0; top: calc(var(--nav-h) - 1rem); width: 100%; height: 48vh; transform: none; }
  .pinmode .bh__copy, .pinmode .bh__back { top: auto; bottom: 5.5rem; transform: none; right: var(--gutter); padding-top: 0; }
  .bh__title { font-size: clamp(3rem, 14vw, 4.6rem); margin: .75rem 0 1rem; }
  .bh__intro { display: none; }
  .pinmode .bh__cue { display: none; }
  .bh__copy .btn-row { margin-top: 1.25rem; }
  .bh__bg::after { background: linear-gradient(180deg, rgba(15, 15, 24, .3) 0%, rgba(15, 15, 24, .55) 45%, rgba(15, 15, 24, .94) 100%); }
}

/* ---------------------------------------------------------------- 02 a companion: words ignite */
.bc { position: relative; padding: var(--section) 0; }
.bc__statement { font-family: var(--f-display); font-weight: 500; font-size: clamp(2.2rem, 1.1rem + 4vw, 5.6rem); line-height: 1.04; letter-spacing: -.02em; margin: 1.75rem 0 0; max-width: 24ch; color: var(--ink); }
.bc__statement em { font-style: italic; font-weight: 400; color: var(--accent-on-paper); }
.pinmode .bc__statement .w { opacity: .13; }
.bc__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 4rem); margin-top: clamp(3rem, 7vw, 6rem); padding-top: 2rem; border-top: 1px solid var(--line-paper); color: var(--ink-soft, #5a4a44); }
@media (max-width: 860px) { .bc__cols { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- 03 a chair left open */
.bo { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); color: var(--on-dark); background: linear-gradient(180deg, #171B27, #211C1C); }
.bo__media { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-items: center; padding: var(--nav-h) var(--gutter) 2rem; }
.bo__frame { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: var(--radius-lg); }
.bo__frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.bo__text { padding: calc(var(--section) * 1.1) var(--gutter) var(--section) 0; display: grid; gap: 1.4rem; align-content: center; min-height: 160vh; }
.bo__text .display { margin-bottom: .5rem; }
.bo__text .display em { color: var(--amber-hi); }
.bo__text .lede { color: var(--cream); }
.bo__text p:not([class]) { color: var(--on-dark-soft); max-width: 34rem; }
@media (max-width: 860px) {
  .bo { grid-template-columns: 1fr; }
  .bo__media { position: relative; height: 62svh; padding: 0; }
  .bo__frame { border-radius: 0; }
  .bo__text { min-height: 0; padding: 3.5rem var(--gutter) var(--section); }
}

/* ---------------------------------------------------------------- 04 the back-cover line, by hand */
.bq { position: relative; padding: calc(var(--section) * 1.2) var(--gutter); text-align: center; color: var(--on-dark);
  background: radial-gradient(60% 60% at 50% 60%, rgba(184, 92, 50, .22), transparent 70%), #12141d; overflow: hidden; }
.bq__fig { margin: 0 auto; max-width: 70rem; }
.bq__quote { margin: 0; font-family: var(--f-hand); font-size: clamp(2.4rem, 1.2rem + 4.8vw, 6.6rem); line-height: 1.12; color: var(--amber); text-shadow: 0 0 40px rgba(217, 154, 50, .25); }
.bq__quote .ch { display: inline-block; white-space: pre; }
.bq figcaption { justify-content: center; margin-top: 2.5rem; color: var(--on-dark-soft); }

/* ---------------------------------------------------------------- 05 the questions: words light up */
.bw { position: relative; color: var(--on-dark); background: linear-gradient(180deg, #12141d, #1d1820 60%, #211C1C); overflow: hidden; }
.bw__pin { position: relative; min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 1fr auto;
  gap: 2rem clamp(2rem, 6vw, 6rem); align-items: center; padding: calc(var(--nav-h) + 3rem) var(--gutter) 3rem; }
.bw__head .display { margin: 1.25rem 0 1.5rem; }
.bw__head .display em { color: var(--amber-hi); }
.bw__head .lede { color: var(--on-dark-soft); max-width: 32rem; }
.bw__words { list-style: none; margin: 0; padding: 0; grid-row: 1 / 3; grid-column: 2; }
.bw__words li { font-family: var(--f-display); font-size: clamp(2.4rem, 1.4rem + 3.4vw, 5.4rem); line-height: 1.04; letter-spacing: -.02em; color: var(--cream); transition: color .6s var(--ease), text-shadow .6s var(--ease); }
.pinmode .bw__words li { color: rgba(244, 235, 221, .12); }
.pinmode .bw__words li.was-lit { color: rgba(244, 235, 221, .55); }
.pinmode .bw__words li.is-lit { color: var(--amber-hi); font-style: italic; text-shadow: 0 0 44px rgba(240, 178, 74, .45); }
.bw__foot { grid-column: 1; color: var(--on-dark-soft); max-width: 30rem; font-size: .95rem; border-top: 1px solid var(--line-dark); padding-top: 1.5rem; }
@media (max-width: 860px) {
  .bw__pin { grid-template-columns: 1fr; grid-template-rows: auto; align-content: center; gap: 1.5rem; padding-top: calc(var(--nav-h) + 1.5rem); }
  .bw__words, .bw__foot { grid-column: 1; grid-row: auto; }
  .bw__head .lede { display: none; }
  .bw__words li { font-size: clamp(2rem, 9vw, 3rem); }
}

/* ---------------------------------------------------------------- 06 excerpt as an open book */
.bx { padding: var(--section) 0; }
.bx .display { margin-top: 1.25rem; }
.bx__spread { display: grid; grid-template-columns: 1fr 1fr; max-width: 66rem; margin: clamp(2.5rem, 5vw, 4rem) auto 0; background: #fbf6ec; border-radius: 4px;
  box-shadow: 0 40px 80px -40px rgba(48, 35, 31, .45), 0 2px 0 rgba(48, 35, 31, .06); }
.bx__page { position: relative; padding: clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 4vw, 3.75rem) 4rem; min-height: 30rem; font-family: var(--f-display); font-size: 1.2rem; line-height: 1.7; color: var(--ink); }
.bx__page:first-child { background: linear-gradient(270deg, rgba(48, 35, 31, .1), transparent 9%); }
.bx__page:last-child { background: linear-gradient(90deg, rgba(48, 35, 31, .1), transparent 9%); }
.bx__run { font: 600 .625rem/1 var(--f-ui); letter-spacing: .22em; text-transform: uppercase; color: var(--accent-on-paper); text-align: center; margin-bottom: 2.5rem; }
.bx__note { font-size: .95rem; font-style: italic; color: #7a6a62; margin-top: 1rem; }
.bx__num { position: absolute; left: 0; right: 0; bottom: 1.5rem; text-align: center; font-style: italic; font-size: .95rem; color: #9a8a82; }
@media (max-width: 760px) { .bx__spread { grid-template-columns: 1fr; } .bx__page { min-height: 16rem; } .bx__page:first-child, .bx__page:last-child { background: none; } .bx__page + .bx__page { border-top: 1px solid var(--line-paper); } }

/* ---------------------------------------------------------------- 07 details */
.bd { padding: 0 0 var(--section); }
.bd__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 7vw, 7rem); align-items: center; }
.bd__cover { perspective: 1200px; max-width: 22rem; }
.bd__cover img { width: 100%; border-radius: 2px 6px 6px 2px; box-shadow: 30px 40px 60px -25px rgba(48, 35, 31, .55); transform: rotateY(-14deg) rotateX(3deg); transition: transform .8s var(--ease-out); }
.bd .h1 { margin: 1rem 0 2rem; }
.bd__facts { margin: 0 0 2.5rem; }
.bd__facts > div { position: relative; display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: 1rem 0; }
.bd__facts > div::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line-paper); transform-origin: left; }
.pinmode .bd__facts > div::after { transform: scaleX(var(--draw, 0)); }
.bd__facts dt { font: 700 .6875rem/1.6 var(--f-ui); letter-spacing: .18em; text-transform: uppercase; color: var(--accent-on-paper); }
.bd__facts dd { margin: 0; font-family: var(--f-display); font-size: 1.25rem; }
@media (max-width: 860px) { .bd__grid { grid-template-columns: 1fr; } .bd__cover { max-width: 14rem; } .bd__facts > div { grid-template-columns: 7rem 1fr; } }

/* ---------------------------------------------------------------- 08 readers + 09 end */
.br .display { margin-top: 1rem; }
.be { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center; color: var(--cream); overflow: hidden; background: #12141d; }
.be__img { position: absolute; inset: 0; }
.be__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.be__img::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 45%, rgba(18, 20, 29, .35), rgba(18, 20, 29, .85)); }
.be__content { position: relative; z-index: 1; padding: var(--section) var(--gutter); }
.be__title { font-family: var(--f-display); font-weight: 500; font-size: clamp(3.4rem, 1.6rem + 7vw, 9rem); line-height: .95; letter-spacing: -.025em; }
.be__title em { font-style: italic; font-weight: 400; color: var(--amber-hi); }
.be__sub { font-family: var(--f-hand); color: var(--amber); font-size: clamp(1.4rem, 1rem + 1.4vw, 2.2rem); margin: 1.25rem 0 2.5rem; }
.be .btn-row { justify-content: center; }
