/* ==========================================================================
   Author website styles.
   Design tokens live in :root — change colours, fonts, spacing and motion there.
   Built on the "modern-web-design" principles: performance-first, bold
   minimalism, purposeful micro-interactions, accessible by default.
   ========================================================================== */
:root {
  /* Colour — "Midnight & gold", taken from the Mend cover. OKLCH, limited palette.
     Text pairs meet WCAG AAA (7:1) on the night background. */
  color-scheme: dark;
  --paper:   oklch(16.5% 0.028 258);      /* page background: deep midnight blue */
  --paper-2: oklch(21.5% 0.032 258);      /* raised surfaces */
  --ink:     oklch(94.5% 0.010 90);       /* main text: soft candlelight white */
  --ink-2:   oklch(77.0% 0.022 250);      /* secondary text: moonlit grey-blue */
  --rule:    oklch(31.0% 0.032 258);      /* hairlines */
  --accent:  oklch(81.0% 0.115 82);       /* burnished gold */
  --glow:    oklch(81% 0.115 82 / .10);   /* soft gold light behind covers */
  --on-ink:  var(--paper);

  /* Type */
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans:  "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-xs:   clamp(0.6875rem, 0.66rem + 0.1vw, 0.75rem);
  --fs-sm:   clamp(0.8125rem, 0.78rem + 0.15vw, 0.875rem);
  --fs-base: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --fs-lg:   clamp(1.1875rem, 1.05rem + 0.6vw, 1.4375rem);
  --fs-xl:   clamp(1.625rem, 1.35rem + 1.2vw, 2.125rem);
  --fs-2xl:  clamp(2.25rem, 1.6rem + 3vw, 3.75rem);
  --fs-3xl:  clamp(3rem, 1.6rem + 6.4vw, 6.5rem);

  /* Space */
  --space-2xs: clamp(0.25rem, 0.2rem + 0.25vw, 0.375rem);
  --space-xs:  clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
  --space-sm:  clamp(0.75rem, 0.6rem + 0.75vw, 1.125rem);
  --space-md:  clamp(1rem, 0.8rem + 1vw, 1.5rem);
  --space-lg:  clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
  --space-xl:  clamp(2rem, 1.6rem + 2vw, 3rem);
  --space-2xl: clamp(3rem, 2.4rem + 3vw, 4.5rem);
  --space-3xl: clamp(4rem, 2.8rem + 6vw, 7.5rem);

  /* Depth — deep shadows for book objects on a dark page */
  --elev-1: 0 1px 2px oklch(5% 0.02 258 / .5);
  --elev-2: 0 2px 4px oklch(5% 0.02 258 / .5), 0 18px 36px -12px oklch(4% 0.02 258 / .8);
  --elev-3: 0 4px 8px oklch(5% 0.02 258 / .5), 0 34px 60px -18px oklch(4% 0.02 258 / .9), 0 0 60px -10px var(--glow);

  /* Motion */
  --dur-fast: 150ms;
  --dur-normal: 250ms;
  --dur-slow: 600ms;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-in-out: cubic-bezier(.4, 0, .2, 1);

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

/* Smooth cross-page fade + shared-element cover morph (progressive: browsers without support just navigate) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 280ms; animation-timing-function: var(--ease-in-out); }
::view-transition-group(*) { animation-duration: 420ms; animation-timing-function: var(--ease-out); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background:
    radial-gradient(ellipse 90% 60% at 70% -10%, oklch(30% 0.06 258 / .55), transparent 70%),
    var(--paper);
  background-attachment: fixed;
  color: var(--ink);
  font: 400 var(--fs-base)/1.65 var(--serif);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
main:focus { outline: none; }
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--on-ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--ink-2); }

/* ---------- Accessibility ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.card:focus-visible { outline-offset: 8px; }
.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 50;
  background: var(--ink); color: var(--on-ink); padding: 12px 18px;
  font: 500 var(--fs-sm)/1 var(--sans); text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Type ---------- */
.eyebrow {
  font: 600 var(--fs-xs)/1.4 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--space-xs);
  display: block;
}
.display {
  font: 300 var(--fs-3xl)/0.96 var(--serif);
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-lg);
  text-wrap: balance;
}
.h1 { font: 400 var(--fs-2xl)/1.04 var(--serif); letter-spacing: -0.022em; margin: 0 0 var(--space-xs); text-wrap: balance; }
.h2 { font: 400 var(--fs-xl)/1.15 var(--serif); letter-spacing: -0.012em; margin: 0; text-wrap: balance; }
.lede { font-size: var(--fs-lg); line-height: 1.5; color: var(--ink-2); max-width: 30em; margin: 0 0 var(--space-xl); font-style: italic; text-wrap: pretty; }
.prose p { margin: 0 0 1.1em; max-width: 36em; text-wrap: pretty; }
.prose-lg { font-size: var(--fs-lg); line-height: 1.55; margin: 0 0 var(--space-sm); max-width: 32em; text-wrap: pretty; }

