/* ═══════════════════════════════════════════════════════════════
   ATRAMENT — THE ARCHIVE · stylesheet
   Eight chambers, one ink. Tokens first, then one block per
   chamber, then responsive + reduced-motion at the end.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --black: #0a0908;
  --coal: #14110f;
  --iron: #201c18;
  --bone: #e8e2d6;
  --smoke: #8f887a;
  --oxblood: #7a1f2b;
  --blood: #a3293a;
  --gilt: #b08d4f;
  --paper: #e9dfc9;
  --paper-deep: #ddcfae;
  --sepia: #372e24;
  --hairline: rgba(232, 226, 214, 0.14);
  --hairline-dark: rgba(43, 36, 29, 0.28);

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --display: "Gloock", "Georgia", serif;
  --brand: "Italiana", serif;
  --mono: "IBM Plex Mono", monospace;
  --blackletter: "Pirata One", "Georgia", serif;
  --script: "Pinyon Script", cursive;

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

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--black);
  color: var(--bone);
  font-family: var(--serif);
  overflow-x: hidden;
  cursor: none;
  transition: background-color 1.2s ease;
}
body.is-loading { overflow: hidden; }
body.theme-paper { background: var(--paper); }
@media (hover: none) { body { cursor: auto; } }

::selection { background: var(--oxblood); color: var(--bone); }

a:focus-visible { outline: 1px solid var(--oxblood); outline-offset: 4px; }

img { display: block; width: 100%; height: 100%; object-fit: cover; }

.mono {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--smoke);
}
.serif-i { font-family: var(--serif); font-style: italic; font-weight: 300; }

.svgdefs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ─────────────── loader ─────────────── */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--black);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2.6rem;
}
.loader__stamp { position: relative; }
.loader__the {
  position: absolute; top: -0.72em; left: -0.55em; z-index: 2;
  font-family: var(--script);
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  color: var(--oxblood);
  transform: rotate(-9deg);
  opacity: 0;
}
.loader__word { display: flex; gap: 0.14em; }
.loader__word span {
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 4.2rem);
  letter-spacing: 0.12em;
  opacity: 0;
  transform: scale(1.5);
  filter: blur(10px);
}
.loader__line {
  width: min(240px, 44vw); height: 1px;
  background: var(--hairline); overflow: hidden;
}
.loader__line span {
  display: block; width: 100%; height: 100%;
  background: var(--bone);
  transform: scaleX(0); transform-origin: left;
}
.loader__count { opacity: 0.7; }

/* ─────────────── cursor ─────────────── */
.cursor, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 99;
  pointer-events: none; border-radius: 50%;
  will-change: transform;
}
.cursor {
  width: 5px; height: 5px; background: var(--bone);
  transform: translate(-50%, -50%);
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid rgba(232, 226, 214, 0.35);
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  transition: width 0.35s ease, height 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}
.cursor-ring__label {
  font-size: 0.5rem; letter-spacing: 0.2em; color: var(--bone);
  opacity: 0; transition: opacity 0.3s ease;
  transform: translateY(0.05em);
}
.cursor-ring.is-hover {
  width: 64px; height: 64px;
  border-color: rgba(122, 31, 43, 0.9);
  background: rgba(122, 31, 43, 0.12);
}
.cursor-ring.is-view {
  width: 84px; height: 84px;
  border-color: rgba(232, 226, 214, 0.55);
  background: rgba(10, 9, 8, 0.35);
  backdrop-filter: blur(2px);
}
.cursor-ring.is-view .cursor-ring__label,
.cursor-ring.is-ink .cursor-ring__label { opacity: 1; }
.cursor-ring.is-ink {
  width: 70px; height: 70px;
  border-color: rgba(176, 141, 79, 0.7);
  background: rgba(176, 141, 79, 0.08);
}
body.theme-paper .cursor { background: var(--sepia); }
body.theme-paper .cursor-ring { border-color: rgba(55, 46, 36, 0.5); }
body.theme-paper .cursor-ring__label { color: var(--sepia); }
@media (hover: none) { .cursor, .cursor-ring { display: none; } }

