/* ════════════════════════════════════════════════════════════════════
   MARY NOVA — HOME
   Una exposición que se desplaza
   ════════════════════════════════════════════════════════════════════ */

:root {
  /* sala */
  --ivory:    #F1ECE3;
  --ivory-2:  #E8E1D4;
  --ivory-3:  #DDD5C5;
  --ink:      #1A1817;
  --ink-2:    #46423C;
  --ink-3:    #87807A;
  --ghost:    rgba(26, 24, 23, 0.08);
  --ghost-2:  rgba(26, 24, 23, 0.18);
  --rule:     rgba(26, 24, 23, 0.12);

  /* acento — vermillion (cattleya / brand red) */
  --accent:        oklch(54% 0.18 27);
  --accent-soft:   oklch(54% 0.18 27 / 0.12);

  /* tipografías */
  --display: "Helvetica Neue", "Inter Tight", -apple-system, sans-serif;
  --serif:   "Spectral", "Iowan Old Style", Georgia, serif;
  --mono:    "JetBrains Mono", ui-monospace, monospace;

  /* ritmo */
  --gut:        clamp(20px, 4vw, 56px);
  --margin-x:   clamp(20px, 5vw, 72px);
  --safe-top:   72px;
  --ease:       cubic-bezier(0.22, 1, 0.36, 1);

  /* progreso de scroll (set por JS) */
  --scroll:        0;       /* 0..1 página entera */
  --scroll-umbral: 0;       /* 0..1 dentro de Umbral */
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--ivory); }
body {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga";
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--accent); color: var(--ivory); }


/* ──────────────────────────────────────────────────────────────────
   Persistent UI — page chrome
   ────────────────────────────────────────────────────────────────── */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  padding: 26px var(--margin-x);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  pointer-events: none;
  mix-blend-mode: normal;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}
.site-nav.is-hidden { opacity: 0; transform: translateY(-12px); }
.site-nav .brand {
  font-family: var(--display);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.32em;
  color: var(--ink);
  pointer-events: auto;
}
.site-nav .brand .dot { color: var(--accent); }
.site-nav .links {
  display: flex;
  gap: 36px;
  pointer-events: auto;
}
.site-nav .links a {
  position: relative;
  padding-bottom: 4px;
  transition: color 240ms var(--ease);
}
.site-nav .links a.is-active,
.site-nav .links a:hover { color: var(--ink); }
.site-nav .links a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--accent);
}

body.contact-modal-open {
  overflow: hidden;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 86;
  display: grid;
  place-items: center;
  padding: var(--margin-x);
  background: rgba(241, 236, 227, 0.68);
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms var(--ease);
}

.contact-modal[hidden] {
  display: none;
}

.contact-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.contact-panel {
  position: relative;
  width: min(430px, calc(100vw - 40px));
  padding: clamp(44px, 6vw, 66px) clamp(30px, 5vw, 54px);
  border: 1px solid var(--rule);
  background: var(--ivory);
  text-align: center;
  transform: translateY(10px);
  transition: transform 280ms var(--ease);
}

.contact-modal.is-open .contact-panel {
  transform: none;
}

.contact-close {
  position: absolute;
  top: 15px;
  right: 17px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1;
  color: var(--ink-3);
  transition: color 240ms var(--ease);
}

.contact-close:hover,
.contact-close:focus-visible {
  color: var(--accent);
}