.link {
  font: 500 var(--fs-sm)/1 var(--sans); letter-spacing: .02em; text-decoration: none; color: var(--accent);
  display: inline-flex; align-items: center; gap: .4em; min-height: 44px;
  background: linear-gradient(currentColor, currentColor) 0 calc(50% + .8em) / 0 1px no-repeat;
  transition: background-size var(--dur-normal) var(--ease-out);
}
.link:hover { background-size: 100% 1px; }
.link .arr { display: inline-block; transition: transform var(--dur-normal) var(--ease-out); }
.link:hover .arr { transform: translateX(3px); }
.link:hover .arr--back { transform: translateX(-3px); }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px;
  font: 500 var(--fs-sm)/1 var(--sans); letter-spacing: .04em;
  text-decoration: none;
  background: var(--accent); color: var(--on-ink);
  border: 1px solid var(--accent); border-radius: 2px;
  transition: background-color var(--dur-normal) var(--ease-out), color var(--dur-normal) var(--ease-out),
              border-color var(--dur-normal) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn:hover { background: var(--ink); border-color: var(--ink); }
.btn:active { transform: scale(.97); }
.btn--ghost { background: transparent; color: var(--ink); border-color: color-mix(in oklch, var(--ink) 35%, transparent); }
.btn--ghost:hover { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }

/* ---------- Header / footer ---------- */
.preview-note {
  background: oklch(26% 0.05 82); color: oklch(90% 0.06 88); border-bottom: 1px solid oklch(38% 0.07 82);
  font: var(--fs-sm)/1.4 var(--sans); text-align: center; padding: 8px 16px;
}
.preview-note code { font-size: .92em; background: oklch(100% 0 0 / .1); padding: 1px 5px; border-radius: 3px; }
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in oklch, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px) saturate(140%); -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-normal) var(--ease-out);
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { font: 500 1.3rem/1 var(--serif); letter-spacing: .005em; text-decoration: none; padding: 12px 0; }
.site-nav { display: flex; gap: var(--space-lg); }
.site-nav a {
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
  font: 500 var(--fs-xs)/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--ink-2);
  transition: color var(--dur-fast) var(--ease-out);
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 10px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform var(--dur-normal) var(--ease-out);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 12px 10px; cursor: pointer; flex-direction: column; justify-content: center; gap: 7px; }
.nav-toggle span:not(.sr) { display: block; height: 1.5px; background: var(--ink); transition: transform var(--dur-normal) var(--ease-out); }