/* ─────────────── grain + progress ─────────────── */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.05;
  animation: grain 8s steps(10) infinite;
}
body.theme-paper .grain { opacity: 0.09; }
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5%, -8%); }
  30% { transform: translate(3%, -6%); }
  50% { transform: translate(-7%, 4%); }
  70% { transform: translate(6%, 8%); }
  90% { transform: translate(-3%, 3%); }
}

.progress {
  position: fixed; top: 0; right: 0; z-index: 60;
  width: 1px; height: 100%;
  background: var(--hairline);
  pointer-events: none;
}
.progress span {
  display: block; width: 100%; height: 100%;
  background: linear-gradient(var(--oxblood) 0%, var(--bone) 120%);
  transform: scaleY(0); transform-origin: top;
}

/* ─────────────── nav ─────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.6rem 2.4rem;
  mix-blend-mode: difference;
}
.nav__brand {
  font-family: var(--brand);
  font-size: 1.15rem; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--bone); text-decoration: none;
}
.nav__links { display: flex; gap: 2.2rem; }
.nav__links a {
  font-family: var(--mono); font-size: 0.62rem;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--bone); text-decoration: none;
  position: relative; padding-bottom: 3px;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--bone);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s var(--ease-out);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__meta { color: var(--bone); text-decoration: none; }
.nav.is-scrolled {
  background: rgba(10, 9, 8, 0.72);
  backdrop-filter: blur(10px);
  mix-blend-mode: normal;
  border-bottom: 1px solid var(--hairline);
}
@media (max-width: 1080px) {
  .nav__links { gap: 1.4rem; }
}
@media (max-width: 860px) {
  .nav__links { display: none; }
}

/* ─────────────── 00 · hero / threshold ─────────────── */
.hero {
  position: relative; height: 100svh; min-height: 640px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 26%, rgba(10, 9, 8, 0.88) 100%);
  pointer-events: none;
}
.hero__frame { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.hero__corner { position: absolute; opacity: 0; }
.hero__corner.tl { top: 5.4rem; left: 2.4rem; }
.hero__corner.tr { top: 5.4rem; right: 2.4rem; }
.hero__corner.bl { bottom: 2.2rem; left: 2.4rem; }
.hero__corner.br { bottom: 2.2rem; right: 2.4rem; }

.hero__lockup { position: relative; z-index: 2; text-align: center; }
.hero__the {
  position: absolute; z-index: 3;
  top: -0.42em; left: -0.18em;
  font-family: var(--script);
  font-size: clamp(2.2rem, 6.5vw, 5.4rem);
  color: var(--blood);
  transform: rotate(-9deg);
  opacity: 0;
  text-shadow: 0 2px 30px rgba(10, 9, 8, 0.6);
}
.hero__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.6rem, 16.5vw, 15rem);
  letter-spacing: 0.03em;
  line-height: 0.92;
  display: flex;
  text-shadow: 0 0 80px rgba(0, 0, 0, 0.55);
}
.hero__letter { display: inline-block; overflow: hidden; }
.hero__letter i {
  font-style: normal; display: inline-block;
  transform: translateY(112%) rotate(3deg);
}
.hero__sub {
  margin-top: 1.8rem;
  font-size: clamp(1rem, 2vw, 1.4rem);
  letter-spacing: 0.1em;
  color: var(--smoke);
  opacity: 0;
}
.hero__scroll {
  position: absolute; bottom: 2rem; left: 50%; z-index: 3;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
  opacity: 0;
}
.hero__drip {
  width: 1px; height: 46px; display: block;
  background: linear-gradient(var(--bone), transparent);
  overflow: hidden; position: relative;
}
.hero__drip::after {
  content: ""; position: absolute; left: 0; top: -50%;
  width: 100%; height: 50%;
  background: var(--oxblood);
  animation: drip 2.2s ease-in infinite;
}
@keyframes drip { 0% { top: -50%; } 100% { top: 110%; } }

