/* =====================================================================
   NOCTIS — The Hollow Kingdom
   ===================================================================== */
:root {
  --ink: #050506;
  --coal: #111214;
  --ash: #2a2c30;
  --mist: #8d939c;
  --bone: #dcdad4;
  --silver: #bfc2c8;
  --silver-dim: rgba(191, 194, 200, .55);
  --steel: #8796a8;            /* the only cold accent: lightning, focus */
  --hair: rgba(220, 218, 212, .16);
  --gutter: clamp(16px, 4.2vw, 64px);
  --vh: 1vh;
  --ease: cubic-bezier(.22, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; }
:root { color-scheme: dark; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--ink); color: var(--bone);
  font-family: var(--f-ui); font-weight: 300;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(135, 150, 168, .35); color: #fff; }
:focus-visible { outline: 1px solid var(--steel); outline-offset: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type roles ---------- */
.t-display { font-family: var(--f-display); font-weight: 400; letter-spacing: .01em; line-height: .95; }
/* engraved small caps for the name and the chapter headings */
.logo, .chapter__title [data-rise], .oaths__title [data-rise], .gate__title [data-rise], .menu__list b, .oath__name, .loader__word {
  font-family: var(--f-display-sc); font-weight: 400;
}
.t-orn { font-family: var(--f-orn); font-weight: 400; font-style: normal; letter-spacing: 0; text-transform: none; }
.t-sign { font-family: var(--f-sign); font-weight: 400; }
.t-ui { font-family: var(--f-ui); font-weight: 200; font-size: 10.5px; letter-spacing: .32em; text-transform: uppercase; line-height: 1.6; }
.t-body { font-family: var(--f-ui); font-weight: 300; font-size: clamp(14px, 1.02vw, 16px); line-height: 1.75; color: rgba(220, 218, 212, .74); letter-spacing: .01em; }

/* quill reveal: text is uncovered left→right like wet ink, a glint rides the edge */
.quill { --q: 120%; --qa: 0; position: relative; }
/* clip-path (not a mask): negative insets let swashes and flourishes spill past the box uncut */
.quill-ink {
  display: inline-block;
  -webkit-clip-path: inset(-1.2em calc(100% - var(--q)) -1.2em -1.2em);
          clip-path: inset(-1.2em calc(100% - var(--q)) -1.2em -1.2em);
}
/* SplitText line masks: room for ascenders/descenders so lines aren't shaved */
.ln-mask { padding: .14em 0 .22em; margin: -.14em 0 -.22em; }
.quill-glint {
  position: absolute; top: 55%; left: var(--q); width: 1.2em; height: 1.2em; margin: -.6em 0 0 -.6em;
  border-radius: 50%; pointer-events: none; opacity: var(--qa, 0);
  background: radial-gradient(circle, rgba(235, 240, 250, .55), rgba(200, 210, 230, .12) 40%, transparent 70%);
  filter: blur(2px);
}

/* =====================================================================
   Stage
   ===================================================================== */
.stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--ink); }
.stage__gl, .stage__fx { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage__fallback { position: absolute; inset: 0; display: none; }
.stage__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 57% 40%; filter: grayscale(1) brightness(.8); }
.no-webgl .stage__gl { display: none; }
.no-webgl .stage__fallback { display: block; }
.fx-near { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; }.grain {
  position: fixed; inset: -50%; z-index: 6; pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-4%, 3%); } 40% { transform: translate(3%, -5%); }
  60% { transform: translate(-6%, -2%); } 80% { transform: translate(5%, 4%); } 100% { transform: translate(0, 0); }
}

/* =====================================================================
   Preloader
   ===================================================================== */
