/* ==========================================================================
   The End of Knowledge — site styles
   Palette and type are derived from the book cover (watercolor wash,
   book-leaves in olive / ochre / plum / teal, pencil ink).
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-full-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-full-italic.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-standard-normal.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f5f4f8;
  --paper-2: #ebe9f2;
  --wash: #c6cfea;
  --wash-2: #dfe3f3;
  --ink: #211f30;
  --ink-2: #4c4a5e;
  --ink-3: #75738a;
  --ochre: #c4922a;
  --ochre-2: #a4781c;
  --plum: #6d4a8e;
  --olive: #8c963f;
  --teal: #2e7f7e;
  --night: #1a1932;
  --night-2: #2a2951;

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: 1.95rem;
  --step-4: 2.44rem;
  --step-5: 3.05rem;

  --measure: 62ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --wrap: 1180px;
  --section: clamp(4rem, 9vw, 8rem);
}

*,
*::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;
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
a { color: var(--plum); text-underline-offset: 0.15em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  font-variation-settings: "opsz" 144, "SOFT" 60, "WONK" 1;
}
h2 { font-size: clamp(var(--step-3), 4vw, var(--step-5)); max-width: 20ch; }
h3 { font-size: var(--step-2); }
p { margin: 0 0 1em; max-width: var(--measure); }
.lead { font-size: var(--step-1); color: var(--ink-2); }

.skip {
  position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: #fff;
  padding: 0.6rem 1rem; z-index: 100; border-radius: 4px;
}
.skip:focus { top: 1rem; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
section { padding-block: var(--section); }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font: 600 var(--step-0) var(--body);
  padding: 0.85rem 1.4rem; border-radius: 999px;
  text-decoration: none; border: 1.5px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--buy { background: var(--ochre); color: var(--ink); border-color: var(--ochre); box-shadow: 0 6px 18px -8px rgba(164, 120, 28, 0.7); }
.btn--buy:hover { background: var(--ochre-2); border-color: var(--ochre-2); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: rgba(33, 31, 48, 0.35); }
.btn--ghost:hover { background: rgba(33, 31, 48, 0.06); color: var(--ink); }
.btn--paper { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--paper:hover { background: #fff; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn--sm { font-size: var(--step--1); padding: 0.55rem 1rem; }

/* Header ----------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 244, 248, 0.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(33, 31, 48, 0.08);
}
.nav__in { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; }
.nav__brand { font-family: var(--display); font-weight: 600; font-size: var(--step-1); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; font-variation-settings: "opsz" 48, "SOFT" 40; }
.nav__brand small { display: block; font: 400 0.78rem var(--body); color: var(--ink-3); letter-spacing: 0; }
.nav__links { display: flex; gap: 1.4rem; margin-left: auto; list-style: none; padding: 0; margin-block: 0; }
.nav__links a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: var(--step--1); }
.nav__links a:hover { color: var(--ink); }
.nav__cta { margin-left: auto; }
.nav__links + .nav__cta { margin-left: 0; }
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__brand { font-size: var(--step-0); }
  .nav__brand small { display: none; }
  .nav__in { min-height: 3.75rem; }
}

/* Hero ------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(2rem, 5vw, 4rem) clamp(2rem, 4vw, 3rem);
  /* Optional Midjourney backdrop: drop it at assets/img/mj/hero-backdrop.jpg and it appears
     behind the book; if the file is missing the layer is simply transparent. */
  background:
    linear-gradient(180deg, rgba(245, 244, 248, 0) 60%, var(--paper) 100%),
    linear-gradient(90deg, rgba(245, 244, 248, 0.75) 0%, rgba(245, 244, 248, 0.35) 40%, rgba(245, 244, 248, 0) 60%),
    url("../img/mj/hero-backdrop.jpg") right center / auto 100% no-repeat,
    url("../img/wash-light.jpg") center / cover no-repeat, var(--paper);
}
.hero__in {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center; gap: clamp(1.5rem, 4vw, 4rem);
}
.hero__copy { position: relative; z-index: 2; }
.hero__author { font-size: var(--step-1); color: var(--ink-2); margin: 0 0 0.75rem; }
.hero h1 {
  font-size: clamp(3rem, 7.6vw, 6.4rem);
  font-weight: 400; line-height: 0.96; letter-spacing: -0.025em;
  margin-bottom: 1.4rem;
  font-variation-settings: "opsz" 144, "SOFT" 80, "WONK" 1;
}
.hero__question {
  font-family: var(--display); font-style: italic; font-weight: 400;
  font-size: clamp(var(--step-1), 2.3vw, var(--step-3));
  line-height: 1.25; max-width: 24ch; color: var(--ink);
  margin-bottom: 1.8rem;
  font-variation-settings: "opsz" 72, "SOFT" 60, "WONK" 1;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.2rem; }
