/* ==========================================================================
   Artificracy — When Machines Become Citizens
   Stylesheet. Tokens first, then base, then components top-to-bottom of page.
   ========================================================================== */

/* Self-hosted variable fonts (SIL Open Font License, see fonts/*.txt). */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/newsreader-latin-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/newsreader-latin-ext-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/newsreader-latin-opsz-italic.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("../fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Palette drawn from the cover (true black, the Earth's sand) and the
     book's illustrations (pale blue-white light streams). */
  --ink: #000000;
  --paper: #edebe6;
  --paper-dim: #b9b7b2;
  --mist: #8fa3bd;
  --glow: #bfe0ff;
  --earth: #c9a46b;
  --earth-deep: #a8853f;
  --line: rgba(237, 235, 230, 0.14);
  --line-strong: rgba(237, 235, 230, 0.32);
  --veil: rgba(0, 0, 0, 0.55);

  /* Type. Newsreader = the book's voice. Archivo = the interface. */
  --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;

  /* Scale ~1.25 on a 17px base, fluid at the top end. */
  --t-xs: 0.8125rem;   /* 13 */
  --t-s: 0.9375rem;    /* 15 */
  --t-m: 1.0625rem;    /* 17 */
  --t-l: 1.3125rem;    /* 21 */
  --t-xl: clamp(1.5rem, 1.2rem + 1.2vw, 1.875rem);      /* 24–30 */
  --t-2xl: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);         /* 30–42 */
  --t-3xl: clamp(2.4rem, 1.5rem + 3.6vw, 4.2rem);       /* 38–67 */
  --t-4xl: clamp(2.9rem, 1.3rem + 5vw, 5.4rem);         /* 46–86 */

  --measure: 62ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 1200px;
  --nav-h: 64px;
  --radius: 6px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }

a { color: var(--glow); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--paper); }

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

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

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

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Background particle field (three.js) ---------- */