.loader {
  --hole: 0%;
  position: fixed; inset: 0; z-index: 30; display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 45%, #0c0d0f 0%, #050506 70%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent var(--hole), #000 calc(var(--hole) + 18%));
          mask-image: radial-gradient(circle at 50% 50%, transparent var(--hole), #000 calc(var(--hole) + 18%));
}
.loader__inner { display: grid; justify-items: center; gap: 18px; text-align: center; padding: 0 var(--gutter); }
.loader__sigil { width: 64px; height: 86px; color: var(--silver); overflow: visible; }
.loader__word { font-size: 15px; letter-spacing: .9em; margin: 6px 0 0 .9em; color: var(--silver-dim); }
.loader__count { margin: 0; color: var(--silver); min-width: 10ch; }
.loader__count span:first-child { display: inline-block; min-width: 6ch; text-align: right; }
.loader__sep { margin: 0 .8em; opacity: .5; }
.loader__whisper, .loader__hint { margin: 0; color: rgba(220, 218, 212, .38); }
.loader__hint { position: fixed; bottom: calc(28px + env(safe-area-inset-bottom)); left: 0; right: 0; }
.loader__choices { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); margin-top: 10px; }
.loader__choices[hidden] { display: none; }
.choice { font-size: clamp(26px, 3vw, 40px); color: var(--bone); padding: 8px 4px; position: relative; transition: color .6s var(--ease), opacity .6s; }
.choice::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: 4px; height: 1px; background: currentColor; transform: scaleX(0); transition: transform .8s var(--ease); opacity: .5; }
.choice:hover::after, .choice:focus-visible::after { transform: scaleX(1); }
.loader__choices:hover .choice:not(:hover) { opacity: .4; }
.choice__star { width: 12px; height: 12px; color: var(--silver-dim); flex: none; }

/* =====================================================================
   HUD
   ===================================================================== */
.hud {
  position: fixed; z-index: 10; top: 0; left: 0; right: 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: calc(22px + env(safe-area-inset-top)) var(--gutter) 0;
  pointer-events: none; opacity: 0;
}
.hud > * { pointer-events: auto; }
.hud__brand { display: inline-flex; align-items: center; gap: 12px; justify-self: start; color: var(--silver); }
.hud__brand svg { width: 17px; height: 23px; }
.hud__brand span { letter-spacing: .5em; }
.hud__chapter { margin: 0; color: rgba(220, 218, 212, .55); white-space: nowrap; }
.hud__menu { justify-self: end; display: inline-flex; align-items: center; gap: 14px; color: var(--silver); padding: 8px 0; }
.hud__menu i { position: relative; width: 22px; height: 9px; }
.hud__menu b { position: absolute; left: 0; right: 0; height: 1px; background: currentColor; transition: transform .6s var(--ease); }
.hud__menu b:first-child { top: 0; } .hud__menu b:last-child { bottom: 0; transform: scaleX(.55); transform-origin: right; }
.hud__menu:hover b:last-child { transform: scaleX(1); }

.rail { position: fixed; z-index: 10; right: calc(var(--gutter) * .6); top: 50%; transform: translateY(-50%); opacity: 0; }
.rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 30px; position: relative; }
.rail__line { position: absolute; right: 4.5px; top: 4px; bottom: 4px; width: 1px; background: var(--hair); }
.rail__fill { position: absolute; inset: 0 0 auto 0; height: 0; background: var(--silver); }
.rail button { display: flex; align-items: center; flex-direction: row-reverse; gap: 14px; }
.rail i { width: 10px; height: 10px; display: grid; place-items: center; position: relative; }
.rail i::before { content: ""; width: 6px; height: 6px; transform: rotate(45deg); border: 1px solid var(--silver-dim); background: var(--ink); transition: background .6s, border-color .6s, transform .6s var(--ease); }
.rail span { opacity: 0; transform: translateX(8px); transition: opacity .6s, transform .6s var(--ease); color: rgba(220, 218, 212, .6); white-space: nowrap; font-size: 9.5px; }
.rail button:hover span, .rail button:focus-visible span { opacity: 1; transform: none; }
.rail .is-active i::before { background: var(--silver); border-color: var(--silver); transform: rotate(45deg) scale(1.25); }

