/* ==========================================================================
   Quevedo & Cajal — quevedocajal.com
   Materials: walnut (the desk), paper (Golgi preparations), brass (the machines)
   Type: Libre Caslon Text (display) + IBM Plex Sans (text)
   ========================================================================== */

/* Self-hosted type (SIL Open Font License, see fonts/LICENSE-*.txt) */
@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/libre-caslon-text-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Libre Caslon Text"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/libre-caslon-text-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/libre-caslon-text-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }

:root {
  --walnut: #1b120c;
  --walnut-2: #241911;
  --walnut-3: #31241a;
  --ink: #231a14;
  --ink-soft: #4a3d33;
  --paper: #ede4cf;
  --paper-2: #e4d9c0;
  --paper-3: #d8cba9;
  --silver: #c9c2b4;
  --silver-soft: #9c9384;
  --brass: #b48a3c;
  --brass-2: #cfa24e;
  --brass-dark: #7a5a22;

  --serif: "Libre Caslon Text", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;

  /* Type scale, 1.25 ratio, fluid */
  --t-1: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);   /* 14–15  captions */
  --t0:  clamp(1rem, 0.95rem + 0.25vw, 1.125rem);         /* 16–18  body */
  --t1:  clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);     /* 18–21  lede */
  --t2:  clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);        /* 22–28  h3 */
  --t3:  clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);          /* 28–40  h2 */
  --t4:  clamp(2.25rem, 1.6rem + 3vw, 3.75rem);           /* 36–60  h1 */
  --t5:  clamp(3rem, 2rem + 5vw, 5.5rem);                 /* 48–88  numerals */

  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --measure: 66ch;
  --radius: 3px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::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(--sans);
  font-size: var(--t0);
  line-height: 1.6;
  color: var(--paper);
  background: var(--walnut);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
ol, ul { margin: 0; padding: 0; list-style: none; }
dl, dd, dt, figure { margin: 0; }

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

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--brass); color: var(--ink); padding: .6rem 1rem; text-decoration: none; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 2px solid var(--brass-2); outline-offset: 3px; }

/* --------------------------------------------------------------------------
   Type helpers
   -------------------------------------------------------------------------- */