.contact-panel h2 {
  margin: 0 0 clamp(34px, 4.8vw, 48px);
  font-family: var(--display);
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.contact-list {
  display: grid;
  gap: clamp(28px, 4.4vw, 38px);
}

.contact-label {
  margin-bottom: 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.contact-value {
  display: inline-block;
  max-width: 100%;
  font-family: var(--serif);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.35;
  color: var(--ink-3);
  overflow-wrap: anywhere;
  transition: color 240ms var(--ease);
}

.contact-value:hover,
.contact-value:focus-visible {
  color: var(--ink);
}

@media (max-width: 720px) {
  .site-nav { padding: 18px 22px; }
  .site-nav .links { gap: 18px; font-size: 10.5px; }
  .site-nav .links a:not(.always) { display: none; }
}


/* ── Chapter meta (top right) ── */
.chapter-meta {
  position: fixed;
  top: 26px;
  right: var(--margin-x);
  z-index: 55;
  text-align: right;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  pointer-events: none;
  display: none; /* shown on small screens */
}

/* ── Trace line — left edge ── */
.trace {
  position: fixed;
  left: calc(var(--margin-x) * 0.55);
  top: var(--safe-top);
  bottom: 32px;
  width: 1px;
  z-index: 40;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.trace::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--rule);
}
.trace .progress {
  position: absolute;
  top: 0;
  width: 1px;
  background: var(--ink);
  height: calc(var(--scroll, 0) * 100%);
  transition: height 100ms linear;
}
.trace .markers {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}
.trace .mk {
  position: relative;
  width: 8px; height: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.trace .mk::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--ivory);
  border: 1px solid var(--ink-3);
  border-radius: 50%;
  transition: background 400ms var(--ease), border-color 400ms var(--ease), transform 400ms var(--ease);
}
.trace .mk.is-active::before {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.5);
}
.trace .mk.is-past::before {
  background: var(--ink);
  border-color: var(--ink);
}
.trace .mk-label {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  opacity: 0;
  transition: opacity 300ms var(--ease), color 300ms var(--ease);
}
.trace .mk.is-active .mk-label {
  opacity: 1;
  color: var(--accent);
}

@media (max-width: 720px) {
  .trace { display: none; }
  .chapter-meta { display: block; }
}


/* ──────────────────────────────────────────────────────────────────
   Chapter generic
   ────────────────────────────────────────────────────────────────── */

.ch {
  position: relative;
  width: 100%;
}
.ch + .ch { border-top: 1px solid transparent; }

