/* ==========================================================================
   LEARNER — book landing page. Its own visual world, derived from the
   cover: cream ground, four blues, black grotesque, cascading type.
   No shadows, no radius, flat print color. Motion: load cascade, scroll-
   scrubbed 3D book, marquee, reveal-on-enter. learnerbook.js drives JS.
   ========================================================================== */

/* ----- Palette (sampled from the cover) ----- */
.bk {
  --bk-cream: #F4EEE0;
  --bk-blue:  #1E4BDB;   /* cobalt — the loud rows        */
  --bk-blue2: #3D73EA;   /* mid                            */
  --bk-blue3: #93B6F2;   /* light                          */
  --bk-blue4: #CCDCF8;   /* palest echo                    */
  --bk-black: #101010;
  background: var(--bk-cream);
  color: var(--bk-black);
  font-family: var(--sans);
  overflow-x: clip;
}
/* The book page owns the whole canvas — mute the site's paper texture. */
body.page-learnerbook { background-image: none; background: #F4EEE0; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ============ TOPBAR ============ */
.bk-topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  mix-blend-mode: normal;
}
.bk-brand {
  font-weight: 800; letter-spacing: -0.02em; font-size: 15px;
  color: var(--bk-black);
  display: inline-flex; align-items: baseline; gap: 2px;
}
/* Cover-font wordmark stands in for the text brand. */
.bk-brand img {
  height: 24px; width: auto; display: block;
  align-self: center;
}
.bk-brand i {
  font-style: italic; font-weight: 400;
  font-family: var(--serif);
  letter-spacing: 0;
  opacity: 0.7;
}
.bk-cta {
  display: inline-block;
  background: var(--bk-black); color: var(--bk-cream);
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none;
  padding: 14px 22px;
  border: 1px solid var(--bk-black);
  transition: background 0.15s, color 0.15s;
}
.bk-cta:hover { background: var(--bk-blue); border-color: var(--bk-blue); color: var(--bk-cream); }
.bk-cta--small { padding: 10px 16px; }

/* ============ HERO: cream lab-sheet grid, cover + spec rail ============ */
.bk-hero {
  min-height: 100svh;
  position: relative;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 90px 4vw 64px;
  overflow: clip;
  --g: clamp(44px, 6.3vw, 92px);
  background-image:
    linear-gradient(rgba(16, 16, 16, 0.033) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 16, 16, 0.033) 1px, transparent 1px);
  background-size: var(--g) var(--g);
}
/* Sparse grid cells in the four blues — a few breathe on a ticker. */
.bk-gridlay { position: absolute; inset: 0; pointer-events: none; }
.bk-gridlay .g {
  position: absolute;
  left: calc(var(--x) * var(--g));
  top: calc(var(--y) * var(--g));
  width: var(--g); height: var(--g);
  opacity: 0;
  transition: opacity 0.8s ease;
}
.bk-gridlay .g.on { opacity: 1; }
.bk-gridlay .g.h { height: calc(var(--g) / 2); }
.bk-gridlay .g.trail { transition: none; }
.bk-gridlay .g.trail.fade { animation: bk-trail 0.9s ease-out forwards; }
@keyframes bk-trail {
  0% { opacity: 0.95; }
  100% { opacity: 0; }
}
.bk-gridlay .c1 { background: var(--bk-blue); }
.bk-gridlay .c2 { background: var(--bk-blue2); }
.bk-gridlay .c3 { background: var(--bk-blue3); }
.bk-gridlay .c4 { background: var(--bk-blue4); }

.bk-hero-inner {
  position: relative; z-index: 2;
  display: grid;
  /* Rail cap sized so "important skill of our time." holds one line
     at the claim's largest clamp size. */
  grid-template-columns: auto minmax(300px, 700px);
  align-items: center;
  gap: 5vw;
}
/* The cover, with flat print-layer echoes offset on the grid. The
   echoes sit at real 3D depths so the cursor tilt reveals layers. */
.bk-cover-wrap { perspective: 1100px; position: relative; }
.bk-shadow {
  position: absolute;
  left: 4%; right: -2%;
  bottom: -30px; height: 36px;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(16, 16, 16, 0.22), transparent 64%);
}
@media (prefers-reduced-motion: no-preference) {
  .bk-cover-wrap { animation: bk-float 6.5s ease-in-out infinite; }
}
.bk-cover {
  position: relative;
  height: min(72svh, 640px);
  aspect-ratio: 1024 / 1536;
  transform: rotateY(-4deg);
  transition: transform 0.25s ease-out;
  will-change: transform;
}
.bk-cover img {
  display: block; width: 100%; height: 100%;
  object-fit: contain;
}