.display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.12;
  text-wrap: balance;
}
.section-title { font-size: var(--t3); max-width: 22ch; margin-bottom: .6em; }
.section-intro { font-size: var(--t1); max-width: var(--measure); line-height: 1.55; }
.paper .section-intro { color: var(--ink-soft); }
.walnut .section-intro { color: var(--silver); }
em { font-style: italic; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.9rem; padding: .7rem 1.4rem;
  font-family: var(--sans); font-weight: 500; font-size: var(--t0); line-height: 1.2;
  text-decoration: none; border-radius: var(--radius); border: 1.5px solid transparent;
  cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
  white-space: nowrap;
}
.btn-brass {
  color: var(--ink);
  background: linear-gradient(160deg, var(--brass-2) 0%, var(--brass) 55%, #a07b32 100%);
  border-color: var(--brass-dark);
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, .35), 0 1px 0 rgba(0,0,0,.25);
}
.btn-brass:hover { background: linear-gradient(160deg, #dbb15f 0%, var(--brass-2) 55%, var(--brass) 100%); }
.btn-brass:active { transform: translateY(1px); }
.btn-outline { color: var(--ink); background: transparent; border-color: currentColor; }
.btn-outline:hover { background: rgba(35, 26, 20, .08); }
.walnut .btn-outline, .hero .btn-outline, .btn-light { color: var(--paper); }
.walnut .btn-outline:hover, .hero .btn-outline:hover, .btn-light:hover { background: rgba(237, 228, 207, .1); }
.btn-ghost { color: var(--silver); border-color: rgba(201,194,180,.35); background: rgba(27,18,12,.55); backdrop-filter: blur(4px); }
.btn-ghost:hover { color: var(--paper); border-color: var(--silver); }
.btn-small { min-height: 2.3rem; padding: .45rem 1rem; font-size: var(--t-1); }
.link-plain { color: var(--ink-soft); text-decoration: underline; text-underline-offset: .2em; }
.link-plain:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: linear-gradient(to bottom, rgba(27,18,12,.85), rgba(27,18,12,0));
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-solid { background: rgba(27,18,12,.92); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(201,194,180,.12); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }

.brand { display: inline-flex; align-items: baseline; gap: .5rem; text-decoration: none; color: var(--paper); }
.brand-amp { font-family: var(--serif); font-style: italic; font-size: 1.9rem; line-height: 1; color: var(--brass-2); transform: translateY(.1em); }
.brand-text { font-family: var(--serif); font-size: 1.15rem; letter-spacing: .01em; }
.brand-sep { color: var(--brass-2); font-style: italic; }

.site-nav { display: flex; align-items: center; gap: clamp(.75rem, 1.6vw, 1.5rem); }
.site-nav > a:not(.btn) { color: var(--silver); text-decoration: none; font-size: var(--t-1); font-weight: 500; padding: .35rem 0; border-bottom: 1px solid transparent; }
.site-nav > a:not(.btn):hover { color: var(--paper); border-bottom-color: var(--brass); }
.nav-lang { font-weight: 600; letter-spacing: .05em; }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 2.75rem; height: 2.75rem; padding: 0; background: transparent; border: 1px solid rgba(201,194,180,.3); border-radius: var(--radius); cursor: pointer;
  }
  .nav-toggle span { display: block; width: 20px; height: 2px; margin-inline: auto; background: var(--paper); transition: transform .25s var(--ease), opacity .2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(27,18,12,.97); border-top: 1px solid rgba(201,194,180,.12); padding: .5rem var(--gutter) 1.25rem;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav > a:not(.btn) { padding: .8rem 0; border-bottom: 1px solid rgba(201,194,180,.1); font-size: var(--t0); }
  .site-nav .nav-cta { margin-top: 1rem; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative; min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 54%);
  align-items: center;
  background: var(--walnut);
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120% 80% at 70% 60%, #2a1d14 0%, var(--walnut) 55%, #120c08 100%);
}
.hero-scene {
  position: absolute; inset: 0; z-index: 0;
  display: grid; place-items: center;
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; opacity: 0; transition: opacity .8s var(--ease); }
#hero-canvas.is-ready { opacity: 1; }
#hero-canvas.is-dragging { cursor: grabbing; }
.hero-fallback {
  position: relative; width: min(24vw, 340px); height: auto; margin-left: 46%;
  box-shadow: 0 30px 60px rgba(0,0,0,.6);
  transition: opacity .6s var(--ease);
}
.has-webgl .hero-fallback { opacity: 0; pointer-events: none; }
.scene-controls {
  position: absolute; left: 73%; bottom: clamp(1rem, 4vh, 2.5rem); transform: translateX(-50%);
  display: flex; align-items: center; gap: .75rem; white-space: nowrap;
}
.scene-controls[hidden] { display: none; }
.scene-hint { font-size: var(--t-1); color: var(--silver-soft); }

.hero-copy {
  position: relative; z-index: 1; grid-column: 1; width: auto; margin: 0;
  padding: calc(4.25rem + 2vh) var(--gutter) 3rem clamp(var(--gutter), 6vw, 6rem);
}
.hero-kicker { font-size: var(--t-1); color: var(--silver); max-width: 48ch; margin-bottom: 1.75rem; }
.hero-title { font-family: var(--serif); font-size: clamp(2.1rem, 1.4rem + 2.7vw, 3.4rem); line-height: 1.08; letter-spacing: -0.01em; text-wrap: balance; max-width: 17ch; margin-bottom: 1.25rem; }
.hero-lede { font-size: var(--t0); line-height: 1.55; color: var(--silver); max-width: 50ch; margin-bottom: 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.25rem; }
.hero-meta { font-size: var(--t-1); color: var(--silver-soft); }
.hero-meta a { color: var(--silver); }

@media (min-width: 901px) and (max-height: 800px) {
  .hero-copy { padding-top: 4.75rem; padding-bottom: 2rem; }
  .hero-kicker { margin-bottom: 1rem; }
  .hero-title { font-size: clamp(1.8rem, 1.1rem + 2.1vw, 2.5rem); margin-bottom: .9rem; }
  .hero-lede { font-size: .95rem; max-width: 46ch; margin-bottom: 1.1rem; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-scene { position: relative; inset: auto; grid-column: 1; grid-row: 1; height: min(62svh, 560px); min-height: 380px; margin-top: 4.25rem; }
  .hero-fallback { margin-left: 0; width: min(46%, 240px); }
  .scene-controls { left: 50%; }
  .hero-copy { grid-column: 1; grid-row: 2; padding: .5rem var(--gutter) 3rem; }
  .hero-title { max-width: 18ch; }
}
@media (max-width: 480px) {
  .scene-controls { gap: .5rem; bottom: .75rem; }
  .scene-hint { font-size: .75rem; }
}

/* --------------------------------------------------------------------------
   Sections & surfaces
   -------------------------------------------------------------------------- */
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.paper { background: var(--paper); color: var(--ink); }
.walnut { background: var(--walnut); color: var(--paper); }
.paper + .walnut, .walnut + .paper, .hero + .paper { border-top: 1px solid rgba(0,0,0,.06); }
.paper.has-texture { background-image: url("../img/textures/paper.jpg"); background-size: 1400px auto; background-blend-mode: multiply; }
.walnut.has-texture { background-image: linear-gradient(rgba(27,18,12,.86), rgba(27,18,12,.92)), url("../img/textures/walnut.jpg"); background-size: 1600px auto; }

/* --------------------------------------------------------------------------
   The claim
   -------------------------------------------------------------------------- */
.claim-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; margin-bottom: clamp(3rem, 6vw, 5rem); }
.claim-head .display { font-size: var(--t3); max-width: 20ch; }
.claim-body p { max-width: 58ch; color: var(--ink-soft); font-size: var(--t1); line-height: 1.55; }
.claim-body p:first-child { color: var(--ink); }

.proofs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 3rem); border-top: 1px solid var(--ink); padding-top: 1.5rem; }
.proofs li { display: grid; gap: .5rem; }
.proof-year { font-family: var(--serif); font-size: var(--t5); line-height: .95; color: var(--ink); letter-spacing: -0.02em; }
.proofs p { color: var(--ink-soft); max-width: 36ch; }

