/* ==========================================================================
   Gary J. Kirchner: author site
   Classic structure, finished with care: Caslon display and text,
   midnight navy and McGill crimson, motion that answers the reader.
   ========================================================================== */

@font-face { font-family: 'Libre Caslon Display'; src: url('/assets/fonts/libre-caslon-display.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Libre Caslon Text'; src: url('/assets/fonts/libre-caslon-text-normal-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Libre Caslon Text'; src: url('/assets/fonts/libre-caslon-text-italic-400.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Libre Caslon Text'; src: url('/assets/fonts/libre-caslon-text-normal-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Hanken Grotesk'; src: url('/assets/fonts/hanken-grotesk.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  --white: #ffffff;
  --warm: #f6f3ee;
  --warm-2: #ece6dc;
  --ink: #14171c;
  --muted: #5a6069;
  --line: #e2ddd4;
  --navy: #0e1a2b;
  --navy-text: #c3cbd6;
  --crimson: #a61e2d;
  --crimson-deep: #851522;
  --gold: #c9a34e;

  --display: 'Libre Caslon Display', 'Libre Caslon Text', Georgia, serif;
  --serif: 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
  --sans: 'Hanken Grotesk', 'Segoe UI', system-ui, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

/* per-book colour, sampled from each cover */
.accent-crombys  { --b-bg: #22100a; --b-glow: #8a2a12; --b-accent: #ff8a5c; }
.accent-pacing   { --b-bg: #101216; --b-glow: #8f1420; --b-accent: #ff5a66; }
.accent-firstten { --b-bg: #0a1934; --b-glow: #1f4fa8; --b-accent: #9dbcff; }
.accent-gridiron { --b-bg: #0e1219; --b-glow: #6b5317; --b-accent: #f5b92e; }
.accent-hammer   { --b-bg: #2a1507; --b-glow: #a0521a; --b-accent: #ffb54a; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: var(--serif); font-size: clamp(1.03rem, 0.98rem + 0.25vw, 1.15rem); line-height: 1.7;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, picture, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
blockquote { margin: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--crimson); }
::selection { background: var(--crimson); color: #fff; }
:focus-visible { outline: 2px solid var(--crimson); outline-offset: 3px; border-radius: 2px; }
html { scrollbar-color: #b9b2a6 var(--white); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -80px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 4px; font-family: var(--sans); font-weight: 600; text-decoration: none; }
.skip-link:focus, .skip-link:hover { top: 12px; color: #fff; }

.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.label { font-family: var(--sans); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.label--light { color: rgba(255, 255, 255, 0.62); }

.section-title { font-family: var(--display); font-size: clamp(2.6rem, 1.6rem + 3.6vw, 4.6rem); line-height: 1.02; letter-spacing: -0.01em; }
.section-title--small { font-size: clamp(2rem, 1.4rem + 2.2vw, 3.1rem); }

.prose p + p { margin-top: 1.05em; }
.prose { max-width: 66ch; }
.prose--lead { font-size: 1.14em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px;
  font-family: var(--sans); font-weight: 600; font-size: 0.98rem; letter-spacing: 0.02em; text-decoration: none;
  border-radius: 999px; border: 1.5px solid transparent; cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.btn .icon { transition: transform 0.35s var(--ease); }
.btn:hover .icon { transform: translateX(4px); }
.btn--solid { background: var(--crimson); color: #fff; box-shadow: 0 10px 24px -12px rgba(166, 30, 45, 0.7); }
.btn--solid:hover { background: var(--crimson-deep); color: #fff; transform: translateY(-1px); box-shadow: 0 14px 30px -12px rgba(166, 30, 45, 0.75); }
.hero-cta:hover .icon { transform: translateY(3px); }
.btn--line { border-color: var(--ink); color: var(--ink); }
.btn--line:hover { background: var(--ink); color: #fff; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; }

.text-link { display: inline-flex; align-items: center; gap: 8px; font-family: var(--sans); font-weight: 600; font-size: 0.95rem; text-decoration: none; }
.text-link .icon { transition: transform 0.35s var(--ease); }
.text-link:hover .icon { transform: translateX(4px); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  border-bottom: 1px solid var(--line);
  transition: border-color 0.4s var(--ease), color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
/* The frosted glass lives on a pseudo-element: backdrop-filter on the header itself would
   become the containing block for the fixed mobile menu and clip it to the header bar. */
.site-header::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  transition: background-color 0.4s var(--ease);
}
.site-header--overlay { position: fixed; left: 0; right: 0; border-color: transparent; color: #fff; }
.site-header--overlay::before { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.site-header--overlay.is-scrolled { color: var(--ink); border-color: var(--line); box-shadow: 0 10px 30px -24px rgba(14, 26, 43, 0.5); }
.site-header--overlay.is-scrolled::before { background: rgba(255, 255, 255, 0.92); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand:hover { color: inherit; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid currentColor; border-radius: 50%; font-family: var(--display); font-size: 0.95rem; letter-spacing: 0.04em; padding-top: 2px; }
.brand-name { font-family: var(--display); font-size: 1.35rem; letter-spacing: 0.005em; white-space: nowrap; }
.site-nav ul { display: flex; gap: clamp(20px, 3vw, 40px); }
.site-nav a { position: relative; font-family: var(--sans); font-weight: 500; font-size: 0.97rem; letter-spacing: 0.02em; text-decoration: none; padding-block: 8px; }
.site-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.45s var(--ease); }
.site-nav a:hover { color: inherit; }
.site-nav a:hover::after, .site-nav a[aria-current='page']::after { transform: scaleX(1); transform-origin: left; }

.menu-toggle { display: none; position: relative; z-index: 120; width: 46px; height: 46px; border: 0; background: transparent; color: inherit; cursor: pointer; border-radius: 50%; }
.menu-toggle-lines, .menu-toggle-lines::before, .menu-toggle-lines::after { position: absolute; left: 12px; width: 22px; height: 1.6px; background: currentColor; border-radius: 2px; transition: transform 0.4s var(--ease), background-color 0.2s; }
.menu-toggle-lines { top: 50%; }
.menu-toggle-lines::before, .menu-toggle-lines::after { content: ''; left: 0; }
.menu-toggle-lines::before { transform: translateY(-7px); }
.menu-toggle-lines::after { transform: translateY(7px); }
.menu-toggle[aria-expanded='true'] .menu-toggle-lines { background: transparent; }
.menu-toggle[aria-expanded='true'] .menu-toggle-lines::before { transform: rotate(45deg); background: #fff; }
.menu-toggle[aria-expanded='true'] .menu-toggle-lines::after { transform: rotate(-45deg); background: #fff; }

@media (max-width: 820px) {
  :root { --header-h: 66px; }
  .brand-mark { width: 38px; height: 38px; font-size: 0.85rem; }
  .brand-name { font-size: 1.15rem; }
  .menu-toggle { display: block; }
  .site-nav { position: fixed; inset: 0; z-index: 110; background: var(--navy); color: #fff; display: flex; align-items: center; padding: var(--gutter); visibility: hidden; opacity: 0; transition: opacity 0.4s var(--ease), visibility 0s 0.4s; }
  .site-nav.is-open { visibility: visible; opacity: 1; transition: opacity 0.4s var(--ease); }
  .site-nav ul { flex-direction: column; gap: 6px; }
  .site-nav a { font-family: var(--display); font-weight: 400; font-size: clamp(2.6rem, 10vw, 3.6rem); letter-spacing: 0; line-height: 1.2; }
  .site-nav a::after { bottom: 6px; }
  .site-nav li { opacity: 0; transform: translateY(18px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
  .site-nav.is-open li { opacity: 1; transform: none; }
  .site-nav.is-open li:nth-child(2) { transition-delay: 0.06s; }
  .site-nav.is-open li:nth-child(3) { transition-delay: 0.12s; }
  .site-nav.is-open li:nth-child(4) { transition-delay: 0.18s; }
  .site-nav :focus-visible { outline-color: #fff; }
  body.menu-open { overflow: hidden; }
  body.menu-open .site-header { color: #fff; border-color: transparent; box-shadow: none; }
  body.menu-open .site-header::before { background: transparent; }
}

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; min-height: clamp(640px, 100svh, 1040px); display: flex; align-items: flex-end; background: var(--navy); }
.hero-media { position: absolute; inset: -6% 0 0; z-index: -2; will-change: transform; }
.hero-drift { width: 100%; height: 100%; transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1.05); transition: transform 1.2s var(--ease); }
.hero-media picture, .hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 66% 38%; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(8, 14, 24, 0.55) 0%, rgba(8, 14, 24, 0) 22%),
    linear-gradient(90deg, rgba(8, 14, 24, 0.86) 0%, rgba(8, 14, 24, 0.5) 40%, rgba(8, 14, 24, 0) 66%),
    linear-gradient(0deg, rgba(8, 14, 24, 0.85) 0%, rgba(8, 14, 24, 0) 48%);
}
.hero-content { padding-bottom: clamp(96px, 13vh, 150px); }
.hero-copy { max-width: 640px; }

/* the name set like a book jacket: italic forename over a monumental surname */
.hero-title { line-height: 1; }
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line > span { display: inline-block; }
.line--first { font-family: var(--serif); font-style: italic; font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.6rem); line-height: 1.1; padding: 0.04em 0.2em 0.24em 0.12em; margin-bottom: -0.2em; color: rgba(255, 255, 255, 0.92); }
.line--last { font-family: var(--display); font-size: clamp(4.4rem, 1.4rem + 8.4vw, 10.25rem); line-height: 0.86; letter-spacing: -0.03em; padding-bottom: 0.08em; margin-left: -0.04em; }
.hero-tag { margin-top: clamp(14px, 2vw, 24px); max-width: 26ch; font-style: italic; font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.75rem); line-height: 1.35; color: rgba(255, 255, 255, 0.9); }
.hero-tag::before { content: ''; display: block; width: 48px; height: 1px; margin-bottom: 18px; background: var(--gold); }
.hero-actions { margin-top: clamp(28px, 3.4vw, 40px); display: flex; align-items: center; flex-wrap: wrap; gap: 28px 40px; }
.hero :focus-visible { outline-color: #fff; }

/* bookshelf: the five covers fanned in the corner */
.hero-shelf { display: flex; align-items: center; gap: 22px; padding-left: clamp(0px, 3vw, 40px); border-left: 1px solid rgba(255, 255, 255, 0.22); transform: translate3d(calc(var(--px, 0px) * -0.35), calc(var(--py, 0px) * -0.35), 0); transition: transform 1.2s var(--ease); }
.hero-shelf-title { font-family: var(--sans); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; }
.hero-shelf-title a { display: inline-flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.hero-shelf-title { order: 2; }
.hero-shelf-title a::before { content: ''; width: 24px; height: 1px; background: var(--gold); }
.hero-shelf-title a:hover { color: #fff; }
.hero-shelf-list { display: flex; align-items: flex-end; padding-inline: 10px; }
.hero-shelf-book { --w: clamp(46px, 3.7vw, 60px); width: var(--w); margin-inline: calc(var(--w) * -0.14); transform-origin: 50% 120%; transition: transform 0.6s var(--ease); }
.hero-shelf-book a { display: block; border-radius: 2px 4px 4px 2px; overflow: hidden; box-shadow: 0 24px 36px -16px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08); transition: box-shadow 0.6s var(--ease); }
.hero-shelf-book img { width: 100%; aspect-ratio: 2 / 3.08; object-fit: cover; }
.hero-shelf-book--1 { transform: rotate(-10deg) translateY(6px); }
.hero-shelf-book--2 { transform: rotate(-5deg) translateY(1px); }
.hero-shelf-book--3 { transform: rotate(0deg); z-index: 1; }
.hero-shelf-book--4 { transform: rotate(5deg) translateY(1px); }
.hero-shelf-book--5 { transform: rotate(10deg) translateY(6px); }
.hero-shelf-book:hover, .hero-shelf-book:focus-within { z-index: 5; transform: rotate(0deg) translateY(-14px) scale(1.35); }
.hero-shelf-book:hover a, .hero-shelf-book:focus-within a { box-shadow: 0 36px 48px -18px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.2); }
.hero-shelf-list:hover .hero-shelf-book:not(:hover) { filter: brightness(0.7); }
.hero-shelf-book { transition: transform 0.6s var(--ease), filter 0.4s var(--ease); }

/* scroll cue */
.hero-scroll { position: absolute; left: 50%; bottom: 0; width: 1px; height: 64px; background: rgba(255, 255, 255, 0.22); overflow: hidden; }
.hero-scroll span { position: absolute; left: 0; top: 0; width: 1px; height: 100%; background: #fff; transform: translateY(-100%); }

@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .hero-media img { animation: settle 2.6s var(--ease) both; }
  .hero-title .line > span { animation: rise 1.25s var(--ease) both; }
  .hero-title .line--last > span { animation-delay: 0.1s; }
  .hero-tag { animation: fade-up 1s 0.45s var(--ease) both; }
  .hero-cta { animation: fade-up 1s 0.6s var(--ease) both; }
  .hero-shelf { animation: fade-up 1s 0.7s var(--ease) both; }
  .hero-shelf-title { animation: fade-up 1s 1.1s var(--ease) both; }
  .hero-shelf-book > a { animation: shelf-in 1.1s var(--ease) both; }
  .hero-shelf-book--1 > a { animation-delay: 0.7s; }
  .hero-shelf-book--2 > a { animation-delay: 0.78s; }
  .hero-shelf-book--3 > a { animation-delay: 0.86s; }
  .hero-shelf-book--4 > a { animation-delay: 0.94s; }
  .hero-shelf-book--5 > a { animation-delay: 1.02s; }
  .hero-scroll span { animation: drip 2.4s 1.6s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
  @keyframes settle { from { transform: scale(1.12); } to { transform: scale(1); } }
  @keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
  @keyframes shelf-in { from { opacity: 0; transform: translateY(70px); } to { opacity: 1; transform: none; } }
  @keyframes drip { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }
}
@media (max-width: 960px) {
  .hero-content { padding-bottom: 72px; }
  .hero-scroll { display: none; }
}
@media (max-width: 700px) {
  .hero { min-height: 100svh; }
  .hero-media img { object-position: 74% 50%; }
  .hero-shade { background: linear-gradient(180deg, rgba(8, 14, 24, 0.5) 0%, rgba(8, 14, 24, 0) 22%), linear-gradient(0deg, rgba(8, 14, 24, 0.94) 0%, rgba(8, 14, 24, 0.6) 48%, rgba(8, 14, 24, 0) 76%); }
  .hero-shelf { padding-left: 0; border-left: 0; gap: 16px; }
  .hero-shelf-book { --w: clamp(44px, 12vw, 54px); }
}

/* ---------- intro (find me online) ---------- */
.intro { position: relative; z-index: 2; margin-top: -46px; }
.intro-inner { display: flex; justify-content: center; }
.intro-online {
  display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 14px 28px;
  padding: 20px clamp(20px, 3vw, 34px); background: #fff; border-radius: 16px;
  box-shadow: 0 30px 60px -36px rgba(14, 26, 43, 0.45), 0 2px 8px -4px rgba(14, 26, 43, 0.12);
}
.social-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.social-link {
  display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); font-family: var(--sans); font-weight: 500; font-size: 0.95rem; text-decoration: none;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.social-link:hover { border-color: var(--crimson); color: var(--crimson); background: #fbf2f3; }
.social-list--stack { flex-direction: column; align-items: flex-start; margin-top: 32px; }

/* ---------- books (home) ---------- */
.books { padding-top: clamp(88px, 10vw, 140px); }
.books > .wrap > .section-title { text-align: center; margin-bottom: clamp(56px, 7vw, 96px); }
.books > .wrap > .section-title::after { content: ''; display: block; width: 56px; height: 2px; margin: 26px auto 0; background: var(--crimson); }

.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(36px, 7vw, 112px); align-items: center; padding-bottom: clamp(88px, 10vw, 140px); }
.feature--flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); padding-top: clamp(88px, 10vw, 140px); }
.feature--flip .feature-media { order: 2; }
.feature-media { justify-self: center; width: 100%; max-width: 400px; }
.feature-title { font-family: var(--display); font-size: clamp(2.6rem, 1.7rem + 3vw, 4.4rem); line-height: 1; letter-spacing: -0.01em; }
.feature-title a { text-decoration: none; }
.feature-title a:hover { color: inherit; }
.feature-teaser { margin-top: 22px; font-size: 1.2em; line-height: 1.6; color: #2b3038; max-width: 40ch; }
.feature .btn { margin-top: 32px; }
@media (max-width: 820px) {
  .feature, .feature--flip { grid-template-columns: 1fr; }
  .feature--flip .feature-media { order: 0; }
  .feature-media { max-width: 280px; justify-self: start; }
}

/* books as physical objects */
.book3d { perspective: 1400px; }
.book3d-inner {
  position: relative; border-radius: 2px 5px 5px 2px; transform-style: preserve-3d;
  transform: rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg));
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
  box-shadow: 0 36px 60px -30px rgba(14, 26, 43, 0.55), 0 14px 22px -12px rgba(14, 26, 43, 0.35);
}
.book3d-inner img { width: 100%; border-radius: inherit; }
.book3d-inner::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 5%; z-index: 1; border-radius: 2px 0 0 2px; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, 0.28), rgba(255, 255, 255, 0.2) 45%, rgba(0, 0, 0, 0.1) 75%, transparent); }
.book3d-sheen { position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.5s var(--ease); background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, 0.3), transparent 55%); }
.book3d.is-tilting .book3d-inner { transition: transform 0.12s linear, box-shadow 0.6s var(--ease); box-shadow: 0 50px 80px -34px rgba(14, 26, 43, 0.6), 0 18px 28px -14px rgba(14, 26, 43, 0.35); }
.book3d.is-tilting .book3d-sheen { opacity: 1; }

/* trilogy band */
.trilogy { position: relative; overflow: hidden; color: #fff; background: var(--navy); padding-block: clamp(88px, 11vw, 150px); }
.trilogy::before { content: ''; position: absolute; inset: -30% -10% auto; height: 80%; background: radial-gradient(ellipse at 50% 0%, rgba(201, 163, 78, 0.16), transparent 60%); pointer-events: none; }
.trilogy-head { position: relative; text-align: center; max-width: 900px; margin-inline: auto; }
.trilogy-head::before { content: ''; display: block; width: 56px; height: 1px; margin: 0 auto 28px; background: var(--gold); }
.trilogy-title { font-family: var(--display); font-size: clamp(2.6rem, 1.4rem + 4.4vw, 5.2rem); line-height: 1.02; letter-spacing: -0.01em; }
.trilogy-list { position: relative; margin-top: clamp(56px, 7vw, 96px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4.5vw, 72px); }
.trilogy-cover { display: block; max-width: 320px; }
.trilogy-cover .book3d-inner { box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.8), 0 14px 24px -12px rgba(0, 0, 0, 0.5); }
.trilogy-book { margin-top: 34px; font-family: var(--display); font-size: clamp(1.8rem, 1.3rem + 1.2vw, 2.4rem); line-height: 1.08; }
.trilogy-book a { text-decoration: none; }
.trilogy-book a:hover { color: var(--b-accent); }
.trilogy-part { margin-top: 8px; font-family: var(--sans); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--b-accent); }
.trilogy-teaser { margin-top: 16px; color: var(--navy-text); font-size: 0.98em; line-height: 1.65; }
.trilogy .text-link { margin-top: 20px; color: #fff; }
.trilogy .text-link:hover { color: var(--b-accent); }
.trilogy :focus-visible { outline-color: #fff; }
@media (max-width: 900px) {
  .trilogy-list { grid-template-columns: 1fr; gap: 72px; max-width: 460px; margin-inline: auto; }
  .trilogy-cover { max-width: 240px; }
}

/* ---------- page heroes (about, book club, contact) ---------- */
.page-hero { background: var(--warm); padding-block: clamp(56px, 8vw, 112px); border-bottom: 1px solid var(--line); }
.page-title { font-family: var(--display); font-size: clamp(3.4rem, 1.8rem + 6vw, 7.2rem); line-height: 0.96; letter-spacing: -0.015em; }
.page-hero-name { font-style: italic; font-size: clamp(1.2rem, 1rem + 0.6vw, 1.55rem); color: var(--muted); margin-bottom: 10px; }
.page-lead { margin-top: 24px; max-width: 52ch; font-size: clamp(1.12rem, 1rem + 0.45vw, 1.35rem); line-height: 1.6; color: #2b3038; }
@media (prefers-reduced-motion: no-preference) {
  .page-title, .page-hero-name, .book-title { animation: fade-up 1s var(--ease) both; }
  .page-lead, .book-series, .book-quote, .buy { animation: fade-up 1s 0.14s var(--ease) both; }
}

/* ---------- book page ---------- */
.book-hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; background: var(--b-bg); padding: calc(var(--header-h) + clamp(40px, 6vw, 80px)) 0 clamp(72px, 9vw, 120px); }
.book-hero-glow { position: absolute; z-index: -1; width: 70vmax; height: 70vmax; left: -18vmax; top: -24vmax; border-radius: 50%; background: radial-gradient(circle, var(--b-glow), transparent 62%); opacity: 0.75; }
.book-hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 7vw, 112px); align-items: center; }
.book-hero-cover { width: 100%; max-width: 420px; justify-self: center; }
.book-hero-cover .book3d-inner { box-shadow: 0 50px 90px -36px rgba(0, 0, 0, 0.85), 0 18px 30px -14px rgba(0, 0, 0, 0.55); }
@media (prefers-reduced-motion: no-preference) {
  .book-hero-cover .book3d { animation: cover-in 1.3s var(--ease) both; }
  @keyframes cover-in { from { opacity: 0; transform: translateY(40px) rotate(-3deg); } to { opacity: 1; transform: none; } }
}
.crumbs { display: flex; gap: 10px; flex-wrap: wrap; font-family: var(--sans); font-size: 0.88rem; color: rgba(255, 255, 255, 0.62); margin-bottom: clamp(20px, 3vw, 32px); }
.crumbs a { text-decoration: none; color: rgba(255, 255, 255, 0.82); }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.book-title { font-family: var(--display); font-size: clamp(3rem, 1.8rem + 4.6vw, 6.2rem); line-height: 0.98; letter-spacing: -0.015em; }
.book-series { margin-top: 14px; font-style: italic; font-size: 1.15em; color: var(--b-accent); }
.book-quote { margin-top: clamp(26px, 3.4vw, 40px); max-width: 34ch; font-style: italic; font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.7rem); line-height: 1.45; color: rgba(255, 255, 255, 0.92); }
.book-quote::before { content: ''; display: block; width: 44px; height: 2px; margin-bottom: 22px; background: var(--b-accent); }
.buy { margin-top: clamp(32px, 4vw, 48px); }
.buy-list { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.buy-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3); font-family: var(--sans); font-weight: 600; font-size: 0.92rem; text-decoration: none; color: #fff;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.buy-link .icon { width: 1em; height: 1em; opacity: 0.75; }
.buy-link:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.75); color: #fff; transform: translateY(-1px); }
.buy-link--primary { background: var(--b-accent); border-color: var(--b-accent); color: var(--b-bg); }
.buy-link--primary:hover { background: #fff; border-color: #fff; color: var(--b-bg); }
.book-hero :focus-visible { outline-color: #fff; }
@media (max-width: 860px) {
  .book-hero-grid { grid-template-columns: 1fr; }
  .book-hero-cover { max-width: 260px; justify-self: start; }
}

.book-about { padding-block: clamp(72px, 9vw, 128px) clamp(56px, 7vw, 96px); }
.book-about-inner { display: flex; justify-content: center; }
.book-about .prose { max-width: 62ch; }
.book-about .prose p:first-child::first-letter { float: left; font-family: var(--display); font-size: 4.2em; line-height: 0.82; padding: 0.08em 0.1em 0 0; color: var(--crimson); }
.series-nav { margin-top: clamp(56px, 7vw, 88px); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.series-step { display: flex; flex-direction: column; gap: 4px; padding: 24px 0; border-top: 1px solid var(--line); text-decoration: none; }
.series-step--next { grid-column: 2; text-align: right; align-items: flex-end; }
.series-step-label { font-family: var(--sans); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.series-step-title { font-family: var(--display); font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem); line-height: 1.1; transition: color 0.3s var(--ease); }
.series-step:hover { color: inherit; }
.series-step:hover .series-step-title { color: var(--crimson); }

.more { background: var(--warm); padding-block: clamp(72px, 9vw, 120px); }
.more .section-title { text-align: center; }
.more-list { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3.5vw, 48px); }
.more-item { display: flex; flex-direction: column; gap: 18px; text-decoration: none; }
.more-item:hover { color: var(--crimson); }
.more-title { font-family: var(--display); font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem); line-height: 1.15; }
.more-list--404 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 900px) { .more-list, .more-list--404 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 24px; } }

/* ---------- about ---------- */
.read-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 150; height: 3px; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--crimson); transform-origin: left; transform: scaleX(var(--p, 0)); }

.about-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--navy); color: #fff; min-height: clamp(620px, 92svh, 920px); display: flex; align-items: center; }
.about-hero-photo { position: absolute; z-index: -1; top: 0; bottom: 0; right: 0; width: 46%; }
.about-hero-photo picture, .about-hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 38% 30%; }
.about-hero-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--navy) 0%, rgba(14, 26, 43, 0.6) 16%, rgba(14, 26, 43, 0) 42%), linear-gradient(0deg, rgba(14, 26, 43, 0.5), transparent 30%); }
.about-hero-inner { padding-block: calc(var(--header-h) + clamp(32px, 5vw, 64px)) clamp(56px, 7vw, 96px); }
.about-hero-text { max-width: 560px; }
.about-hero .page-hero-name { color: rgba(255, 255, 255, 0.72); }
.chapters-nav { margin-top: clamp(32px, 4vw, 48px); }
.chapters { border-top: 1px solid rgba(255, 255, 255, 0.14); }
.chapter {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px;
  padding: 16px 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.14); text-decoration: none; color: #fff;
  transition: background-color 0.35s var(--ease), padding 0.35s var(--ease);
}
.chapter-num { font-family: var(--display); font-size: 1.15rem; color: var(--gold); }
.chapter-body { display: grid; gap: 2px; min-width: 0; }
.chapter-name { font-family: var(--display); font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.6rem); line-height: 1.2; }
.chapter-line { font-size: 0.92rem; line-height: 1.45; color: var(--navy-text); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.chapter .icon { opacity: 0.4; transition: transform 0.35s var(--ease), opacity 0.35s var(--ease); }
.chapter:hover { color: #fff; background: rgba(255, 255, 255, 0.05); padding-inline: 12px; }
.chapter:hover .icon { opacity: 1; transform: translateX(4px); }
.about-hero :focus-visible { outline-color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .about-hero-photo img { animation: settle 1.2s cubic-bezier(0.33, 1, 0.68, 1) both; }
  .chapters li { animation: fade-up 0.9s var(--ease) both; }
  .chapters li:nth-child(1) { animation-delay: 0.25s; }
  .chapters li:nth-child(2) { animation-delay: 0.32s; }
  .chapters li:nth-child(3) { animation-delay: 0.39s; }
  .chapters li:nth-child(4) { animation-delay: 0.46s; }
  .chapters li:nth-child(5) { animation-delay: 0.53s; }
}
@media (max-width: 900px) {
  .about-hero { display: block; min-height: 0; }
  .about-hero-photo { position: relative; width: 100%; height: auto; aspect-ratio: 4 / 3.4; }
  .about-hero-photo::after { background: linear-gradient(0deg, var(--navy) 0%, rgba(14, 26, 43, 0) 45%), linear-gradient(180deg, rgba(14, 26, 43, 0.55), transparent 30%); }
  .about-hero-inner { padding-top: 0; margin-top: -72px; position: relative; }
}

.about-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); padding-block: clamp(72px, 9vw, 120px); }
.toc { position: sticky; top: calc(var(--header-h) + 36px); align-self: start; }
.toc ol { margin-top: 16px; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a { display: flex; gap: 12px; margin-left: -1px; padding: 9px 0 9px 18px; border-left: 2px solid transparent; font-family: var(--sans); font-weight: 500; font-size: 0.95rem; color: var(--muted); text-decoration: none; transition: color 0.3s var(--ease), border-color 0.3s var(--ease); }
.toc-num { font-variant-numeric: tabular-nums; opacity: 0.6; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--crimson); border-left-color: var(--crimson); }
.about-body { max-width: 760px; }
.bio-section + .bio-section, .bio-photo + .bio-section { margin-top: clamp(64px, 8vw, 104px); }
.bio-head { display: flex; align-items: baseline; gap: 18px; padding-bottom: 20px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.bio-num { font-family: var(--display); font-size: clamp(1.4rem, 1.2rem + 0.6vw, 1.8rem); color: var(--crimson); }
.bio-h { font-family: var(--display); font-size: clamp(2.3rem, 1.6rem + 2.2vw, 3.6rem); line-height: 1.04; }
.bio-lead { font-family: var(--display); font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.95rem); line-height: 1.35; color: var(--ink); margin-bottom: 1.1em; }
.bio-prose p:not(.bio-lead) { color: #2b3038; }
.bio-photo { margin: clamp(64px, 8vw, 104px) 0 0; }
.bio-photo img { width: 100%; border-radius: 8px; box-shadow: 0 40px 70px -44px rgba(14, 26, 43, 0.6); }
@media (max-width: 900px) {
  .about-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
}

.about-books { background: var(--warm); padding-block: clamp(72px, 9vw, 120px); }
.about-books .section-title { text-align: center; }
.more-list--five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 900px) { .more-list--five { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- book club ---------- */
.club-hero { background: var(--warm); padding-block: clamp(56px, 8vw, 104px); border-bottom: 1px solid var(--line); }
.club-hero-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(36px, 6vw, 96px); align-items: center; }
.guide-cards { display: grid; gap: 14px; }
.guide-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px;
  padding: 16px 22px 16px 18px; background: #fff; border-radius: 16px; text-decoration: none;
  box-shadow: 0 1px 0 var(--line), 0 20px 40px -32px rgba(14, 26, 43, 0.45);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.guide-card:hover { color: inherit; transform: translateY(-3px); box-shadow: 0 1px 0 var(--line), 0 30px 50px -30px rgba(14, 26, 43, 0.5); }
.guide-card .icon { color: var(--crimson); transition: transform 0.35s var(--ease); }
.guide-card:hover .icon { transform: translateX(4px); }
.guide-card-text { display: grid; gap: 4px; }
.guide-card-title { font-family: var(--display); font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.55rem); line-height: 1.15; }
.guide-card-meta { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .guide-cards li { animation: fade-up 0.9s var(--ease) both; }
  .guide-cards li:nth-child(2) { animation-delay: 0.08s; }
  .guide-cards li:nth-child(3) { animation-delay: 0.16s; }
}

/* fanned cover stacks */
.stack { display: flex; align-items: center; }
.stack-cover { display: block; width: 46px; border-radius: 2px 3px 3px 2px; overflow: hidden; box-shadow: 0 10px 18px -10px rgba(14, 26, 43, 0.7); }
.stack--3 .stack-cover + .stack-cover { margin-left: -24px; }
.stack--3 .stack-cover:nth-child(1) { rotate: -6deg; }
.stack--3 .stack-cover:nth-child(3) { rotate: 6deg; }
.stack--3 .stack-cover:nth-child(2) { position: relative; z-index: 1; translate: 0 -4px; }
.guide-card .stack { width: 72px; justify-content: center; }

.club-note { padding-block: clamp(56px, 7vw, 88px); }
.club-note-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 20px clamp(32px, 6vw, 96px); }
.club-note-title { font-family: var(--display); font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.7rem); line-height: 1.1; }
.club-note-text { color: #2b3038; }
@media (max-width: 860px) { .club-hero-grid, .club-note-grid { grid-template-columns: 1fr; } }

.club-guides { padding-bottom: clamp(72px, 9vw, 120px); }
.club-tabs-wrap { position: sticky; top: var(--header-h); z-index: 20; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-block: 1px solid var(--line); }
.club-tabs-wrap[hidden] { display: none; }
.club-tabs { display: flex; gap: 6px; overflow-x: auto; padding-block: 12px; scrollbar-width: none; }
.club-tab {
  flex: none; min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font-family: var(--sans); font-weight: 600; font-size: 0.95rem; color: var(--muted); white-space: nowrap;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.club-tab:hover { color: var(--ink); background: var(--warm); }
.club-tab[aria-selected='true'] { background: var(--navy); color: #fff; }

.guide { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); padding-top: clamp(48px, 6vw, 80px); }
.guide + .guide { margin-top: clamp(48px, 6vw, 80px); border-top: 1px solid var(--line); }
.js-tabs .guide + .guide { margin-top: 0; border-top: 0; }
.guide[hidden] { display: none; }
.guide-aside-inner { position: sticky; top: calc(var(--header-h) + 96px); display: grid; gap: 16px; justify-items: start; }
.guide-aside .stack-cover { width: 110px; }
.guide-aside .stack--3 .stack-cover { width: 92px; }
.guide-aside .stack--3 .stack-cover + .stack-cover { margin-left: -46px; }
.guide-title { margin-top: 8px; font-family: var(--display); font-size: clamp(2rem, 1.5rem + 1.6vw, 2.8rem); line-height: 1.06; }
.guide-progress { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); }
.guide-meter { width: 100%; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.guide-meter span { display: block; height: 100%; width: 100%; background: var(--crimson); transform-origin: left; transform: scaleX(var(--done, 0)); transition: transform 0.5s var(--ease); }
.btn--small { min-height: 42px; padding: 0 18px; font-size: 0.88rem; }

.question {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 8px 16px; align-items: start;
  padding: 22px 0; border-top: 1px solid var(--line);
}
.question:last-child { border-bottom: 1px solid var(--line); }
.q-num { font-family: var(--display); font-size: 1.5rem; line-height: 1.2; color: var(--crimson); font-variant-numeric: lining-nums tabular-nums; }
.q-text { font-size: 1.04em; transition: color 0.3s var(--ease); }
.q-check { position: relative; display: grid; place-items: center; width: 44px; height: 44px; margin-top: -8px; cursor: pointer; }
.q-check input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.q-box { width: 24px; height: 24px; border: 1.5px solid #b9b2a6; border-radius: 50%; transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease); }
.q-box::after { content: ''; display: block; width: 7px; height: 12px; margin: 3px auto 0; border: solid #fff; border-width: 0 2px 2px 0; rotate: 45deg; opacity: 0; transition: opacity 0.2s; }
.q-check:hover .q-box { border-color: var(--crimson); }
.q-check input:checked + .q-box { background: var(--crimson); border-color: var(--crimson); }
.q-check input:checked + .q-box::after { opacity: 1; }
.q-check input:focus-visible + .q-box { outline: 2px solid var(--crimson); outline-offset: 3px; }
.question.is-done .q-text { color: var(--muted); }
.fun { margin-top: 32px; padding: clamp(24px, 3vw, 36px); border-radius: 16px; background: var(--navy); color: #fff; }
.fun-label { font-family: var(--sans); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.fun-q { margin-top: 10px; font-family: var(--display); font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.8rem); line-height: 1.3; }
@media (max-width: 900px) {
  .guide { grid-template-columns: 1fr; gap: 28px; }
  .guide-aside-inner { position: static; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 20px; }
  .guide-aside .stack { grid-row: span 4; }
  .guide-aside .stack-cover { width: 72px; }
  .guide-aside .stack--3 .stack-cover { width: 60px; }
  .guide-aside .stack--3 .stack-cover + .stack-cover { margin-left: -30px; }
  .guide-title { margin-top: 0; }
  .question { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 6px 10px; }
}

/* ---------- contact: an open book ---------- */
.contact-page { background: var(--warm); padding-block: clamp(48px, 7vw, 104px) clamp(72px, 9vw, 128px); overflow: hidden; }
.book-spread {
  --paper: #fdfbf6; --paper-edge: #e8dfcf; --board: #0e1a2b;
  position: relative; max-width: 1120px; margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); perspective: 2600px;
}
/* the hardcover board behind the pages */
.book-spread::before {
  content: ''; position: absolute; inset: -14px -16px -18px; z-index: -1; border-radius: 12px; background: var(--board);
  box-shadow: 0 60px 90px -50px rgba(14, 26, 43, 0.7), 0 20px 30px -20px rgba(14, 26, 43, 0.4);
}
.page { position: relative; background: var(--paper); padding: clamp(36px, 4.5vw, 64px); min-height: 640px; }
.page--left {
  border-radius: 8px 0 0 8px;
  background: linear-gradient(270deg, rgba(14, 26, 43, 0.12), rgba(14, 26, 43, 0) 9%), var(--paper);
  box-shadow: -2px 2px 0 var(--paper-edge), -4px 4px 0 var(--paper), -5px 5px 0 var(--paper-edge);
  display: flex; flex-direction: column;
}
.page--right {
  grid-column: 2; grid-row: 1; border-radius: 0 8px 8px 0;
  background: linear-gradient(90deg, rgba(14, 26, 43, 0.14), rgba(14, 26, 43, 0) 9%), var(--paper);
  box-shadow: 2px 2px 0 var(--paper-edge), 4px 4px 0 var(--paper), 5px 5px 0 var(--paper-edge);
}
.page-num { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; font-style: italic; font-size: 0.9rem; color: #a59c8c; }
.page--left .page-lead { margin-top: 20px; }
.contact-elsewhere { margin-top: auto; padding-top: 40px; }
.contact-elsewhere .social-list--stack { margin-top: 14px; }

/* ribbon bookmark hanging from the head of the right page */
.ribbon { position: absolute; top: -14px; right: 56px; width: 22px; height: 96px; background: var(--crimson); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 84%, 0 100%); box-shadow: inset -4px 0 0 rgba(0, 0, 0, 0.12); }

/* the turning leaf: left page on one face, the cover on the other */
.leaf { position: relative; grid-column: 1; grid-row: 1; transform-style: preserve-3d; transform-origin: right center; }
.leaf-page { height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.leaf-cover {
  position: absolute; inset: -14px -2px -18px -16px; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  border-radius: 12px 4px 4px 12px; color: #fff;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), transparent 6%), radial-gradient(ellipse at 30% 20%, #1b2d48, var(--board) 70%);
  transform: rotateY(180deg); backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.leaf-cover-mark { display: grid; place-items: center; width: 150px; height: 150px; border: 1.5px solid var(--gold); border-radius: 50%; font-family: var(--display); font-size: 2.6rem; padding-top: 6px; }
.leaf-cover-name { font-family: var(--display); font-size: 1.5rem; letter-spacing: 0.02em; }

/* writing paper */
.form { position: relative; display: grid; gap: 22px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: grid; gap: 2px; }
.field label { font-family: var(--sans); font-weight: 600; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.optional { font-weight: 400; letter-spacing: 0.02em; text-transform: none; margin-left: 4px; }
.field input, .field textarea {
  width: 100%; font-family: var(--serif); font-style: italic; font-size: 1.18rem; color: var(--ink); caret-color: var(--crimson);
  background: transparent; border: 0; border-radius: 0; padding: 8px 2px 6px; min-height: 46px;
  border-bottom: 1px solid #cdbfa8; transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.field textarea {
  --line: 2.1rem; min-height: calc(var(--line) * 6 + 8px); resize: vertical; line-height: var(--line); padding-top: 4px; border-bottom: 0;
  background: repeating-linear-gradient(transparent 0, transparent calc(var(--line) - 1px), #cdbfa8 calc(var(--line) - 1px), #cdbfa8 var(--line));
  background-attachment: local;
}
.field input:hover, .field textarea:hover { border-color: #a99a80; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--crimson); background-color: rgba(166, 30, 45, 0.03); }
.field [aria-invalid='true'] { border-color: var(--crimson); }
.field-error { font-family: var(--sans); font-size: 0.85rem; color: var(--crimson); margin-top: 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { min-height: 65px; }
.form-status:empty { display: none; }
.form-status { padding: 12px 14px; border-radius: 10px; font-family: var(--sans); font-size: 0.95rem; background: #f1ebe0; }
.form-status.is-error { background: #fdf3f4; color: var(--crimson-deep); }
.form-status.is-ok { background: #eaf3ec; color: #1d5a32; }
.form .btn { justify-self: start; }
.form.is-sent .field, .form.is-sent .field-row, .form.is-sent .cf-turnstile, .form.is-sent .btn { display: none; }
.form.is-sent { min-height: 480px; align-content: center; }
.form.is-sent .form-status { background: none; padding: 0; text-align: center; color: var(--ink); font-family: var(--display); font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.6rem); line-height: 1.2; }
.form.is-sent .form-status::before { content: ''; display: block; width: 48px; height: 2px; margin: 0 auto 24px; background: var(--crimson); }
@media (prefers-reduced-motion: no-preference) { .form.is-sent .form-status { animation: fade-up 0.8s var(--ease) both; } }

/* desktop: the book arrives closed and opens */
@media (min-width: 861px) {
  .leaf-cover { display: flex; }
  .page { min-height: 660px; }
}
@media (min-width: 861px) and (prefers-reduced-motion: no-preference) {
  .leaf { animation: book-open 0.7s 0.1s cubic-bezier(0.45, 0, 0.2, 1) both; }
  .book-spread::before { animation: board-in 0.7s 0.1s cubic-bezier(0.45, 0, 0.2, 1) both; }
  .page--right > * { animation: fade-up 0.5s 0.6s var(--ease) both; }
  @keyframes book-open { from { transform: rotateY(180deg); } to { transform: rotateY(0deg); } }
  @keyframes board-in { from { clip-path: inset(0 0 0 50%); } to { clip-path: inset(0 0 0 0); } }
}

/* small screens: two pages, stacked */
@media (max-width: 860px) {
  .contact-page .wrap { padding-inline: 14px; }
  .book-spread { grid-template-columns: minmax(0, 1fr); gap: 0; perspective: none; }
  .book-spread::before { inset: -10px -8px -12px; }
  .leaf, .page--right { grid-column: 1; grid-row: auto; }
  .page { min-height: 0; padding: 32px 18px 60px; }
  .page--left { border-radius: 8px 8px 0 0; box-shadow: none; background: linear-gradient(0deg, rgba(14, 26, 43, 0.1), rgba(14, 26, 43, 0) 7%), var(--paper); }
  .page--right { border-radius: 0 0 8px 8px; box-shadow: none; background: linear-gradient(180deg, rgba(14, 26, 43, 0.1), rgba(14, 26, 43, 0) 7%), var(--paper); }
  .ribbon { right: 28px; }
}
@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; }
  .form .btn { justify-self: stretch; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: var(--navy-text); padding-top: clamp(64px, 8vw, 104px); }
.site-footer a { text-decoration: none; transition: color 0.3s var(--ease); }
.site-footer a:hover { color: #fff; }
.site-footer :focus-visible { outline-color: #fff; }
.footer-top { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px; }
.footer-name { font-family: var(--display); font-size: clamp(2.2rem, 1.6rem + 2vw, 3.2rem); line-height: 1; color: #fff; }
.footer-tag { margin-top: 14px; font-style: italic; }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-h { font-family: var(--sans); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.footer-cols ul { display: grid; gap: 8px; font-family: var(--sans); font-size: 0.95rem; }
.footer-base { display: flex; justify-content: space-between; gap: 16px; margin-top: clamp(56px, 7vw, 88px); padding-block: 24px; border-top: 1px solid rgba(255, 255, 255, 0.1); font-family: var(--sans); font-size: 0.85rem; }
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .footer-cols { grid-template-columns: 1fr 1fr; } }

/* ---------- scroll reveals (enabled by main.js; content is visible without JS) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--d, 0) * 110ms); }
  .js [data-reveal='cover'] { transform: translateY(48px) rotate(2.5deg); transition-duration: 1.2s; }
  .js [data-reveal='soft'] { transform: translateY(10px); transition-duration: 0.7s; }
  .js [data-reveal='photo'] { opacity: 1; transform: none; clip-path: inset(14% 0 0 0 round 6px); transition: clip-path 1.4s var(--ease); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js [data-reveal='photo'].is-in { clip-path: inset(0 0 0 0 round 6px); }
}

/* ---------- print ---------- */
@media print {
  .site-header, .site-footer, .club-tabs-wrap, .club-hero, .club-note, .toc, .read-progress, .q-check, .btn { display: none !important; }
  .guide { display: block; }
  .guide[hidden] { display: none !important; }
  .guide-aside-inner { position: static; }
  .fun { background: #fff; color: #000; border: 1px solid #000; }
}