/* ─────────────── 01 · index wall ─────────────── */
.index {
  position: relative;
  padding: clamp(6rem, 14vh, 10rem) 0 clamp(5rem, 12vh, 9rem);
  border-top: 1px solid var(--hairline);
  overflow: hidden;
}
.index__label { margin: 0 2.4rem 3.6rem; }
.index__wall { display: flex; flex-direction: column; gap: 0.4rem; }
.index__row {
  white-space: nowrap;
  line-height: 0.98;
  will-change: transform;
}
.index__inner { display: inline-flex; will-change: transform; }
.index__row span { display: inline-block; }
.index__row--out span {
  font-family: var(--display);
  font-size: clamp(3rem, 8.5vw, 8rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(232, 226, 214, 0.42);
  transition: color 0.7s ease, -webkit-text-stroke-color 0.7s ease;
}
.index__row--out:hover span { color: var(--bone); -webkit-text-stroke-color: var(--bone); }
.index__row--fill span {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(2.2rem, 6vw, 5.4rem);
  color: var(--oxblood);
  letter-spacing: 0.01em;
}
.index__note {
  margin: clamp(3rem, 8vh, 5rem) 2.4rem 0;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  color: var(--smoke);
  max-width: 42ch;
}

/* ─────────────── 02 · plates ─────────────── */
.plates { position: relative; border-top: 1px solid var(--hairline); }
.plates__pin {
  position: relative;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.plates__head {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 5.6rem 2.4rem 0;
  pointer-events: none;
}
.plates__label { margin-bottom: 0.9rem; }
.plates__title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.9rem, 4.4vw, 3.4rem);
  line-height: 1;
}
.plates__title .serif-i { color: var(--blood); }
.plates__counter { text-align: right; padding-top: 0.4rem; }
.plates__counter #plateCurrent { color: var(--blood); font-size: 1.4em; }

.plates__track {
  display: flex;
  gap: clamp(4rem, 8vw, 9rem);
  padding: 0 max(12vw, 8rem) 0 max(14vw, 9rem);
  align-items: center;
  will-change: transform;
}