#field {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* Everything readable sits above the field. */
.site { position: relative; z-index: 1; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--sans); font-weight: 500; font-size: var(--t-s);
  letter-spacing: 0.01em; line-height: 1;
  padding: 0.95rem 1.4rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 180ms var(--ease-out), border-color 180ms var(--ease-out), color 180ms var(--ease-out), transform 180ms var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--earth); color: var(--ink);
  border-color: var(--earth);
}
.btn-primary:hover { background: #dcb97f; border-color: #dcb97f; color: var(--ink); }

.btn-ghost {
  background: rgba(0, 0, 0, 0.35);
  color: var(--paper);
  border-color: var(--line-strong);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: var(--paper); color: var(--paper); }

.btn svg { width: 1.05em; height: 1.05em; flex: none; }

/* ---------- Header ---------- */

.header {
  position: sticky; top: 0; z-index: 20;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: linear-gradient(to bottom, rgba(0,0,0,0.85), rgba(0,0,0,0.55));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header .wrap { display: flex; align-items: center; gap: 1.5rem; }

.wordmark {
  font-family: var(--serif); font-size: 1.35rem; letter-spacing: 0.02em;
  color: var(--paper); text-decoration: none; margin-right: auto;
  display: inline-flex; align-items: baseline; gap: 0.5rem;
}
.wordmark small {
  font-family: var(--sans); font-size: var(--t-xs); color: var(--mist);
  letter-spacing: 0.01em;
}

.nav { display: flex; gap: 1.6rem; align-items: center; }
.nav a {
  color: var(--paper-dim); text-decoration: none; font-size: var(--t-s);
}
.nav a:hover { color: var(--paper); }

.header .btn { padding: 0.65rem 1rem; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: calc(100svh - var(--nav-h));
  display: grid;
  align-items: center;
  padding-block: clamp(2rem, 6vh, 5rem);
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
/* A soft veil behind the copy so the storm never fights the words. */
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 70% at 25% 50%, rgba(0,0,0,0.75), rgba(0,0,0,0) 70%);
  pointer-events: none;
}

.hero-copy { max-width: 40rem; }
.kicker {
  font-size: var(--t-s); color: var(--mist);
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-size: var(--t-4xl);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.hero .lede {
  font-size: var(--t-l);
  line-height: 1.45;
  color: var(--paper-dim);
  max-width: 34rem;
  margin-bottom: 2rem;
}
.hero .lede strong { color: var(--paper); font-weight: 500; }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

.formats {
  margin-top: 1.4rem;
  font-size: var(--t-s); color: var(--mist);
  max-width: 34rem; line-height: 1.5;
}
.formats a { color: var(--paper-dim); }

/* The 3D book stage */
.book-stage {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.book-stage canvas {
  position: absolute; inset: 0; width: 100% !important; height: 100% !important;
  display: block; cursor: grab;
}
.book-stage.is-dragging canvas { cursor: grabbing; }
.book-fallback {
  position: absolute; inset: 0; margin: auto;
  width: 78%; height: auto;
  object-fit: contain;
  filter: drop-shadow(0 30px 40px rgba(0,0,0,0.7));
}
.book-stage.is-3d .book-fallback { display: none; }
.book-hint {
  position: absolute; left: 0; right: 0; bottom: -0.25rem;
  text-align: center; font-size: var(--t-xs); color: var(--mist);
  opacity: 0; transition: opacity 600ms var(--ease-out) 1.2s;
  pointer-events: none;
}
.book-stage.is-3d .book-hint { opacity: 1; }

/* ---------- Generic section rhythm ---------- */

.section { position: relative; padding-block: clamp(4.5rem, 10vw, 9rem); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head h2 { font-size: var(--t-3xl); margin-bottom: 1rem; }
.section-head p { color: var(--paper-dim); font-size: var(--t-l); line-height: 1.45; }
.section-label { font-size: var(--t-s); color: var(--mist); margin-bottom: 0.9rem; }

/* ---------- Opening lines ---------- */

.opening { text-align: left; }
.opening blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--t-2xl);
  line-height: 1.3;
  max-width: 30em;
  color: var(--paper);
}
.opening blockquote p + p { margin-top: 0.6em; }
.opening cite {
  display: block; margin-top: 1.5rem;
  font-family: var(--sans); font-style: normal; font-size: var(--t-s); color: var(--mist);
}

/* ---------- The word ---------- */

.word { overflow: hidden; }
.word-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  margin-top: clamp(2rem, 4vw, 3.5rem);
}
.etymology {
  font-family: var(--serif);
  font-size: clamp(3rem, 1rem + 9vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0;
  white-space: nowrap;
}
.etymology .dot { color: var(--earth); margin-inline: 0.02em; }
.etym-roots {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
  max-width: 32rem; margin-bottom: 2.4rem;
}
.etym-roots > div { border-top: 1px solid var(--line-strong); padding-top: 0.8rem; }
.etym-roots i { font-family: var(--serif); font-size: var(--t-l); display: block; margin-bottom: 0.2rem; }
.etym-roots span { color: var(--mist); font-size: var(--t-s); }

.definition {
  font-family: var(--serif);
  font-size: var(--t-2xl);
  line-height: 1.22;
  max-width: 22em;
}
.definition small {
  display: block; margin-top: 1.2rem;
  font-family: var(--sans); font-size: var(--t-s); color: var(--mist); line-height: 1.55;
  max-width: 32rem;
}
.word-art {
  position: relative; aspect-ratio: 1; overflow: hidden;
  max-width: 480px; margin-inline: auto;
}
.word-art img { width: 100%; height: 100%; object-fit: cover; }
.word-art::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 70% at 50% 50%, rgba(0,0,0,0) 55%, rgba(0,0,0,0.85) 100%);
}
.word-art figcaption {
  margin-top: 0.8rem; font-size: var(--t-xs); color: var(--mist); text-align: center;
}
.word-art { overflow: visible; }
.word-art img { aspect-ratio: 1; }
.word-art::after { bottom: 2.2rem; }

/* ---------- The journey (three sections of the book) ---------- */