@media (max-width: 900px) {
  .claim-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .proofs { grid-template-columns: 1fr; gap: 2rem; }
  .proofs li { grid-template-columns: auto 1fr; align-items: start; gap: 1.25rem; }
  .proof-year { font-size: var(--t3); min-width: 4.5ch; }
}

/* --------------------------------------------------------------------------
   Two blueprints (split with hinge)
   -------------------------------------------------------------------------- */
#blueprints .section-title, #blueprints .section-intro { margin-inline: auto; text-align: center; }
#blueprints .section-title { max-width: 26ch; }
#blueprints .section-intro { margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.split {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto;
  align-items: stretch;
}
.half { display: grid; grid-template-rows: auto 1fr; gap: 1.5rem; padding: clamp(1.25rem, 3vw, 2.5rem); }
.half-cajal { background: var(--paper); color: var(--ink); }
.half-quevedo { background: var(--walnut-2); color: var(--paper); box-shadow: inset 0 0 0 1px rgba(201,194,180,.12); }
.half-figure { display: grid; gap: .5rem; }
.half-figure img { width: 100%; max-height: 340px; object-fit: contain; object-position: left center; }
.half-cajal .half-figure img { mix-blend-mode: multiply; }
.half-quevedo .half-figure img { filter: invert(1) grayscale(1) contrast(1.7) brightness(1.15) sepia(.3); mix-blend-mode: screen; opacity: .95; }
.half-figure figcaption { font-size: var(--t-1); opacity: .75; }
.half h3 { font-family: var(--serif); font-size: var(--t2); margin-bottom: 1rem; }
.blue-list { display: grid; grid-template-columns: max-content 1fr; column-gap: 1.25rem; row-gap: .75rem; align-items: baseline; }
.blue-list dt { font-weight: 600; font-size: var(--t-1); letter-spacing: .01em; }
.blue-list dd { max-width: 44ch; line-height: 1.55; }
.half-cajal .blue-list dd { color: var(--ink-soft); }
.half-quevedo .blue-list dd { color: var(--silver); }
.half-quevedo .blue-list dt { color: var(--brass-2); }
.half-cajal .blue-list dt { color: var(--brass-dark); }

