/* ============================================================
   For Bee — A Reading Room
   A guided literary journey, room by room.
   Visual system: warm ivory · walnut · olive — editorial, architectural, calm.
   ============================================================ */

:root {
  --serif: "Baskervville", Georgia, "Times New Roman", serif;
  --sans:  "Jost", system-ui, -apple-system, sans-serif;

  /* Two surfaces only — light room, dark room */
  --paper:        #F4EEE2;
  --paper-warm:   #F8F3E9;
  --limestone:    #ECE4D5;
  --travertine:   #E0D2B8;
  --walnut:       #241D15;
  --walnut-2:     #2E2519;

  --ink:          #2C2720;
  --ink-soft:     #6E665A;
  --ink-faint:    #9A9081;

  /* The tool's accent — now an ochre family (vars keep their legacy "olive" names) */
  --olive:        #B07A2B;
  --olive-deep:   #7E531E;
  --olive-light:  #E2C684;

  /* warm accents — a pop of colour + an African-leaning palette
     (terracotta clay, ochre gold, adire indigo). Used sparingly. */
  --terracotta:   oklch(0.57 0.105 45);
  --ochre:        oklch(0.71 0.10 73);
  --indigo:       oklch(0.44 0.068 262);

  --line:         rgba(44, 39, 32, 0.16);
  --line-soft:    rgba(44, 39, 32, 0.08);
  --line-ondark:  rgba(244, 238, 226, 0.16);

  --measure: 900px;
  --gutter: clamp(28px, 7vw, 140px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --slow: 1.15s;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.62;
  font-size: 17px;
  letter-spacing: 0.01em;
  overflow: hidden;                 /* the stage owns scrolling, per room */
  transition: background-color 1.1s var(--ease);
}
body.is-dark { background: var(--walnut); }

/* whisper of paper grain */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.045; mix-blend-mode: multiply;
  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='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; margin: 0; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--olive); color: var(--paper-warm); }

/* ============================================================
   Architectural left rail — the spine
   ============================================================ */
:root { --rail-w: 0px; }
@media (min-width: 1000px) { :root { --rail-w: clamp(72px, 6vw, 96px); } }

.rail {
  position: fixed; left: 0; top: 0; z-index: 60;
  width: var(--rail-w); height: 100svh;
  background: transparent;
  border-right: 1px solid var(--line);
  display: none;
  flex-direction: column; align-items: center;
  padding: clamp(26px, 4vh, 44px) 0;
  transition: border-color 1.1s var(--ease);
}
@media (min-width: 1000px) { .rail { display: flex; } }
body.is-dark .rail { border-right-color: var(--line-ondark); }

.rail__id {
  font-family: var(--serif); font-size: 1.2rem; line-height: 1;
  color: var(--olive-deep); font-variant-numeric: tabular-nums;
  transition: color 1.1s var(--ease);
}
body.is-dark .rail__id { color: var(--olive-light); }

.rail__track { position: relative; flex: 1; width: 1px; background: var(--line); margin: 20px 0; transition: background 1.1s var(--ease); }
body.is-dark .rail__track { background: var(--line-ondark); }
.rail__fill { position: absolute; top: 0; left: 0; width: 1px; height: 0; background: var(--olive); transition: height 0.9s var(--ease); }
body.is-dark .rail__fill { background: var(--olive-light); }

.rail__tick {
  position: absolute; left: 50%; top: 0; width: 22px; height: 22px;
  transform: translate(-50%, -50%); cursor: pointer; display: block;
}
.rail__tick::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 5px; height: 5px; border-radius: 50%; transform: translate(-50%, -50%);
  background: var(--ink-faint);
  transition: width 0.5s var(--ease), height 0.5s var(--ease), background 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.rail__tick:hover::after { background: var(--olive-deep); }
.rail__tick.active::after { width: 8px; height: 8px; background: var(--olive); box-shadow: 0 0 0 5px rgba(176,122,43,0.16); }
body.is-dark .rail__tick::after { background: rgba(244,238,226,0.4); }
body.is-dark .rail__tick.active::after { background: var(--olive-light); box-shadow: 0 0 0 5px rgba(226,198,132,0.16); }

.rail__total { font-family: var(--sans); font-size: 11px; letter-spacing: 0.18em; color: var(--ink-faint); font-variant-numeric: tabular-nums; transition: color 1.1s var(--ease); }
body.is-dark .rail__total { color: rgba(244,238,226,0.45); }

/* masthead + dedication whisper */
.masthead {
  position: fixed; z-index: 60;
  top: clamp(24px, 3vh, 36px); right: clamp(24px, 4vw, 64px);
  font-family: var(--sans); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  white-space: nowrap; color: var(--ink-faint); transition: color 1.1s var(--ease);
}
body.is-dark .masthead { color: rgba(244, 238, 226, 0.55); }
/* the top progress bar replaces this chrome below 1000px — hide it there so the
   two never overlap (the bar is the orientation on small screens) */
@media (max-width: 999px) { .masthead { display: none; } }

/* the two sand-toned pages (06 · 08) — darken the page chrome so the masthead
   and rail stay legible on the warmer #dcbd88 ground */
body.is-sand .masthead { color: rgba(52, 41, 27, 0.66); }
body.is-sand .rail { border-right-color: rgba(52, 41, 27, 0.22); }
body.is-sand .rail__id { color: #8a4e21; }
body.is-sand .rail__total { color: rgba(52, 41, 27, 0.55); }
body.is-sand .rail__track { background: rgba(52, 41, 27, 0.2); }
body.is-sand .rail__fill { background: #8a4e21; }
body.is-sand .rail__tick::after { background: rgba(52, 41, 27, 0.42); }
body.is-sand .rail__tick.active::after { background: #8a4e21; box-shadow: 0 0 0 5px rgba(138, 78, 33, 0.16); }
body.is-sand .topbar { background: linear-gradient(#dcbd88 58%, rgba(220, 189, 136, 0)); }
body.is-sand .topbar__id { color: #8a4e21; }
body.is-sand .topbar__track { background: rgba(52, 41, 27, 0.2); }
body.is-sand .topbar__fill { background: #8a4e21; }
body.is-sand .topbar__total { color: rgba(52, 41, 27, 0.55); }

/* ============================================================
   Mobile progress bar — the spine, reimagined for small screens
   (the vertical rail is hidden below 1000px; this keeps her oriented)
   ============================================================ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: none; align-items: center; gap: 13px;
  padding: 15px clamp(20px, 6vw, 40px) 17px;
  font-family: var(--sans); font-variant-numeric: tabular-nums;
  background: linear-gradient(var(--paper) 58%, rgba(244,238,226,0));
  transition: background-color 1.1s var(--ease);
}
@media (max-width: 999px) { .topbar { display: flex; } }
body.is-dark .topbar { background: linear-gradient(var(--walnut) 58%, rgba(36,29,21,0)); }
.topbar__id { font-family: var(--serif); font-size: 1.05rem; line-height: 1; color: var(--olive-deep); }
body.is-dark .topbar__id { color: var(--olive-light); }
.topbar__track { position: relative; flex: 1; height: 1px; background: var(--line); }
body.is-dark .topbar__track { background: var(--line-ondark); }
.topbar__fill { position: absolute; left: 0; top: 0; height: 1px; width: 0; background: var(--olive); transition: width 0.9s var(--ease); }
body.is-dark .topbar__fill { background: var(--olive-light); }
.topbar__total { font-size: 10px; letter-spacing: 0.18em; color: var(--ink-faint); }
body.is-dark .topbar__total { color: rgba(244,238,226,0.45); }
body.covers-active .topbar { opacity: 0; visibility: hidden; pointer-events: none; }

/* ============================================================
   The stage + rooms
   Every room is a full-viewport page. One is visible at a time;
   moving between them is a quiet cross-dissolve, like turning a page.
   ============================================================ */
.stage { position: fixed; inset: 0; padding-left: var(--rail-w); }

.room {
  position: absolute; inset: 0;
  padding-left: var(--rail-w);
  background: var(--paper);
  overflow-y: auto; overflow-x: hidden;
  display: grid; grid-template-rows: 1fr auto 1fr;
  opacity: 0; visibility: hidden;
  transform: translateY(20px) scale(0.992);
  transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease), visibility var(--slow) var(--ease);
  z-index: 1;
  -webkit-overflow-scrolling: touch;
}
.room.is-active { opacity: 1; visibility: visible; transform: none; z-index: 2; }

.room__inner {
  grid-row: 2;
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding: clamp(4.5rem, 10vh, 7.5rem) var(--gutter);
  position: relative;
}
/* every room shares one content column, so side margins read the same from
   page to page (matching the Stories page) — the big editorial statements
   stay narrow via their own text max-widths */
.room--wide .room__inner { max-width: var(--measure); }
.room--narrow .room__inner { max-width: var(--measure); }

/* dark rooms — backdrop + text */
.room--dark { background: var(--walnut); color: var(--paper-warm); }
.room--dark .room__inner { position: relative; z-index: 1; }
.room--dark .eyebrow { color: rgba(244,238,226,0.55); }
.room--dark .eyebrow::before { background: var(--line-ondark); }
.room--dark .lede { color: rgba(244,238,226,0.7); }
.room--dark .back { color: rgba(244,238,226,0.5); }
.room--dark .back::after { background: rgba(244,238,226,0.4); }

/* ============================================================
   Shared editorial primitives
   ============================================================ */
.kicker {
  font-family: var(--sans); font-size: 12px; font-weight: 500;
  letter-spacing: 0.34em; text-transform: uppercase; color: var(--ink-faint);
}
.eyebrow {
  font-family: var(--sans); font-size: 12px; font-weight: 500;
  letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink-faint);
  display: inline-flex; align-items: center; gap: 0.9em;
}
.eyebrow .num { color: var(--olive); font-variant-numeric: tabular-nums; }
.room--dark .eyebrow .num { color: var(--olive-light); }
.eyebrow::before { content: ""; width: 40px; height: 1px; background: var(--line); display: inline-block; }

.lede {
  font-size: clamp(1.08rem, 1.4vw, 1.28rem);
  color: var(--ink-soft); max-width: 50ch; line-height: 1.64;
}
.room__title {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1.08; letter-spacing: -0.012em; text-wrap: balance;
  margin-top: 1.8rem; max-width: 20ch;
}
.room__title em { font-style: italic; color: var(--olive-deep); }
.room--dark .room__title em { color: var(--olive-light); }

/* buttons */
.btn {
  appearance: none; border: 0; white-space: nowrap;
  background: var(--walnut); color: var(--paper-warm);
  font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: 0.07em;
  padding: 1.1em 2.2em; border-radius: 100px;
  transition: background 0.55s var(--ease), transform 0.55s var(--ease), color 0.55s var(--ease), opacity 0.55s var(--ease);
  display: inline-flex; align-items: center; gap: 0.7em;
}
.btn:hover { background: var(--olive-deep); transform: translateY(-2px); }
.btn .arrow { transition: transform 0.55s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.room--dark .btn { background: var(--paper-warm); color: var(--walnut); }
.room--dark .btn:hover { background: var(--olive-light); color: var(--walnut); }

.btn--ghost {
  background: transparent; color: var(--ink); padding: 1.1em 0; border-radius: 0; position: relative;
}
.btn--ghost::after {
  content: ""; position: absolute; left: 0; bottom: 0.7em;
  width: 100%; height: 1px; background: var(--ink); transform-origin: left;
  transition: transform 0.55s var(--ease), background 0.55s var(--ease);
}
.btn--ghost:hover { background: transparent; transform: none; color: var(--olive-deep); }
.btn--ghost:hover::after { background: var(--olive-deep); }
.room--dark .btn--ghost { color: var(--paper-warm); }
.room--dark .btn--ghost::after { background: rgba(244,238,226,0.6); }
.room--dark .btn--ghost:hover { color: var(--olive-light); }

.actions { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }

/* quiet back link — pinned to a consistent top-left on every room, aligned to
   the content column's left edge so it never drifts page to page (it used to
   ride the vertically-centred inner, so it moved with each page's content) */
.back {
  position: fixed; z-index: 40;
  top: clamp(24px, 3vh, 36px);
  left: var(--gutter);
  appearance: none; border: 0; background: transparent;
  font-family: var(--sans); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-faint); padding: 0 0 0.4em; display: inline-flex; align-items: center; gap: 0.5em;
  transition: color 0.5s var(--ease), gap 0.5s var(--ease), opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.back:hover { color: var(--olive-deep); gap: 0.75em; }
.back .a { transition: transform 0.5s var(--ease); }
.back:hover .a { transform: translateX(-3px); }
/* small screens: no left spine, a top progress bar instead — sit just below it */
@media (max-width: 999px) {
  .back { top: clamp(3.5rem, 7vh, 4.4rem); left: var(--gutter); }
  /* push room content clear of the fixed top bar + back link so the eyebrow /
     kicker never tucks under them on tall pages */
  .room__inner { padding-top: clamp(6.5rem, 15vh, 9rem); }
  /* once she scrolls into the page, the back link would hover over the text —
     fade it away; it returns when she scrolls back to the top */
  body.scrolled .room .back { opacity: 0; pointer-events: none; transform: translateY(-8px); }
  /* intro covers: top-align the long dedication so it clears the back link and
     isn't jammed under the browser chrome; let it scroll if it runs tall */
  .cover { overflow-y: auto; }
  .cover.cover--note { justify-content: flex-start; padding-top: clamp(5rem, 12vh, 7rem); padding-bottom: clamp(3rem, 7vh, 5rem); }
}

/* primary call-to-action block at the foot of a room */
.room__cta { margin-top: clamp(3rem, 7vh, 5.5rem); display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.room__cta .note { font-family: var(--serif); font-style: italic; color: var(--ink-soft); font-size: 1.05rem; }
.room--dark .room__cta .note { color: rgba(244,238,226,0.62); }

/* ============================================================
   Reveal choreography — staggered focus-in on room entrance
   ============================================================ */
[data-reveal] {
  opacity: 0; transform: translateY(24px); filter: blur(6px);
  transition: opacity 1.15s var(--ease), transform 1.15s var(--ease), filter 1.15s var(--ease);
  will-change: opacity, transform, filter;
}
[data-reveal].is-in { opacity: 1; transform: none; filter: none; }
[data-reveal][data-delay="1"] { transition-delay: 0.12s; }
[data-reveal][data-delay="2"] { transition-delay: 0.24s; }
[data-reveal][data-delay="3"] { transition-delay: 0.36s; }
[data-reveal][data-delay="4"] { transition-delay: 0.48s; }
[data-reveal][data-delay="5"] { transition-delay: 0.60s; }

/* word-by-word assembly for the large editorial statements */
[data-words] .w {
  display: inline-block; opacity: 0;
  transform: translateY(0.62em); filter: blur(5px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), filter 0.8s var(--ease);
  transition-delay: calc(var(--wi, 0) * 0.034s + var(--wd, 0s));
  will-change: opacity, transform, filter;
}
[data-words].is-in .w { opacity: 1; transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; filter: none; transition: none; }
  [data-words] .w { opacity: 1; transform: none; filter: none; transition: none; }
  .room { transition: opacity 0.2s linear; transform: none; }
}

/* ============================================================
   01 — Arrival
   ============================================================ */
.arrival { max-width: 22ch; }
.arrival__title {
  font-size: clamp(2.9rem, 6.4vw, 6rem);
  line-height: 1.02; letter-spacing: -0.018em; text-wrap: balance;
  margin: clamp(2.4rem, 7vh, 4.5rem) 0 clamp(2rem, 5vh, 3rem);
}
.arrival__title em { font-style: italic; color: var(--olive-deep); }
.arrival__sub {
  font-family: var(--serif); font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.5; color: var(--ink-soft); max-width: 26ch;
}
.arrival .actions { margin-top: clamp(3rem, 8vh, 5rem); }

/* ============================================================
   01 — Arrival as a warm, living hero: earth-tone gradient with
   a soft light that follows the cursor (ochre · burnt orange · clay)
   ============================================================ */
#room-1 { background: #a85730; }
/* fixed (not absolute) so the warm gradient + glow fill the whole viewport even
   when the page scrolls — on mobile the tall hero/spell pages used to run out of
   gradient and fall back to flat colour at the bottom */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; --mx: .5; --my: .5; }
.aurora__base {
  position: absolute; inset: -8%;
  background:
    radial-gradient(80% 82% at 26% 14%, #dda35d 0%, #c67c3f 36%, #a85730 70%, #8c4828 100%),
    linear-gradient(125deg, #9c4f2a, #c47c44);
}
.aurora__blob { position: absolute; border-radius: 50%; will-change: transform, translate; }
.aurora__blob--1 {
  width: 64vw; height: 64vw; left: -12vw; top: -16vw;
  background: radial-gradient(circle, rgba(248,226,176,.92), rgba(248,226,176,0) 64%);
  mix-blend-mode: soft-light; filter: blur(34px);
  translate: calc((var(--mx) - .5) * 95px) calc((var(--my) - .5) * 78px);
  transition: translate .6s cubic-bezier(.2,.7,.2,1);
  animation: auroraDrift1 19s ease-in-out infinite alternate;
}
.aurora__blob--2 {
  width: 56vw; height: 56vw; right: -14vw; bottom: -18vw;
  background: radial-gradient(circle, rgba(96,46,24,.55), rgba(96,46,24,0) 66%);
  mix-blend-mode: multiply; filter: blur(44px);
  translate: calc((var(--mx) - .5) * -72px) calc((var(--my) - .5) * -60px);
  transition: translate .7s cubic-bezier(.2,.7,.2,1);
  animation: auroraDrift2 23s ease-in-out infinite alternate;
}
.aurora__blob--3 {
  width: 46vw; height: 46vw; left: 34vw; top: 26vh;
  background: radial-gradient(circle, rgba(228,162,84,.6), rgba(228,162,84,0) 62%);
  mix-blend-mode: screen; filter: blur(38px);
  translate: calc((var(--mx) - .5) * 54px) calc((var(--my) - .5) * -46px);
  transition: translate .5s cubic-bezier(.2,.7,.2,1);
  animation: auroraDrift3 17s ease-in-out infinite alternate;
}
.aurora__glow {
  position: absolute; inset: 0;
  background: radial-gradient(26vw 26vw at calc(var(--mx) * 100%) calc(var(--my) * 100%), rgba(252,236,198,.5), rgba(252,236,198,0) 60%);
  mix-blend-mode: soft-light;
  transition: background .2s linear;
}
@keyframes auroraDrift1 { from { transform: translate(0,0) scale(1); } to { transform: translate(5%, 4%) scale(1.12); } }
@keyframes auroraDrift2 { from { transform: translate(0,0) scale(1); } to { transform: translate(-4%, -5%) scale(1.15); } }
@keyframes auroraDrift3 { from { transform: translate(0,0) scale(1.05); } to { transform: translate(6%, -3%) scale(0.95); } }
@media (prefers-reduced-motion: reduce) {
  .aurora__blob { animation: none !important; }
  .aurora__glow { transition: none; }
}

/* arrival text + controls, read over the warmth */
#room-1 .room__inner { position: relative; z-index: 1; }
#room-1 .kicker { color: rgba(255,244,228,.82); }
#room-1 .arrival__title { color: #f8eed9; text-shadow: 0 1px 34px rgba(110,52,24,.28); }
#room-1 .arrival__title em { color: #f4cf86; font-style: italic; }
#room-1 .arrival__sub { color: rgba(255,243,228,.86); }
#room-1 .back { color: rgba(255,243,228,.74); }
#room-1 .btn { background: #3a1f12; color: #f8ecd6; }
#room-1 .btn:hover { background: #2a160c; }
#room-1 .btn--ghost { background: transparent; color: #f8eed9; }
#room-1 .btn--ghost::after { background: rgba(248,238,217,.55); }
#room-1 .btn--ghost:hover { color: #fff; background: transparent; }
#room-1 .btn--ghost:hover::after { background: rgba(255,255,255,.7); }

/* warm chrome — once the covers have lifted */
body.is-warm:not(.covers-active) { background: #a85730; }
body.is-warm:not(.covers-active) .masthead { color: rgba(255,246,230,.84); }
body.is-warm:not(.covers-active) .rail { border-right-color: rgba(255,246,230,.24); }
body.is-warm:not(.covers-active) .rail__id { color: #fff4e6; }
body.is-warm:not(.covers-active) .rail__total { color: rgba(255,246,230,.72); }
body.is-warm:not(.covers-active) .rail__track { background: rgba(255,246,230,.3); }
body.is-warm:not(.covers-active) .rail__fill { background: #fff4e6; }
body.is-warm:not(.covers-active) .rail__tick::after { background: rgba(255,246,230,.55); }
body.is-warm:not(.covers-active) .rail__tick.active::after { background: #fff4e6; box-shadow: 0 0 0 5px rgba(255,246,230,.2); }
body.is-warm:not(.covers-active) .topbar { background: linear-gradient(#a85730 58%, rgba(168,87,48,0)); }
body.is-warm:not(.covers-active) .topbar__id { color: #fff4e6; }
body.is-warm:not(.covers-active) .topbar__track { background: rgba(255,246,230,.3); }
body.is-warm:not(.covers-active) .topbar__fill { background: #fff4e6; }
body.is-warm:not(.covers-active) .topbar__total { color: rgba(255,246,230,.7); }

/* any room with an aurora keeps its content above the moving light */
.aurora ~ .room__inner { position: relative; z-index: 1; }

/* ---- moody ember variant of the aurora (the spell page) ---- */
.aurora--ember .aurora__base {
  background:
    radial-gradient(82% 84% at 30% 16%, #ad6630 0%, #834826 42%, #5d3318 76%, #3f230f 100%),
    linear-gradient(125deg, #44260f, #7e4827);
}
.aurora--ember .aurora__blob--1 { background: radial-gradient(circle, rgba(244,196,128,.5), rgba(244,196,128,0) 64%); }
.aurora--ember .aurora__blob--2 { background: radial-gradient(circle, rgba(34,18,8,.62), rgba(34,18,8,0) 66%); }
.aurora--ember .aurora__blob--3 { background: radial-gradient(circle, rgba(214,142,72,.5), rgba(214,142,72,0) 62%); }
.aurora--ember .aurora__glow { background: radial-gradient(28vw 28vw at 50% 42%, rgba(250,214,154,.4), rgba(250,214,154,0) 60%); }

/* ---- dusk variant of the aurora (page 05 · the questions) ----
   deeper, redder sienna at evening — distinct from the golden ember.
   the gradient lives on the ROOM (not the viewport-sized aurora) so it
   always reaches the bottom of the scroll, however tall the content grows */
#room-3 {
  background-color: #260c06;
  background-image: linear-gradient(176deg, #9a4a2b 0%, #6c3019 32%, #481c10 66%, #280d07 100%);
  background-repeat: no-repeat;
  background-attachment: local;
}
.aurora--dusk .aurora__base { background: none; }
.aurora--dusk .aurora__blob--1 { background: radial-gradient(circle, rgba(242,182,126,.42), rgba(242,182,126,0) 64%); }
.aurora--dusk .aurora__blob--2 { background: radial-gradient(circle, rgba(18,7,3,.6), rgba(18,7,3,0) 66%); }
.aurora--dusk .aurora__blob--3 { background: radial-gradient(circle, rgba(208,110,66,.46), rgba(208,110,66,0) 62%); }
.aurora--dusk .aurora__glow { background: radial-gradient(28vw 28vw at calc(var(--mx) * 100%) calc(var(--my) * 100%), rgba(248,198,152,.32), rgba(248,198,152,0) 60%); }
/* (the aurora is fixed for every aurora page now — see the .aurora base rule) */

/* ---- sandstone strata texture, layered into the warm pages ----
   real rock photographed in the gift's own palette: the strata read
   as accumulated layers — stories settling into stone */
.sand-tex {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url("sandstone.jpg") center / cover no-repeat;
  mix-blend-mode: soft-light; opacity: 0.5;
}
.sand-tex--b { background-image: url("sandstone-2.jpg"); }
.sand-tex--quiet { opacity: 0.3; }
/* faint sandstone strata over the warm cream pages (page 04, the close, the
   approach) — a touch more "line" than the dedication cover. fixed so it covers
   the whole page even as the books / essay / manifesto scroll. */
.sand-tex--page { position: fixed; mix-blend-mode: multiply; opacity: 0.12; }
/* texture sits above the aurora base/blobs but below the cursor glow */
.aurora .sand-tex { inset: 0; }

/* ============================================================
   Warming the cream surfaces — so the light pages feel alive and
   on-theme (a soft ochre light + faint sandstone grain), while
   staying calm enough to read books, cards and the dedication
   ============================================================ */
#room-2, #room-7 {
  background-color: #f1e7d2;
  background-image:
    radial-gradient(125% 85% at 100% -6%, rgba(224,166,92,0.14), rgba(224,166,92,0) 50%),
    radial-gradient(120% 95% at -8% 108%, rgba(176,122,43,0.10), rgba(176,122,43,0) 48%);
  /* show the wash once and let it scroll WITH the content, not pinned to the viewport */
  background-repeat: no-repeat, no-repeat;
  background-attachment: local, local;
}
#room-2 .room__inner, #room-6 .room__inner, #room-7 .room__inner { position: relative; z-index: 1; }

/* page 08 — recommendations on warm sand: carries page 07's warmth forward
   and softens the jump out of the dark room; a solid tone also means the
   background simply can't feel "pinned" while the cards scroll */
#room-6 { background: #dcbd88; }
#room-6 .eyebrow { color: #463720; }
#room-6 .eyebrow .num { color: #8a4e21; }
#room-6 .eyebrow::before { background: rgba(52,41,27,0.42); }
#room-6 .back { color: #463720; }
#room-6 .back::after { background: rgba(52,41,27,0.5); }
#room-6 .room__title { color: #34291b; }
#room-6 .rec { border-color: rgba(52,41,27,0.20); }
#room-6 .rec__because { color: #5a4a30; }
#room-6 .rec__weThought { color: #6e5a3c; }
#room-6 .rec__title { color: #2e2417; }
#room-6 .rec__author { color: #5a4a30; }
#room-6 .rec__why { color: #3d3120; }
#room-6 .rec__theme,
#room-6 .rec__why .echo { color: #7a3f1a; }
#room-6 .rec__read { color: #6e5a3c; }
#room-6 .rec__read:hover { color: #7a3f1a; }
#room-6 .rec--wild .rec__because { color: #a0481f; }

/* the covers — warm cream with a soft light breathing behind the gift */
.covers {
  background: #f1e7d2;
}
.cover { background: transparent; }
.cover__back { position: absolute; z-index: 2; top: clamp(2rem, 5vh, 3.2rem); left: var(--gutter); }
#cover-1 > .sand-tex { opacity: 0.4; mix-blend-mode: multiply; }
/* the dedication scrolls on tall/large viewports. paint its grain on the .covers
   wrapper (fixed, full viewport, does NOT itself scroll) rather than on the
   scrolling cover — so the texture stays uniform top-to-bottom with no seam, and
   no fixed-layer-promotion blend glitch when the note scrolls. */
#cover-2 > .sand-tex { display: none; }
.covers:has(> .cover--note.is-shown)::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url("sandstone.jpg") center / cover no-repeat;
  mix-blend-mode: soft-light; opacity: 0.5;
}
.cover--open::before {
  content: ""; position: absolute; z-index: 0; left: 50%; top: 44%;
  width: min(640px, 74vw); aspect-ratio: 1 / 1; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(226,168,92,0.22), rgba(226,168,92,0) 62%);
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .cover--open::before { animation: coverBreath 6.5s ease-in-out infinite; }
}
@keyframes coverBreath {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.07); }
}
.cover--note::before {
  content: ""; position: absolute; z-index: 0; inset: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 50% -12%, rgba(224,166,92,0.13), rgba(224,166,92,0) 55%);
}

/* ---- the two interludes: warm colour, cream type ----
   02 is a plain solid ochre; 03 (the spell) carries the moving ember light */
#room-interlude { background: #b9763a; }
#room-interlude-2 { background: #5d3318; }

/* page 02 & 06 carry the texture as a direct child — keep content above it */
#room-interlude .interlude__inner,
#room-4 .room__inner { position: relative; z-index: 1; }

/* page 06 — a plain coloured page (echoes the warm interludes),
   warm sand so the long portrait essay stays comfortable to read */
#room-4 { background: #dcbd88; }
/* the essay can run taller than the viewport; pin its grain so it covers the
   page all the way to the bottom instead of scrolling away with the content
   (keeps the soft-light / 0.3 look of --quiet, just fixed rather than absolute) */
#room-4 .sand-tex { position: fixed; }
#room-4 .room__title,
#room-4 .essay p { color: #34291b; }
#room-4 .qualities__cap,
#room-4 .quality__word { color: #5a4a30; }
#room-4 .quality__name { color: #2e2417; }
#room-4 .quality__mark { background: var(--olive-deep); opacity: 1; }
#room-4 .essay .drop::first-letter { color: #7a3f1a; }
/* keep the chrome legible on sand */
#room-4 .eyebrow { color: #463720; }
#room-4 .eyebrow .num { color: #8a4e21; }
#room-4 .eyebrow::before { background: rgba(52,41,27,0.42); }
#room-4 .back { color: #463720; }
#room-4 .back::after { background: rgba(52,41,27,0.5); }
#room-interlude .interlude__quote,
#room-interlude-2 .interlude__quote { color: #f8eed9; }
#room-interlude .interlude__quote em,
#room-interlude-2 .interlude__quote em { color: #f4cf86; }
#room-interlude-2 .interlude__spell { color: #f6d79a; }
#room-interlude .back,
#room-interlude-2 .back { color: rgba(255,243,228,.74); }
#room-interlude .scrollcue { color: rgba(255,243,228,.72); }
#room-interlude .scrollcue__chev { color: #f4cf86; }
#room-interlude .scrollcue:hover { color: #fff; }

/* ============================================================
   Interlude — a Mel aside (scroll to continue)
   ============================================================ */
.interlude__quote {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.8vw, 3.7rem);
  line-height: 1.18; letter-spacing: -0.012em;
  text-wrap: balance; max-width: 19ch;
  color: var(--ink);
}
.interlude__quote em { font-style: italic; color: var(--olive-deep); }
.scrollcue {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  margin-top: clamp(3rem, 9vh, 5.5rem);
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0.7rem;
  padding: 0.3rem 0.2rem;
  font-family: var(--sans); font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--ink-faint);
  transition: color 0.5s var(--ease);
}
.scrollcue:hover { color: var(--olive-deep); }
.scrollcue__chev { display: inline-flex; color: var(--olive); animation: cueBob 1.9s var(--ease) infinite; }
.scrollcue__chev svg { width: 24px; height: 24px; }
.scrollcue:hover .scrollcue__chev { color: var(--olive-deep); }
@keyframes cueBob {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(6px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .scrollcue__chev { animation: none; opacity: 0.85; } }

/* the spell — fades in beneath "So here goes…" */
.interlude__spell {
  margin-top: clamp(1.6rem, 4.5vh, 2.8rem);
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.7rem, 3.6vw, 2.8rem);
  line-height: 1.1; letter-spacing: 0.005em; color: var(--olive-deep);
  opacity: 0; transform: translateY(12px);
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
}
.interlude__spell.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .interlude__spell { transition: opacity 0.4s var(--ease); transform: none; }
}

/* Wingardium Leviosa — the whole aside rises and floats away.
   (no will-change here: it would create a containing block that traps the
   fixed-position back link mid-page; the transform transition is enough) */
.interlude__inner { transition: transform 1.7s cubic-bezier(0.33, 0, 0.2, 1), opacity 1.5s var(--ease); }
.interlude__inner.levitate { transform: translateY(-160px); opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .interlude__inner { transition: opacity 0.4s var(--ease); }
  .interlude__inner.levitate { transform: none; }
}

/* ============================================================
   02 — The Stories That Stayed  (a centred search; books bloom in)
   ============================================================ */
.stories { margin-inline: auto; text-align: center; }
.stories__title { font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1.06; letter-spacing: -0.014em; margin-top: 1.7rem; }
.stories .lede { margin: 1.5rem auto 0; max-width: 44ch; }

.search { margin: clamp(2.6rem, 7vh, 4.2rem) auto 0; max-width: 540px; position: relative; z-index: 20; text-align: left; }
.search__field {
  display: flex; align-items: center; gap: 14px;
  border-bottom: 1px solid var(--ink); padding: 0.6em 0.2em 0.95em;
  transition: border-color 0.45s var(--ease);
}
.search__field:focus-within { border-color: var(--olive-deep); }
.search__field svg { flex: none; color: var(--ink-soft); transition: color 0.45s var(--ease); }
.search__field:focus-within svg { color: var(--olive-deep); }
.search input {
  flex: 1; border: 0; background: transparent;
  font-family: var(--serif); font-size: clamp(1.2rem, 2vw, 1.55rem);
  color: var(--ink); outline: none;
}
.search input::placeholder { color: var(--ink-faint); font-style: italic; }

.suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: #FCFAF4; border: 1px solid rgba(44,39,32,0.14);
  box-shadow: 0 26px 50px -24px rgba(44,39,32,0.45), 0 2px 6px rgba(44,39,32,0.06);
  z-index: 30; max-height: 320px; overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
}
.suggest.open { opacity: 1; visibility: visible; transform: none; }
.suggest__item {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 0.85em 1.2em; cursor: pointer; border-bottom: 1px solid var(--line-soft);
  transition: background 0.25s var(--ease), padding 0.25s var(--ease);
}
.suggest__item:last-child { border-bottom: 0; }
.suggest__item:hover, .suggest__item.cursor { background: var(--limestone); padding-left: 1.5em; }
.suggest__item .t { font-family: var(--serif); font-size: 1.08rem; color: var(--ink); }
.suggest__item .a { font-size: 0.82rem; color: var(--ink-faint); white-space: nowrap; }
.suggest__empty { padding: 1.1em 1.2em; color: var(--ink-faint); font-style: italic; font-family: var(--serif); }

.shelf-count {
  margin-top: clamp(2rem, 5vh, 3rem); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-faint); min-height: 1.2em;
}
.shelf-count b { color: var(--olive-deep); font-weight: 500; }

/* the library — each book blooms in as a small object */
.shelf {
  margin-top: clamp(2.4rem, 5vh, 3.4rem);
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(18px, 2.2vw, 30px);
}
.shelf:empty { margin: 0; }

.book { position: relative; width: clamp(118px, 14vw, 146px); }
.book--new { animation: bookIn 0.85s var(--ease) both; }
@keyframes bookIn {
  from { opacity: 0; transform: translateY(22px) scale(0.9); filter: blur(8px); }
  to   { opacity: 1; transform: none; filter: none; }
}
.book__cover {
  position: relative; aspect-ratio: 5 / 7; border-radius: 2px 4px 4px 2px;
  padding: 0.95rem 0.9rem 1rem 1.15rem; display: flex; flex-direction: column;
  box-shadow: 0 20px 32px -22px rgba(44,39,32,0.55), inset 0 0 0 1px rgba(0,0,0,0.05);
  overflow: hidden; text-align: left;
  transition: transform 0.55s var(--ease), box-shadow 0.55s var(--ease);
}
.book:hover .book__cover { transform: translateY(-6px); box-shadow: 0 30px 44px -24px rgba(44,39,32,0.6); }
.book__cover::before { content: ""; position: absolute; left: 5px; top: 0; bottom: 0; width: 1px; background: rgba(0,0,0,0.14); }
.book__glyph { width: 17px; height: 17px; opacity: 0.55; }
.book__glyph svg { width: 100%; height: 100%; }
.book__title { font-family: var(--serif); font-size: 0.94rem; line-height: 1.16; margin-top: auto; text-wrap: balance; }
.book__author { margin-top: 0.6rem; font-size: 0.72rem; letter-spacing: 0.03em; color: var(--ink-soft); text-align: center; }
.book__remove {
  position: absolute; top: -9px; right: -9px; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper-warm); color: var(--ink-soft);
  display: grid; place-items: center; font-size: 13px; line-height: 1; z-index: 3;
  opacity: 0; transform: scale(0.8);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.book:hover .book__remove { opacity: 1; transform: scale(1); }
.book__remove:hover { background: var(--walnut); color: var(--paper-warm); border-color: var(--walnut); }
/* touch devices have no hover — keep the remove control visible so books can be taken off */
@media (hover: none) {
  .book__remove { opacity: 1; transform: none; }
}

/* cover tones — rotate like real spines, now with warm pops of colour */
.book__cover[data-tone="0"] { background: var(--limestone); color: var(--ink); }
.book__cover[data-tone="1"] { background: var(--terracotta); color: var(--paper-warm); }
.book__cover[data-tone="2"] { background: #A8741F; color: var(--paper-warm); }
.book__cover[data-tone="3"] { background: #86472A; color: var(--paper-warm); }
.book__cover[data-tone="4"] { background: #D8C7AC; color: var(--ink); }
.book__cover[data-tone="1"] .book__author,
.book__cover[data-tone="2"] .book__author,
.book__cover[data-tone="3"] .book__author { color: rgba(244,238,226,0.7); }

.empty-note { font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 1.5vw, 1.35rem); color: var(--ink-soft); max-width: 34ch; }
.room--dark .empty-note { color: rgba(244,238,226,0.65); }

#shelf-continue { justify-content: center; transition: opacity 0.6s var(--ease); }
#shelf-continue .btn[disabled] { opacity: 0.32; cursor: default; pointer-events: none; }

/* ============================================================
   03 — The Questions You Return To  (two stages)
   ============================================================ */
.qlead { transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.qroom[data-stage="reveal"] .qlead { display: none; }
.qroom[data-stage="lead"] .qreveal { display: none; }

.qlead__text {
  font-size: clamp(2.4rem, 5.4vw, 4.6rem);
  line-height: 1.12; letter-spacing: -0.014em; max-width: 16ch;
  margin-bottom: clamp(3rem, 8vh, 5rem);
}
.qlead__text em { font-style: italic; color: var(--olive-light); }

.qreveal__lead { max-width: 26ch; margin-bottom: clamp(3rem, 7vh, 5rem); }
.qreveal__lead .lede { color: rgba(244,238,226,0.72); }

.qlist { display: flex; flex-direction: column; }
.qitem {
  display: grid; grid-template-columns: 4rem 1fr; gap: clamp(1.2rem, 3vw, 2.6rem);
  align-items: start; padding: clamp(2.2rem, 5vh, 3.6rem) 0;
  border-top: 1px solid var(--line-ondark);
}
.qitem:last-child { border-bottom: 1px solid var(--line-ondark); }
.qitem__no { font-family: var(--serif); font-size: 1.2rem; color: var(--olive-light); font-variant-numeric: tabular-nums; padding-top: 0.4rem; }
.qitem h3 { font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: 1.06; letter-spacing: -0.012em; }
.qitem p { margin-top: 1rem; color: rgba(244,238,226,0.66); font-size: clamp(1rem, 1.3vw, 1.15rem); line-height: 1.6; max-width: 46ch; }
.qitem p.qitem__books { margin-top: 1.5rem; color: rgba(244,238,226,0.5); font-size: clamp(0.95rem, 1.15vw, 1.05rem); line-height: 1.55; }
.qitem p.qitem__books em { font-style: italic; font-family: var(--serif); color: var(--olive-light); }
.qitem__lead { color: rgba(244,238,226,0.64); }
@media (max-width: 640px) {
  .qitem { grid-template-columns: 1fr; gap: 0.8rem; }
  .qitem__no { padding-top: 0; }
}

/* ============================================================
   04 — What Your Books Reveal  (essay + quiet annotations)
   ============================================================ */
.reveal-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; margin-top: clamp(2.8rem, 6vh, 4.5rem); }
.essay p + p { margin-top: 1.5rem; }
.essay p { font-family: var(--serif); font-size: clamp(1.18rem, 1.7vw, 1.5rem); line-height: 1.62; color: var(--ink); }
.essay .drop::first-letter { font-size: 3.6em; float: left; line-height: 0.74; padding: 0.06em 0.14em 0 0; font-family: var(--serif); color: var(--olive-deep); }

/* qualities as marginal annotations — measuring marks, never meters */
.qualities { display: flex; flex-direction: column; gap: clamp(1.6rem, 3vh, 2.2rem); padding-top: 0.4rem; }
.qualities__cap { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.4rem; }
.quality { display: flex; flex-direction: column; gap: 0.7rem; }
.quality__name { font-family: var(--serif); font-size: 1.18rem; line-height: 1.1; }
.quality__mark { height: 1px; background: var(--olive); width: 40px; transition: width 1.6s var(--ease); opacity: 0.85; }
.quality__word { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); }
@media (max-width: 820px) { .reveal-grid { grid-template-columns: 1fr; } }

/* ============================================================
   05 — A Way of Seeing  (the climax, dark, monumental)
   ============================================================ */
.seeing { text-align: left; max-width: 720px; }
.seeing .eyebrow { margin-bottom: clamp(1.8rem, 5vh, 3rem); }
.seeing__passage {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 3.4vw, 3rem);
  line-height: 1.2; letter-spacing: -0.012em; color: var(--paper-warm);
  text-wrap: pretty;
}
.seeing__passage em { font-style: italic; color: var(--olive-light); }
.seeing__sig { margin-top: clamp(2rem, 5vh, 3rem); font-size: 12px; letter-spacing: 0.26em; text-transform: uppercase; color: rgba(244,238,226,0.5); }

/* ============================================================
   06 — Where to Explore Next  (a friend remembering a book)
   ============================================================ */
.recs { display: flex; flex-direction: column; margin-top: clamp(2.8rem, 6vh, 4.5rem); }
.rec {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(1.5rem, 3.2vw, 3rem);
  padding: clamp(2.6rem, 6vh, 4rem) 0; border-top: 1px solid var(--line); align-items: start;
}
.rec:last-child { border-bottom: 1px solid var(--line); }
.rec__because { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.5; }
.rec__theme { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2vw, 1.65rem); color: var(--olive-deep); margin: 0.5rem 0 1.3rem; line-height: 1.12; }
.rec__weThought { font-size: 0.82rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); }
.rec__title { font-family: var(--serif); font-size: clamp(1.7rem, 2.6vw, 2.2rem); line-height: 1.06; letter-spacing: -0.01em; margin-top: 0.6rem; }
.rec__author { font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.6rem; }
.rec__why { color: var(--ink-soft); font-size: 1.05rem; line-height: 1.64; margin-top: 1.4rem; max-width: 46ch; }
.rec__why .echo { color: var(--olive-deep); font-style: italic; font-family: var(--serif); }
.rec--wild .rec__because { text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.72rem; font-weight: 500; color: var(--terracotta); }

/* the "already read" action, and the quiet swap it triggers */
.rec__right { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(1.4rem, 2.6vh, 2rem); }
.rec__read {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-faint); padding: 0.4em 0; position: relative; align-self: flex-start;
  transition: color 0.5s var(--ease);
}
.rec__read::after {
  content: ""; position: absolute; left: 0; bottom: 0.1em; width: 100%; height: 1px;
  background: currentColor; opacity: 0.32; transition: opacity 0.45s var(--ease);
}
.rec__read:hover { color: var(--olive-deep); }
.rec__read:hover::after { opacity: 0.85; }

.rec--enter { animation: recIn 0.8s var(--ease) both; }
@keyframes recIn {
  from { opacity: 0; transform: translateY(16px); filter: blur(5px); }
  to   { opacity: 1; transform: none; filter: none; }
}
.rec--out {
  opacity: 0 !important; transform: translateY(-10px) !important; pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
@media (max-width: 820px) {
  .rec { grid-template-columns: 1fr; gap: 1.2rem; }
}

/* ============================================================
   07 — Keep Reading  (the quiet close)
   ============================================================ */
.close { text-align: center; max-width: 30ch; margin-inline: auto; }
.close__mark { font-family: var(--serif); font-size: clamp(2.6rem, 5.5vw, 4.4rem); line-height: 1.05; letter-spacing: -0.014em; }
.close__lines { font-family: var(--serif); font-size: clamp(1.3rem, 2vw, 1.7rem); line-height: 1.6; color: var(--ink-soft); margin-top: clamp(2.4rem, 6vh, 3.6rem); text-wrap: balance; }
.close__sig { margin-top: clamp(2.4rem, 5vh, 3.2rem); font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-faint); }
/* handwritten sign-off — drop a transparent PNG at assets/signature.png */
.close__signoff { display: flex; flex-direction: column; align-items: center; margin-top: clamp(2.4rem, 5vh, 3.2rem); }
.close__signature { width: clamp(150px, 26vw, 224px); height: auto; opacity: 0.9; margin-bottom: 0.6rem; }
.close__signoff .close__sig { margin-top: 0; }
.close .room__cta { justify-content: center; margin-top: clamp(3rem, 8vh, 5rem); }
.close__dedication {
  margin-top: clamp(3.4rem, 9vh, 6rem); font-family: var(--serif); font-style: italic;
  font-size: 0.95rem; color: var(--ink-faint); line-height: 1.6;
}

/* center the close room's inner content */
#room-7 .room__inner { display: flex; flex-direction: column; align-items: center; }

/* ============================================================
   The Approach — scrollable editorial manifesto
   ============================================================ */
.approach {
  position: fixed; inset: 0; z-index: 80;
  background-color: #f1e7d2;
  background-image: radial-gradient(120% 80% at 50% -8%, rgba(224,166,92,0.13), rgba(224,166,92,0) 55%);
  background-repeat: no-repeat;
  background-attachment: local;
  overflow-y: auto; overflow-x: hidden;
  opacity: 0; visibility: hidden; transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), visibility 0.9s var(--ease);
}
.approach.is-open { opacity: 1; visibility: visible; transform: none; }

.approach__bar {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(18px, 3vh, 28px) var(--gutter);
  background: linear-gradient(#f1e7d2 62%, rgba(241,231,210,0));
}
.approach__bar .back { position: static; top: auto; left: auto; }
.approach__label { font-family: var(--sans); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-faint); }
@media (max-width: 600px) { .approach__label { display: none; } }

.approach__scroll {
  position: relative; z-index: 1;
  max-width: 880px; margin-inline: auto;
  padding: clamp(1rem, 2vh, 2rem) var(--gutter) clamp(6rem, 16vh, 12rem);
}
.approach__hero { padding: clamp(2.5rem, 9vh, 7rem) 0 clamp(3rem, 9vh, 6.5rem); border-bottom: 1px solid var(--line); }
.approach__title {
  font-size: clamp(2.1rem, 4.6vw, 3.8rem); line-height: 1.08; letter-spacing: -0.014em;
  margin-top: clamp(1.6rem, 4vh, 2.6rem); max-width: 21ch; text-wrap: balance;
}
.approach__mov { padding: clamp(3.2rem, 9vh, 7rem) 0; border-bottom: 1px solid var(--line); }
.approach__mov h2 {
  font-size: clamp(1.85rem, 3.6vw, 3rem); line-height: 1.08; letter-spacing: -0.012em;
  margin-top: 1.4rem; max-width: 19ch; text-wrap: balance;
}
.approach__mov h2 em { font-style: italic; color: var(--olive-deep); }
.approach__body {
  margin-top: clamp(1.4rem, 3vh, 2rem); font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  line-height: 1.62; color: var(--ink-soft); max-width: 52ch;
}
.approach__end { padding: clamp(4rem, 11vh, 8rem) 0 0; }
.approach__endline {
  font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1.1; letter-spacing: -0.012em;
  max-width: 20ch; text-wrap: balance;
}
.approach__cta { margin-top: clamp(2.6rem, 6vh, 4rem); display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }

/* ============================================================
   Intro covers — "Open me" + the dedication
   Full-viewport overlays shown before the journey begins.
   ============================================================ */
.covers {
  position: fixed; inset: 0; z-index: 80;
  background: var(--paper);
  transition: opacity 1s var(--ease), visibility 1s var(--ease);
}
.covers.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }

/* hide the spine + masthead while the covers are up */
.rail, .masthead { transition: opacity 0.7s var(--ease), visibility 0.7s var(--ease), color 1.1s var(--ease), border-color 1.1s var(--ease); }
body.covers-active .rail,
body.covers-active .masthead { opacity: 0; visibility: hidden; pointer-events: none; }

.cover {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  text-align: center;
  /* overflow so tall covers (dedication on large screens) can scroll rather than
     clip the top half of the content behind the viewport edge */
  overflow-y: auto;
  padding: clamp(5rem, 12vh, 8rem) var(--gutter) clamp(3rem, 7vh, 5rem);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease), visibility 1.1s var(--ease);
}
/* centre-align the gift cover — its content is always short enough to fit */
.cover--open { justify-content: center; padding: clamp(3rem, 9vh, 7rem) var(--gutter); }
.cover.is-shown { opacity: 1; visibility: visible; transform: none; }

/* staggered settle-in of each line, echoing the room reveals */
.cover [data-cstep] {
  opacity: 0; transform: translateY(18px); filter: blur(5px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease), filter 1.1s var(--ease);
  will-change: opacity, transform, filter;
}
.cover.is-shown [data-cstep] { opacity: 1; transform: none; filter: none; }
.cover.is-shown [data-cstep="2"] { transition-delay: 0.14s; }
.cover.is-shown [data-cstep="3"] { transition-delay: 0.26s; }
.cover.is-shown [data-cstep="4"] { transition-delay: 0.40s; }
.cover.is-shown [data-cstep="5"] { transition-delay: 0.56s; }
.cover.is-shown [data-cstep="6"] { transition-delay: 0.72s; }
.cover.is-shown [data-cstep="7"] { transition-delay: 0.88s; }
.cover.is-shown [data-cstep="8"] { transition-delay: 1.06s; }
.cover.is-shown [data-cstep="9"] { transition-delay: 1.26s; }

/* cover 1 — the present */
.cover__present {
  background: none; border: 0; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: clamp(22px, 4.5vh, 44px);
  color: var(--ink-soft);
  transition: color 0.6s var(--ease);
}
.cover__present:hover { color: var(--olive-deep); }
.cover__gift svg { width: clamp(112px, 17vh, 172px); height: auto; display: block; transition: transform 0.85s var(--ease); }
.cover__present:hover .cover__gift svg { transform: translateY(-7px) scale(1.03) rotate(-1.5deg); }
.cover__open {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.7rem, 3.3vw, 2.7rem); letter-spacing: 0.01em; color: var(--ink);
  position: relative; white-space: nowrap;
}
.cover__open::after {
  content: ""; position: absolute; left: 50%; bottom: -0.34em; transform: translateX(-50%) scaleX(0);
  width: 1.6em; height: 1px; background: var(--olive-deep); transform-origin: center;
  transition: transform 0.6s var(--ease);
}
.cover__present:hover .cover__open::after { transform: translateX(-50%) scaleX(1); }