.plate { position: relative; flex: 0 0 auto; }
.plate__etch {
  position: absolute;
  top: 46%; left: -0.36em;
  transform: translateY(-50%);
  z-index: 0;
  font-family: var(--display);
  font-size: clamp(12rem, 42vh, 26rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(232, 226, 214, 0.12);
  pointer-events: none;
  will-change: transform;
}
.plate__media {
  position: relative; z-index: 1;
  height: min(58vh, 560px);
  aspect-ratio: 3 / 4;
  background: var(--coal);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.plate__media img {
  filter: grayscale(0.12) contrast(1.04);
}
.plate__gl {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.plate__meta { margin-top: 1.5rem; max-width: 40ch; position: relative; z-index: 1; }
.plate__num { display: block; color: var(--blood); margin-bottom: 0.55rem; }
.plate__name {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  margin-bottom: 0.6rem;
  letter-spacing: 0.01em;
}
.plate__spec { line-height: 1.9; color: #a69d8d; }

.plates__rail {
  position: absolute; bottom: 2.4rem; left: 2.4rem; right: 2.4rem;
  height: 1px; background: var(--hairline);
}
.plates__rail span {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--oxblood), var(--bone));
  transform: scaleX(0); transform-origin: left;
}
.plates__hint {
  position: absolute; bottom: 3.4rem; left: 50%;
  transform: translateX(-50%);
  opacity: 0.55;
}

/* ─────────────── 03 · flash chamber ─────────────── */
.flash { position: relative; color: var(--sepia); }
.flash__tear {
  position: relative; z-index: 2;
  height: 66px;
  background: var(--paper);
}
.flash__tear--top {
  clip-path: polygon(0 100%, 100% 100%, 100% 62%, 96% 44%, 91% 58%, 86% 30%, 81% 52%, 76% 24%, 70% 48%, 64% 18%, 58% 44%, 52% 26%, 46% 52%, 40% 20%, 34% 46%, 28% 28%, 22% 54%, 16% 22%, 10% 48%, 5% 34%, 0 56%);
}
.flash__tear--btm {
  clip-path: polygon(0 0, 100% 0, 100% 38%, 95% 62%, 90% 40%, 85% 70%, 79% 44%, 73% 76%, 67% 50%, 61% 80%, 55% 52%, 49% 78%, 43% 48%, 37% 74%, 31% 46%, 25% 72%, 19% 44%, 13% 68%, 8% 50%, 4% 64%, 0 46%);
}
.flash__body {
  position: relative;
  background:
    radial-gradient(ellipse 80% 50% at 12% 8%, rgba(176, 141, 79, 0.10), transparent 60%),
    radial-gradient(ellipse 60% 40% at 88% 88%, rgba(122, 31, 43, 0.05), transparent 60%),
    radial-gradient(ellipse 40% 30% at 78% 18%, rgba(55, 46, 36, 0.07), transparent 65%),
    var(--paper);
  padding: clamp(4rem, 9vh, 7rem) clamp(1.4rem, 6vw, 6rem) clamp(5rem, 10vh, 8rem);
}
.flash__body::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.04 0.06' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.30 0 0 0 0 0.25 0 0 0 0 0.18 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
  opacity: 0.16;
  mix-blend-mode: multiply;
}
.flash__head { position: relative; text-align: center; margin-bottom: clamp(3.5rem, 8vh, 6rem); }
.flash__label { color: rgba(55, 46, 36, 0.62); margin-bottom: 2.2rem; }
.flash__title {
  font-family: var(--blackletter);
  font-weight: 400;
  font-size: clamp(3rem, 9vw, 7.5rem);
  line-height: 0.95;
  color: var(--sepia);
  letter-spacing: 0.01em;
}
.flash__no { color: var(--oxblood); font-size: 0.5em; vertical-align: 0.5em; }
.flash__lede {
  margin-top: 1.4rem;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  color: rgba(55, 46, 36, 0.75);
}
.flash__script {
  font-family: var(--script);
  font-size: 1.7em;
  color: var(--oxblood);
  margin-right: 0.3em;
}

.flash__sheet {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1180px;
  margin-inline: auto;
  border: 1px solid var(--hairline-dark);
}
.flash__piece {
  position: relative;
  padding: clamp(1.6rem, 3vw, 3rem) clamp(1.2rem, 2.4vw, 2.4rem) clamp(1.4rem, 2.6vw, 2.4rem);
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  transform: rotate(var(--rot, 0deg));
  transition: background 0.6s ease;
  border-right: 1px solid var(--hairline-dark);
  border-bottom: 1px solid var(--hairline-dark);
}
.flash__piece:nth-child(3n) { border-right: 0; }
.flash__piece:nth-last-child(-n+2) { border-bottom: 0; }
.flash__piece:hover .flash__art {
  transform: scale(1.02) rotate(0deg) !important;
  filter: contrast(1.06) drop-shadow(0 12px 28px rgba(55, 46, 36, 0.18));
}
.flash__piece.is-inked:hover .flash__stamp {
  animation: stamp-wiggle 0.6s ease;
}
@keyframes stamp-wiggle {
  0%, 100% { transform: rotate(11deg) scale(1); }
  40% { transform: rotate(8deg) scale(1.03); }
  70% { transform: rotate(13deg) scale(0.98); }
}
.flash__art {
  width: min(100%, 240px);
  height: auto;
  display: block;
  object-fit: contain;
  filter: contrast(1.02);
  clip-path: inset(8% 8% 8% 8%);
  opacity: 0.18;
  transform: scale(0.97);
  will-change: clip-path, opacity, transform;
}
.flash__piece.is-inked .flash__art {
  clip-path: inset(0% 0% 0% 0%);
  opacity: 1;
  transform: scale(1);
}
.flash__cap { text-align: center; }
.flash__cap .mono { color: rgba(55, 46, 36, 0.55); }
.flash__name {
  font-family: var(--blackletter); font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  color: var(--sepia);
  margin: 0.3rem 0 0.35rem;
}
.flash__price { color: rgba(55, 46, 36, 0.55); }
.flash__stamp {
  position: absolute;
  top: 14%; right: 10%;
  padding: 0.5rem 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--oxblood);
  border: 2px solid var(--oxblood);
  border-radius: 3px;
  transform: rotate(11deg) scale(2.4);
  opacity: 0;
  /* two mask layers, composited additively: turbulent ink + a 55% floor —
     the stamp reads distressed but the word never breaks apart */
  mask-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='d'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.6 -0.25'/%3E%3CfeComposite in='SourceGraphic' operator='in'/%3E%3C/filter%3E%3Crect width='100' height='100' fill='%23fff' filter='url(%23d)'/%3E%3C/svg%3E"),
    linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.55));
  mask-size: 130% 130%, 100% 100%;
  mask-position: center;
}
.flash__piece.is-inked .flash__stamp { animation: stamp 0.5s var(--ease-out) 0.55s forwards; }
@keyframes stamp {
  0% { opacity: 0; transform: rotate(11deg) scale(2.4); }
  60% { opacity: 1; transform: rotate(11deg) scale(0.94); }
  100% { opacity: 0.9; transform: rotate(11deg) scale(1); }
}