.hinge { position: relative; width: 4.5rem; display: grid; place-items: center; }
.hinge::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: linear-gradient(to bottom, transparent, var(--brass) 15%, var(--brass) 85%, transparent); }
.hinge-amp { position: relative; font-family: var(--serif); font-style: italic; font-size: 3.25rem; color: var(--brass-2); background: var(--walnut); padding: .3rem .2rem; line-height: 1; }

.hinge-note { margin: clamp(2rem, 4vw, 3rem) auto 0; max-width: 60ch; text-align: center; font-family: var(--serif); font-size: var(--t1); line-height: 1.5; color: var(--silver); text-wrap: balance; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .hinge { width: 100%; height: 5rem; }
  .hinge::before { top: 50%; bottom: auto; left: 0; right: 0; width: auto; height: 1px; background: linear-gradient(to right, transparent, var(--brass) 15%, var(--brass) 85%, transparent); }
  .half-figure img { max-height: 220px; }
}
@media (max-width: 560px) {
  .blue-list { grid-template-columns: 1fr; row-gap: .25rem; }
  .blue-list dd { margin-bottom: .75rem; }
}

/* --------------------------------------------------------------------------
   Timeline
   -------------------------------------------------------------------------- */
.timeline-shell { position: relative; margin-top: clamp(2rem, 4vw, 3rem); }
.timeline-shell::before, .timeline-shell::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: max(var(--gutter), calc((100% - var(--wrap)) / 2)); z-index: 1; pointer-events: none;
}
.timeline-shell::before { left: 0; background: linear-gradient(to right, var(--paper) 35%, rgba(237,228,207,0)); }
.timeline-shell::after { right: 0; background: linear-gradient(to left, var(--paper) 35%, rgba(237,228,207,0)); }
@media (max-width: 1300px) { .timeline-shell::before, .timeline-shell::after { width: var(--gutter); } }
.timeline {
  --tl-gap: clamp(1rem, 2vw, 1.75rem);
  display: grid; grid-auto-flow: column; grid-auto-columns: min(82vw, 330px);
  gap: var(--tl-gap);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding-block: 1.5rem;
  padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2));
  scroll-padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2));
  scrollbar-width: thin; scrollbar-color: var(--paper-3) transparent;
}
.timeline li { scroll-snap-align: start; display: grid; gap: .75rem; align-content: start; position: relative; padding-top: .25rem; }
.timeline li::before { content: ""; position: absolute; left: 0; top: calc(.25rem + 3.05rem); width: calc(100% + var(--tl-gap)); height: 1px; background: var(--ink); opacity: .3; }
.timeline li:last-child::before { width: 100%; }
.tl-year { font-family: var(--serif); font-size: var(--t3); line-height: 1; color: var(--ink); position: relative; padding-bottom: 1.05rem; }
.tl-year::after { content: ""; position: absolute; left: 0; bottom: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--brass); transform: translateY(50%) translateY(-1px); box-shadow: 0 0 0 4px var(--paper); z-index: 1; }
.timeline p { color: var(--ink-soft); line-height: 1.55; font-size: var(--t-1); max-width: 40ch; }
.timeline:focus-visible { outline-offset: -2px; }

.tl-nav { display: contents; }
.tl-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
  font-size: 1.1rem; cursor: pointer; display: grid; place-items: center; transition: background-color .2s var(--ease), color .2s var(--ease);
}
.tl-arrow:hover { background: var(--ink); color: var(--paper); }
.tl-prev { left: max(.5rem, calc((100vw - var(--wrap)) / 2 - 3.5rem)); }
.tl-next { right: max(.5rem, calc((100vw - var(--wrap)) / 2 - 3.5rem)); }
@media (max-width: 1300px) {
  .tl-nav { display: flex; gap: .5rem; justify-content: flex-end; width: min(100% - 2 * var(--gutter), var(--wrap)); margin: .25rem auto 0; }
  .tl-arrow { position: static; transform: none; }
}

/* --------------------------------------------------------------------------
   Inside the book
   -------------------------------------------------------------------------- */