.journey .section-head { max-width: 46rem; }
.journey-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  border: 1px solid var(--line);
  background: var(--line);
}
.part {
  position: relative;
  background: var(--ink);
  min-height: 40rem;
  display: flex; flex-direction: column;
  isolation: isolate;
}
.part-art {
  position: absolute; top: 0; left: 0; right: 0; height: 62%; z-index: -1; overflow: hidden;
}
.part-art img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: opacity 500ms var(--ease-out); }
.part:hover .part-art img { opacity: 1; }
.part-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.25) 45%, rgba(0,0,0,0.85) 80%, #000 100%);
}
.part-body { margin-top: clamp(9rem, 15vw, 12.5rem); padding: clamp(1.4rem, 2.4vw, 2.2rem); }
.part-num {
  font-family: var(--serif); font-size: var(--t-xl); color: var(--mist);
  margin-bottom: 0.4rem;
}
.part h3 { font-size: var(--t-2xl); margin-bottom: 0.5rem; }
.part .part-sub { color: var(--paper-dim); font-size: var(--t-m); margin-bottom: 1.2rem; }
.part .epigraph {
  font-family: var(--serif); font-style: italic; color: var(--mist);
  font-size: var(--t-m); margin-bottom: 1.2rem; line-height: 1.35;
}
.chapters { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.chapters > li { border-bottom: 1px solid var(--line); }
.chapters details summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: baseline; gap: 0.7rem;
  padding: 0.6rem 0; font-size: var(--t-s);
}
.chapters details summary::-webkit-details-marker { display: none; }
.chapters .ch-n { color: var(--mist); font-variant-numeric: tabular-nums; flex: none; width: 1.6em; }
.chapters .ch-t { flex: 1; }
.chapters .ch-i {
  flex: none; width: 0.9em; height: 0.9em; position: relative; opacity: 0.6;
  transition: transform 200ms var(--ease-out);
}
.chapters .ch-i::before, .chapters .ch-i::after {
  content: ""; position: absolute; background: currentColor; inset: 0; margin: auto;
}
.chapters .ch-i::before { width: 100%; height: 1px; }
.chapters .ch-i::after { width: 1px; height: 100%; }
.chapters details[open] .ch-i { transform: rotate(45deg); }
.chapters ol {
  margin: 0 0 0.8rem 2.3em; padding: 0; list-style: none;
  font-size: var(--t-xs); color: var(--paper-dim); line-height: 1.5;
}
.chapters ol li { padding: 0.15rem 0; }
.chapters ol li::before { content: attr(data-n) " "; color: var(--mist); }

/* ---------- Read free ---------- */

.read .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.read-options { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.read-option {
  background: var(--ink); padding: clamp(1.4rem, 2.4vw, 2rem);
  display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center;
  text-decoration: none; color: var(--paper);
  transition: background-color 180ms var(--ease-out);
}
.read-option:hover { background: linear-gradient(rgba(255,255,255,0.035), rgba(255,255,255,0.035)), var(--ink); color: var(--paper); }
.read-option h3 { font-size: var(--t-xl); margin-bottom: 0.35rem; }
.read-option p { color: var(--paper-dim); font-size: var(--t-s); max-width: 30rem; }
.read-option .arrow { width: 2.2rem; height: 2.2rem; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center; flex: none; }
.read-option .arrow svg { width: 1rem; height: 1rem; }
.read-figure { position: relative; margin: 0; overflow: hidden; }
.read-figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.read-figure figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.2rem 1.4rem;
  background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0));
  font-size: var(--t-s); color: var(--paper-dim);
}

/* ---------- Prologue quote ---------- */

.prologue { text-align: center; }
.prologue .wrap { max-width: 52rem; }
.prologue blockquote {
  margin: 0; font-family: var(--serif); font-size: var(--t-3xl); line-height: 1.15;
  letter-spacing: -0.01em;
}
.prologue cite {
  display: block; margin-top: 1.6rem; font-style: normal; font-family: var(--sans);
  font-size: var(--t-s); color: var(--mist);
}
.prologue cite b { font-weight: 500; color: var(--paper-dim); }
.prologue .byline {
  display: inline-flex; align-items: center; gap: 1rem; text-align: left;
  margin-top: 2rem; line-height: 1.4;
}
.prologue .byline img {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none;
  filter: grayscale(1) contrast(1.05); border: 1px solid var(--line-strong);
}
.prologue .byline b { display: inline-block; margin-bottom: 0.1rem; color: var(--paper); font-size: var(--t-m); }

/* ---------- Author ---------- */

.author .wrap {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: start;
}
.author-card { display: flex; align-items: center; gap: 1.4rem; margin-bottom: 1.8rem; }
.author-card img {
  width: 108px; height: 108px; border-radius: 50%; object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  border: 1px solid var(--line-strong);
}
.author-card h2 { font-size: var(--t-2xl); }
.author-card p { color: var(--mist); font-size: var(--t-s); }
.author-bio { color: var(--paper-dim); font-size: var(--t-m); line-height: 1.6; max-width: var(--measure); }
.author-bio p + p { margin-top: 0.9rem; }
.author-links { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 1.4rem; font-size: var(--t-s); }

.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.ledger li {
  display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: baseline;
  padding: 0.9rem 0; border-bottom: 1px solid var(--line);
}
.ledger b { font-family: var(--serif); font-weight: 400; font-size: var(--t-2xl); line-height: 1; color: var(--paper); min-width: 4.2ch; }
.ledger span { color: var(--paper-dim); font-size: var(--t-s); }