/* cover 2 — the dedication */
.cover--note { gap: clamp(26px, 5vh, 52px); }
.cover__eyebrow {
  font-family: var(--sans); font-size: 12px; font-weight: 500;
  letter-spacing: 0.34em; text-transform: uppercase; color: var(--ink-faint);
}
.cover__dedication { max-width: 42ch; display: flex; flex-direction: column; gap: clamp(15px, 2.4vh, 26px); }
.cover__dedication p {
  font-family: var(--serif); font-size: clamp(1.08rem, 1.55vw, 1.36rem);
  line-height: 1.62; color: var(--ink-soft); text-wrap: pretty;
}
.cover__dedication em { font-style: italic; color: var(--olive-deep); }
.cover__dedication .cover__hbd {
  font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.08; letter-spacing: -0.015em;
  color: var(--ink); margin-bottom: 0.04em;
}
.cover__dedication .cover__epithet {
  font-style: italic; color: var(--olive-deep);
  font-size: clamp(1.18rem, 2vw, 1.6rem); margin-top: -0.5em;
}
.cover__action { margin-top: clamp(0.5rem, 1vh, 1rem); }

@media (prefers-reduced-motion: reduce) {
  .cover [data-cstep] { opacity: 1; transform: none; filter: none; transition: none; }
}