.ch-opener {
  padding: 24vh var(--margin-x) 12vh;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
  gap: var(--gut);
  align-items: end;
}
.ch-opener .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.ch-opener .title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(48px, 7.2vw, 96px);
  line-height: 0.94;
  letter-spacing: -0.035em;
  margin: 18px 0 0;
}
.ch-opener .title:first-child {
  margin-top: 0;
}
.ch-opener .blurb {
  font-family: var(--serif);
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 38ch;
}
.ch-opener .blurb em {
  font-style: italic;
  color: var(--ink);
}
@media (max-width: 720px) {
  .ch-opener {
    padding: 22vh 22px 8vh;
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .ch-opener .title { font-size: clamp(40px, 11vw, 64px); }
}


/* ════════════════════════════════════════════════════════════════════
   CHAPTER I — UMBRAL
   ════════════════════════════════════════════════════════════════════ */

.ch-umbral {
  position: relative;
  min-height: 100vh;
  padding-top: var(--safe-top);
  overflow: hidden;
}

.umbral-stage {
  position: relative;
  width: 100%;
  height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  align-items: stretch;
  /* very subtle parallax on whole stage */
  transform: translateY(calc(var(--scroll-umbral, 0) * -6vh));
  transition: transform 200ms linear;
}

/* Three independent typographic layers — MARY (upper-left, background),
   NOVA (mid, foreground, flush right, crossing the portrait),
   ART (lower-center, background). Each lives on its own row of the stage. */
.umbral-word {
  position: relative;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.82;
  font-size: clamp(110px, 22vw, 320px);
  user-select: none;
  z-index: 1;
}
.umbral-word.mary {
  align-self: start;
  justify-self: start;
  padding-top: 3vh;
  padding-left: clamp(20px, 4vw, 72px);
  text-align: left;
  color: rgba(26, 24, 23, 0.07);
}
.umbral-word.art  {
  position: absolute;
  /* .umbral-stage extends past viewport by --safe-top because .ch-umbral has
     padding-top; this offset re-anchors ART to the real viewport bottom and the
     extra 0.21em sinks the line-box so the glyph baseline lands on that edge. */
  bottom: calc(var(--safe-top) - 0.21em);
  left: 50%;
  transform: translateX(-50%);
  padding-bottom: 0;
  line-height: 1;
  text-align: center;
  color: rgba(26, 24, 23, 0.06);
  z-index: 5;
}

/* NOVA — strongest accent, vertically centered, anchored to the right margin.
   Single live text node (no duplicate raster span); glow is text-shadow so the
   word stays fully editable in Edit mode. */
.umbral-nova {
  position: absolute;
  /* shifted up by safe-top/2 so NOVA's center sits on viewport vertical center,
     not stage center (the stage is offset down by the chapter padding-top) —
     this places it precisely between MARY (top) and ART (baseline at viewport bottom) */
  top: calc(50% - 36px);
  right: clamp(10px, 3vw, 56px);
  transform: translateY(-50%);
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
  font-size: clamp(120px, 20vw, 280px);
  color: var(--accent);
  z-index: 4;
  white-space: nowrap;
  text-shadow:
    0 0 28px oklch(54% 0.18 27 / 0.30),
    0 0 56px oklch(54% 0.18 27 / 0.18);
}
.umbral-nova .label {
  display: inline-block;
}

/* Portrait — approved museum-ivory PNG. Larger, vertically centered.
   Sits in front of MARY/ART; NOVA crosses in front on the right. */
.umbral-portrait {
  position: absolute;
  top: 50%; left: 50%;
  /* face sits in upper third of source — pull image down so the eyes land on viewport vertical center */
  transform: translate(-50%, -58%);
  height: min(97vh, 936px);
  width: auto;
  max-width: none;
  z-index: 3;
  pointer-events: none;
  opacity: calc((1 - var(--scroll-umbral, 0) * 0.35) * 0.86);
  filter: contrast(0.94) brightness(1.02);
  -webkit-mask-image: radial-gradient(ellipse 70% 78% at 50% 44%, #000 60%, rgba(0,0,0,0.85) 80%, transparent 100%);
          mask-image: radial-gradient(ellipse 70% 78% at 50% 44%, #000 60%, rgba(0,0,0,0.85) 80%, transparent 100%);
}
@media (max-width: 720px) {
  .umbral-portrait {
    height: min(82vh, 700px);
    transform: translate(-50%, -52%);
  }
}

@media (max-width: 720px) {
  .umbral-word { font-size: clamp(70px, 26vw, 180px); }
  .umbral-nova { font-size: clamp(90px, 32vw, 220px); }
}


/* ════════════════════════════════════════════════════════════════════
   CHAPTER II — ATMÓSFERA
   ════════════════════════════════════════════════════════════════════ */

.ch-atmosfera { padding-bottom: 8vh; }

/* Ghost text — giant typographic statement, pinned, artwork passes through */
.crossing {
  position: relative;
  height: 220vh;
  margin: 0;
}
.crossing-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 var(--margin-x);
}
.crossing-text {
  position: relative;
  z-index: 1;
  width: 100%;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(34px, 4.6vw, 80px);
  line-height: 1.05;
  letter-spacing: -0.028em;
  color: var(--ink);
  text-align: left;
  text-wrap: balance;
  max-width: 22ch;
  margin: 0 auto;
}
.crossing-text .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em);
  transition: opacity 700ms var(--ease), transform 900ms var(--ease);
  white-space: nowrap;
}
.crossing-text.is-revealed .word {
  opacity: 1;
  transform: none;
}
.crossing-text .dim { color: var(--ink-3); }

/* Artwork that crosses through the text */
.crossing-art {
  position: absolute;
  z-index: 2;
  width: clamp(280px, 28vw, 480px);
  aspect-ratio: 1 / 1;
  /* Travels from below to above the viewport as the user scrolls */
  --p: var(--crossing-progress, 0);   /* 0..1 */
  top: 50%;
  left: 50%;
  transform:
    translate(calc(-50% + var(--art-x, 8vw)), calc(120vh * (0.5 - var(--p))))
    rotate(var(--art-rot, -4deg));
  pointer-events: none;
  will-change: transform;
}
.crossing-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 24px 60px rgba(26, 24, 23, 0.08));
}

/* small artwork label that appears with the work */
.crossing-art .lbl {
  position: absolute;
  left: 0; bottom: -28px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
  opacity: calc(1 - abs(var(--p, 0) - 0.5) * 2.4);
}

