/* The book's sales page (/book/) in the look of the book's own cover: cream paper, near-black
   heavy capitals, one red poker chip. Loaded after /marketing.css, which still holds the page's
   base rules; this file only belongs to this page, so the shared stylesheet stays as it was for
   the quiz, the guides and the answer pages.

   The hero is the cover opened up: the cover stands as a book, the cover's chip rolls in behind
   it, and the headline is set the way the title is. Under it a black band carries the price
   arithmetic, drawn to scale. Everything moves once and settles; every entrance starts from a
   keyframe, so the rules below are the finished page. */
@font-face { font-family: Shoulders; src: url(/fonts/big-shoulders-display-latin-900-normal.woff2) format('woff2'); font-weight: 900; font-display: swap; }
@font-face { font-family: Hanken; src: url(/fonts/hanken-grotesk-latin-wght-normal.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }

:root { --paper: #F2ECE1; --cover-ink: #141210; --chip: #C8261C; --disp: Shoulders, 'Arial Narrow', Impact, sans-serif; }
@media not (prefers-color-scheme: dark) {
  :root { --bg: #FBF8F2; --surface: #fff; --line: #ddd5c7; --ink: #141210; --ink-2: #3b3732; --dim: #5f5a52; }
}
body { font-family: Hanken, 'Hanken Grotesk', system-ui, -apple-system, sans-serif; }

/* ---------- The hero: a cream band, edge to edge, in the cover's colours in any theme ---------- */
.book-hero {
  position: relative; isolation: isolate; overflow: hidden;
  margin: 14px -20px 0; padding: 22px 20px 26px;
  grid-template-columns: 128px 1fr; column-gap: 18px; align-items: start;
  background: #F2ECE1; color: #141210; color-scheme: light;
  box-shadow: 0 0 0 100vmax #F2ECE1; clip-path: inset(0 -100vmax);
  --ink: #141210; --ink-2: #3b3732; --dim: #5f5a52; --line: #d6ccba; --amber-text: #8a5800;
}
/* The cover as a book: a front, a spine and a soft shadow on the ground. The chip is the cover's
   own drawing, large, behind the book and off the band's edge. */
.bk-stage { position: relative; grid-column: 1; grid-row: 1 / span 2; perspective: 900px; --d: 18px; margin-bottom: 34px; }
.bk { position: relative; transform-style: preserve-3d; transform: rotateY(28deg); animation: bk-swing 1.1s .15s cubic-bezier(.22,1,.36,1) both; }
.book-cover { width: 100%; height: auto; display: block; box-shadow: none; transform: translateZ(calc(var(--d) / 2)); backface-visibility: hidden; }
.bk::after { content: ''; position: absolute; inset: 0; transform: translateZ(calc(var(--d) / 2 + .5px)); pointer-events: none;
  background: linear-gradient(90deg, rgba(20,18,16,.16) 0, rgba(20,18,16,0) 3.5%, rgba(255,255,255,.2) 5.5%, rgba(255,255,255,0) 11%, rgba(20,18,16,0) 70%, rgba(20,18,16,.07) 100%); }
.bk-spine { position: absolute; left: 0; top: 0; height: 100%; width: var(--d); transform: translateX(calc(var(--d) / -2)) rotateY(-90deg);
  background: linear-gradient(90deg, #cfc5b3, #e6decf 45%, #d8cfbe); }
.bk-stage::after { content: ''; position: absolute; left: -4%; right: -10%; bottom: -5%; height: 9%; z-index: -1;
  background: radial-gradient(closest-side, rgba(20,18,16,.34), rgba(20,18,16,0)); filter: blur(5px); }
.bk-chip { position: absolute; z-index: -2; width: 180%; height: auto; left: -84%; bottom: -21%; max-width: none; animation: bk-roll 1.5s cubic-bezier(.22,1,.36,1) both; }

.book-eyebrow { grid-row: 1; grid-column: 2; align-self: end; margin-top: 0; font-size: 11px; line-height: 1.6; color: #B3241B; }
.book-eyebrow strong { color: #141210; font-size: 14px; }
.book-hero h1 { grid-row: 2; grid-column: 2; align-self: start; margin-top: 8px; font-family: var(--disp); font-weight: 900; text-transform: uppercase;
  font-size: clamp(34px, 10.2vw, 44px); line-height: .9; letter-spacing: 0; text-wrap: balance; color: #141210; animation: bk-rise .7s .35s cubic-bezier(.22,1,.36,1) both; }
.book-hero h1 span { color: var(--chip); }
.book-hero .lede { margin-top: 14px; font-size: 16px; line-height: 1.45; color: #141210; }
.book-checks { margin-top: 12px; gap: 6px 14px; }
.book-checks li { font-weight: 600; }
.book-checks li::before { width: 9px; height: 9px; border-radius: 50%; background: var(--chip); }
.book-consent a, .book-hero .fine a { color: #141210; }
.book-buy { min-height: 56px; display: flex; align-items: center; justify-content: center; font-size: 16px; margin-top: 12px; }

@keyframes bk-swing { from { opacity: 0; transform: rotateY(84deg) translateY(-14px); } }
@keyframes bk-roll { from { translate: -60% 0; rotate: -200deg; } }
@keyframes bk-rise { from { opacity: 0; translate: 0 14px; } }
@keyframes bk-grow { from { scale: 0 1; } }
@keyframes bk-lift { from { opacity: .3; translate: 0 18px; } }
@media (prefers-reduced-motion: reduce) {
  .bk, .bk-chip, .book-hero h1 { animation: none; }
}

/* ---------- The price arithmetic: a black band, the sentence large, the two amounts to scale ---------- */
.book-anchor { margin: 0 -20px; padding: 26px 20px 22px; border-left: 0; background: #141210; color: #F2ECE1;
  box-shadow: 0 0 0 100vmax #141210; clip-path: inset(0 -100vmax); }
.book-anchor p:first-child { font-family: var(--disp); font-weight: 900; text-transform: uppercase; font-size: clamp(30px, 8.6vw, 64px); line-height: .92; color: #ff6a5c; text-wrap: balance; }
.book-anchor strong { display: block; font-weight: 900; color: #F2ECE1; margin-bottom: .14em; }
.ba-scale { display: grid; gap: 10px; margin-top: 22px; }
.ba-scale span { display: grid; gap: 5px; }
.ba-scale i { display: block; height: 10px; transform-origin: 0 50%; }
.ba-scale b { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #cfc7b9; }
.ba-year i { width: 100%; background: #F2ECE1; }
.ba-book i { width: max(3px, calc(100% * 19 / 2400)); }
.ba-book i { background: #ff6a5c; }
.book-anchor .fine { margin-top: 12px; color: #cfc7b9; }

/* ---------- Under the bands: the page's own ground, with the cover's type ---------- */
.wrap.book > h2 { margin-top: 52px; font-family: var(--disp); font-weight: 900; text-transform: uppercase; font-size: clamp(32px, 9vw, 52px); line-height: .92; letter-spacing: 0; }
.book-tiles { gap: 16px; margin-top: 18px; }
.book-tiles .card { margin-top: 0; padding: 0; overflow: hidden; }
.book-tiles .card h3 { margin: 14px 16px 0; font-size: 19px; }
.book-tiles .card p { margin: 6px 16px 16px; font-size: 16px; }
.bt-shot { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 0; border-bottom: 1px solid var(--line); background: #F2ECE1; }
/* The book's tile shows the whole cover, standing on the cover's own cream. */
.book-tiles .card:first-child .bt-shot { object-fit: contain; object-position: 50% 50%; padding: 14px 0; }

/* The four parts are a real order, so they carry their numbers large. */
.book-contents { margin-top: 16px; padding: 4px 16px 16px; }
.book-contents > .row { display: grid; grid-template-columns: 48px 1fr; column-gap: 10px; align-items: start; margin-top: 0; padding: 14px 0; border-top: 1px solid var(--line); }
.book-contents > .row:first-child { border-top: 0; }
.book-contents > .row .n { font-family: var(--disp); font-weight: 900; font-size: 40px; line-height: .85; letter-spacing: 0; color: var(--chip); }
.book-contents > .row strong { display: block; color: var(--ink); font-size: 18px; }

/* Who it is for: four statements, each under a black rule. */
.wrap.book > ul { list-style: none; margin: 18px 0 0; display: grid; gap: 0 20px; }
.wrap.book > ul li { margin-top: 0; padding: 14px 0 14px 26px; border-top: 2px solid var(--ink); font-size: 17px; font-weight: 600; color: var(--ink); position: relative; }
.wrap.book > ul li::before { content: ''; position: absolute; left: 0; top: 20px; width: 12px; height: 12px; border-radius: 50%; background: var(--chip); }

.wrap.book > .cta { display: flex; align-items: center; justify-content: center; min-height: 56px; font-size: 16px; margin-top: 32px; }

@media (min-width: 640px) {
  .wrap.book > ul { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .book-hero { grid-template-columns: 400px 1fr; column-gap: 56px; align-items: center; margin-top: 18px; padding: 44px 20px 48px; }
  .bk-stage { grid-row: 1; --d: 38px; perspective: 1500px; padding-left: 60px; margin-bottom: 0; }
  .bk-chip { width: 112%; left: -1%; bottom: -24%; }
  .bk-stage::after { left: 12%; }
  .book-eyebrow { font-size: 13px; }
  .book-eyebrow strong { font-size: 16px; }
  .book-hero h1 { font-size: clamp(64px, 7vw, 96px); margin-top: 14px; max-width: 8.5em; }
  .book-hero .lede { font-size: 19px; max-width: 34em; }
  .book-buy { display: inline-flex; padding-inline: 56px; }
  .book-anchor { padding: 44px 20px 36px; }
  .wrap.book > .card, .wrap.book > .book-tiles, .wrap.book > ul { max-width: none; }
  .wrap.book > h2 { margin-top: 72px; }
  .book-contents { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 28px; padding: 20px 24px 20px; }
  .book-contents > .row { display: block; border-top: 0; padding: 0 0 8px; }
  .book-contents > .row .n { display: block; font-size: 72px; margin-bottom: 10px; }
  .book-contents > details, .book-contents > .fine { grid-column: 1 / -1; }
  .wrap.book > ul { grid-template-columns: repeat(4, 1fr); }
  .wrap.book > .cta { display: inline-flex; padding-inline: 56px; }
}

/* Motion tied to scrolling, where the browser has it and the visitor allows motion: the long bar
   grows as the band comes into view, and the four parts lift into place (they never start
   invisible, so a page read without scrolling still shows them). Without it the page is the same
   page, already drawn. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .ba-year i { animation: bk-grow linear both; animation-timeline: view(); animation-range: entry 20% cover 38%; }
    .book-contents > .row { animation: bk-lift linear both; animation-timeline: view(); animation-range: entry 0% cover 22%; }
  }
}