.flash__foot {
  max-width: 1180px;
  margin: 2rem auto 0;
  display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap;
}
.flash__foot .mono { color: rgba(55, 46, 36, 0.6); }

/* ─────────────── 04 · reliquary ─────────────── */
.reliquary { position: relative; border-top: 1px solid var(--hairline); }
.reliquary__pin {
  position: relative;
  height: 100svh;
  overflow: hidden;
}
.reliquary__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.reliquary__halo {
  position: absolute; z-index: 1;
  top: 50%; left: 50%;
  width: min(56vh, 520px); height: min(56vh, 520px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 12%, rgba(176, 141, 79, 0.5) 22%, transparent 34%, transparent 55%, rgba(176, 141, 79, 0.28) 68%, transparent 80%);
  -webkit-mask: radial-gradient(closest-side, transparent 96.5%, #000 97.5% 99%, transparent 100%);
          mask: radial-gradient(closest-side, transparent 96.5%, #000 97.5% 99%, transparent 100%);
  animation: halo-spin 28s linear infinite;
  opacity: 0.8;
  pointer-events: none;
}
@keyframes halo-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.reliquary__label {
  position: absolute; top: 5.6rem; left: 2.4rem; z-index: 2;
}
.reliquary__names {
  position: absolute; z-index: 2;
  left: 2.4rem; top: 50%;
  transform: translateY(-50%);
  min-height: 9rem;
}
.reliquary__name {
  position: absolute; top: 0; left: 0;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s var(--ease-out);
  pointer-events: none;
  width: max-content;
}
.reliquary__name.is-active { opacity: 1; transform: translateY(0); }
.reliquary__name .mono { display: block; margin-bottom: 0.7rem; color: var(--gilt); }
.reliquary__name h3 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.reliquary__name p { color: var(--smoke); font-size: clamp(1.05rem, 1.8vw, 1.3rem); }

.reliquary__caption {
  position: absolute; z-index: 2;
  right: 2.4rem; bottom: 5rem;
  max-width: 34ch;
  text-align: right;
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  color: var(--smoke);
}
.reliquary__dots {
  position: absolute; z-index: 2;
  left: 2.4rem; bottom: 5rem;
  display: flex; gap: 0.7rem;
}
.reliquary__dots span {
  width: 5px; height: 5px; border-radius: 50%;
  background: transparent;
  border: 1px solid var(--smoke);
  transition: background 0.5s ease, border-color 0.5s ease;
}
.reliquary__dots span.is-active { background: var(--gilt); border-color: var(--gilt); }

/* ─────────────── 05 · the sitting ─────────────── */
.sitting { position: relative; border-top: 1px solid var(--hairline); }
.sitting__pin {
  position: relative;
  height: 100svh;
  overflow: hidden;
}
.sitting__layer {
  position: absolute; inset: 0;
  will-change: clip-path;
}
.sitting__layer img { filter: grayscale(0.2) contrast(1.05) brightness(0.82); }
.sitting__shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10, 9, 8, 0.2) 0%, rgba(10, 9, 8, 0.05) 45%, rgba(10, 9, 8, 0.82) 100%);
}
.sitting__layer[data-stage="1"], .sitting__layer[data-stage="2"] {
  clip-path: polygon(0 110%, 100% 110%, 100% 110%, 0 110%);
}