/* Quiet plates — full artworks alone (a breath) */
.plate-quiet {
  height: 110vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  position: relative;
  background: var(--bg, transparent);
  transition: background 800ms var(--ease);
}
.plate-quiet .frame {
  width: min(720px, 64vw);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.plate-quiet .frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.plate-quiet .cap {
  position: static;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;
  white-space: nowrap;
  opacity: 1;
}
.plate-quiet .cap .num { color: inherit; margin-right: 12px; }

@media (max-width: 720px) {
  .crossing { height: 200vh; }
  .crossing-text { font-size: clamp(28px, 8vw, 44px); max-width: 18ch; }
  .crossing-art { width: 56vw; }
  .plate-quiet .frame { width: 80vw; }
  .plate-quiet .cap { font-size: 9.5px; white-space: normal; max-width: calc(100vw - 44px); }
}


/* ════════════════════════════════════════════════════════════════════
   CHAPTER III — DESCENSO
   Three voices, a descent into intimacy
   ════════════════════════════════════════════════════════════════════ */

.ch-descenso { padding-bottom: 10vh; position: relative; }

/* Voice rail — keeps the trace line visible inside body content */
.voice-rail {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--margin-x);
}
.voice-rail::before {
  /* internal column line connecting the cards (echo of the trace) */
  content: "";
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--ghost-2);
}

/* Voice I — biographical cards on the line */
.voice.voice-I {
  display: flex;
  flex-direction: column;
  gap: 20vh;
  padding: 20vh 0;
  position: relative;
}
.bio-card {
  position: relative;
  width: clamp(260px, 30vw, 360px);
  padding: 56px 28px 36px;
  border: 1px solid var(--ghost-2);
  background: var(--ivory);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.5;
  color: var(--accent);
  text-align: center;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
}
.bio-card.is-in { opacity: 1; transform: none; }
.bio-card .marker {
  position: absolute;
  top: -7px; left: 50%;
  width: 13px; height: 13px;
  background: var(--ivory);
  border: 1px solid var(--ink-3);
  border-radius: 50%;
  transform: translateX(-50%);
}
.bio-card .yr {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.bio-card.left  { align-self: flex-end; margin-right: calc(50% + 30px); text-align: right; }
.bio-card.right { align-self: flex-start; margin-left:  calc(50% + 30px); text-align: left; }

/* Voice II — typographic moment */
.voice.voice-II {
  padding: 24vh var(--margin-x);
  position: relative;
  z-index: 2;
  background: var(--ivory);
}
.voice-II .huge {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(40px, 6.2vw, 96px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
  max-width: 18ch;
  margin: 0 auto;
  text-wrap: balance;
}
.voice-II .huge em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
  letter-spacing: -0.005em;
}
.voice-II .huge .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.5em);
  transition: opacity 700ms var(--ease), transform 900ms var(--ease);
}
.voice-II .huge.is-revealed .word { opacity: 1; transform: none; }
.voice-II .attrib {
  display: block;
  margin-top: 64px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Voice III — existential testimony */
.voice.voice-III {
  padding: 30vh var(--margin-x) 24vh;
  position: relative;
  z-index: 2;
  background: var(--ivory);
}
.voice-III .col {
  max-width: 58ch;
  margin: 0 auto;
  font-family: var(--serif);
  font-size: clamp(18px, 1.55vw, 21px);
  line-height: 1.62;
  color: var(--ink);
}
.voice-III .col p { margin: 0 0 1.6em; opacity: 0; transform: translateY(16px); transition: opacity 900ms var(--ease), transform 1100ms var(--ease); }
.voice-III .col.is-in p { opacity: 1; transform: none; }
.voice-III .col p:nth-child(2) { transition-delay: 120ms; }
.voice-III .col p:nth-child(3) { transition-delay: 220ms; }
.voice-III .col p:nth-child(4) { transition-delay: 340ms; }
.voice-III .col p:nth-child(5) { transition-delay: 460ms; }

.voice-III .col em {
  font-style: italic;
  color: var(--accent);
}
.voice-III .col .lead {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 2em;
}
.voice-III .col .sig {
  display: block;
  margin-top: 32px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

@media (max-width: 720px) {
  .voice-rail::before { left: 22px; }
  .bio-card { width: calc(100% - 56px); margin-left: 56px !important; margin-right: 0 !important; text-align: left !important; }
  .bio-card .marker { left: -34px; top: 24px; transform: none; }
  .voice.voice-II { padding: 18vh 22px; }
  .voice.voice-III { padding: 18vh 22px; }
}


/* ════════════════════════════════════════════════════════════════════
   CHAPTER IV — ÍNDICE
   The exhibition opens. Five rooms, two further sections.
   ════════════════════════════════════════════════════════════════════ */

.ch-indice {
  padding: 18vh var(--margin-x) 12vh;
  position: relative;
  overflow: hidden;
}

.indice-head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: var(--gut);
  align-items: end;
  margin-bottom: 8vh;
}
.indice-head .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.indice-head h2 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(40px, 5.4vw, 80px);
  line-height: 0.96;
  letter-spacing: -0.03em;
  margin: 14px 0 0;
}
.indice-head h2:first-child {
  margin-top: 0;
}
.indice-head h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}
.indice-head .blurb {
  font-family: var(--serif);
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 40ch;
}

