/* =====================================================================
   Matthew Salter: shared design system
   Slate, deep coastal blue, woodland green and warm paper, with carrot-mine
   gold, moss and mineral blue for featured sections. Book pages receive
   --t-deep / --t-warm / --t-cool from their artwork (see build).
   ===================================================================== */

:root {
  /* North Wales foundation */
  --slate-950: #10171d;
  --slate-900: #18212a;
  --slate-800: #232e38;
  --slate-700: #34414d;
  --slate-500: #5d6b77;
  --slate-300: #a7b1b9;
  --sea-950: #0b1d2b;
  --sea-900: #0f2a3d;
  --sea-800: #143650;
  --sea-700: #1b4662;
  --sea-500: #2f6c8a;
  --wood-950: #121d15;
  --wood-900: #18281c;
  --wood-800: #213726;
  --wood-700: #2c4832;
  --wood-500: #52714a;
  --paper-50: #fbf7ef;
  --paper-100: #f5eee0;
  --paper-200: #ece0c9;
  --paper-300: #ddcaa6;
  --paper-400: #c9b083;

  /* Carrot-mine accents */
  --gold-300: #f0c873;
  --gold-400: #e4b04e;
  --gold-500: #c99230;
  --gold-700: #835a12;
  --moss-400: #9cb565;
  --mineral-300: #8fc6c9;
  --mineral-500: #3f8b93;
  --mineral-700: #245a61;
  --carrot-500: #d36a2c;

  --ink: #1b2128;
  --ink-soft: #444f59;
  --line: rgba(27, 33, 40, 0.14);
  --line-light: rgba(245, 238, 224, 0.18);

  /* Default theme (overridden per book) */
  --t-deep: #26313a;
  --t-warm: #e4b04e;
  --t-cool: #3f8b93;

  /* Type */
  --font-display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --font-body: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Atkinson Hyperlegible Mono', ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.88rem);
  --step-0: clamp(1.05rem, 1rem + 0.25vw, 1.15rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.25rem + 1vw, 1.95rem);
  --step-3: clamp(1.9rem, 1.5rem + 2vw, 2.9rem);
  --step-4: clamp(2.4rem, 1.7rem + 3.6vw, 4.4rem);
  --step-5: clamp(3rem, 1.6rem + 7vw, 7.2rem);

  --gutter: clamp(18px, 4vw, 56px);
  --wrap: 1360px;
  --wrap-narrow: 48rem;
  --space-section: clamp(2.75rem, 1.8rem + 3.2vw, 5rem);
  --radius: 3px;
  --shadow-book: 0 1px 1px rgba(0, 0, 0, 0.12), 0 10px 24px -8px rgba(10, 18, 24, 0.45), 0 30px 60px -30px rgba(10, 18, 24, 0.55);
  --focus: var(--sea-700);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 6rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper-50);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-kerning: normal;
  overflow-x: hidden;
}
img, picture, svg { display: block; max-width: 100%; height: auto; }
picture img { width: 100%; }
a { color: var(--sea-700); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.08; margin: 0 0 0.5em; font-optical-sizing: auto; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { padding-left: 1.2em; }
[role='list'] { list-style: none; padding: 0; margin: 0; }
figure { margin: 0; }
button { font: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* One container system: .wrap for page sections, .wrap-narrow for long reading. Both share the same gutters. */
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap-narrow { width: min(var(--wrap-narrow), 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--gold-400); color: var(--slate-950); padding: 0.7rem 1rem; font-weight: 700; text-decoration: none; transition: top 0.15s; }
.skip-link:focus { top: 1rem; }

/* Dark surfaces share these settings */
.site-header, .hero, .featured, .world, .book-hero, .site-footer, .about-hero, .author-intro__img.is-art {
  --focus: var(--gold-300);
}

/* ---------------------------------------------------------------- type helpers */
.eyebrow, .label, .art-label, .book-card__series, .buy-row__series, .profile__species, .crumbs, .post-card__meta, .article__meta, .latest__meta, .facts-title {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.eyebrow { color: var(--gold-300); margin: 0 0 1rem; }
.eyebrow--dark { color: var(--gold-700); }
.label { color: inherit; opacity: 0.75; margin-right: 0.4em; }
.display { font-size: var(--step-5); font-weight: 400; line-height: 0.95; letter-spacing: -0.025em; margin-bottom: 0.35em; }
.display em, .page-title em { font-style: italic; font-weight: 300; color: var(--gold-300); }
.section-title { font-size: var(--step-3); }
.page-title { font-size: var(--step-4); font-weight: 400; letter-spacing: -0.02em; }
.page-intro, .lede { font-size: var(--step-1); line-height: 1.5; max-width: 38rem; }
.text-link { font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.text-link:hover { border-bottom-width: 2px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  --btn-bg: var(--gold-400); --btn-fg: var(--slate-950); --btn-bd: var(--gold-400);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0.7rem 1.4rem;
  border: 1.5px solid var(--btn-bd); border-radius: var(--radius);
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; letter-spacing: 0.01em;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
  cursor: pointer;
}
.btn:hover { --btn-bg: var(--gold-300); --btn-bd: var(--gold-300); transform: translateY(-1px); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--paper-100); --btn-bd: rgba(245, 238, 224, 0.55); }
.btn--ghost:hover { --btn-bg: rgba(245, 238, 224, 0.1); --btn-fg: #fff; --btn-bd: var(--paper-100); }
.btn--dark { --btn-bg: var(--slate-900); --btn-fg: var(--paper-50); --btn-bd: var(--slate-900); }
.btn--dark:hover { --btn-bg: var(--sea-800); --btn-bd: var(--sea-800); }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--slate-900); --btn-bd: var(--slate-900); }
.btn--outline:hover { --btn-bg: var(--slate-900); --btn-fg: var(--paper-50); --btn-bd: var(--slate-900); }
.btn--small { min-height: 44px; padding: 0.5rem 1rem; font-size: 0.95rem; }
.btn--amazon { flex-direction: column; align-items: flex-start; gap: 0.1rem; }
.btn__meta { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.8; }
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.5rem 0 0; }

/* ---------------------------------------------------------------- header */
.site-header { background: var(--slate-950); color: var(--paper-100); position: relative; z-index: 20; border-bottom: 1px solid rgba(228, 176, 78, 0.35); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; flex-wrap: wrap; }
.brand { color: var(--paper-50); text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; padding: 0.6rem 0; }
.brand__name { font-family: var(--font-display); font-size: 1.45rem; font-weight: 500; letter-spacing: -0.01em; }
.brand__sub { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-300); margin-top: 0.2rem; }
.site-nav { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.15rem 1.3rem; }
.site-nav ul a { color: var(--paper-100); text-decoration: none; font-weight: 600; font-size: 0.98rem; padding: 0.6rem 0; display: inline-block; position: relative; }
.site-nav ul a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0.35rem; height: 1.5px; background: var(--gold-400); transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease); }
.site-nav ul a:hover::after, .site-nav ul a[aria-current='page']::after { transform: scaleX(1); }
.site-nav ul a[aria-current='page'] { color: var(--gold-300); }
.btn--buy[aria-current='page'] { box-shadow: inset 0 0 0 2px var(--slate-950); }

.nav-toggle { display: none; }
@media (max-width: 1080px) {
  .js .nav-toggle {
    display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; padding: 0.4rem 0.9rem;
    background: transparent; color: var(--paper-100); border: 1.5px solid rgba(245, 238, 224, 0.4); border-radius: var(--radius); cursor: pointer; font-weight: 700;
  }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: transform 0.2s, opacity 0.2s; }
  .nav-toggle__bars::before, .nav-toggle__bars::after { content: ''; position: absolute; left: 0; }
  .nav-toggle__bars::before { top: -6px; }
  .nav-toggle__bars::after { top: 6px; }
  .nav-toggle[aria-expanded='true'] .nav-toggle__bars { background: transparent; }
  .nav-toggle[aria-expanded='true'] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded='true'] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }
  .js .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 1rem; padding: 0.5rem 0 1.4rem; }
  .js .site-nav.is-open { display: flex; }
  .js .site-nav ul { flex-direction: column; gap: 0; }
  .js .site-nav ul a { display: block; padding: 0.85rem 0; border-bottom: 1px solid var(--line-light); font-size: 1.1rem; }
  .js .site-nav ul a::after { display: none; }
  .no-js .site-nav { padding-bottom: 1rem; }
}