.bk-rail { display: flex; flex-direction: column; gap: 2.4vh; }
.bk-hero .bk-kicker {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase;
  margin: 0;
  display: flex; align-items: center; gap: 12px;
  color: var(--bk-black);
}
.bk-hero .bk-kicker::before {
  content: ""; width: 10px; height: 10px; background: var(--bk-blue);
}
.bk-rail-claim {
  font-weight: 800;
  font-size: clamp(2.1rem, 3.4vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0;
  color: var(--bk-black);
  text-wrap: balance;
}
/* The manual break holds the spec'd wrap ("…most important / skill of
   our time.") where the first line fits; below that the break hides and
   balance + the glued "our time." keep "time." off its own line. */
@media (max-width: 940px) {
  .bk-claim-br { display: none; }
}
/* The promise matches the claim's scale — an ink/cobalt couplet. */
.bk-rail-sub {
  font-weight: 800;
  font-size: clamp(2.1rem, 3.4vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: -1.2vh 0 0;
  color: var(--bk-blue);
  text-wrap: balance;
}
.bk-rail-who {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  line-height: 1.5;
  max-width: 44ch;
  margin: 0;
  color: rgba(16, 16, 16, 0.85);
}
/* The name leads the lockup — upright grotesque over the italic
   credential, same pattern as the blurb captions. */
.bk-rail-who b {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-weight: 800;
  font-size: 1.06em;
  letter-spacing: -0.015em;
  color: var(--bk-black);
  margin-bottom: 3px;
}
.bk-cta--blue {
  background: var(--bk-blue); color: var(--bk-cream);
  border-color: var(--bk-blue);
}
.bk-cta--blue:hover { background: var(--bk-black); border-color: var(--bk-black); color: var(--bk-cream); }
.bk-hero-ctas { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
/* Entrance: sub-300ms fades, tight stagger — the cover lands first and
   at full strength, never washed out while the rail settles. */
@media (prefers-reduced-motion: no-preference) {
  .bk-cover-wrap, .bk-rail > * {
    opacity: 0; transform: translateY(14px);
    animation: bk-hero-in 0.28s cubic-bezier(0.2, 0.9, 0.25, 1) forwards;
  }
  .bk-cover-wrap { animation: bk-hero-in 0.28s cubic-bezier(0.2, 0.9, 0.25, 1) forwards, bk-float 6.5s ease-in-out 0.35s infinite; }
  .bk-rail > *:nth-child(1) { animation-delay: 0.05s; }
  .bk-rail > *:nth-child(2) { animation-delay: 0.1s; }
  .bk-rail > *:nth-child(3) { animation-delay: 0.15s; }
  .bk-rail > *:nth-child(4) { animation-delay: 0.2s; }
  .bk-rail > *:nth-child(5) { animation-delay: 0.25s; }
}
@keyframes bk-hero-in {
  to { opacity: 1; transform: translateY(0); }
}

/* ============ STATEMENT: cobalt band — the claim + Coyle ============ */
.bk-statement {
  background-color: var(--bk-blue);
  color: var(--bk-cream);
  padding: 14vh 4vw;
  background-image:
    linear-gradient(rgba(244, 238, 224, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 238, 224, 0.06) 1px, transparent 1px);
  background-size: clamp(44px, 6.3vw, 92px) clamp(44px, 6.3vw, 92px);
}
.bk-statement-inner {
  max-width: 1360px; margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 5vh 6vw;
  align-items: start;
}
/* One quote, magazine-split: the question in big type left (opening
   mark only), the rest in serif right (closing mark only), attribution
   under the right column. figure/blockquote use display: contents so
   the pieces land as grid items without losing quote semantics. */
h2.bk-st-label {
  grid-column: 1 / -1;
  font-family: var(--mono); font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: rgba(244, 238, 224, 0.7);
  margin: 0;
  display: flex; align-items: center; gap: 12px;
}
h2.bk-st-label::before {
  content: ""; width: 10px; height: 10px; background: var(--bk-cream);
}
.bk-st-quote, .bk-st-quote blockquote { display: contents; margin: 0; }
.bk-st-q {
  font-weight: 800;
  font-size: clamp(1.9rem, 3.6vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0;
  color: var(--bk-cream);
  text-wrap: balance;
}
.bk-st-rest {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.25rem, 1.5vw, 1.375rem);
  line-height: 1.6;
  margin: 0;
  max-width: 62ch;
  color: rgba(244, 238, 224, 0.94);
  text-wrap: pretty;
}
.bk-st-rest em { font-style: italic; font-weight: 700; }
/* Attribution signs the whole band: a hairline across both columns,
   name + credential beneath — everything above the line is Coyle's. */
.bk-st-quote figcaption {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(244, 238, 224, 0.35);
  padding-top: 18px;
  display: flex; align-items: baseline; gap: 8px 18px; flex-wrap: wrap;
}
.bk-st-quote figcaption b {
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}
.bk-st-quote figcaption span {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(244, 238, 224, 0.8);
}
.bk-st-quote figcaption span i { font-style: normal; }
@media (max-width: 900px) {
  .bk-statement { padding: 10vh 6vw; }
  .bk-statement-inner { grid-template-columns: 1fr; gap: 4.5vh; }
}

/* ============ THE IDEAS: outcomes, not topics ============ */
.bk-ideas { padding: 14vh 4vw 10vh; max-width: 1240px; margin: 0 auto; }
/* The closing button mirrors a row's grid so it aligns with the item
   text, not the circles. */
.bk-ideas-cta {
  grid-column: 2;
  /* Cancels most of the grid's 6vh row gap — the last row's own padding
     already provides the breathing room. */
  margin-top: -4vh;
  display: grid;
  grid-template-columns: minmax(44px, 56px) 1fr;
  gap: 12px 2.2vw;
}
.bk-ideas-cta .bk-cta { grid-column: 2; justify-self: start; }
.bk-ideas-grid {
  display: grid;
  /* List column sized so the longest items (1 and 8) hold two lines at
     desktop type sizes. */
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.38fr);
  gap: 6vh 4.5vw;
  align-items: start;
}
.bk-ideas-head {
  /* --header-height: room for a sticky site header, if one ever lands. */
  position: sticky; top: calc(16vh + var(--header-height, 0px));
  font-weight: 800;
  font-size: clamp(2rem, 4.2vw, 3.75rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}
.bk-ideas-head em {
  font-style: normal;
  color: var(--bk-blue);
}
.bk-ideas ol { list-style: none; margin: 0; padding: 0; }
.bk-ideas li {
  display: grid;
  grid-template-columns: minmax(44px, 56px) 1fr;
  gap: 12px 2.2vw;
  align-items: start;
  padding: 3.4vh 0;
  border-top: 2px solid var(--bk-black);
}
.bk-ideas .num {
  display: flex; align-items: center; justify-content: center;
  width: clamp(38px, 3.2vw, 48px);
  height: clamp(38px, 3.2vw, 48px);
  border-radius: 50%;
  background: var(--bk-blue);
  color: var(--bk-cream);
  font-weight: 800;
  font-size: clamp(0.95rem, 1.25vw, 1.1875rem);
  letter-spacing: 0;
}
.bk-ideas li p {
  font-weight: 800;
  font-size: clamp(1.25rem, 2vw, 1.875rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}
.bk-ideas li:nth-child(odd) p { color: var(--bk-blue); }
.bk-ideas li p i {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

/* ============ GODIN: black band ============ */
.bk-godin {
  background-color: var(--bk-black);
  color: var(--bk-cream);
  padding: 11vh 6vw;
  margin-top: 8vh;
  background-image:
    linear-gradient(rgba(244, 238, 224, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 238, 224, 0.055) 1px, transparent 1px);
  background-size: clamp(44px, 6.3vw, 92px) clamp(44px, 6.3vw, 92px);
}
.bk-godin figure { max-width: 980px; margin: 0 auto; }
.bk-godin-label {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: rgba(244, 238, 224, 0.6);
  margin: 0 0 20px;
  display: flex; align-items: center; gap: 12px;
}
.bk-godin-label::before {
  content: ""; width: 10px; height: 10px; background: var(--bk-blue2);
}
.bk-godin blockquote {
  margin: 0 0 24px;
  font-weight: 800;
  font-size: clamp(1.4rem, 2.8vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.bk-godin figcaption b {
  display: block;
  font-weight: 800;
  font-size: 1.125rem;
}
.bk-godin figcaption span {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(244, 238, 224, 0.6);
}
.bk-godin figcaption span i { font-style: normal; }

/* ============ FINALE ============ */
.bk-finale {
  background-color: var(--bk-blue);
  color: var(--bk-cream);
  padding: 12vh 4vw 10vh;
  text-align: center;
  overflow: clip;
  background-image:
    linear-gradient(rgba(244, 238, 224, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 238, 224, 0.06) 1px, transparent 1px);
  background-size: clamp(44px, 6.3vw, 92px) clamp(44px, 6.3vw, 92px);
}
/* Giant LEARNER — Trevor's wordmark image, the cover's actual face
   (replaced the stretched Inter Tight stand-in). */
.bk-finale-word {
  display: block;
  width: min(80%, 1020px);
  height: auto;
  margin: 10vh auto 5vh;
}
.bk-finale-line {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  margin: 0 0 5vh;
}
.bk-retailers {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 14px;
  margin-bottom: 4vh;
}
.bk-retail {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--bk-cream);
  text-decoration: none;
  border: 1px solid var(--bk-cream);
  padding: 18px 28px;
  transition: background 0.15s, color 0.15s;
}
.bk-retail:hover { background: var(--bk-cream); color: var(--bk-blue); }
.bk-finale-mono {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.2em;
  opacity: 0.7;
  margin: 0;
}

/* ============ AUTHOR: a note from Trevor, set like a page of the book ============ */
.bk-author {
  padding: 14vh 4vw 16vh;
  max-width: 1200px;
  margin: 0 auto;
  overflow: clip;
}
.bk-author-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 6vh 7vw;
  align-items: start;
}
.bk-author-card { margin: 0; }
/* Headshot: isolated b&w portrait over a scatter of checker cells —
   the hero grid's callback — plus blueprint registration ticks. */
.bk-author-photo { position: relative; }
.bk-author-photo img {
  display: block; width: 100%; height: auto;
  position: relative; z-index: 1;
  filter: grayscale(1) contrast(1.05);
}
.bk-author-checks { position: absolute; inset: 0; }
.bk-author-checks i { position: absolute; width: 25%; aspect-ratio: 1; }
.bk-author-checks i:nth-child(1) { left: 0;   top: 25%; background: var(--bk-blue4); }
.bk-author-checks i:nth-child(2) { left: 75%; top: 0;   background: var(--bk-blue); }
.bk-author-checks i:nth-child(3) { left: 75%; top: 50%; background: var(--bk-blue3); }
.bk-author-checks i:nth-child(4) { left: 0;   top: 75%; background: var(--bk-blue2); }
.bk-author-photo::before,
.bk-author-photo::after {
  content: ""; position: absolute; width: 20px; height: 20px; z-index: 2;
  background:
    linear-gradient(var(--bk-black), var(--bk-black)) center / 100% 2px no-repeat,
    linear-gradient(var(--bk-black), var(--bk-black)) center / 2px 100% no-repeat;
}
.bk-author-photo::before { top: -28px; left: -28px; }
.bk-author-photo::after  { right: -28px; bottom: -28px; }
.bk-author-card figcaption { margin-top: clamp(28px, 3.5vh, 42px); }
.bk-author-card figcaption b {
  display: block;
  font-weight: 800;
  color: var(--bk-blue);
  font-size: clamp(1.4rem, 2.1vw, 1.875rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.bk-author-card figcaption span {
  display: block;
  margin-top: 8px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(16, 16, 16, 0.58);
}
/* The passage: Times, book-page conventions — no paragraph gaps,
   first-line indents after the opening graf, chapter drop cap. */
.bk-author-note p {
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 1.4vw, 1.3125rem);
  line-height: 1.72;
  color: rgba(16, 16, 16, 0.92);
  margin: 0;
  max-width: 62ch;
  text-wrap: pretty;
}
.bk-author-note p + p { text-indent: 2em; }
/* Sized to release within the two-line opening graf (box = font-size
   x line-height must stay under 2 body lines = 3.44em). */
.bk-author-note p:first-of-type::first-letter {
  float: left;
  font-size: 3.9em;
  line-height: 0.74;
  padding: 0 0.14em 0 0;
  color: var(--bk-blue);
}
/* Metric-true alignment where initial-letter exists (see
   single-longform.css) — cap top flush with line one, two lines deep. */
@supports (initial-letter: 2) or (-webkit-initial-letter: 2) {
  .bk-author-note p:first-of-type::first-letter {
    float: none;
    font-size: 1em;
    line-height: 1;
    padding: 0 0.18em 0 0;
    -webkit-initial-letter: 2;
    initial-letter: 2;
  }
}
@media (max-width: 900px) {
  .bk-author-inner { grid-template-columns: 1fr; gap: 7vh; }
  .bk-author-card { max-width: 420px; }
}

/* ============ MOBILE ============ */
@media (max-width: 640px) {
  .bk-topbar { padding: 10px 14px; }
  .bk-brand i { display: none; }
  .bk-hero { padding: 76px 5vw 48px; --g: clamp(34px, 11vw, 48px); }
  .bk-hero-inner { grid-template-columns: 1fr; gap: 2.5vh; justify-items: center; }
  .bk-cover { height: min(54svh, 440px); }
  .bk-rail { width: 100%; gap: 2vh; }
  .bk-hero-ctas .bk-cta { width: 100%; text-align: center; }
  .bk-ideas { padding-top: 10vh; }
  .bk-ideas-grid { grid-template-columns: 1fr; }
  .bk-ideas-cta { grid-column: 1; display: block; }
  .bk-ideas-cta .bk-cta { display: block; width: 100%; text-align: center; }
  .bk-ideas-head { position: static; }
  .bk-ideas li { grid-template-columns: 48px 1fr; gap: 10px 14px; padding: 3.2vh 0; }
  .bk-retail { padding: 15px 18px; flex: 1 1 40%; text-align: center; }
}