/* room list with hover-revealed thumbnail (desktop) */
.indice-rooms {
  position: relative;
  border-top: 1px solid var(--rule);
}
.room-link {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: baseline;
  gap: var(--gut);
  padding: 36px 0 32px;
  border-bottom: 1px solid var(--rule);
  position: relative;
  cursor: pointer;
  transition: padding 320ms var(--ease);
}
.room-link .num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  white-space: nowrap;
  color: var(--ink-3);
  transition: color 320ms var(--ease);
}
.room-link .name {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(28px, 3.6vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.024em;
  color: var(--ink);
  transition: transform 480ms var(--ease), color 320ms var(--ease);
}
.room-link .meta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: right;
  align-self: center;
}
.room-link:hover .num,
.room-link.is-hover .num { color: var(--accent); }
.room-link:hover .name,
.room-link.is-hover .name {
  transform: translateX(14px);
  font-style: italic;
  font-family: var(--serif);
  font-weight: 400;
  color: var(--accent);
}
.room-link:hover::before,
.room-link.is-hover::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: var(--accent);
}

/* hover thumbnail follows the cursor (desktop) */
.thumb-follow {
  position: fixed;
  pointer-events: none;
  z-index: 70;
  width: 280px;
  height: 360px;
  transform: translate(-50%, -50%) scale(0.96);
  opacity: 0;
  transition: opacity 240ms var(--ease), transform 320ms var(--ease);
  background: var(--ivory);
  overflow: hidden;
  box-shadow:
    0 1px 0 var(--ink-3),
    0 24px 64px rgba(26, 24, 23, 0.18);
}
.thumb-follow.is-visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.thumb-follow img { width: 100%; height: 100%; object-fit: cover; }

/* footer / secondary links */
.indice-footer {
  margin-top: 14vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gut);
  padding-top: 64px;
  border-top: 1px solid var(--rule);
}
.indice-footer .col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.indice-footer .ttl {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.indice-footer .big {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  transition: color 280ms var(--ease), transform 280ms var(--ease);
}
.indice-footer .big:hover { color: var(--accent); transform: translateX(8px); }

.indice-coda {
  margin-top: 16vh;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

@media (max-width: 720px) {
  .indice-head { grid-template-columns: 1fr; gap: 24px; }
  .room-link { grid-template-columns: 32px 1fr; padding: 24px 0 22px; }
  .room-link .meta { display: none; }
  .room-link:hover .name,
  .room-link.is-hover .name { transform: none; }
  .thumb-follow { display: none; }
  .indice-footer { grid-template-columns: 1fr; gap: 32px; }
}


/* ════════════════════════════════════════════════════════════════════
   Tweaks panel (custom — vanilla)
   ════════════════════════════════════════════════════════════════════ */

.tweaks {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: var(--ivory);
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms var(--ease), transform 280ms var(--ease);
}
.tweaks.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.tweaks .hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 10.5px;
}
.tweaks .hd .x {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: var(--ink-3);
}
.tweaks .hd .x:hover { color: var(--ink); }
.tweaks .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
}
.tweaks .row:last-child { border-bottom: none; }
.tweaks .row .k {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10.5px;
  color: var(--ink-2);
}
.tweaks .seg {
  display: flex;
  border: 1px solid var(--ink-3);
}
.tweaks .seg button {
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-right: 1px solid var(--ink-3);
}
.tweaks .seg button:last-child { border-right: none; }
.tweaks .seg button.is-on {
  background: var(--ink);
  color: var(--ivory);
}