/* Client preview */
.preview-banner { background: repeating-linear-gradient(-45deg, #f6d36b, #f6d36b 14px, #f1c84e 14px, #f1c84e 28px); color: #2a2000; text-align: center; font-size: 0.9rem; padding: 0.5rem var(--gutter); }
.preview-tag { display: inline-block; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; background: #f6d36b; color: #2a2000; padding: 0.2rem 0.5rem; border-radius: 2px; vertical-align: middle; }
.client-note { background: #fff6d6; color: #3a2e00; border-left: 4px solid #e5b62d; padding: 0.7rem 0.9rem; font-size: 0.92rem; margin: 1rem 0; max-width: 40rem; }
.client-note strong { font-weight: 700; }
figure .preview-tag { position: absolute; top: 0.75rem; right: 0.75rem; z-index: 2; }

/* ---------------------------------------------------------------- book visuals */
.book-visual { position: relative; aspect-ratio: 1838 / 2775; background: var(--slate-800); box-shadow: var(--shadow-book); overflow: hidden; border-radius: 2px; }
.book-visual picture, .book-visual img { width: 100%; height: 100%; object-fit: cover; }
.book-visual--cover { aspect-ratio: auto; }
.book-visual--cover img { object-fit: contain; height: auto; }
.book-visual::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.art-label {
  position: absolute; left: 0.6rem; bottom: 0.6rem; z-index: 1;
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500;
  background: rgba(16, 23, 29, 0.84); color: var(--paper-100); padding: 0.3rem 0.55rem; border-radius: 2px;
  backdrop-filter: blur(3px);
}
.book-visual--plate {
  display: grid; place-items: center;
  background:
    radial-gradient(120% 70% at 50% 110%, color-mix(in oklab, var(--t-warm) 30%, transparent), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='%23e4b04e' stroke-opacity='.16' stroke-width='1'%3E%3Cpath d='M-10 60c40-20 70 18 110 0s70-28 150 4'/%3E%3Cpath d='M-10 90c40-20 70 18 110 0s70-28 150 4'/%3E%3Cpath d='M-10 120c40-20 70 18 110 0s70-28 150 4'/%3E%3Cpath d='M-10 150c40-20 70 18 110 0s70-28 150 4'/%3E%3Cpath d='M-10 180c40-20 70 18 110 0s70-28 150 4'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(170deg, var(--sea-900), var(--slate-950));
}
.plate-mark { width: 30%; max-width: 90px; height: auto; color: rgba(240, 200, 115, 0.5); margin-bottom: 10%; }

/* ---------------------------------------------------------------- purchase states */
.purchase { margin: 0; }
.buy-options { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.purchase__small { font-size: 0.9rem; margin: 0.7rem 0 0; opacity: 0.85; }
.status { display: inline-flex; align-items: center; gap: 0.6rem; margin: 0; padding: 0.55rem 0.9rem; min-height: 44px; border: 1.5px dashed currentColor; border-radius: var(--radius); font-weight: 700; font-size: 0.95rem; }
.status__dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: currentColor; opacity: 0.8; }
.status--soon { border-style: solid; }

/* ---------------------------------------------------------------- HOME hero */
.hero { position: relative; isolation: isolate; color: var(--paper-100); background: var(--sea-950); overflow: hidden; }
.hero__sky { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__sky::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(60% 75% at 78% 42%, color-mix(in oklab, var(--t-warm) 38%, transparent) 0%, transparent 62%),
    radial-gradient(55% 60% at 98% 100%, color-mix(in oklab, var(--t-cool) 55%, transparent) 0%, transparent 70%),
    radial-gradient(70% 90% at 0% 0%, var(--sea-800) 0%, transparent 65%),
    linear-gradient(160deg, var(--sea-900) 0%, var(--sea-950) 45%, color-mix(in oklab, var(--t-deep) 70%, var(--sea-950)) 100%);
}
.hero__glow { position: absolute; width: 46vmax; height: 46vmax; right: -6vmax; top: 6%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in oklab, var(--gold-300) 26%, transparent), transparent); filter: blur(10px); opacity: 0.8; }
.hero__grain { position: absolute; inset: 0; opacity: 0.08; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* Penmon light: a slow sweeping beam from behind the featured art */
.beam {
  position: absolute; left: 74%; top: 38%;
  width: 260vmax; height: 260vmax; translate: -50% -50%;
  background: conic-gradient(from 0deg,
      transparent 0deg 318deg,
      rgba(255, 236, 190, 0.05) 330deg,
      rgba(255, 240, 205, 0.16) 344deg,
      rgba(255, 244, 215, 0.2) 348deg,
      rgba(255, 236, 190, 0.05) 356deg,
      transparent 360deg);
  -webkit-mask-image: radial-gradient(circle at center, transparent 0, #000 3%, #000 30%, transparent 46%);
  mask-image: radial-gradient(circle at center, transparent 0, #000 3%, #000 30%, transparent 46%);
  rotate: 200deg;
  mix-blend-mode: screen;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .js .beam { animation: sweep 26s linear infinite; }
  .js .hero__glow { animation: breathe 13s ease-in-out infinite alternate; }
  .motion-paused .beam, .motion-paused .hero__glow { animation-play-state: paused; }
}
@keyframes sweep { from { rotate: 0deg; } to { rotate: 360deg; } }
@keyframes breathe { from { opacity: 0.55; transform: scale(0.96); } to { opacity: 0.9; transform: scale(1.04); } }

.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding-block: clamp(1.75rem, 3.5vw, 3rem) clamp(3.5rem, 6vw, 5rem); }
.hero__text .lede { color: color-mix(in oklab, var(--paper-100) 92%, transparent); max-width: 34rem; }
.hero__art { justify-self: end; width: min(100%, 460px, max(300px, (100svh - 250px) * 0.662)); position: relative; }
.hero__art-link { display: block; transition: transform 0.4s var(--ease); }
.hero__art-link:hover { transform: translateY(-4px) rotate(-0.4deg); }
.hero__art .book-visual { box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2), 0 30px 60px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.06); }
.hero__art figcaption { margin-top: 1rem; font-size: 0.95rem; color: var(--paper-200); }
.hero__art figcaption .label { color: var(--gold-300); opacity: 1; }

.motion-toggle {
  position: absolute; right: var(--gutter); bottom: 1.1rem; z-index: 3;
  display: inline-flex; align-items: center; gap: 0.55rem; min-height: 44px; padding: 0.4rem 0.85rem;
  background: rgba(11, 29, 43, 0.72); color: var(--paper-100); border: 1px solid rgba(245, 238, 224, 0.35); border-radius: 999px;
  font-size: 0.85rem; font-weight: 600; cursor: pointer; backdrop-filter: blur(4px);
}
.motion-toggle:hover { border-color: var(--paper-100); }
.motion-toggle__icon { width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.motion-paused .motion-toggle__icon { border: 0; width: 0; height: 0; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.book-hero .motion-toggle { position: static; margin-top: 1.5rem; }

/* ---------------------------------------------------------------- HOME featured */
.featured {
  position: relative; color: var(--paper-100); padding-block: var(--space-section);
  background:
    radial-gradient(70% 60% at 15% 20%, color-mix(in oklab, var(--gold-400) 30%, transparent), transparent 60%),
    radial-gradient(60% 70% at 100% 100%, color-mix(in oklab, var(--mineral-500) 55%, transparent), transparent 65%),
    linear-gradient(135deg, var(--wood-900) 0%, var(--wood-950) 45%, #10242a 100%);
}
.featured__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.featured__art { position: relative; aspect-ratio: 1 / 1.08; }
.featured__plate { position: absolute; width: 62%; box-shadow: var(--shadow-book); border-radius: 2px; overflow: hidden; }
.featured__plate--a { left: 0; top: 0; rotate: -3deg; }
.featured__plate--b { right: 0; bottom: 0; rotate: 2.5deg; border: 6px solid var(--paper-100); }
.featured__tagline { font-family: var(--font-display); font-style: italic; font-size: var(--step-2); line-height: 1.25; color: var(--gold-300); }
.story-list { margin: 1.2rem 0 1.5rem; border-top: 1px solid var(--line-light); }
.story-list li { padding: 0.9rem 0; border-bottom: 1px solid var(--line-light); color: var(--paper-200); }
.story-list__title { display: block; font-family: var(--font-display); font-size: var(--step-1); color: var(--paper-50); margin-bottom: 0.15rem; }
.featured__actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.featured .status { color: var(--gold-300); }

/* ---------------------------------------------------------------- HOME shelf */
.shelf { padding-block: var(--space-section); background: var(--paper-100); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.section-head .section-title { margin: 0; }
.shelf__row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.8rem); }
@media (max-width: 1100px) {
  .shelf__row { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(200px, 34%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1.2rem; scrollbar-width: thin; }
  .shelf__row > * { scroll-snap-align: start; }
}
@media (max-width: 560px) { .shelf__row { grid-auto-columns: 68%; } }

.book-card { display: flex; flex-direction: column; gap: 0.6rem; }
.book-card__link { display: flex; flex-direction: column; gap: 0.75rem; color: inherit; text-decoration: none; }
.book-card__link .book-visual { transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.book-card__link:hover .book-visual, .book-card__link:focus-visible .book-visual { transform: translateY(-5px); box-shadow: 0 2px 2px rgba(0, 0, 0, 0.12), 0 22px 40px -14px rgba(10, 18, 24, 0.55); }
.book-card__link:focus-visible { outline: none; }
.book-card__link:focus-visible .book-card__title { outline: 3px solid var(--focus); outline-offset: 3px; }
.book-card__series { color: color-mix(in oklab, var(--t-cool) 55%, var(--ink)); margin-top: 0.4rem; font-size: 0.72rem; }
.book-card__title { font-size: var(--step-2); margin: 0; }
.book-card__link:hover .book-card__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
.book-card__tagline { font-size: 0.95rem; color: var(--ink-soft); margin: 0; }
.book-card__contents { font-size: 0.9rem; margin: 0; color: var(--ink-soft); }
.book-card .status { color: var(--ink-soft); font-size: 0.82rem; min-height: 36px; padding: 0.3rem 0.7rem; margin-top: 0.2rem; align-self: flex-start; }

/* ---------------------------------------------------------------- HOME story world */
.world { color: var(--paper-100); }
.world__above { background: linear-gradient(180deg, #d9e2df 0%, #c5d3cf 100%); color: var(--ink); padding-block: var(--space-section) 0.5rem; --focus: var(--sea-700); }
.world__above .eyebrow { color: var(--wood-700); }
.world__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.world__intro p:last-child { font-size: var(--step-1); line-height: 1.55; }
.places { margin: 0; display: grid; gap: 1.2rem; }
.places > div { border-top: 1px solid var(--line); padding-top: 1rem; }
.places dt { font-family: var(--font-display); font-size: var(--step-1); margin-bottom: 0.2rem; }
.places dd { margin: 0; color: var(--ink-soft); }
.world__roots { background: #c5d3cf; color: #2b2119; line-height: 0; }
.world__roots svg { width: 100%; height: clamp(50px, 8vw, 110px); }
.world__below { background: linear-gradient(180deg, #2b2119 0%, #1f1a15 40%, #14211f 100%); padding-block: 0.5rem var(--space-section); position: relative; }
.world__below::before { content: ''; position: absolute; inset: 0; background: radial-gradient(40% 50% at 25% 40%, color-mix(in oklab, var(--gold-400) 22%, transparent), transparent 70%), radial-gradient(40% 40% at 90% 90%, color-mix(in oklab, var(--mineral-500) 30%, transparent), transparent 70%); pointer-events: none; }
.world__grid--below { position: relative; align-items: center; }
.world__art { position: relative; }
.world__art picture { box-shadow: var(--shadow-book); border-radius: 2px; overflow: hidden; }
.world__art figcaption { margin-top: 0.8rem; color: var(--paper-300); font-size: 0.9rem; }
.places--below > div { border-color: var(--line-light); }
.places--below dd { color: var(--paper-200); }
.places--below dt { color: var(--gold-300); }
.places__more a { color: var(--paper-50); }

/* ---------------------------------------------------------------- HOME author + latest */
.author-intro { padding-block: var(--space-section); background: var(--paper-50); }
.author-intro__grid { display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.author-intro__img { position: relative; max-width: 380px; }
.author-intro__img picture { border-radius: 2px; overflow: hidden; box-shadow: var(--shadow-book); }
.author-intro__img.is-portrait picture { aspect-ratio: 4 / 5; }
.author-intro__img.is-portrait img { height: 100%; object-fit: cover; object-position: 50% 30%; }
.author-intro__text p:not(.eyebrow) { font-size: var(--step-1); line-height: 1.55; max-width: 36rem; }
.latest { padding-block: 0 var(--space-section); }
.latest__inner { border-top: 1px solid var(--line); padding-top: 2rem; }
.latest__inner > * { max-width: 46rem; }
.latest .section-title a { color: inherit; text-decoration: none; }
.latest .section-title a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- inner page heads */
.page-head { padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(2.5rem, 5vw, 4rem); background: var(--paper-100); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-head::after { content: ''; position: absolute; right: -4rem; top: -2rem; width: min(46vw, 560px); aspect-ratio: 1; opacity: 0.55; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Cg fill='none' stroke='%231b4662' stroke-opacity='.16'%3E%3Cpath d='M200 40c90 0 150 60 150 150s-70 170-160 170S40 290 50 200 110 40 200 40z'/%3E%3Cpath d='M200 70c70 0 120 50 120 122s-60 136-130 136S72 280 80 200s50-130 120-130z'/%3E%3Cpath d='M200 100c55 0 92 40 92 94s-44 104-100 104-84-44-80-100 33-98 88-98z'/%3E%3Cpath d='M200 130c38 0 64 28 64 66s-30 72-70 72-56-30-54-70 22-68 60-68z'/%3E%3Cpath d='M200 160c20 0 34 16 34 36s-16 40-38 40-30-18-28-38 14-38 32-38z'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain; }
.page-head > .wrap { position: relative; z-index: 1; }
.page-head--books { background: linear-gradient(120deg, var(--paper-100), #e9e3d2); }
.page-head--characters { background: linear-gradient(120deg, #e8eadf, var(--paper-100)); }
.page-head--tales { background: linear-gradient(120deg, #efe2c8, var(--paper-100)); }
.page-head--buy { background: linear-gradient(120deg, #e3e9e8, var(--paper-100)); }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.3rem; padding: 0; margin: 0 0 1rem; font-size: 0.72rem; }
.crumbs li:not(:last-child)::after { content: '/'; margin-left: 0.4rem; opacity: 0.5; }
.crumbs a { color: inherit; }
.crumbs [aria-current] { opacity: 0.7; }

/* ---------------------------------------------------------------- BOOKS catalogue */
.catalogue { padding-block: var(--space-section) 2rem; display: grid; gap: var(--space-section); }
.catalogue-group__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 4rem; align-items: end; margin-bottom: 1.75rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.catalogue-group__head .eyebrow { grid-column: 1 / -1; }
.catalogue-group__head .section-title { margin: 0; }
.catalogue-group__head p:last-child { margin: 0; color: var(--ink-soft); }
.catalogue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: clamp(2rem, 3vw, 3rem) clamp(1.2rem, 2.5vw, 2.4rem); }
.note-panel { margin-bottom: var(--space-section); padding: 1.6rem clamp(1.2rem, 3vw, 2.5rem); background: var(--paper-100); border-left: 4px solid var(--gold-500); }
.note-panel h2 { font-size: var(--step-2); }
.note-panel p { margin: 0; max-width: 46rem; }

/* ---------------------------------------------------------------- BOOK page */
.book-hero {
  position: relative; isolation: isolate; overflow: hidden; color: var(--paper-100);
  padding-block: clamp(1.25rem, 2.5vw, 2rem) clamp(2.25rem, 4.5vw, 3.75rem);
  background:
    radial-gradient(55% 70% at 18% 40%, color-mix(in oklab, var(--t-warm) 30%, transparent), transparent 65%),
    radial-gradient(60% 70% at 100% 100%, color-mix(in oklab, var(--t-cool) 45%, transparent), transparent 70%),
    linear-gradient(150deg, color-mix(in oklab, var(--t-deep) 55%, var(--slate-950)) 0%, var(--slate-950) 100%);
}
.book-hero__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.beam--book { left: 22%; top: 42%; opacity: 0.8; }
.book-hero .crumbs { color: var(--paper-200); }
.book-hero__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.book-hero__visual { max-width: 440px; }
.book-hero__visual .client-note { margin-top: 1rem; }
.book-title { font-size: var(--step-5); font-weight: 400; letter-spacing: -0.025em; line-height: 0.95; margin: 0 0 0.25em; }
.book-hero__series { font-family: var(--font-display); font-style: italic; font-size: var(--step-1); color: var(--paper-200); margin-top: -0.2rem; }
.book-hero__tagline { font-size: var(--step-1); max-width: 34rem; line-height: 1.5; }
.book-hero .eyebrow { color: color-mix(in oklab, var(--t-warm) 70%, var(--paper-50)); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.2rem 0 1.8rem; }
.chips li { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.3rem 0.6rem; border: 1px solid rgba(245, 238, 224, 0.35); border-radius: 2px; color: var(--paper-200); }
.book-hero__buy .status { color: var(--paper-50); border-color: color-mix(in oklab, var(--t-warm) 70%, var(--paper-50)); }
.book-hero__buy .status__dot { background: var(--t-warm); opacity: 1; }
.book-hero__buy .purchase__small { color: var(--paper-200); }

.book-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 0 clamp(2rem, 6vw, 6rem); padding-block: var(--space-section); }
.book-body > section, .book-pager { grid-column: 1 / -1; }
.book-body > .synopsis { grid-column: 1; }
.book-body > .book-facts { grid-column: 2; align-self: start; }
.synopsis p { font-size: var(--step-1); line-height: 1.65; max-width: 40rem; }
.synopsis p:first-of-type::first-letter { font-family: var(--font-display); float: left; font-size: 4.4em; line-height: 0.82; padding: 0.06em 0.1em 0 0; color: color-mix(in oklab, var(--t-cool) 60%, var(--ink)); }
.book-facts { border-top: 3px solid color-mix(in oklab, var(--t-warm) 70%, var(--ink)); padding-top: 1.2rem; }
.facts-title { font-family: var(--font-mono); font-size: 0.78rem; margin-bottom: 1rem; }
.book-facts dl { margin: 0; }
.book-facts dl > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.book-facts dt { font-weight: 700; font-size: 0.92rem; }
.book-facts dd { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.contents, .gallery, .cast { margin-top: var(--space-section); }
.contents-list li { display: grid; grid-template-columns: 4rem 1fr; gap: 1rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.contents-list li:last-child { border-bottom: 1px solid var(--line); }
.contents-list__n { font-family: var(--font-display); font-size: var(--step-3); line-height: 1; color: color-mix(in oklab, var(--t-cool) 55%, var(--ink)); font-weight: 300; }
.contents-list h3 { font-size: var(--step-2); margin-bottom: 0.3rem; }
.contents-list p { margin: 0; color: var(--ink-soft); max-width: 40rem; }
.gallery__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: clamp(1.4rem, 3vw, 2.4rem) clamp(1rem, 2.5vw, 2rem); align-items: start; }
.gallery__item picture { box-shadow: var(--shadow-book); border-radius: 2px; overflow: hidden; }
.gallery__item figcaption { font-size: 0.92rem; color: var(--ink-soft); margin-top: 0.7rem; }
.cast__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 1rem; }
.cast__link { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto; column-gap: 0.9rem; align-items: center; padding: 0.7rem; border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; background: var(--paper-50); transition: border-color 0.2s, background 0.2s; min-height: 88px; }
.cast__link:hover { border-color: var(--ink); background: #fff; }
.cast__link picture, .cast__initial { grid-row: 1 / 3; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; }
.cast__link img { height: 100%; object-fit: cover; }
.cast__initial { display: grid; place-items: center; background: var(--sea-800); color: var(--gold-300); font-family: var(--font-display); font-size: 1.6rem; }
.cast__name { font-family: var(--font-display); font-size: 1.15rem; align-self: end; }
.cast__species { font-size: 0.82rem; color: var(--ink-soft); align-self: start; }
.book-pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; margin-top: var(--space-section); padding-top: 2rem; border-top: 1px solid var(--line); }
.book-pager a { color: var(--ink); text-decoration: none; font-family: var(--font-display); font-size: var(--step-1); display: flex; flex-direction: column; min-height: 44px; justify-content: center; }
.book-pager a:hover { text-decoration: underline; }
.book-pager .label { font-family: var(--font-mono); font-size: 0.72rem; }
.book-pager__next { text-align: right; align-items: flex-end; }
.book-pager__all { font-family: var(--font-body) !important; font-size: 0.95rem !important; font-weight: 700; padding: 0.5rem 1rem; border: 1.5px solid var(--ink); border-radius: var(--radius); }

/* ---------------------------------------------------------------- BUY */
.market-switch { border: 0; padding: 0; margin: 1.8rem 0 0; display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.market-switch legend { float: left; margin-right: 0.6rem; font-weight: 700; }
.market-switch label { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0.4rem 0.9rem; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--paper-50); cursor: pointer; }
.market-switch label:has(input:checked) { border-color: var(--ink); background: #fff; }
.buy-list { padding-block: clamp(1.5rem, 3vw, 2.5rem); display: grid; gap: 1.2rem; }
.buy-row {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: clamp(1rem, 3vw, 2.2rem); align-items: center;
  padding: clamp(1rem, 2.5vw, 1.6rem); background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  border-left: 5px solid color-mix(in oklab, var(--t-warm) 75%, var(--ink));
}
.buy-row:target { box-shadow: 0 0 0 3px var(--gold-400); }
.buy-row__thumb .book-visual { box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.45); }
.buy-row__thumb .art-label { font-size: 0.5rem; left: 0; right: 0; bottom: 0; padding: 0.2rem 0.25rem; letter-spacing: 0.02em; white-space: nowrap; text-align: center; border-radius: 0; }
.buy-row__thumb .plate-mark { width: 40%; margin-bottom: 30%; }
.buy-row__series { margin: 0 0 0.3rem; color: var(--ink-soft); font-size: 0.72rem; }
.buy-row__title { font-size: var(--step-2); margin: 0 0 0.3rem; }
.buy-row__title a { color: inherit; text-decoration: none; }
.buy-row__title a:hover { text-decoration: underline; }
.buy-row__contents, .buy-row__editions { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.buy-row__action .status { color: var(--ink-soft); }
.buy-help { padding-block: 1rem var(--space-section); }
.buy-help__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; }
.buy-help h3 { font-size: var(--step-1); }
.buy-help p { color: var(--ink-soft); }
.js .buy-option[data-hidden] { display: none; }

/* ---------------------------------------------------------------- ABOUT */
.about-hero { background: linear-gradient(150deg, var(--wood-900), var(--slate-950) 70%); color: var(--paper-100); padding-block: clamp(1.5rem, 3vw, 2.75rem) clamp(2rem, 4vw, 3.25rem); position: relative; overflow: hidden; }
.about-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(45% 60% at 85% 30%, rgba(228, 176, 78, 0.18), transparent 70%); }
.about-hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.about-hero .crumbs { color: var(--paper-200); }
.about-hero .page-intro { color: var(--paper-200); }
.about-hero__img { position: relative; justify-self: end; width: min(100%, 400px); }
.about-hero__img picture { border-radius: 2px; overflow: hidden; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.7); }
.about-hero__img.is-portrait picture { aspect-ratio: 4 / 5; }
.about-hero__img.is-portrait img { height: 100%; object-fit: cover; object-position: 50% 28%; }
.prose-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: clamp(2rem, 6vw, 6rem); padding-block: var(--space-section); align-items: start; }
.prose { max-width: 42rem; }
.prose h2 { font-size: var(--step-3); margin-top: 1.6em; }
.prose h3 { font-size: var(--step-2); margin-top: 1.8em; }
.prose p, .prose li { line-height: 1.7; }
.prose__lead { font-size: var(--step-1); line-height: 1.6 !important; }
.prose__lead::first-line { font-weight: 700; }
.pull { margin: 1.8rem 0; padding: 0 0 0 1.6rem; border-left: 3px solid var(--gold-500); }
.pull p { font-family: var(--font-display); font-style: italic; font-weight: 300; font-size: var(--step-2); line-height: 1.3; margin-bottom: 0.6rem; }
.pull cite { font-family: var(--font-mono); font-style: normal; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.prose__wide { position: relative; margin: 2.4rem 0; }
.prose__wide picture { border-radius: 2px; overflow: hidden; }
.prose__wide figcaption { font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.6rem; }
.prose blockquote { margin: 2rem 0; padding-left: 1.4rem; border-left: 3px solid var(--gold-500); font-family: var(--font-display); font-style: italic; font-size: var(--step-1); }
.prose-aside { position: sticky; top: 2rem; display: grid; gap: 1.5rem; }
.aside-card { padding: 1.6rem; background: var(--paper-100); border-top: 3px solid var(--wood-500); }
.aside-card h2 { font-size: var(--step-1); }
.aside-card .btn { width: 100%; text-align: center; }
.aside-card--quiet { background: transparent; border: 1px solid var(--line); }

/* ---------------------------------------------------------------- CHARACTERS */
.jump ul { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0.4rem 0.95rem; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper-50); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.jump a:hover { border-color: var(--ink); }
.profiles { padding-block: var(--space-section); display: grid; gap: clamp(2.5rem, 5vw, 4.25rem); }
.profile { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; scroll-margin-top: 2rem; }
/* Alternate profiles mirror the first: text takes the wide column, image sits flush right */
.profile--alt { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.profile--alt .profile__img { order: 2; justify-self: end; width: 100%; }
.profile__img { width: 100%; }
.profile__img { position: relative; max-width: 420px; }
.profile__img > picture, .portrait-plate { border-radius: 50% 50% 3px 3px / 36% 36% 3px 3px; overflow: hidden; box-shadow: var(--shadow-book); aspect-ratio: 1; }
.profile__img > picture img { height: 100%; object-fit: cover; }
.portrait-plate { position: relative; display: grid; place-items: center; background: radial-gradient(70% 60% at 50% 100%, rgba(228, 176, 78, 0.35), transparent 70%), linear-gradient(170deg, var(--sea-800), var(--slate-950)); }
.portrait-plate > span:first-child { font-family: var(--font-display); font-style: italic; font-weight: 300; font-size: clamp(5rem, 14vw, 9rem); color: rgba(245, 238, 224, 0.4); line-height: 1; }
.profile__inset { position: absolute; right: -1rem; bottom: -2.5rem; width: 42%; background: var(--paper-50); padding: 0.5rem 0.5rem 0.4rem; box-shadow: var(--shadow-book); rotate: 3deg; }
.profile--alt .profile__inset { right: auto; left: -1rem; rotate: -3deg; }
.profile__inset figcaption { font-size: 0.75rem; color: var(--ink-soft); margin-top: 0.35rem; line-height: 1.3; }
.profile__species { color: var(--wood-700); margin: 0 0 0.5rem; }
.profile__name { font-size: var(--step-4); font-weight: 400; margin-bottom: 0.3rem; }
.profile__lede { font-family: var(--font-display); font-style: italic; font-size: var(--step-1); line-height: 1.4; color: var(--sea-700); }
.profile__text > p { max-width: 46rem; }
.profile__facts { margin: 1.6rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.profile__facts > div { background: var(--paper-50); padding: 0.8rem 1rem; }
.profile__facts dt { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.profile__facts dd { margin: 0.2rem 0 0; font-weight: 600; font-size: 0.98rem; }
.profile__books { font-size: 0.98rem; }

/* ---------------------------------------------------------------- TALES */
.tales { padding-block: var(--space-section); display: grid; gap: 2.5rem; }
.post-card { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.post-card__img picture { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 2px; }
.post-card__img img { height: 100%; object-fit: cover; }
.post-card__meta { color: var(--ink-soft); }
.post-card__title { font-size: var(--step-3); }
.post-card__title a { color: inherit; text-decoration: none; }
.post-card__title a:hover { text-decoration: underline; }
.empty-state { max-width: 40rem; margin-inline: auto; text-align: center; padding: clamp(1rem, 3vw, 2rem) 1rem; }
.empty-state h2 { font-size: var(--step-3); }
.empty-state p { color: var(--ink-soft); }
.empty-state__actions { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; justify-content: center; align-items: center; margin-top: 2rem; }
.empty-state__lantern { width: 64px; height: 92px; margin: 0 auto 1.8rem; position: relative; border: 2px solid var(--gold-700); border-radius: 18px 18px 10px 10px; background: radial-gradient(circle at 50% 60%, var(--gold-300), rgba(228, 176, 78, 0.15) 60%, transparent 70%); }
.empty-state__lantern::before { content: ''; position: absolute; left: 50%; top: -18px; width: 24px; height: 16px; translate: -50% 0; border: 2px solid var(--gold-700); border-bottom: 0; border-radius: 12px 12px 0 0; }
@media (prefers-reduced-motion: no-preference) { .js .empty-state__lantern { animation: flicker 4s ease-in-out infinite; } }
@keyframes flicker { 0%, 100% { filter: brightness(1); } 45% { filter: brightness(1.12); } 55% { filter: brightness(0.92); } }
.article { padding-bottom: var(--space-section); }
.article__head { padding-block: clamp(1.5rem, 3vw, 2.5rem) 1.25rem; }
.article__title { font-size: var(--step-4); font-weight: 400; }
.article__summary { font-size: var(--step-1); color: var(--ink-soft); }
.article__meta { color: var(--ink-soft); }
.article__figure { margin-bottom: 2.5rem; }
.article__figure picture { border-radius: 2px; overflow: hidden; max-height: 70vh; }
.article__figure img { max-height: 70vh; object-fit: cover; }
.article__figure figcaption { font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.6rem; }
.article__body.prose { max-width: none; }
.article__related { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.article__back { margin-top: 2rem; }

/* ---------------------------------------------------------------- CONTACT / EVENTS / 404 */
.contact { padding-block: var(--space-section); background: linear-gradient(180deg, var(--paper-100), var(--paper-50)); }
.contact__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.contact__email { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 2rem; }
.contact__address { font-family: var(--font-mono); font-size: 0.95rem; }
.contact__pending { margin-top: 2rem; }
.contact__pending .status { color: var(--sea-700); }
.contact__pending p:last-child { margin-top: 0.8rem; color: var(--ink-soft); }
.contact__notes { padding: 1.8rem; background: #fff; border-top: 3px solid var(--sea-500); }
.contact__notes h2 { font-size: var(--step-1); }
.contact__notes li { margin-bottom: 0.4rem; color: var(--ink-soft); }
.events { padding-block: var(--space-section); }
.event-list { display: grid; gap: 1.5rem; }
.event { padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.event__date { font-family: var(--font-mono); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--wood-700); }
.event__title { font-size: var(--step-2); }
.lost { padding-block: var(--space-section); }
.lost__inner > * { max-width: 42rem; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--slate-950); color: var(--paper-200); padding-block: 2.5rem 1.75rem; border-top: 3px solid var(--gold-500); }
.site-footer__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 2rem 4rem; }
.site-footer__name { font-family: var(--font-display); font-size: 1.6rem; color: var(--paper-50); margin-bottom: 0.4rem; }
.site-footer__about p:last-child { max-width: 26rem; }
.site-footer__links { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 1.5rem; }
.site-footer__links a { color: var(--paper-100); text-decoration: none; display: inline-block; padding: 0.5rem 0; }
.site-footer__links a:hover { color: var(--gold-300); text-decoration: underline; }
.site-footer__small { grid-column: 1 / -1; font-size: 0.85rem; color: var(--slate-300); border-top: 1px solid var(--line-light); padding-top: 1.5rem; margin: 0; }

/* ---------------------------------------------------------------- reveal on scroll (only once JS has set up the observer) */
.io .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.io .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .io .reveal { transform: none; transition: opacity 0.3s linear; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .hero__grid, .featured__grid, .world__grid, .author-intro__grid, .book-hero__grid, .about-hero__grid, .prose-layout, .contact__grid, .profile, .catalogue-group__head, .site-footer__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__art { justify-self: start; width: min(100%, 420px); }
  .featured__art { max-width: 520px; width: 100%; }
  .author-intro__img { max-width: 300px; }
  .book-hero__visual { max-width: min(300px, 62vw); }
  .book-hero__grid { gap: 1.8rem; }
  .book-body { grid-template-columns: minmax(0, 1fr); }
  .book-body > .synopsis, .book-body > .book-facts { grid-column: 1; }
  .book-facts { margin-top: 2.5rem; }
  .about-hero__img { justify-self: start; width: min(100%, 320px); }
  .prose-aside { position: static; }
  .profile--alt .profile__img { order: 0; justify-self: start; }
  .profile__img { max-width: 340px; }
  .profile__inset, .profile--alt .profile__inset { right: -0.5rem; left: auto; rotate: 3deg; }
  .catalogue-group__head { gap: 1rem; }
  .world__grid--below .world__art { max-width: 420px; }
}
@media (max-width: 640px) {
  .hero__grid { padding-bottom: 5.5rem; }
  .buy-row { grid-template-columns: 72px minmax(0, 1fr); }
  .buy-row__action { grid-column: 1 / -1; }
  .book-pager { grid-template-columns: 1fr 1fr; }
  .book-pager__all { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .contents-list li { grid-template-columns: 2.6rem 1fr; }
  .book-facts dl > div { grid-template-columns: 6rem 1fr; }
  .post-card { grid-template-columns: minmax(0, 1fr); }
  .featured__art { aspect-ratio: 1 / 1.15; }
}

/* ---------------------------------------------------------------- print */
@media print {
  .site-header, .site-footer, .motion-toggle, .beam, .hero__sky, .skip-link { display: none !important; }
  body { background: #fff; }
  .hero, .book-hero, .featured, .about-hero { background: #fff !important; color: #000 !important; }
  .fireflies, .backdrop, .ribbon { display: none !important; }
}

/* =====================================================================
   VISUAL LAYER: atmosphere, depth and colour drawn from the artwork
   ===================================================================== */

/* Italic accent words in headings */
:root { --accent-em: #b4541c; }
.hero, .featured, .world__below, .shelf, .page-head--art, .about-hero, .book-hero { --accent-em: var(--gold-300); }
.section-title em, .page-title em, .book-title em { font-style: italic; font-weight: 300; color: var(--accent-em); }

/* Blurred artwork backdrop: section colour comes from the illustration itself */
.backdrop { position: absolute; inset: -8%; z-index: 0; }
.backdrop img { width: 100%; height: 100%; object-fit: cover; filter: blur(46px) saturate(1.35); transform: scale(1.08); opacity: 0.5; }

/* Fireflies */
.fireflies { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.fireflies span {
  position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%;
  background: #ffe9a8; opacity: 0.55;
  box-shadow: 0 0 6px 2px rgba(255, 214, 120, 0.75), 0 0 20px 7px rgba(255, 186, 72, 0.28);
}
@media (prefers-reduced-motion: no-preference) {
  .js .fireflies span { animation: drift var(--d) ease-in-out var(--delay) infinite alternate, flick calc(var(--d) / 2.4) ease-in-out var(--delay) infinite alternate; }
  .motion-paused .fireflies span { animation-play-state: paused; }
}
@keyframes drift { 0% { transform: translate(0, 0); } 50% { transform: translate(20px, -28px); } 100% { transform: translate(-16px, -54px); } }
@keyframes flick { from { opacity: 0.1; } to { opacity: 0.95; } }

/* ---------------------------------------------------------------- hero v2 */
.hero__sky::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(7, 18, 27, 0.88) 0%, rgba(7, 18, 27, 0.62) 42%, rgba(7, 18, 27, 0.15) 75%, rgba(7, 18, 27, 0.05) 100%), linear-gradient(0deg, rgba(7, 18, 27, 0.7), transparent 35%); }
.hero__sky .beam { z-index: 1; }

.display__line { display: block; }
.display__accent {
  font-style: italic; font-weight: 300; padding-right: 0.1em;
  background: linear-gradient(100deg, #f9e2a2 0%, #e9b955 40%, #e08a3c 80%, #d36a2c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .display { font-size: clamp(3.4rem, 1.6rem + 8vw, 8.4rem); text-shadow: 0 2px 30px rgba(0, 0, 0, 0.25); }
.hero__note { margin: 1.4rem 0 0; font-family: var(--font-display); font-style: italic; font-size: var(--step-1); color: var(--paper-200); }
.hero__note-mark { color: var(--gold-300); font-style: normal; margin-right: 0.4rem; }
.btn--glow { box-shadow: 0 10px 34px -8px rgba(228, 176, 78, 0.75), 0 0 0 0 rgba(228, 176, 78, 0.4); }
.btn--glow:hover { box-shadow: 0 14px 40px -6px rgba(240, 200, 115, 0.9), 0 0 0 6px rgba(228, 176, 78, 0.18); }

.hero__art { justify-self: end; width: min(100%, 540px); }
.hero__stack { position: relative; aspect-ratio: 1 / 1.1; }
.hero__card { position: absolute; width: 62%; border-radius: 3px; overflow: hidden; transition: transform 0.7s var(--ease), filter 0.7s; box-shadow: 0 2px 2px rgba(0, 0, 0, 0.25), 0 34px 60px -22px rgba(0, 0, 0, 0.85); }
.hero__card picture, .hero__card img { height: 100%; object-fit: cover; }
.hero__card--back { left: 0; top: 9%; transform: rotate(-10deg); filter: brightness(0.62) saturate(0.9); }
.hero__card--mid { right: 0; top: 4%; transform: rotate(8deg); filter: brightness(0.7) saturate(0.95); }
.hero__card--front { left: 19%; top: 0; width: 64%; z-index: 2; transform: rotate(-1.5deg); overflow: visible; box-shadow: none; }
.hero__card--front .book-visual { box-shadow: 0 2px 2px rgba(0, 0, 0, 0.25), 0 40px 70px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 230, 170, 0.25), 0 0 80px -10px color-mix(in oklab, var(--t-warm) 60%, transparent); }
.hero__card--front .book-visual::after { inset: 10px; box-shadow: none; border: 1px solid rgba(255, 236, 190, 0.45); }
.hero__stack:hover .hero__card--back { transform: rotate(-14deg) translateX(-16px); filter: brightness(0.8); }
.hero__stack:hover .hero__card--mid { transform: rotate(12deg) translateX(16px); filter: brightness(0.85); }
.hero__art-link:hover, .hero__stack:hover .hero__card--front { transform: rotate(0deg) translateY(-8px); }
.hero__art figcaption { margin-top: 1.4rem; text-align: center; }

/* ---------------------------------------------------------------- ribbon */
.ribbon { position: relative; z-index: 3; overflow: hidden; color: var(--slate-950); background: linear-gradient(90deg, #c99230, #f0c873 30%, #e9b955 60%, #c99230); border-block: 1px solid rgba(0, 0, 0, 0.25); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.5); }
.ribbon__track { display: flex; width: max-content; }
.ribbon__row { display: flex; align-items: center; gap: 1.6rem; padding: 0.95rem 0.8rem; font-family: var(--font-display); font-style: italic; font-size: clamp(1.15rem, 0.9rem + 1vw, 1.6rem); white-space: nowrap; }
.ribbon__star { font-style: normal; font-size: 0.7em; opacity: 0.55; }
@media (prefers-reduced-motion: no-preference) {
  .js .ribbon__track { animation: marquee 55s linear infinite; }
  .motion-paused .ribbon__track { animation-play-state: paused; }
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------- featured v2 */
.featured { overflow: hidden; }
.featured__text { position: relative; }
.featured__numeral { position: absolute; right: -1rem; top: -3rem; z-index: -1; font-family: var(--font-display); font-style: italic; font-weight: 300; font-size: clamp(9rem, 20vw, 19rem); line-height: 1; color: rgba(240, 200, 115, 0.09); pointer-events: none; }
.featured__grid { position: relative; z-index: 1; }
.featured__plate::after { content: ''; position: absolute; inset: 8px; border: 1px solid rgba(255, 236, 190, 0.4); pointer-events: none; }
.featured__plate--b { border-color: #f3e8d2; }
.featured .section-title { font-size: var(--step-4); }

/* ---------------------------------------------------------------- 3D books (shelf and catalogue) */
.book-card__link { perspective: 1400px; }
.book-card .book-visual {
  transform: rotateY(-16deg) rotateX(2deg); transform-origin: 30% 50%; border-radius: 1px 4px 4px 1px;
  box-shadow: 5px 4px 0 -1px #efe6d3, 6px 5px 0 -1px rgba(0, 0, 0, 0.18), 10px 8px 0 -2px #e6dcc6, 18px 22px 34px -12px rgba(0, 0, 0, 0.6);
  transition: transform 0.55s var(--ease), box-shadow 0.55s var(--ease);
}
.book-card .book-visual::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 8%; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(255, 255, 255, 0.22), rgba(0, 0, 0, 0.38) 45%, rgba(255, 255, 255, 0.1) 75%, transparent); }
.book-card__link:hover .book-visual, .book-card__link:focus-visible .book-visual { transform: rotateY(0) translateY(-8px); box-shadow: 3px 3px 0 -1px #efe6d3, 24px 30px 40px -14px rgba(0, 0, 0, 0.6); }

/* ---------------------------------------------------------------- dark spotlit shelf */
.shelf { position: relative; overflow: hidden; isolation: isolate; color: var(--paper-100); --focus: var(--gold-300);
  background: radial-gradient(55% 45% at 50% 0%, rgba(228, 176, 78, 0.22), transparent 70%), radial-gradient(40% 50% at 100% 100%, rgba(63, 139, 147, 0.25), transparent 70%), linear-gradient(180deg, #0b1d2b, #0a141c); }
.shelf__sky { position: absolute; inset: 0; z-index: -1; }
.shelf .section-title { font-size: var(--step-4); }
.shelf .text-link { color: var(--gold-300); }
.shelf .book-card__series { color: var(--gold-300); }
.shelf .book-card__tagline { color: var(--paper-300); }
.shelf .book-card .status { color: var(--paper-300); }
.shelf .book-card .book-visual { box-shadow: 5px 4px 0 -1px #d9cfbb, 6px 5px 0 -1px rgba(0, 0, 0, 0.3), 10px 8px 0 -2px #c9bea8, 18px 26px 40px -10px rgba(0, 0, 0, 0.85); }
.shelf__row { padding-top: 0.5rem; }
.shelf__plank { height: 1px; margin-top: 2rem; background: linear-gradient(90deg, transparent, rgba(240, 200, 115, 0.55), transparent); }

/* ---------------------------------------------------------------- cast strip */
.cast-strip { padding-block: var(--space-section); position: relative; overflow: hidden;
  background: radial-gradient(50% 60% at 0% 0%, rgba(156, 181, 101, 0.22), transparent 70%), radial-gradient(45% 60% at 100% 100%, rgba(228, 176, 78, 0.2), transparent 70%), var(--paper-100); }
.cast-strip .section-title { font-size: var(--step-4); }
.cast-strip__list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2rem); }
.cast-strip__item { display: flex; flex-direction: column; align-items: center; text-align: center; color: var(--ink); text-decoration: none; gap: 0.25rem; }
.cast-strip__ring { width: min(100%, 180px); aspect-ratio: 1; border-radius: 50%; padding: 5px; margin-bottom: 0.9rem;
  background: conic-gradient(from 200deg, var(--gold-300), var(--carrot-500), var(--mineral-500), var(--moss-400), var(--gold-300));
  box-shadow: 0 18px 34px -16px rgba(20, 30, 40, 0.6); transition: transform 0.5s var(--ease), box-shadow 0.5s; }
.cast-strip__ring picture { border-radius: 50%; overflow: hidden; border: 4px solid var(--paper-50); height: 100%; }
.cast-strip__ring img { height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.cast-strip__item:hover .cast-strip__ring { transform: translateY(-8px) rotate(-4deg); box-shadow: 0 26px 40px -16px rgba(20, 30, 40, 0.7); }
.cast-strip__item:hover img { transform: scale(1.08); }
.cast-strip__item:focus-visible { outline: none; }
.cast-strip__item:focus-visible .cast-strip__ring { outline: 3px solid var(--sea-700); outline-offset: 4px; }
.cast-strip__name { font-family: var(--font-display); font-size: var(--step-1); line-height: 1.2; }
.cast-strip__species { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.io .cast-strip li.reveal { transition-delay: calc(var(--i) * 90ms); }

/* ---------------------------------------------------------------- world + author v2 */
.world__below { overflow: hidden; }
.world__grid--below { z-index: 3; }
.world .section-title { font-size: var(--step-4); }
.author-intro { position: relative; overflow: hidden; background: radial-gradient(45% 60% at 100% 0%, rgba(63, 139, 147, 0.14), transparent 70%), var(--paper-50); }
.author-intro__img { isolation: isolate; }
.author-intro__img::before { content: ''; position: absolute; inset: 16px -16px -16px 16px; border: 1px solid var(--gold-500); z-index: -1; }
.author-intro__img::after { content: ''; position: absolute; inset: -30px auto auto -30px; width: 140px; height: 140px; z-index: -2; border-radius: 50%; background: radial-gradient(circle, rgba(228, 176, 78, 0.45), transparent 70%); }
.author-intro .section-title { font-size: var(--step-4); }
.author-intro__quote { margin: 0 0 1.5rem; padding-left: 1.2rem; border-left: 3px solid var(--gold-500); }
.author-intro__quote p { font-family: var(--font-display); font-style: italic; font-weight: 300; font-size: var(--step-2) !important; line-height: 1.3 !important; color: var(--sea-700); margin: 0; }

/* ---------------------------------------------------------------- inner page heads with artwork */
.page-head--art { position: relative; isolation: isolate; overflow: hidden; color: var(--paper-100); background: var(--sea-950); border-bottom: 0; --focus: var(--gold-300); padding-block: clamp(1.5rem, 3vw, 2.75rem) clamp(2rem, 4vw, 3.25rem); }
.page-head--art::after { display: none; }
.page-head__sky { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: linear-gradient(150deg, var(--sea-900), var(--slate-950)); }
.page-head__sky::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(7, 18, 27, 0.9) 0%, rgba(7, 18, 27, 0.66) 48%, rgba(7, 18, 27, 0.25) 100%), linear-gradient(0deg, rgba(7, 18, 27, 0.55), transparent 45%); }
.page-head__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.page-head--art .page-title { font-size: clamp(2.6rem, 1.6rem + 4.4vw, 5.4rem); margin-bottom: 0.3em; }
.page-head--art .crumbs, .page-head--art .page-intro { color: var(--paper-200); }
.page-head--art .jump a { background: rgba(255, 255, 255, 0.06); color: var(--paper-100); border-color: rgba(245, 238, 224, 0.3); }
.page-head--art .jump a:hover { border-color: var(--gold-300); color: var(--gold-300); }
.page-head--art .market-switch label { background: rgba(255, 255, 255, 0.06); border-color: rgba(245, 238, 224, 0.3); color: var(--paper-100); }
.page-head--art .market-switch label:has(input:checked) { background: rgba(228, 176, 78, 0.18); border-color: var(--gold-300); }
.about-hero { isolation: isolate; }
.about-hero::before { z-index: 0; }
.about-hero__grid { z-index: 1; }
.about-hero .page-title { font-size: clamp(2.6rem, 1.6rem + 4.4vw, 5.4rem); }
.about-hero__img { rotate: 2deg; }
.about-hero__img picture { border: 6px solid var(--paper-100); }

/* Fanned illustrations */
.fan { position: relative; height: clamp(250px, 28vw, 380px); }
.fan__card { position: absolute; left: 50%; top: 50%; width: 44%; border-radius: 3px; overflow: hidden; border: 5px solid var(--paper-100); box-shadow: 0 30px 50px -20px rgba(0, 0, 0, 0.85); transition: transform 0.6s var(--ease); }
.fan__card--1 { transform: translate(-50%, -50%) translateX(-52%) rotate(-12deg); }
.fan__card--2 { transform: translate(-50%, -52%); z-index: 2; }
.fan__card--3 { transform: translate(-50%, -50%) translateX(52%) rotate(12deg); }
.page-head:hover .fan__card--1 { transform: translate(-50%, -50%) translateX(-62%) rotate(-16deg); }
.page-head:hover .fan__card--3 { transform: translate(-50%, -50%) translateX(62%) rotate(16deg); }
.page-head:hover .fan__card--2 { transform: translate(-50%, -56%); }

/* Character cluster */
.orbit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.6rem, 1.5vw, 1.1rem); max-width: 400px; margin-inline: auto 0; padding-bottom: 12%; }
.orbit__face { aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 3px solid rgba(240, 200, 115, 0.75); box-shadow: 0 16px 30px -12px rgba(0, 0, 0, 0.85); }
.orbit__face img { height: 100%; object-fit: cover; }
.orbit__face--2, .orbit__face--5 { transform: translateY(28%); }

/* Single framed artwork */
.single-art { position: relative; max-width: 300px; margin-inline: auto 0; rotate: 3deg; border: 6px solid var(--paper-100); border-radius: 3px; overflow: hidden; box-shadow: 0 30px 50px -20px rgba(0, 0, 0, 0.85); }
.single-art--round { border-radius: 50%; aspect-ratio: 1; rotate: 0deg; border: 4px solid transparent; background: conic-gradient(from 200deg, var(--gold-300), var(--carrot-500), var(--mineral-500), var(--moss-400), var(--gold-300)) border-box; }
.single-art--round picture { border-radius: 50%; overflow: hidden; height: 100%; }
.single-art--round img { height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------- book page v2 */
.book-hero__bg::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(7, 14, 20, 0.35) 0%, rgba(7, 14, 20, 0.78) 50%, rgba(7, 14, 20, 0.88) 100%), linear-gradient(0deg, rgba(7, 14, 20, 0.6), transparent 40%); }
.book-hero__bg .beam { z-index: 1; }
.book-hero__visual { position: relative; }
.book-hero__visual .book-visual { transform: perspective(1400px) rotateY(10deg); box-shadow: -5px 4px 0 -1px #efe6d3, -10px 8px 0 -2px #e0d5bf, -24px 34px 60px -18px rgba(0, 0, 0, 0.9), 0 0 90px -10px color-mix(in oklab, var(--t-warm) 55%, transparent); transition: transform 0.6s var(--ease); }
.book-hero__visual:hover .book-visual { transform: perspective(1400px) rotateY(0); }
.book-title { background: linear-gradient(100deg, #fbf3df 0%, #fbf3df 55%, color-mix(in oklab, var(--t-warm) 80%, #fff) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.contents-list li { transition: background 0.3s; padding-inline: 0.8rem; margin-inline: -0.8rem; }
.contents-list li:hover { background: color-mix(in oklab, var(--t-warm) 10%, transparent); }
.gallery__item picture { transition: transform 0.5s var(--ease), box-shadow 0.5s; }
.gallery__item:hover picture { transform: translateY(-6px) rotate(-0.6deg); }

/* ---------------------------------------------------------------- characters v2 */
.profile { isolation: isolate; }
.profiles { overflow-x: clip; }
html { overflow-x: clip; }
.profile__text { position: relative; }
.profile__watermark { position: absolute; right: 0; top: -3.5rem; z-index: -1; font-family: var(--font-display); font-style: italic; font-weight: 300; font-size: clamp(9rem, 18vw, 16rem); line-height: 1; color: rgba(27, 70, 98, 0.07); pointer-events: none; }
.profile__img::before { content: ''; position: absolute; inset: 10% -8% -8% 10%; z-index: -1; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(228, 176, 78, 0.5), rgba(63, 139, 147, 0.3) 55%, transparent 72%); filter: blur(24px); }
.profile__img > picture { border: 6px solid var(--paper-50); outline: 1px solid var(--gold-500); outline-offset: 6px; }
.profile__name { font-size: clamp(2.6rem, 1.8rem + 4vw, 5rem); }

/* ---------------------------------------------------------------- contact v2 */
.contact__card { padding: clamp(1.5rem, 3vw, 2.5rem); background: #fff; border-top: 4px solid var(--gold-500); box-shadow: 0 20px 40px -24px rgba(20, 30, 40, 0.4); }
.contact__card .section-title { font-size: var(--step-3); }
.contact__card .contact__email, .contact__card .contact__pending { margin-top: 1rem; }

/* ---------------------------------------------------------------- footer v2 */
.site-footer { position: relative; overflow: hidden; background: radial-gradient(50% 80% at 100% 0%, rgba(228, 176, 78, 0.12), transparent 70%), var(--slate-950); }
.site-footer__name { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); font-style: italic; font-weight: 300; color: var(--gold-300); }

/* =====================================================================
   MOTION LAYER. Everything here is decorative. It runs only with JS and
   prefers-reduced-motion: no-preference, and stops with the pause control.
   ===================================================================== */

/* Global pause control (fixed, every page) */
.motion-toggle { position: fixed; left: 1rem; right: auto; bottom: 1rem; z-index: 70; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.6); background: rgba(11, 29, 43, 0.86); }
@media (max-width: 640px) {
  .motion-toggle { padding: 0.4rem; width: 44px; justify-content: center; }
  .motion-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Reading progress */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 80; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--gold-300), var(--carrot-500), var(--mineral-500)); pointer-events: none; }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) { .js .progress { animation: progress linear both; animation-timeline: scroll(root); } }
}
@keyframes progress { to { transform: scaleX(1); } }

/* Drifting mist */
.mist { position: absolute; width: 70vmax; height: 46vmax; border-radius: 50%; filter: blur(70px); opacity: 0.16; pointer-events: none; }
.mist--a { left: -20%; top: -10%; background: radial-gradient(closest-side, #f6cf7c, transparent); }
.mist--b { right: -25%; bottom: -20%; background: radial-gradient(closest-side, #5fb3bb, transparent); }
@media (prefers-reduced-motion: no-preference) {
  .js .mist--a { animation: mistA 38s ease-in-out infinite alternate; }
  .js .mist--b { animation: mistB 46s ease-in-out infinite alternate; }
  .motion-paused .mist { animation-play-state: paused; }
}
@keyframes mistA { to { transform: translate(28vw, 12vh) scale(1.15); } }
@keyframes mistB { to { transform: translate(-30vw, -14vh) scale(1.2); } }

/* Rolling sea under the hero */
.hero__grid { position: relative; z-index: 3; }
.waves { position: absolute; left: 0; right: 0; bottom: -1px; height: clamp(56px, 8vw, 120px); overflow: hidden; pointer-events: none; z-index: 2; }
.waves svg { position: absolute; bottom: 0; left: 0; width: 200%; max-width: none; height: 100%; }
.waves__l1 path { fill: rgba(63, 139, 147, 0.22); }
.waves__l2 path { fill: rgba(31, 85, 115, 0.45); }
.waves__l3 path { fill: #0a1822; }
@media (prefers-reduced-motion: no-preference) {
  .js .waves__l1 { animation: waveRoll 26s linear infinite; }
  .js .waves__l2 { animation: waveRoll 18s linear infinite reverse; }
  .js .waves__l3 { animation: waveRoll 12s linear infinite; }
  .motion-paused .waves svg { animation-play-state: paused; }
}
@keyframes waveRoll { to { transform: translateX(-50%); } }

/* Headline and hero entrance */
.display__mask { display: block; overflow: hidden; padding: 0 0.18em 0.1em 0; margin-bottom: -0.1em; }
@media (prefers-reduced-motion: no-preference) {
  .js .rise { animation: rise 1s var(--ease) both; animation-delay: calc(var(--d, 0) * 120ms + 120ms); }
  .js .display__line.rise { animation-name: riseLine; animation-duration: 1.1s; }
  .js .rise--art { animation-name: riseArt; animation-duration: 1.4s; }
}
.entered .rise { animation: none !important; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
@keyframes riseLine { from { transform: translateY(110%) rotate(3deg); } }
@keyframes riseArt { from { opacity: 0; transform: translateY(50px) scale(0.94); } }

/* 3D tilt + scroll parallax on the hero stack */
.hero__stack { transform: perspective(1300px) rotateY(var(--tilt-x, 0deg)) rotateX(var(--tilt-y, 0deg)); transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); transform-style: preserve-3d; }
.hero__card--back { translate: 0 calc(var(--p, 0) * -70px); }
.hero__card--mid { translate: 0 calc(var(--p, 0) * -40px); }
.hero .backdrop { translate: 0 calc(var(--p, 0) * 90px); }
.hero__text { translate: 0 calc(var(--p, 0) * 40px); }
.hero__card--front::before { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: 3px; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 30%), rgba(255, 244, 220, 0.28), transparent 45%); mix-blend-mode: soft-light; }
.hero__stack:hover .hero__card--front::before { opacity: 1; }
.book-hero__visual .book-visual { transform: perspective(1400px) rotateY(calc(10deg + var(--tilt-x, 0deg))) rotateX(var(--tilt-y, 0deg)); transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.book-hero__visual:hover .book-visual { transform: perspective(1400px) rotateY(var(--tilt-x, 0deg)) rotateX(var(--tilt-y, 0deg)); }
.page-head__sky .backdrop, .book-hero__bg .backdrop, .about-hero .backdrop { translate: 0 calc(var(--p, 0) * 70px); }

/* Lantern light follows the pointer through the mines */
.world__below::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity 0.6s;
  background: radial-gradient(280px circle at var(--lx, 50%) var(--ly, 50%), rgba(255, 210, 120, 0.2), rgba(255, 190, 90, 0.06) 45%, transparent 70%); }
.world__below.is-lit::after { opacity: 1; }
.world__below > .fireflies { z-index: 1; }

/* Roots grow as the divider scrolls into view */
.world__roots .roots path { stroke-dasharray: 130; stroke-dashoffset: 0; opacity: 0.6; }
.io .world__roots.reveal { transform: none; }
.io .world__roots.reveal .roots path { stroke-dashoffset: 130; transition: stroke-dashoffset 2.4s var(--ease) 0.2s; }
.io .world__roots.reveal.is-in .roots path { stroke-dashoffset: 0; }
.root-lights circle { fill: #f6cf7c; filter: drop-shadow(0 0 6px #f6cf7c); }
@media (prefers-reduced-motion: no-preference) {
  .js .root-lights circle { animation: pulse 3.2s ease-in-out infinite; }
  .js .root-lights circle:nth-child(2) { animation-delay: -0.8s; }
  .js .root-lights circle:nth-child(3) { animation-delay: -1.6s; }
  .js .root-lights circle:nth-child(4) { animation-delay: -2.4s; }
  .motion-paused .root-lights circle { animation-play-state: paused; }
}
@keyframes pulse { 50% { opacity: 0.35; } }

/* Second ribbon: dark, running the other way */
.ribbon--dark { color: var(--gold-300); background: linear-gradient(90deg, #0f2a3d, #18405a 50%, #0f2a3d); border-color: rgba(240, 200, 115, 0.3); }
.ribbon--reverse .ribbon__track { animation-direction: reverse; }

/* Rotating colour rings around character portraits */
.cast-strip__ring { position: relative; isolation: isolate; background: transparent; }
.cast-strip__ring::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: 50%; background: conic-gradient(from 0deg, var(--gold-300), var(--carrot-500), var(--mineral-500), var(--moss-400), var(--gold-300)); }
@media (prefers-reduced-motion: no-preference) {
  .js .cast-strip__ring::before { animation: spin 14s linear infinite; }
  .js .cast-strip li:nth-child(even) .cast-strip__ring::before { animation-direction: reverse; }
  .motion-paused .cast-strip__ring::before { animation-play-state: paused; }
}
@keyframes spin { to { transform: rotate(1turn); } }

/* Light sweeping along the shelf */
.shelf::before { content: ''; position: absolute; inset: -10% -60%; z-index: -1; pointer-events: none; background: linear-gradient(100deg, transparent 40%, rgba(255, 232, 175, 0.09) 50%, transparent 60%); }
@media (prefers-reduced-motion: no-preference) {
  .js .shelf::before { animation: sweepX 16s ease-in-out infinite alternate; }
  .motion-paused .shelf::before { animation-play-state: paused; }
}
@keyframes sweepX { from { transform: translateX(-30%); } to { transform: translateX(30%); } }

/* Gentle idle float on page-head artwork */
@media (prefers-reduced-motion: no-preference) {
  .js .orbit__face { animation: bob 6s ease-in-out infinite; }
  .js .orbit__face:nth-child(2n) { animation-delay: -2s; }
  .js .orbit__face:nth-child(3n) { animation-delay: -4s; }
  .js .single-art { animation: bob 7s ease-in-out infinite; }
  .motion-paused .orbit__face, .motion-paused .single-art { animation-play-state: paused; }
}
@keyframes bob { 50% { translate: 0 -10px; } }
.orbit__face--2, .orbit__face--5 { transform: none; margin-top: 28%; }

/* ---------------------------------------------------------------- responsive v2 */
@media (max-width: 1100px) {
  .cast-strip__list { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(150px, 28%); overflow-x: auto; scroll-snap-type: x mandatory; padding: 0.5rem 0 1.2rem; }
  .cast-strip__list > li { scroll-snap-align: start; }
  /* Scrolling rows run edge to edge while their first card still lines up with the container */
  .shelf__row, .cast-strip__list { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
}
@media (max-width: 960px) {
  .hero__grid { min-height: 0; }
  .hero__art { justify-self: center; width: min(100%, 440px); }
  .page-head__grid { grid-template-columns: minmax(0, 1fr); }
  .page-head__art { max-width: 420px; width: 100%; }
  .orbit, .single-art { margin-inline: 0; }
  .hero__sky::after { background: linear-gradient(180deg, rgba(7, 18, 27, 0.82) 0%, rgba(7, 18, 27, 0.6) 55%, rgba(7, 18, 27, 0.35) 100%); }
  .page-head__sky::after { background: linear-gradient(180deg, rgba(7, 18, 27, 0.85), rgba(7, 18, 27, 0.6)); }
  .book-hero__bg::after { background: linear-gradient(180deg, rgba(7, 14, 20, 0.5), rgba(7, 14, 20, 0.85) 45%); }
  .book-hero__visual .book-visual { transform: none; }
}
@media (max-width: 640px) {
  .cast-strip__list { grid-auto-columns: 42%; }
  .fan { height: 230px; }
  .page-head__art .fan { max-width: 340px; }
  .orbit { max-width: 280px; }
  .single-art { max-width: 200px; }
  .featured__numeral { font-size: 8rem; top: -2rem; }
  .hero__art { width: min(88%, 330px); }
  .hero__grid { gap: 1.5rem; }
  .hero .display { font-size: clamp(3.2rem, 15vw, 4.4rem); }
}