.site-footer { border-top: 1px solid var(--rule); margin-top: var(--space-3xl); padding: var(--space-2xl) 0; }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: var(--space-lg) var(--space-2xl); justify-content: space-between; align-items: flex-start; }
.site-footer__name { font-size: 1.25rem; margin: 0 0 4px; }
.site-footer .muted { font: var(--fs-sm)/1.5 var(--sans); margin: 0; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 0 var(--space-lg); }
.site-footer__links a { display: inline-flex; align-items: center; min-height: 44px; font: 500 var(--fs-sm)/1 var(--sans); text-decoration: none; color: var(--ink-2); transition: color var(--dur-fast); }
.site-footer__links a:hover { color: var(--ink); }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 76px; background: var(--paper-2);
    flex-direction: column; gap: 0; padding: 4px var(--gutter) 20px; border-bottom: 1px solid var(--rule);
    visibility: hidden; opacity: 0; transform: translateY(-6px);
    transition: opacity var(--dur-normal) var(--ease-out), transform var(--dur-normal) var(--ease-out), visibility 0s linear var(--dur-normal);
  }
  .site-header.is-open .site-nav { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .site-nav a { min-height: 56px; font-size: var(--fs-sm); border-bottom: 1px solid var(--rule); }
  .site-nav a::after { display: none; }
  .site-header.is-open .nav-toggle span:nth-child(1) { transform: translateY(4.25px) rotate(45deg); }
  .site-header.is-open .nav-toggle span:nth-child(2) { transform: translateY(-4.25px) rotate(-45deg); }
}