.inside-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.inside-head { position: sticky; top: 5.5rem; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; margin: 2rem 0; padding-top: 1.25rem; border-top: 1px solid rgba(201,194,180,.2); }
.facts dt { font-size: var(--t-1); color: var(--silver-soft); }
.facts dd { font-family: var(--serif); font-size: var(--t2); line-height: 1.15; }

.toc { border-top: 1px solid rgba(201,194,180,.2); }
.toc li { border-bottom: 1px solid rgba(201,194,180,.2); }
.toc details { padding: 0; }
.toc summary {
  display: grid; grid-template-columns: 2.5rem 1fr auto; align-items: baseline; gap: 1rem;
  padding: 1rem 0; cursor: pointer; list-style: none; font-family: var(--serif); font-size: var(--t1);
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "+"; font-family: var(--sans); color: var(--brass-2); font-size: 1.25rem; line-height: 1; transition: transform .25s var(--ease); }
.toc details[open] summary::after { transform: rotate(45deg); }
.toc summary:hover .toc-title { color: var(--brass-2); }
.toc-num { color: var(--brass-2); font-size: var(--t-1); font-family: var(--sans); font-weight: 600; }
.toc p { margin: 0 0 1.25rem 3.5rem; color: var(--silver); max-width: 56ch; font-size: var(--t0); line-height: 1.55; }

@media (max-width: 900px) {
  .inside-grid { grid-template-columns: 1fr; }
  .inside-head { position: static; }
  .toc p { margin-left: 0; }
}

/* --------------------------------------------------------------------------
   Foreword
   -------------------------------------------------------------------------- */
.foreword-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.foreword-figure img { width: 100%; max-width: 360px; box-shadow: 0 18px 40px rgba(35,26,20,.25); }
.foreword-figure figcaption { font-size: var(--t-1); color: var(--ink-soft); margin-top: .75rem; max-width: 36ch; }
.pull { margin: 0 0 1.25rem; padding: 0 0 0 1.25rem; border-left: 2px solid var(--brass); }
.pull p { font-family: var(--serif); font-size: var(--t2); line-height: 1.35; max-width: 30ch; text-wrap: balance; margin: 0; }
.cite { color: var(--ink-soft); max-width: 58ch; }
.cite strong { color: var(--ink); font-weight: 600; }
.foreword-text > p:last-child { max-width: 58ch; color: var(--ink-soft); }
@media (max-width: 900px) { .foreword-grid { grid-template-columns: 1fr; } .foreword-figure { order: 2; } }

/* --------------------------------------------------------------------------
   Readers
   -------------------------------------------------------------------------- */