.sound { position: fixed; z-index: 10; left: var(--gutter); bottom: calc(24px + env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 12px; color: var(--silver); opacity: 0; }
.sound__bars { display: inline-flex; align-items: center; gap: 2px; height: 14px; }
.sound__bars i { width: 1px; height: 2px; background: currentColor; transition: height .5s var(--ease); }
.sound.is-on .sound__bars i { animation: bar 1.4s ease-in-out infinite; }
.sound.is-on .sound__bars i:nth-child(2) { animation-delay: -.3s; } .sound.is-on .sound__bars i:nth-child(3) { animation-delay: -.7s; }
.sound.is-on .sound__bars i:nth-child(4) { animation-delay: -.2s; } .sound.is-on .sound__bars i:nth-child(5) { animation-delay: -1s; }
@keyframes bar { 0%, 100% { height: 3px; } 50% { height: 13px; } }
.sound em { font-style: normal; color: rgba(220, 218, 212, .45); }

.folio { position: fixed; z-index: 10; right: var(--gutter); bottom: calc(24px + env(safe-area-inset-bottom)); margin: 0; color: rgba(220, 218, 212, .45); opacity: 0; }
.folio span { color: var(--silver); }

/* ---------- menu ---------- */
.menu {
  position: fixed; inset: 0; z-index: 20; display: grid; place-items: center;
  background: rgba(5, 5, 6, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  clip-path: inset(0 0 100% 0); visibility: hidden;
}
.menu__arch { position: absolute; width: min(56vh, 70vw); height: min(92vh, 115vw); color: rgba(220, 218, 212, .1); left: 50%; top: 50%; transform: translate(-50%, -50%); }
.menu__close { position: absolute; top: calc(22px + env(safe-area-inset-top)); right: var(--gutter); display: inline-flex; align-items: center; gap: 14px; color: var(--silver); padding: 8px 0; }
.menu__close i { position: relative; width: 16px; height: 16px; }
.menu__close i::before, .menu__close i::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: currentColor; transform: rotate(45deg); }
.menu__close i::after { transform: rotate(-45deg); }
.menu__list { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(6px, 1.6vh, 18px); text-align: center; position: relative; }
.menu__list a { display: inline-grid; grid-template-columns: 3.4em auto; align-items: baseline; position: relative; padding: 2px 0; }
.menu__list span { color: rgba(220, 218, 212, .4); text-align: right; padding-right: 1.6em; }
.menu__list b { font-weight: 300; font-size: clamp(38px, 6.4vw, 92px); color: var(--bone); transition: color .6s, letter-spacing .9s var(--ease); }
.menu__list em { position: absolute; right: -.4em; bottom: -.15em; font-size: clamp(22px, 2.6vw, 38px); color: var(--silver); opacity: 0; transform: translateX(-10px); transition: opacity .6s, transform .8s var(--ease); pointer-events: none; }
.menu__list a:hover b, .menu__list a:focus-visible b { color: #fff; letter-spacing: .04em; }
.menu__list a:hover em, .menu__list a:focus-visible em { opacity: 1; transform: none; }
.menu__list:hover a:not(:hover) b { color: rgba(220, 218, 212, .35); }
.menu__foot { position: absolute; bottom: calc(26px + env(safe-area-inset-bottom)); color: rgba(220, 218, 212, .35); margin: 0; }

/* ---------- cursor ---------- */
.cursor { position: fixed; inset: 0; z-index: 40; pointer-events: none; display: none; }
.has-cursor .cursor { display: block; }
.has-cursor, .has-cursor * { cursor: none !important; }
.cursor__ring, .cursor__dot { position: absolute; left: 0; top: 0; border-radius: 50%; will-change: transform; }
.cursor__ring { width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1px solid rgba(220, 218, 212, .35); transition: width .5s var(--ease), height .5s var(--ease), margin .5s var(--ease), border-color .5s, background-color .5s; }
.cursor__dot { width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px; background: var(--bone); }
.cursor.is-hover .cursor__ring { width: 62px; height: 62px; margin: -31px 0 0 -31px; border-color: rgba(220, 218, 212, .7); background: rgba(220, 218, 212, .04); }
.cursor.is-down .cursor__ring { width: 24px; height: 24px; margin: -12px 0 0 -12px; }

/* =====================================================================
   Journey layers
   ===================================================================== */
/* no stacking context here: the hero sits under the castle overlay (z 3), every other layer above it */
.journey { position: relative; height: calc(var(--vh) * 1200); }
.layer { position: fixed; inset: 0; z-index: 4; visibility: hidden; opacity: 0; pointer-events: none; }
.layer.hero { z-index: 2; }
.layer.is-live { pointer-events: auto; }
.layer .chapter__text, .layer [data-depth] { will-change: transform; }

/* ---------- hero ---------- */
/* the name rides high, among the towers, so the castle can stand in front of it */
.hero { display: flex; flex-direction: column; justify-content: flex-start; align-items: center; padding: calc(var(--vh) * 14) var(--gutter) 0; text-align: center; }
.hero__eyebrow { margin: 0 0 clamp(14px, 2vw, 30px); color: rgba(220, 218, 212, .62); }
.logo { margin: 0; position: relative; font-size: clamp(70px, 15vw, 270px); line-height: .8; color: var(--bone); }
.logo__word { display: inline-flex; align-items: baseline; letter-spacing: .07em; margin-right: -.07em; filter: drop-shadow(0 0 40px rgba(200, 210, 230, .12)); }
.lc { display: inline-block; will-change: transform, opacity, filter;
  background: linear-gradient(180deg, #f1f0ec 8%, #c7c9cd 50%, #7d8189 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lc--orb { background: none; }
.lc--orb { width: .74em; height: .74em; margin: 0 .07em 0 0; color: #d9dade; align-self: center; transform: translateY(-.02em); }
.lc--orb svg { width: 100%; height: 100%; display: block; overflow: visible; }
.logo__script { -webkit-text-stroke: .6px rgba(220, 218, 212, .55); position: absolute; right: -.02em; bottom: -.58em; font-size: .3em; color: var(--bone); transform: rotate(-5deg); white-space: nowrap; text-shadow: 0 2px 24px rgba(0, 0, 0, .8); }
.hero__rule { width: 140px; height: 9px; color: var(--silver-dim); margin-top: clamp(40px, 5vw, 76px); }
.hero__lede { position: absolute; left: var(--gutter); bottom: calc(var(--vh) * 6 + 30px); max-width: 30ch; text-align: left; margin: 0; }
.hero__coords { position: absolute; right: var(--gutter); bottom: calc(var(--vh) * 6 + 30px); margin: 0; display: grid; gap: 4px; text-align: right; color: rgba(220, 218, 212, .55); }
.cue { position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; justify-items: center; gap: 10px; color: rgba(220, 218, 212, .55); }
.cue span { margin-left: .32em; }
.cue i { position: relative; width: 1px; height: 46px; background: var(--hair); overflow: hidden; }
.cue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--bone); animation: drip 2.4s var(--ease) infinite; }
@keyframes drip { 0% { top: -40%; } 70%, 100% { top: 100%; } }

/* ---------- chapters ---------- */
.chapter { display: flex; align-items: center; }
.chapter--two { align-items: flex-end; padding-bottom: calc(var(--vh) * 10); }
.chapter__text { position: relative; margin-left: calc(var(--gutter) * 1.6); max-width: min(560px, 46vw); }
.chapter__num { margin: 0 0 22px; color: rgba(220, 218, 212, .6); display: flex; align-items: center; gap: 14px; }
.chapter__num::before { content: ""; width: 34px; height: 1px; background: var(--silver-dim); }
.chapter__title { margin: 0 0 30px; font-size: clamp(54px, 7.6vw, 140px); color: var(--bone); text-shadow: 0 4px 40px rgba(0, 0, 0, .6); perspective: 700px; }
.chapter__title [data-rise] { display: block; }
.chapter__title em { display: inline-block; font-size: .5em; color: var(--silver); margin: -.1em 0 0 1.4em; transform: rotate(-4deg); line-height: 1.3; }
.chapter__text .t-body { max-width: 40ch; margin: 0; text-shadow: 0 1px 18px rgba(0, 0, 0, .9); }

.facts { position: absolute; right: calc(var(--gutter) * 1.7); bottom: calc(var(--vh) * 14); margin: 0; display: grid; gap: 0; min-width: 260px; }
.facts div { display: flex; justify-content: space-between; gap: 30px; padding: 12px 0; border-top: 1px solid var(--hair); }
.facts div:last-child { border-bottom: 1px solid var(--hair); }
.facts dt { color: rgba(220, 218, 212, .45); }
.facts dd { margin: 0; color: var(--bone); }

.epitaph { position: absolute; right: calc(var(--gutter) * 1.8); top: calc(var(--vh) * 20); margin: 0; font-size: clamp(34px, 3.6vw, 64px); color: var(--bone); max-width: 9em; text-align: right; line-height: 1.05; transform: rotate(-3deg); text-shadow: 0 2px 30px rgba(0, 0, 0, .7); }

/* ---------- passage ---------- */
.passage { display: grid; place-content: center; justify-items: center; text-align: center; gap: 28px; padding: 0 var(--gutter); }
.passage__label { margin: 0; color: rgba(220, 218, 212, .62); }
.passage__quote { margin: 0; font-size: clamp(36px, 5.2vw, 92px); line-height: 1.02; max-width: 15ch; color: #eeece6; text-shadow: 0 0 60px rgba(0, 0, 0, .55); }
.passage__quote .w { display: inline-block; will-change: opacity, filter, transform; }
.passage__cite { margin: 6px 0 0; font-size: clamp(24px, 2.4vw, 38px); color: var(--silver); }

/* ---------- oaths ---------- */
.oaths { display: grid; grid-template-rows: auto 1fr; justify-items: center; padding: calc(var(--vh) * 13) var(--gutter) calc(var(--vh) * 8); }
.oaths__head { text-align: center; display: grid; justify-items: center; }
.oaths__head .chapter__num { margin-bottom: 16px; }
.oaths__title { margin: 0; font-size: clamp(44px, 5.4vw, 100px); perspective: 700px; }
.oaths__title [data-rise] { display: block; }
.oaths__title em { display: block; font-size: .44em; color: var(--silver); margin-top: .1em; line-height: 1.4; }
.oaths__row { align-self: end; display: grid; grid-template-columns: repeat(3, minmax(0, min(300px, calc(var(--vh) * 37)))); gap: clamp(20px, 3.4vw, 60px); width: 100%; justify-content: center; }
.oath { position: relative; aspect-ratio: 300 / 430; display: grid; align-content: end; justify-items: center; text-align: center; padding: 0 clamp(20px, 2.2vw, 36px) clamp(26px, 3.4vh, 44px); }
.oath__arch { position: absolute; inset: 0; width: 100%; height: 100%; color: rgba(220, 218, 212, .5); overflow: visible; }
.oath::before { content: ""; position: absolute; inset: 1px; clip-path: polygon(0 100%, 0 37%, 6% 22%, 18% 10%, 34% 3%, 50% 0, 66% 3%, 82% 10%, 94% 22%, 100% 37%, 100% 100%); background: linear-gradient(180deg, rgba(10, 11, 13, .1), rgba(5, 5, 6, .72) 55%); }
.oath > :not(svg) { position: relative; }
.oath__num { margin: 0 0 10px; color: rgba(220, 218, 212, .5); }
.oath__name { margin: 0 0 16px; font-size: clamp(30px, 2.6vw, 46px); color: var(--bone); }
.oath__text { margin: 0; font-size: clamp(13px, .92vw, 15px); text-align: left; }
.dropcap { float: left; font-size: 3.4em; line-height: .8; height: .9em; margin: -.06em .16em 0 -.04em; position: relative; top: -.32em; color: var(--silver); text-shadow: 0 0 18px rgba(200, 210, 230, .18); }

/* ---------- gate ---------- */
.gate { overflow: hidden; }
.gate__doors { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--vh) * 80); perspective: 1400px; display: flex; }
.gate__half { width: 50%; height: 100%; will-change: transform; }
.gate__half svg { width: 100%; height: 100%; display: block; overflow: visible; }
.gate__half--l { transform-origin: 0% 50%; }
.gate__half--r { transform-origin: 100% 50%; }
.gate__text { position: absolute; left: 0; right: 0; top: calc(var(--vh) * 10); text-align: center; display: grid; justify-items: center; padding: 0 var(--gutter); }
.gate__text .chapter__num { margin-bottom: 14px; }
.gate__title { margin: 0 0 18px; font-size: clamp(44px, 6vw, 112px); perspective: 700px; text-shadow: 0 4px 40px rgba(0, 0, 0, .8); }
.gate__title [data-rise] { display: block; }
.gate__title em { display: block; font-size: .46em; color: var(--silver); line-height: 1.3; }
.gate__text .t-body { margin: 0; max-width: 36ch; text-shadow: 0 1px 18px rgba(0, 0, 0, 1); }
.gate__sign { position: absolute; left: 50%; bottom: calc(var(--vh) * 12 + 30px); transform: translateX(-50%); text-align: center; display: grid; justify-items: center; gap: 6px; }
.gate__sign .t-sign { margin: 0; font-size: clamp(54px, 5.6vw, 96px); color: var(--bone); line-height: 1; text-shadow: 0 0 30px rgba(0, 0, 0, 1), 0 0 10px rgba(0, 0, 0, 1); }
.gate__sign .t-ui { margin: 0; color: rgba(220, 218, 212, .55); text-shadow: 0 0 12px #000; }
/* sits on its own row above the sound toggle and folio so nothing collides */
.gate__foot { position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(60px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; color: rgba(220, 218, 212, .4); font-size: 9.5px; }
.gate__foot span:last-child { text-align: right; }
.gate__return { color: var(--bone); letter-spacing: inherit; text-transform: inherit; font-size: inherit; padding: 6px 0; }
.gate__return i { font-style: normal; display: inline-block; margin-left: .6em; transition: transform .6s var(--ease); }
.gate__return:hover i { transform: translateY(-4px); }

/* ---------- relics ---------- */
.relics { position: fixed; inset: 0; z-index: 5; pointer-events: none; opacity: 0; visibility: hidden; }
.relic { position: absolute; left: 0; top: 0; width: 28px; height: 28px; margin: -14px 0 0 -14px; pointer-events: auto; will-change: transform; }
.relics:not(.is-live) .relic { pointer-events: none; }
.relic i { position: absolute; inset: 0; display: grid; place-items: center; }
.relic i::before { content: ""; width: 7px; height: 7px; border: 1px solid rgba(230, 232, 238, .85); transform: rotate(45deg); background: rgba(5, 5, 6, .4); transition: transform .6s var(--ease), background .6s; }
.relic i::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 1px solid rgba(220, 218, 212, .35); animation: pulse 3.2s var(--ease) infinite; }
@keyframes pulse { 0% { transform: scale(.4); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
.relic > span { position: absolute; left: 30px; bottom: 22px; width: max-content; max-width: 230px; text-align: left; display: grid; gap: 6px; padding-left: 14px; border-left: 1px solid var(--hair); opacity: 0; transform: translateY(8px); transition: opacity .6s, transform .8s var(--ease); pointer-events: none; }
.relic--left > span { left: auto; right: 30px; text-align: right; padding: 0 14px 0 0; border-left: 0; border-right: 1px solid var(--hair); }
.relic b { font-weight: 300; font-size: 24px; color: var(--bone); line-height: 1; text-shadow: 0 2px 16px #000; }
.relic small { font-size: 9.5px; letter-spacing: .2em; color: rgba(220, 218, 212, .72); line-height: 1.7; text-shadow: 0 1px 10px #000; }
.relic:hover > span, .relic:focus-visible > span, .relic.is-open > span { opacity: 1; transform: none; }
.relic:hover i::before, .relic.is-open i::before { transform: rotate(225deg) scale(1.3); background: var(--bone); }

.noscript { position: fixed; inset: auto 0 40px; text-align: center; z-index: 50; font-family: var(--f-display); font-size: 22px; }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1180px) {
  .gate__foot { grid-template-columns: 1fr; justify-items: center; padding-left: 0; right: var(--gutter); }
  .gate__foot span { display: none; }
}
@media (max-width: 900px) {
  .facts { display: none; }
  .chapter__text { max-width: 70vw; }
}
@media (max-width: 760px) {
  .t-ui { font-size: 9.5px; letter-spacing: .26em; }
  .hud__chapter { display: none; }
  .hud { grid-template-columns: 1fr 1fr; }
  .rail { display: none; }
  .hero { padding-top: calc(var(--vh) * 11.5); }
  .logo { font-size: 16.5vw; }
  .logo__script { font-size: .34em; bottom: -.7em; }
  .hero__lede { left: var(--gutter); right: var(--gutter); max-width: none; bottom: calc(var(--vh) * 6 + 64px); text-align: center; font-size: 13.5px; }
  .hero__eyebrow { font-size: 8.5px; letter-spacing: .22em; }
  .cue span { display: none; }
  .cue i { height: 38px; }
  .hero__coords { display: none; }
  .chapter, .chapter--two { align-items: flex-end; padding-bottom: calc(var(--vh) * 11); }
  .chapter__text { margin: 0 var(--gutter); max-width: none; }
  .chapter__title { font-size: 15vw; margin-bottom: 20px; }
  .epitaph { left: var(--gutter); right: calc(var(--gutter) + 6px); top: calc(var(--vh) * 14); font-size: 8.4vw; max-width: none; }
  .passage__quote { font-size: 10vw; }
  .oaths { padding-top: calc(var(--vh) * 12); }
  .oaths__title { font-size: 12vw; }
  .oaths__row { grid-template-columns: minmax(0, min(290px, calc(var(--vh) * 40))); position: relative; align-self: center; }
  .oath { grid-area: 1 / 1; }
  .gate__doors { height: calc(var(--vh) * 66); }
  .gate__text { top: calc(var(--vh) * 12); }
  .gate__title { font-size: 12.5vw; }
  .gate__sign { bottom: calc(var(--vh) * 13); }
  .gate__foot { grid-template-columns: 1fr; justify-items: center; gap: 4px; left: var(--gutter); right: var(--gutter); padding-left: 0; text-align: center; bottom: calc(62px + env(safe-area-inset-bottom)); }
  .gate__sign { bottom: calc(var(--vh) * 15); }
  .gate__sign .t-ui { font-size: 8.5px; letter-spacing: .2em; }
  .gate__foot span { display: none; }
  .folio { display: none; }
  .relic b { font-size: 20px; }
  .relic > span { max-width: 170px; }
}

/* phones & tablets: drop full-screen blend/filter layers (the WebGL stage already carries the grain) */
@media (max-width: 760px), (pointer: coarse) {
  .grain { display: none; }
  .logo__word { filter: none; }
  .lc { will-change: transform, opacity; }
  .menu { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(5, 5, 6, .96); }
  .quill-glint { filter: none; }
  .chapter__title, .gate__title, .passage__quote { text-shadow: 0 2px 18px rgba(0, 0, 0, .7); }
}

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .cue i::after, .relic i::after, .sound.is-on .sound__bars i { animation: none; }
  .sound.is-on .sound__bars i { height: 8px; }
}