/* Floating "tweaks" toggle */
.fab {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 100;
  width: 44px; height: 44px;
  background: var(--ink);
  color: var(--ivory);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(26,24,23,0.18);
  transition: transform 240ms var(--ease), opacity 240ms var(--ease);
}
.fab:hover { transform: scale(1.06); }
.fab.is-hidden { opacity: 0; pointer-events: none; transform: scale(0.8); }


/* ════════════════════════════════════════════════════════════════════
   Director's Notes overlay
   ════════════════════════════════════════════════════════════════════ */

.notes-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(241, 236, 227, 0.96);
  backdrop-filter: blur(8px);
  overflow-y: auto;
  display: none;
}
.notes-overlay.is-open { display: block; }
.notes-overlay .notes-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 80px 32px 160px;
}
.notes-overlay .notes-hd {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 64px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ink);
}
.notes-overlay .notes-hd h2 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
}
.notes-overlay .notes-hd .meta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.notes-overlay .notes-hd .close {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 6px 12px;
  border: 1px solid var(--ink);
}
.note {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--rule);
}
.note .id {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.note h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.note p {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 0.85em;
  max-width: 56ch;
}
.note ul {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  max-width: 56ch;
}
.note ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}
.note ul li::before { content: "—"; color: var(--accent); font-family: var(--mono); }

/* Annotation badges (visible when notes are on) */
.annotation {
  position: absolute;
  z-index: 30;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--ivory);
  border: 1px solid var(--accent);
  padding: 4px 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 240ms var(--ease);
}
body.show-notes-marks .annotation { opacity: 1; }


/* ════════════════════════════════════════════════════════════════════
   Mobile preview frame (toggled by tweaks)
   ════════════════════════════════════════════════════════════════════ */

body.mobile-preview {
  background: #2a2723;
}
body.mobile-preview .site-content {
  display: none;
}
body.mobile-preview .mobile-iframe {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 390px;
  height: min(844px, calc(100vh - 80px));
  border: 0;
  background: var(--ivory);
  box-shadow:
    0 0 0 8px #1a1817,
    0 24px 64px rgba(0,0,0,0.5);
  border-radius: 26px;
  z-index: 50;
  display: block;
}
.mobile-iframe { display: none; }


/* ════════════════════════════════════════════════════════════════════
   Reduced motion
   ════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 200ms !important;
  }
  .umbral-stage { transform: none !important; }
  .crossing-art { transform: translate(-50%, -50%) rotate(var(--art-rot, -4deg)) !important; }
}
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after {
  animation-duration: 0.001ms !important;
  transition-duration: 200ms !important;
}
body.reduce-motion .umbral-stage { transform: none !important; }
body.reduce-motion .crossing-art { transform: translate(-50%, -50%) rotate(var(--art-rot, -4deg)) !important; }


/* ════════════════════════════════════════════════════════════════════
   Grid overlay (designer view)
   ════════════════════════════════════════════════════════════════════ */
body.show-grid::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  background:
    linear-gradient(to right, rgba(217, 119, 87, 0.10) 1px, transparent 1px) 0 0 / calc((100% - var(--margin-x)*2) / 12) 100%,
    linear-gradient(to bottom, rgba(217, 119, 87, 0.06) 1px, transparent 1px) 0 0 / 100% 8px;
  margin: 0 var(--margin-x);
  width: calc(100% - var(--margin-x)*2);
}