.readers-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 3rem); border-top: 1px solid rgba(201,194,180,.2); padding-top: 1.5rem; }
.readers-grid h3 { font-family: var(--serif); font-size: var(--t2); margin-bottom: .5rem; }
.readers-grid p { color: var(--silver); max-width: 38ch; }
@media (max-width: 900px) { .readers-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Editions
   -------------------------------------------------------------------------- */
.editions { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
.edition { display: grid; background: rgba(255,255,255,.35); border: 1px solid rgba(35,26,20,.12); padding: 1.5rem; }
.edition-primary { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 1.5rem; align-items: center; background: #fff; border-color: var(--brass); }
.edition-primary img { width: 100%; box-shadow: 8px 12px 30px rgba(35,26,20,.25); }
.edition-body { display: grid; gap: .75rem; align-content: start; }
.edition h3 { font-family: var(--serif); font-size: var(--t2); }
.edition p { color: var(--ink-soft); margin: 0; }
.edition .btn { justify-self: start; margin-top: .25rem; }
@media (max-width: 1100px) { .editions { grid-template-columns: 1fr 1fr; } .edition-primary { grid-column: 1 / -1; } }
@media (max-width: 600px) { .editions { grid-template-columns: 1fr; } .edition-primary { grid-template-columns: 1fr; } .edition-primary img { max-width: 220px; } }

.membership { display: grid; grid-template-columns: minmax(0, 2fr) auto; gap: 2rem; align-items: center; margin-top: 2rem; padding: 1.75rem clamp(1.25rem, 3vw, 2rem); background: var(--walnut); color: var(--paper); }
.membership h3 { font-family: var(--serif); font-size: var(--t2); margin-bottom: .5rem; }
.membership p { color: var(--silver); max-width: 66ch; margin: 0; }
.membership a:not(.btn) { color: var(--paper); }
.membership-actions { display: grid; gap: .75rem; justify-items: start; }
.membership .link-plain { color: var(--silver); }
@media (max-width: 800px) { .membership { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Author
   -------------------------------------------------------------------------- */
.author-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr); gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.author-figure img { width: 100%; filter: saturate(.85); }
.author-text p { max-width: 62ch; color: var(--silver); }
.author-text p:first-of-type { color: var(--paper); }
.author-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1.25rem; }
.author-links a { color: var(--paper); text-decoration-color: var(--brass); text-underline-offset: .2em; }
.author-aside img { width: 100%; filter: saturate(.8); }
.author-aside figcaption { font-size: var(--t-1); color: var(--silver-soft); margin-top: .6rem; }
@media (max-width: 900px) {
  .author-grid { grid-template-columns: 1fr 2fr; }
  .author-text { grid-column: 1 / -1; }
  .author-figure { max-width: 260px; }
}
@media (max-width: 560px) { .author-grid { grid-template-columns: 1fr; } .author-aside { max-width: 260px; } }

.shelf-title { font-family: var(--serif); font-size: var(--t2); margin: clamp(3rem, 6vw, 5rem) 0 1.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(201,194,180,.2); }
.shelf { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.25rem; perspective: 1400px; }
.shelf a { display: grid; gap: .6rem; text-decoration: none; color: var(--silver); }
.shelf img, .tile { aspect-ratio: 9 / 14; width: 100%; object-fit: cover; box-shadow: 6px 10px 26px rgba(0,0,0,.5); transform-origin: left center; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.shelf a:hover img, .shelf a:hover .tile, .shelf a:focus-visible img, .shelf a:focus-visible .tile { transform: rotateY(-14deg) translateX(4px); box-shadow: 18px 18px 40px rgba(0,0,0,.6); }
.shelf-label { font-size: var(--t-1); }
.tile { display: grid; align-content: center; gap: .35rem; padding: 1rem; text-align: center; }
.tile-lost { background: #150f0b; color: #e8d9b5; border: 1px solid rgba(232,217,181,.25); }
.tile-plain { background: var(--paper); color: var(--ink); }
.tile-kicker { font-size: .7rem; letter-spacing: .04em; opacity: .8; }
.tile-name { font-family: var(--serif); font-size: clamp(1rem, 1.4vw, 1.25rem); line-height: 1.15; }
.tile-sub { font-size: .7rem; opacity: .75; line-height: 1.3; }
@media (max-width: 1000px) { .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .shelf img, .tile { transition: none; } }

/* --------------------------------------------------------------------------
   Closing
   -------------------------------------------------------------------------- */
.closing-inner { text-align: center; display: grid; justify-items: center; }
.closing-quote { font-family: var(--serif); font-size: var(--t3); line-height: 1.25; max-width: 28ch; text-wrap: balance; margin-bottom: .75rem; }
.closing-cite { color: var(--ink-soft); font-size: var(--t-1); margin-bottom: 2rem; }
.closing .hero-actions { justify-content: center; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { padding: 2.5rem 0; border-top: 1px solid rgba(201,194,180,.15); color: var(--silver-soft); font-size: var(--t-1); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.footer-inner p { margin: 0; }
.footer-inner a { color: var(--silver); text-decoration-color: rgba(201,194,180,.4); text-underline-offset: .2em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* --------------------------------------------------------------------------
   Optional image bands (Midjourney slots)
   -------------------------------------------------------------------------- */
.band { margin: 0; background: var(--walnut); color: var(--silver); }
.band img { width: 100%; max-height: 70vh; object-fit: cover; display: block; }
.band figcaption { width: min(100% - 2 * var(--gutter), var(--wrap)); margin: 0 auto; padding: 1rem 0 2.5rem; font-size: var(--t-1); max-width: 70ch; }
.closing { position: relative; isolation: isolate; overflow: hidden; }
.closing-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; opacity: .18; filter: saturate(.6); }