.hero__formats { color: var(--ink-2); font-size: var(--step--1); max-width: 40ch; }
.hero__formats a { color: inherit; }

.hero__stage {
  position: relative; aspect-ratio: 1 / 1.05; max-height: 76vh; width: 100%;
  justify-self: center; touch-action: pan-y; margin-bottom: 1.6rem;
}
.hero__stage canvas {
  position: absolute; inset: 0; width: 100% !important; height: 100% !important;
  opacity: 0; transition: opacity 0.9s ease; cursor: grab;
}
.hero__stage.is-ready canvas { opacity: 1; }
.hero__stage.is-dragging canvas { cursor: grabbing; }
.hero__fallback {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  perspective: 1200px;
}
.hero__fallback img {
  width: min(62%, 340px); box-shadow: 18px 24px 40px -18px rgba(33, 31, 48, 0.5), 2px 2px 0 #d9d7e2, 4px 4px 0 #cfcdd9;
  transform: rotateY(-18deg) rotateX(4deg);
}
.hero__stage.is-fallback .hero__fallback { display: flex; }
.hero__stage.is-fallback canvas { display: none; }
.hero__hint {
  position: absolute; left: 0; right: 0; bottom: -1.6rem; text-align: center;
  font-size: 0.8rem; color: var(--ink-3); margin: 0;
  opacity: 0; transition: opacity 0.6s ease 1.2s;
}
.hero__stage.is-ready .hero__hint { opacity: 1; }
.hero__stage.is-fallback .hero__hint { display: none; }

@media (max-width: 860px) {
  .hero__in { grid-template-columns: 1fr; }
  .hero__stage { order: -1; aspect-ratio: 1 / 0.95; max-height: 60vh; max-width: 520px; }
  .hero h1 { font-size: clamp(2.6rem, 12vw, 4rem); }
}

/* Premise ---------------------------------------------------------------- */
.premise { padding-top: clamp(2.5rem, 6vw, 5rem); }
.premise .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.premise h2 { font-size: clamp(var(--step-3), 4.2vw, var(--step-5)); max-width: 16ch; }
.premise__art { position: relative; }
.premise__art img { width: 100%; border-radius: 4px; }
.premise__art figcaption { font-size: 0.8rem; color: var(--ink-3); margin-top: 0.6rem; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 2rem; margin: 2rem 0 0; padding: 0; list-style: none; max-width: 34rem; }
.facts li { border-top: 1px solid rgba(33, 31, 48, 0.15); padding-top: 0.6rem; font-size: var(--step--1); color: var(--ink-2); }
.facts b { display: block; font: italic 400 var(--step-2) var(--display); color: var(--ink); font-variation-settings: "opsz" 72, "SOFT" 60; }
@media (max-width: 860px) { .premise .wrap { grid-template-columns: 1fr; } .premise__art { order: -1; } }

/* Inside the book -------------------------------------------------------- */
.inside { background: var(--paper-2); }
.inside .wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(2rem, 5vw, 5rem); }
.inside__intro { position: sticky; top: 5.5rem; align-self: start; }
.parts { margin: 0; padding: 0; list-style: none; }
.part { margin-bottom: 2.25rem; }
.part__name {
  font-family: var(--display); font-style: italic; font-weight: 400; font-size: var(--step-1);
  color: var(--plum); margin: 0 0 0.5rem; padding-bottom: 0.4rem; border-bottom: 1px solid rgba(109, 74, 142, 0.35);
  font-variation-settings: "opsz" 48, "SOFT" 60;
}
.chapters { margin: 0; padding: 0; list-style: none; }
.chapter { display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.75rem; padding: 0.85rem 0; border-bottom: 1px solid rgba(33, 31, 48, 0.1); }
.chapter:last-child { border-bottom: 0; }
.chapter__n { font: 500 var(--step-2) var(--display); color: var(--ink-3); line-height: 1.1; font-variation-settings: "opsz" 48; }
.chapter h3 { font-size: var(--step-1); margin: 0.1rem 0 0.25rem; font-weight: 600; font-variation-settings: "opsz" 48, "SOFT" 40; }
.chapter p { margin: 0; color: var(--ink-2); font-size: var(--step--1); max-width: 58ch; }
@media (max-width: 860px) { .inside .wrap { grid-template-columns: 1fr; } .inside__intro { position: static; } }