.sitting__rail {
  position: absolute; z-index: 3;
  right: 2.4rem; top: 50%;
  transform: translateY(-50%);
  width: min(380px, 84vw);
  text-align: right;
}
.sitting__label { margin-bottom: 2.6rem; }
.sitting__stages { position: relative; min-height: 15rem; }
.sitting__stage {
  position: absolute; top: 0; right: 0; width: 100%;
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s var(--ease-out);
  pointer-events: none;
}
.sitting__stage.is-active { opacity: 1; transform: translateY(0); }
.sitting__stageno {
  display: block;
  font-family: var(--serif); font-style: italic;
  font-size: 2.6rem; color: var(--oxblood);
  margin-bottom: 0.8rem; line-height: 1;
}
.sitting__stage h3 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  margin-bottom: 0.9rem;
}
.sitting__stage p {
  font-size: 1.08rem; line-height: 1.7;
  color: rgba(232, 226, 214, 0.82);
}
.sitting__progress { margin-top: 2.4rem; color: #a69d8d; }
.sitting__progress #sittingNo { color: var(--blood); }

/* ─────────────── 06 · vault ─────────────── */
.vault {
  position: relative;
  background: #070605;
  border-top: 1px solid var(--hairline);
  padding: clamp(5rem, 11vh, 8.5rem) clamp(1.4rem, 6vw, 6rem) clamp(6rem, 12vh, 9rem);
  overflow: hidden;
}
.vault__head { position: relative; z-index: 3; max-width: 1200px; margin: 0 auto 4.5rem; }
.vault__label { margin-bottom: 2.2rem; color: var(--smoke); }
.vault__title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 1.02;
}
.vault__title .serif-i { color: var(--gilt); }
.vault__lede {
  margin-top: 1.4rem;
  max-width: 44ch;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  color: var(--smoke);
}