.books { margin-top: 2.2rem; }
.books h3 { font-family: var(--sans); font-size: var(--t-s); color: var(--mist); font-weight: 400; margin-bottom: 0.6rem; }
.books ol { margin: 0; padding: 0; list-style: none; font-size: var(--t-s); color: var(--paper-dim); }
.books li { padding: 0.35rem 0; border-top: 1px solid var(--line); }
.books li i { font-family: var(--serif); font-style: normal; color: var(--paper); font-size: var(--t-m); }
.books li i a { color: inherit; text-decoration: none; }
.books li i a:hover { text-decoration: underline; }
.books li span { color: var(--mist); }
.books li.is-series { border-top: 1px solid var(--line-strong); margin-top: 0.4rem; padding-top: 0.6rem; }
.books li.is-series i { color: var(--earth); }

/* ---------- Ways to read ---------- */

.ways-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.way { background: var(--ink); padding: clamp(1.4rem, 2.4vw, 2.2rem); display: flex; flex-direction: column; gap: 0.8rem; min-height: 19rem; }
.way h3 { font-size: var(--t-xl); }
.way p { color: var(--paper-dim); font-size: var(--t-s); line-height: 1.5; }
.way .btn { margin-top: auto; align-self: flex-start; }
.way.is-primary { background: linear-gradient(rgba(201, 164, 107, 0.07), rgba(201, 164, 107, 0.07)), var(--ink); }
.way-badge { width: 130px; margin-top: 0.4rem; }
.way img.way-photo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-top: 0.4rem; }

/* ---------- Final CTA ---------- */

.ready {
  position: relative; text-align: center; overflow: hidden;
  padding-block: clamp(6rem, 14vw, 12rem);
  border-top: 1px solid var(--line);
}
.ready-art { position: absolute; inset: 0; z-index: -1; }
.ready-art img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; }
.ready-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.9) 100%);
}
.ready h2 { font-size: var(--t-4xl); letter-spacing: -0.02em; margin-bottom: 1rem; }
.ready p { color: var(--paper-dim); font-size: var(--t-l); max-width: 34rem; margin: 0 auto 2rem; }
.ready .cta-row { justify-content: center; }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; font-size: var(--t-s); color: var(--mist); background: rgba(0,0,0,0.6); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.footer a { color: var(--paper-dim); text-decoration: none; }
.footer a:hover { color: var(--paper); text-decoration: underline; }
.footer nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }

/* ---------- Page-load reveal (the one orchestrated moment) ---------- */

.reveal > * { opacity: 0; transform: translateY(14px); }
.is-ready .reveal > * {
  animation: rise 900ms var(--ease-out) forwards;
}
.is-ready .reveal > *:nth-child(1) { animation-delay: 80ms; }
.is-ready .reveal > *:nth-child(2) { animation-delay: 180ms; }
.is-ready .reveal > *:nth-child(3) { animation-delay: 300ms; }
.is-ready .reveal > *:nth-child(4) { animation-delay: 420ms; }
.is-ready .reveal > *:nth-child(5) { animation-delay: 520ms; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .journey-grid { grid-template-columns: 1fr; }
  .part { min-height: 0; }
  .part-art { height: 14rem; }
  .part-body { margin-top: 10.5rem; padding-block: 1.5rem 2rem; }
  .author .wrap, .word-grid, .read .wrap { grid-template-columns: 1fr; }
  .word-art { max-width: 420px; margin-inline: 0; }
  .read-figure { display: none; }
  .ways-grid { grid-template-columns: 1fr; }
  .way { min-height: 0; }
}

@media (max-width: 820px) {
  .hero { min-height: 0; padding-top: 1rem; }
  .hero .wrap { grid-template-columns: 1fr; gap: 1rem; }
  .book-stage { order: -1; max-width: 360px; aspect-ratio: 4 / 4.6; }
  .book-hint { bottom: 0.25rem; }
  .hero::before { background: radial-gradient(70% 50% at 50% 75%, rgba(0,0,0,0.7), rgba(0,0,0,0) 70%); }
  .hero-copy { text-align: left; }
  .nav { display: none; }
  .wordmark small { display: none; }
  .header .wrap { gap: 0.8rem; }
  .nav-mobile { display: inline-flex; margin-left: auto; font-size: var(--t-s); color: var(--paper-dim); text-decoration: none; }
  .wordmark { margin-right: 0; }
}
@media (min-width: 821px) { .nav-mobile { display: none; } }

@media (max-width: 480px) {
  html { font-size: 16px; }
  .cta-row .btn { width: 100%; justify-content: center; }
  .etym-roots { grid-template-columns: 1fr; }
  .read-option { grid-template-columns: 1fr; }
  .read-option .arrow { display: none; }
  .author-card { flex-direction: column; align-items: flex-start; }
  .footer .wrap { flex-direction: column; }
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal > * { opacity: 1; transform: none; animation: none !important; }
  .book-hint { transition: none; }
  * { transition-duration: 0.01ms !important; }
}