/* Sample ----------------------------------------------------------------- */
.sample__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.video {
  position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--night) url("../img/wash-night.jpg") center / cover;
  box-shadow: 0 24px 50px -30px rgba(26, 25, 50, 0.6);
}
.video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__play {
  position: absolute; inset: 0; width: 100%; border: 0; background: rgba(26, 25, 50, 0.18); cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 0.75rem; color: #fff; font: 600 var(--step-0) var(--body);
}
.video__play:hover { background: rgba(26, 25, 50, 0.3); }
.video__play span { display: inline-flex; width: 4.5rem; height: 4.5rem; border-radius: 50%; background: var(--ochre); align-items: center; justify-content: center; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.5); }
.video__play svg { width: 1.6rem; height: 1.6rem; margin-left: 0.2rem; fill: var(--ink); }
.video__caption { font-size: 0.85rem; color: var(--ink-3); margin-top: 0.6rem; }

.ways { margin: 0; padding: 0; list-style: none; }
.way { display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding: 1.1rem 0; border-top: 1px solid rgba(33, 31, 48, 0.14); align-items: start; }
.way:last-child { border-bottom: 1px solid rgba(33, 31, 48, 0.14); }
.way__icon { width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--wash-2); display: grid; place-items: center; color: var(--plum); }
.way__icon svg { width: 1.25rem; height: 1.25rem; }
.way h3 { font-size: var(--step-1); margin: 0.15rem 0 0.3rem; font-weight: 600; font-variation-settings: "opsz" 48, "SOFT" 40; }
.way p { margin: 0 0 0.5rem; color: var(--ink-2); font-size: var(--step--1); }
.way a.more { font-weight: 600; font-size: var(--step--1); }

.webedition { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.6rem; margin-top: 2.5rem; }
.webedition img { aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; width: 100%; }
.webedition figcaption { grid-column: 1 / -1; font-size: 0.85rem; color: var(--ink-3); }
@media (max-width: 860px) {
  .sample__grid { grid-template-columns: 1fr; }
  .webedition { grid-template-columns: repeat(3, 1fr); }
}

/* Formats ---------------------------------------------------------------- */
.formats { background: var(--paper-2); }
.formats__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(2rem, 5vw, 5rem); }
.format-list { margin: 0; padding: 0; list-style: none; }
.format { display: grid; grid-template-columns: minmax(9rem, 1fr) 2fr auto; gap: 1rem; align-items: center; padding: 1.1rem 0; border-top: 1px solid rgba(33, 31, 48, 0.14); }
.format:last-child { border-bottom: 1px solid rgba(33, 31, 48, 0.14); }
.format h3 { margin: 0; font-size: var(--step-1); font-weight: 600; font-variation-settings: "opsz" 48, "SOFT" 40; }
.format p { margin: 0; color: var(--ink-2); font-size: var(--step--1); }
.format .btn { justify-self: end; }
.formats__note { font-size: var(--step--1); color: var(--ink-3); margin-top: 1.25rem; }
@media (max-width: 860px) {
  .formats__grid { grid-template-columns: 1fr; }
  .format { grid-template-columns: 1fr auto; }
  .format p { grid-column: 1 / -1; }
}