.vault__wall {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto;
  columns: 3; column-gap: 2rem;
}
.vault__piece {
  break-inside: avoid;
  margin: 0 0 2rem;
  opacity: 1;
}
.vault__media {
  overflow: hidden;
  background: var(--coal);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.vault__media img {
  filter: grayscale(1) brightness(0.78) contrast(1.06);
  transform: scale(1.015);
  transition: filter 0.9s ease, transform 1.6s var(--ease-out);
}
.vault__piece:hover .vault__media img {
  filter: grayscale(0.06) brightness(0.97) contrast(1.02);
  transform: scale(1.055);
}
.vault__cap { padding: 1rem 0.2rem 0; }
.vault__no { display: block; color: var(--gilt); margin-bottom: 0.45rem; }
.vault__name {
  font-family: var(--display); font-weight: 400;
  font-size: 1.35rem; letter-spacing: 0.015em;
  margin-bottom: 0.4rem;
}
.vault__spec { color: #97907f; line-height: 1.8; }

.vault__piece--exception .vault__media { outline: 1px solid rgba(163, 41, 58, 0.55); outline-offset: 6px; }
.vault__piece--exception .vault__no { color: var(--blood); }
.vault__piece--exception .vault__name { color: var(--blood); }

/* the lantern — everything outside the lamp falls to near-black.
   two layers share the same origin: a warm candle core, then the dark. */
.vault__dark {
  --lx: 50%; --ly: 34%;
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle 300px at var(--lx) var(--ly), rgba(232, 226, 214, 0.045), transparent 62%),
    radial-gradient(circle 400px at var(--lx) var(--ly), rgba(176, 141, 79, 0.09), transparent 60%),
    radial-gradient(
      circle 460px at var(--lx) var(--ly),
      transparent 0%,
      rgba(7, 6, 5, 0.16) 42%,
      rgba(7, 6, 5, 0.84) 78%,
      rgba(7, 6, 5, 0.93) 100%
    );
}
.vault__hint {
  position: relative; z-index: 3;
  display: block; margin: 4rem auto 0; text-align: center;
  opacity: 0.5;
}

@media (max-width: 1080px) { .vault__wall { columns: 2; } }
@media (max-width: 640px) { .vault__wall { columns: 1; } }
/* no fine pointer, no lamp — show the wall plainly on any touch device;
   the begin chamber pours its own ink there, so its hint goes too */
@media (hover: none), (pointer: coarse) {
  .vault__dark, .vault__hint { display: none; }
  .vault__media img { filter: grayscale(0.4) brightness(0.9) contrast(1.03); }
  .begin__hint { display: none; }
}

/* ─────────────── 07 · begin ─────────────── */
.begin {
  position: relative;
  min-height: 100svh;
  border-top: 1px solid var(--hairline);
  overflow: hidden;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
}
.begin__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.begin__hint {
  position: absolute; top: 5.6rem; left: 50%;
  transform: translateX(-50%);
  opacity: 0.55;
  text-align: center;
}
.begin__foot {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 1.4rem;
  padding-bottom: clamp(3rem, 8vh, 5.5rem);
  pointer-events: none;
}
.begin__foot a { pointer-events: auto; }
.begin__goo {
  position: absolute;
  top: -20px; left: 50%;
  width: 0; height: 0;
  filter: url(#goo);
}
.begin__blob {
  position: absolute;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--oxblood);
  transform: translate(-50%, -50%) scale(0);
}
.begin__btn {
  position: relative;
  width: 172px; height: 172px;
  border: 1px solid rgba(232, 226, 214, 0.4);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  color: var(--bone);
  background: rgba(10, 9, 8, 0.35);
  backdrop-filter: blur(3px);
  transition: border-color 0.5s ease, background 0.5s ease;
  will-change: transform;
}
.begin__btn:hover { border-color: var(--blood); background: rgba(122, 31, 43, 0.14); }
.begin__btnword {
  font-family: var(--display);
  font-size: 2rem;
  letter-spacing: 0.02em;
}
.begin__period { color: var(--blood); }
.begin__phone { letter-spacing: 0.3em; text-decoration: none; transition: color 0.4s ease; }
.begin__phone:hover { color: var(--bone); }
.begin__note { opacity: 0.55; font-size: 0.58rem; text-align: center; }

/* chamber progress rail — fixed left edge */
.chamber-rail {
  position: fixed;
  left: 1.4rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  pointer-events: none;
}
.chamber-rail span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(232, 226, 214, 0.22);
  transition: background 0.45s ease, border-color 0.45s ease, transform 0.45s ease;
}
.chamber-rail span.is-active {
  background: var(--oxblood);
  border-color: var(--oxblood);
  transform: scale(1.35);
}
@media (max-width: 900px) { .chamber-rail { display: none; } }

/* ─────────────── footer ─────────────── */
.footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.6rem 2.4rem;
  border-top: 1px solid var(--hairline);
  position: relative; z-index: 2;
  background: var(--black);
}
.footer a { color: var(--smoke); text-decoration: none; transition: color 0.3s; }
.footer a:hover { color: var(--bone); }