/* ---------- Covers ---------- */
.cover {
  aspect-ratio: 5 / 8; width: 100%; position: relative;
  box-shadow: var(--elev-2); background: var(--paper-2);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: transform var(--dur-slow) var(--ease-out), box-shadow var(--dur-slow) var(--ease-out);
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
/* spine shading + light sheen that follows the pointer */
.cover::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, oklch(0% 0 0 / .2), oklch(100% 0 0 / .08) 3%, transparent 6%),
    radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), oklch(100% 0 0 / var(--glare, 0)), transparent 55%);
  transition: background var(--dur-slow) var(--ease-out);
}
.cover--gen { background: var(--c); color: #f3ead7; container-type: inline-size; }
.cover__frame {
  position: absolute; inset: 6%; border: 1px solid rgba(243,234,215,.4);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  text-align: center; padding: 12% 8%;
}
.cover__series { font: 600 4.2cqw/1.3 var(--sans); letter-spacing: .2em; text-transform: uppercase; opacity: .8; }
.cover__title { font: 400 12cqw/1.05 var(--serif); letter-spacing: -0.01em; margin: auto 0; text-wrap: balance; }
.cover__rule { width: 18%; height: 1px; background: rgba(243,234,215,.55); }
.cover__author { font: 500 4.6cqw/1.2 var(--sans); letter-spacing: .24em; text-transform: uppercase; }

/* Hover lift (tilt angles are set by site.js on fine pointers only) */
.is-tiltable:hover .cover, .card:focus-visible .cover { --lift: -6px; box-shadow: var(--elev-3); }
.is-tilting .cover { transition-duration: var(--dur-fast); }

/* ---------- Trailer preview on covers ---------- */
.cover__video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 450ms var(--ease-in-out); pointer-events: none;
}
.cover.is-playing .cover__video { opacity: 1; }
.cover__badge {
  position: absolute; left: 50%; bottom: 5%; z-index: 2; transform: translate(-50%, 6px);
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px 6px 9px;
  font: 600 var(--fs-xs)/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #f3ead7;
  background: oklch(15% 0.01 70 / .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid oklch(100% 0 0 / .14); border-radius: 999px;
  opacity: 0; transition: opacity var(--dur-normal) var(--ease-out), transform var(--dur-normal) var(--ease-out); pointer-events: none;
}
.cover__badge-dot { width: 6px; height: 6px; border-radius: 50%; background: oklch(70% 0.17 30); }
.cover.is-loading .cover__badge-dot { animation: pulse 900ms ease-in-out infinite; }
.cover.is-playing .cover__badge, .cover.is-loading .cover__badge { opacity: 1; transform: translate(-50%, 0); }
@keyframes pulse { 50% { opacity: .25; } }

.trailer-btn {
  display: inline-flex; align-items: center; gap: 10px; margin-top: var(--space-md);
  min-height: 44px; padding: 0 18px 0 8px; cursor: pointer;
  font: 500 var(--fs-sm)/1 var(--sans); letter-spacing: .03em; color: var(--ink);
  background: transparent; border: 1px solid color-mix(in oklch, var(--ink) 25%, transparent); border-radius: 999px;
  transition: background-color var(--dur-normal) var(--ease-out), color var(--dur-normal) var(--ease-out), border-color var(--dur-normal) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.trailer-btn__icon {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--on-ink); padding-left: 2px;
  transition: background-color var(--dur-normal) var(--ease-out), transform var(--dur-normal) var(--ease-out);
}
.trailer-btn:hover { border-color: var(--ink); }
.trailer-btn:hover .trailer-btn__icon { background: var(--ink); transform: scale(1.08); }
.trailer-btn:active { transform: scale(.97); }

/* Trailer player */
.trailer-modal {
  border: 0; padding: 0; background: transparent; max-width: none; max-height: none;
  width: 100%; height: 100%; margin: 0; display: none; place-items: center;
}
.trailer-modal[open] { display: grid; animation: fadein var(--dur-normal) var(--ease-out); }
.trailer-modal::backdrop { background: oklch(12% 0.01 70 / .88); backdrop-filter: blur(4px); }
.trailer-modal__inner { position: relative; display: flex; flex-direction: column; align-items: center; padding: 56px 16px 24px; animation: rise var(--dur-slow) var(--ease-out); }
.trailer-modal__video {
  display: block; height: min(78vh, 900px); max-width: calc(100vw - 32px); aspect-ratio: 9 / 16;
  background: #000; box-shadow: 0 30px 80px -20px oklch(0% 0 0 / .7); border-radius: 4px;
}
.trailer-modal__title { margin: 14px 0 0; color: oklch(85% 0.015 80); font: italic 400 1.05rem/1.4 var(--serif); }
.trailer-modal__close {
  position: absolute; top: 4px; right: 8px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid oklch(100% 0 0 / .25); background: transparent; color: #f3ead7;
  font: 300 28px/1 var(--sans); cursor: pointer; transition: background-color var(--dur-fast);
}
.trailer-modal__close:hover { background: oklch(100% 0 0 / .12); }
.modal-open { overflow: hidden; }
@keyframes fadein { from { opacity: 0; } }

/* ---------- Home ---------- */
.hero {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: var(--space-2xl); align-items: center;
  padding-top: var(--space-3xl); padding-bottom: var(--space-3xl);
}
.hero__text { animation: rise var(--dur-slow) var(--ease-out) both; }
.hero__book { justify-self: center; width: min(360px, 100%); display: flex; flex-direction: column; align-items: center; animation: rise 900ms var(--ease-out) 120ms both; }
.hero__book-link { display: block; width: 100%; text-decoration: none; position: relative; }
.hero__book-link::before { content: ""; position: absolute; inset: -18% -30%; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, var(--glow), transparent); }
.hero__caption { display: flex; justify-content: center; align-items: baseline; gap: 10px; margin-top: var(--space-md); font-size: 1.05rem; font-style: italic; }
.hero__caption .eyebrow { margin: 0; font-style: normal; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.section { padding-top: var(--space-3xl); }
.section__head, .shelf__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm); flex-wrap: wrap;
  padding-bottom: var(--space-sm); margin-bottom: var(--space-xl); border-bottom: 1px solid var(--rule);
}
.section__head .link { min-height: 0; }
.shelf__head .muted { font: var(--fs-sm)/1 var(--sans); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--space-2xl) var(--space-lg); }
.card { text-decoration: none; display: block; }
.card__meta { padding-top: var(--space-md); }
.card__meta .eyebrow { margin-bottom: 6px; }
.card__title { font: 400 1.3rem/1.25 var(--serif); margin: 0; transition: color var(--dur-fast); }
.card:hover .card__title { color: var(--accent); }
.tag { display: inline-block; margin-top: 8px; font: 600 var(--fs-xs)/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--rule); padding: 6px 9px; }