/* Trilogy (dark) --------------------------------------------------------- */
.trilogy {
  color: var(--paper); position: relative;
  /* Optional Midjourney art at assets/img/mj/oracle.jpg sits above the night wash. */
  background-color: var(--night);
  background-image: url("../img/mj/oracle.jpg"), url("../img/wash-night.jpg");
  background-size: cover, cover; background-position: center, center; background-repeat: no-repeat;
}
.trilogy::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(26, 25, 50, 0.55), rgba(26, 25, 50, 0.75)); }
.trilogy .wrap { position: relative; }
.trilogy h2, .trilogy h3 { color: #fff; }
.trilogy p { color: rgba(245, 244, 248, 0.86); }
.trilogy a { color: #fff; }
.trilogy .btn--paper { color: var(--ink); }
.trilogy__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.trilogy .shelf { perspective: none; }
.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem 1rem; margin: 0; padding: 0; list-style: none; }
.shelf__item { --w: min(190px, 26vw); }
.shelf__label { margin: 1rem 0 0; font-size: var(--step--1); max-width: none; }
.shelf__label b { display: block; font: 500 var(--step-1) var(--display); color: #fff; font-variation-settings: "opsz" 48, "SOFT" 60; margin-bottom: 0.15rem; }
.shelf__label span { display: block; color: rgba(245, 244, 248, 0.8); margin-bottom: 0.45rem; }
.book3d__turn {
  font: 600 0.8rem var(--body); color: #fff; background: transparent; border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px; padding: 0.3rem 0.75rem; cursor: pointer;
}
.book3d__turn:hover, .book3d__turn[aria-pressed="true"] { background: rgba(255, 255, 255, 0.14); }

/* A book built from four faces: front, back, spine and fore-edge. --w is the cover width,
   --t the thickness (set per book from the real spine width). */
.book3d { perspective: 1400px; width: var(--w); margin-inline: auto; position: relative; padding-bottom: 14px; }
.book3d::after {
  content: ""; position: absolute; left: 6%; right: -8%; bottom: 0; height: 16px;
  background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 70%);
  filter: blur(3px); transition: transform 0.8s ease, opacity 0.8s ease;
}
.book3d__box {
  position: relative; display: block; width: var(--w); height: calc(var(--w) * 1.5);
  transform-style: preserve-3d; transform: rotateY(26deg);
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  text-decoration: none;
}
.book3d__box:hover { transform: rotateY(38deg) translateY(-6px); }
.book3d__box:focus-visible { outline: 3px solid var(--ochre); outline-offset: 6px; }
.book3d.is-flipped .book3d__box { transform: rotateY(-154deg); }
.book3d.is-flipped .book3d__box:hover { transform: rotateY(-142deg) translateY(-6px); }
.book3d__face {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; margin: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; object-fit: cover;
}
.book3d__front { transform: translateZ(calc(var(--t) / 2)); box-shadow: inset 4px 0 8px -6px rgba(0, 0, 0, 0.4); }
.book3d__back { transform: rotateY(180deg) translateZ(calc(var(--t) / 2)); }
.book3d__spine { width: var(--t); left: calc(50% - var(--t) / 2); transform: rotateY(-90deg) translateZ(calc(var(--w) / 2)); }
.book3d__edge {
  width: var(--t); left: calc(50% - var(--t) / 2); transform: rotateY(90deg) translateZ(calc(var(--w) / 2));
  background: #f4efe4 url("../img/pages.jpg") center / 100% auto repeat-y;
}
@media (max-width: 860px) {
  .shelf { grid-template-columns: repeat(3, 1fr); gap: 1rem 0.5rem; }
  .shelf__item { --w: min(150px, 27vw); }
  .shelf__label span { display: none; }
  .shelf__label b { font-size: var(--step-0); }
}
.perk {
  margin-top: 2rem; padding: 1.25rem 1.5rem; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 6px; background: rgba(26, 25, 50, 0.35);
}
.perk p { margin: 0; }
.perk b { color: #fff; }
@media (max-width: 860px) { .trilogy__grid { grid-template-columns: 1fr; } }

/* Vaults ----------------------------------------------------------------- */
.vaults__head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 2rem 4rem; align-items: end; margin-bottom: 2.5rem; }
.vaults__art { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: 6px; margin-bottom: 1.5rem; }
.vault-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.vault { position: relative; }
.vault a { display: block; color: inherit; text-decoration: none; }
.vault__img { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 4px; background: var(--wash-2); }
.vault__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.001); transition: transform 0.5s ease; }
.vault a:hover .vault__img img { transform: scale(1.04); }
.vault__img::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(33, 31, 48, 0.12); border-radius: 4px; }
.vault h3 { font-size: var(--step-0); margin: 0.7rem 0 0.15rem; font-weight: 600; font-variation-settings: "opsz" 48, "SOFT" 40; }
.vault p { margin: 0; font-size: var(--step--1); color: var(--ink-2); }
.vault__meta { font-size: 0.78rem; color: var(--ink-3); display: block; margin-top: 0.25rem; }
.vault--locked .vault__img::before {
  content: "Members"; position: absolute; top: 0.6rem; right: 0.6rem; z-index: 1; font: 600 0.72rem var(--body);
  background: var(--ochre); color: var(--ink); padding: 0.2rem 0.55rem; border-radius: 999px;
}
.vaults__tip { margin-top: 1.5rem; font-size: var(--step--1); color: var(--ink-3); }
kbd { font: 600 0.8em var(--body); border: 1px solid rgba(33, 31, 48, 0.3); border-bottom-width: 2px; border-radius: 4px; padding: 0.05em 0.4em; background: #fff; color: var(--ink); }
@media (max-width: 1000px) { .vault-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .vaults__head { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .vault-grid { grid-template-columns: 1fr; } }

/* Author ----------------------------------------------------------------- */
.author { background: var(--paper-2); }
.author .wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.portrait { position: relative; aspect-ratio: 4 / 5; border-radius: 4px; overflow: hidden; background: var(--wash) url("../img/wash-light.jpg") center / cover; max-width: 380px; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait.is-empty img { display: none; }
.portrait.is-empty::after {
  content: "DV"; position: absolute; inset: 0; display: grid; place-items: center;
  font: italic 400 5rem var(--display); color: rgba(33, 31, 48, 0.35);
}
.author__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin: 1.25rem 0 0; padding: 0; list-style: none; font-size: var(--step--1); }
.creds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem 1.5rem; margin: 1.75rem 0 0; padding: 0; list-style: none; max-width: 40rem; }
.creds li { border-top: 1px solid rgba(33, 31, 48, 0.15); padding-top: 0.5rem; font-size: var(--step--1); color: var(--ink-2); }
.creds b { display: block; font: italic 400 var(--step-2) var(--display); color: var(--ink); font-variation-settings: "opsz" 72, "SOFT" 60; }
@media (max-width: 860px) { .author .wrap { grid-template-columns: 1fr; } .portrait { max-width: 260px; } }
@media (max-width: 480px) { .creds { grid-template-columns: 1fr 1fr; } }

/* More books ------------------------------------------------------------- */
.more__feature {
  padding: clamp(1.5rem, 4vw, 3rem); border-radius: 8px; background: var(--paper-2); margin-bottom: 2.5rem;
}
.more__feature-text { max-width: 62ch; }
.more__feature p { margin-bottom: 0.9rem; }
.tomes {
  display: flex; gap: 0.75rem; align-items: flex-end; margin: 1.5rem 0 0; padding: 1.25rem 0.5rem 0.75rem; list-style: none;
  perspective: 1400px; overflow-x: auto; scroll-snap-type: x proximity; border-bottom: 3px solid var(--ink);
  -webkit-overflow-scrolling: touch;
}
.tomes li { flex: 0 0 auto; width: clamp(96px, 11.5vw, 128px); scroll-snap-align: start; transform: rotateY(-16deg); transition: transform 0.35s ease; transform-origin: 50% 100%; }
.tomes li:hover { transform: rotateY(-4deg) translateY(-6px); }
.tomes a { display: block; }
.tomes img { width: 100%; box-shadow: 8px 10px 22px -12px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(0, 0, 0, 0.2); border-radius: 2px 4px 4px 2px; }
.booklist { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem 2rem; margin: 0; padding: 0; list-style: none; }
.book { border-top: 1px solid rgba(33, 31, 48, 0.14); padding-top: 0.9rem; }
.book h3 { font-size: var(--step-1); margin: 0 0 0.25rem; font-weight: 600; font-variation-settings: "opsz" 48, "SOFT" 40; }
.book h3 a { text-decoration: none; color: var(--ink); }
.book h3 a:hover { text-decoration: underline; }
.book p { margin: 0; font-size: var(--step--1); color: var(--ink-2); }
.book small { color: var(--ink-3); font-size: 0.8rem; }
@media (max-width: 860px) { .booklist { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .booklist { grid-template-columns: 1fr; } }

/* Final CTA -------------------------------------------------------------- */
.finale { text-align: center; background: url("../img/wash-light.jpg") center / cover no-repeat; position: relative; }
.finale::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--paper), rgba(245, 244, 248, 0.6) 40%, rgba(245, 244, 248, 0.6) 60%, var(--paper)); }
.finale .wrap { position: relative; }
.finale h2 { margin-inline: auto; max-width: 22ch; }
.finale p { margin-inline: auto; }
.finale .hero__actions { justify-content: center; margin-top: 1.5rem; }

/* Footer ----------------------------------------------------------------- */
.footer { padding: 2.5rem 0 5.5rem; border-top: 1px solid rgba(33, 31, 48, 0.1); font-size: var(--step--1); color: var(--ink-2); }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; justify-content: space-between; }
.footer ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.footer p { margin: 0; }
@media (min-width: 861px) { .footer { padding-bottom: 2.5rem; } }

/* Sticky mobile buy bar -------------------------------------------------- */
.stickybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: none; gap: 0.6rem; padding: 0.7rem var(--gutter) calc(0.7rem + env(safe-area-inset-bottom));
  background: rgba(245, 244, 248, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(33, 31, 48, 0.12);
  transform: translateY(110%); transition: transform 0.3s ease;
}
.stickybar .btn { flex: 1; justify-content: center; }
.stickybar.is-visible { transform: translateY(0); }
@media (max-width: 860px) { .stickybar { display: flex; } }

/* Utilities -------------------------------------------------------------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