/* ─────────────── responsive ─────────────── */
@media (max-width: 900px) {
  .plates__pin { height: auto; overflow: visible; display: block; padding: 5.4rem 0 3.5rem; }
  .plates__head { position: static; padding: 0 1.4rem 3rem; }
  .plates__counter { display: none; }
  .plates__track {
    flex-direction: column;
    gap: 5.5rem;
    padding: 0 1.4rem;
    align-items: center;
  }
  .plate__media { height: auto; width: min(84vw, 440px); }
  .plate__etch { font-size: clamp(9rem, 34vw, 15rem); left: -0.2em; }
  .plates__rail, .plates__hint { display: none; }

  .flash__sheet { grid-template-columns: 1fr; background: none; }
  .flash__piece {
    border-right: 0;
    border-bottom: 1px solid var(--hairline-dark);
  }
  .flash__piece:nth-child(3n) { border-right: 0; }
  .flash__piece:nth-last-child(-n+3) { border-bottom: 1px solid var(--hairline-dark); }
  .flash__piece:nth-last-child(-n+2) { border-bottom: 0; }
  .flash__piece:last-child { border-bottom: 0; }
  .flash__art { clip-path: inset(0); opacity: 1; transform: none; }

  .reliquary__names { top: auto; bottom: 9.5rem; transform: none; }
  .reliquary__caption { right: 2.4rem; left: 2.4rem; bottom: 2.2rem; max-width: none; text-align: left; font-size: 0.95rem; }
  .reliquary__dots { left: auto; right: 2.4rem; bottom: 5.2rem; }
  .reliquary__halo { width: 74vw; height: 74vw; }

  .sitting__rail {
    right: 1.4rem; left: 1.4rem; top: auto; bottom: 2.2rem;
    transform: none;
    width: auto;
    text-align: left;
    background: linear-gradient(transparent, rgba(10, 9, 8, 0.72) 30%);
    padding: 2rem 0 0;
  }
  .sitting__label { margin-bottom: 1.4rem; }
  .sitting__stages { min-height: 12.5rem; }
  .sitting__stage { right: auto; left: 0; }

  .footer { flex-direction: column; gap: 0.8rem; }
}

@media (max-width: 520px) {
  .hero__corner.tr, .hero__corner.br { display: none; }
  .index__label, .index__note { margin-inline: 1.4rem; }
  .begin__btn { width: 148px; height: 148px; }
}

/* ─────────────── reduced motion ─────────────── */
@media (prefers-reduced-motion: reduce) {
  .grain, .hero__drip::after, .reliquary__halo { animation: none; }
  .loader { display: none !important; }
  body.is-loading { overflow: auto; }
  .hero__letter i, .hero__sub, .hero__corner, .hero__scroll, .hero__the { opacity: 1 !important; transform: none !important; }
  .progress { display: none; }
  .flash__art { clip-path: inset(0) !important; opacity: 1 !important; transform: none !important; }
  .flash__stamp { opacity: 0.9; transform: rotate(11deg) scale(1); animation: none; }
  .plates__pin { height: auto; display: block; padding: 6rem 0 4rem; overflow-x: auto; }
  .plates__head { position: static; padding: 0 2.4rem 3rem; }
  .plates__track { overflow-x: auto; }
  .plates__hint { display: none; }
  .sitting__pin { height: auto; }
  .sitting__layer { position: relative; height: 72vh; clip-path: none !important; }
  .sitting__rail {
    position: static; transform: none;
    width: auto; max-width: 620px;
    margin: 0 auto; padding: 3.5rem 2.4rem 4rem;
    text-align: left;
  }
  .sitting__stages { min-height: 0; }
  .sitting__progress { display: none; }
  .reliquary__name, .sitting__stage { position: relative; opacity: 1; transform: none; margin-bottom: 2rem; }
  .begin__hint { display: none; }
  .vault__dark, .vault__hint { display: none; }
  .vault__media img { filter: grayscale(0.35) brightness(0.92) contrast(1.03); }
}