.about-teaser { display: grid; grid-template-columns: 200px 1fr; gap: var(--space-2xl); align-items: center; }
.portrait { aspect-ratio: 4 / 5; background: var(--paper-2); display: grid; place-items: center; overflow: hidden; box-shadow: var(--elev-1); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait span { font: 300 4rem/1 var(--serif); color: var(--ink-2); letter-spacing: .04em; }

.band { margin-top: var(--space-3xl); background: var(--paper-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.band__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-lg); padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }
.band .muted { color: var(--ink-2); margin: 8px 0 0; }

/* ---------- Books page ---------- */
.page-head { padding-top: var(--space-3xl); padding-bottom: var(--space-2xs); }
.page-head > * { animation: rise var(--dur-slow) var(--ease-out) both; }
.page-head > :nth-child(2) { animation-delay: 60ms; }
.page-head > :nth-child(3) { animation-delay: 120ms; }
.page-head > :nth-child(4) { animation-delay: 180ms; }
.page-head .lede { margin-bottom: var(--space-lg); }
.filters { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.chip {
  font: 500 var(--fs-sm)/1 var(--sans); letter-spacing: .03em; background: transparent;
  border: 1px solid var(--rule); color: var(--ink-2); padding: 0 18px; border-radius: 999px; cursor: pointer; min-height: 44px;
  transition: background-color var(--dur-normal) var(--ease-out), color var(--dur-normal) var(--ease-out), border-color var(--dur-normal) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--on-ink); border-color: var(--accent); }
.shelf { padding-top: var(--space-2xl); }

/* ---------- Book page ---------- */
.book { display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: var(--space-3xl); padding-top: var(--space-2xl); align-items: start; }
.book__cover { position: sticky; top: 108px; display: flex; flex-direction: column; align-items: center; }
.book__cover > .is-tiltable { width: 100%; }
.book__body > * { animation: rise var(--dur-slow) var(--ease-out) both; }
.book__body > :nth-child(n+3) { animation-delay: 80ms; }
.book__body > :nth-child(n+6) { animation-delay: 160ms; }
.back { margin-bottom: var(--space-lg); }
.subtitle { font-size: var(--fs-lg); font-style: italic; color: var(--ink-2); margin: 0 0 var(--space-xs); }
.facts { font: var(--fs-sm)/1.5 var(--sans); color: var(--ink-2); letter-spacing: .03em; margin: 0 0 var(--space-xl); }
.facts:empty { display: none; }
.hook { font-size: var(--fs-xl); line-height: 1.35; font-style: italic; font-weight: 300; margin: 0 0 var(--space-lg); padding-left: var(--space-md); border-left: 2px solid var(--accent); max-width: 26em; text-wrap: balance; }
.buy { margin-top: var(--space-xl); padding-top: var(--space-lg); border-top: 1px solid var(--rule); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: var(--space-3xl); padding-top: var(--space-3xl); align-items: start; }
.about > * { animation: rise var(--dur-slow) var(--ease-out) both; }
.about > :nth-child(2) { animation-delay: 100ms; }
.portrait--lg span { font-size: 6rem; }
.contact .h2 { margin-bottom: var(--space-md); }
.contact p { margin: 0 0 var(--space-lg); }

/* ---------- Scroll reveal (only when JS + IntersectionObserver are available) ---------- */
.reveal-on [data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.reveal-on [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: var(--space-2xl); }
  .hero__book { width: min(280px, 72vw); }
  .book, .about { grid-template-columns: 1fr; gap: var(--space-xl); }
  .book__cover { position: static; width: min(320px, 78vw); margin: 0 auto; }
  .about .portrait { width: min(280px, 70vw); }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-xl) var(--space-sm); }
  .card__title { font-size: 1.125rem; }
  .about-teaser { grid-template-columns: 1fr; }
  .about-teaser .portrait { width: 140px; }
}

/* ---------- Respect reduced-motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
  .reveal-on [data-reveal] { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
}

/* ---------- Trailer + sample buttons under covers ---------- */
.book-extras { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-xs); margin-top: var(--space-md); }
.book-extras .trailer-btn { margin-top: 0; text-decoration: none; }
.buy__sample { margin: var(--space-sm) 0 0; }
.reader-end__back { margin-top: var(--space-lg); }
.content-note { font: italic var(--fs-sm)/1.55 var(--serif); color: var(--ink-2); max-width: 36em; margin: var(--space-md) 0 0; }
.content-note span { font: 600 var(--fs-xs)/1 var(--sans); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-right: .5em; }
