/* =========================================================
   Chapters — shared
   ========================================================= */
.chapter { background: var(--bg); }
.chapter .nav { background: linear-gradient(180deg, rgba(11, 7, 9, .9) 0%, rgba(11, 7, 9, .5) 60%, transparent); transition-delay: .2s; }
.nav__links a[aria-current] span { color: var(--saffron); }
.nav__links a[aria-current]::after { transform: scaleX(1); }

/* ---------- Curtain between pages: a chapter title card ---------- */
.veil {
  position: fixed; inset: 0; z-index: 100; pointer-events: none; display: grid; place-items: center;
  background: radial-gradient(70% 60% at 50% 50%, #140c10, var(--bg) 70%);
  opacity: 1; transition: opacity 1.1s cubic-bezier(.4, 0, .2, 1) .25s;
}
.veil--open { opacity: 0; transition: none; }
.veil--out { opacity: 0; }
.veil__card { text-align: center; display: grid; justify-items: center; gap: 12px; transition: opacity .6s ease, transform .9s cubic-bezier(.4, 0, .2, 1), filter .9s ease; }
.veil--out .veil__card { opacity: 0; transform: translateY(-14px) scale(1.02); filter: blur(6px); }
.veil__num { font: 500 12px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--saffron); }
.veil__num [lang="mr"] { font-size: 16px; letter-spacing: 0; }
.veil__title { font-family: var(--display); font-weight: var(--display-weight, 700); font-size: clamp(56px, 9vw, 128px); line-height: 1.15; color: var(--gold); text-shadow: 0 0 60px rgba(255, 140, 50, .3); }
.veil__en { font: 400 13px/1.4 var(--sans); letter-spacing: .06em; color: var(--dim); }
.veil__card::after { content: ''; width: 140px; height: 1px; margin-top: 10px; background: linear-gradient(90deg, transparent, var(--saffron), transparent); transform-origin: center; animation: veil-line 1.6s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes veil-line { from { transform: scaleX(0); opacity: 0; } }
/* leaving: black closes in from the click, then the next chapter's card fades up */
.veil--in { opacity: 1; transition: none; pointer-events: all; animation: veil-in .7s cubic-bezier(.7, 0, .3, 1) both; }
.veil--in .veil__card { animation: veil-card .6s ease .45s both; }
@keyframes veil-in {
  from { clip-path: circle(0 at var(--x, 50%) var(--y, 50%)); }
  to { clip-path: circle(150% at var(--x, 50%) var(--y, 50%)); }
}
@keyframes veil-card { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }
@media (prefers-reduced-motion: reduce) { .veil, .veil__card { transition-duration: .2s; } .veil--in, .veil--in .veil__card, .veil__card::after { animation: none; } }


/* Reveal on view */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: calc(var(--d, 0) * 1s); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* Intro title card */
.ch-intro {
  position: relative; min-height: 100svh; display: grid; place-items: center; text-align: center;
  padding: 120px var(--gutter) 80px; overflow: hidden; isolation: isolate;
}
.ch-intro::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 50% 62%, rgba(255, 120, 40, .16), transparent 70%),
    radial-gradient(90% 70% at 50% 100%, rgba(120, 40, 30, .35), transparent 70%);
}
.ch-intro__num { font: italic 400 clamp(20px, 2vw, 26px)/1 var(--serif); color: var(--saffron); letter-spacing: .04em; }
.ch-intro__mr {
  display: block; margin-top: 18px;
  font-family: var(--deva); font-size: clamp(64px, 13vw, 180px); line-height: 1.05; color: var(--gold);
  text-shadow: 0 0 60px rgba(255, 140, 50, .35);
}
.ch-intro__en { display: block; margin-top: 8px; font: 500 12px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.ch-intro__lede { max-width: 560px; margin: 34px auto 0; font: italic 400 clamp(19px, 1.7vw, 24px)/1.45 var(--serif); color: var(--muted); text-wrap: balance; }
.ch-intro > div > * { opacity: 0; transform: translateY(24px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); transition-delay: calc(.35s + var(--i, 0) * .14s); }
.is-ready .ch-intro > div > * { opacity: 1; transform: none; }
.scroll-cue { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: grid; justify-items: center; gap: 10px; font: 500 10px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--dim); }
.scroll-cue::after { content: ''; width: 1px; height: 46px; background: linear-gradient(var(--saffron), transparent); animation: cue 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* Common section copy */
.kicker { font: 500 11px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--saffron); }
.h2 { font: 400 clamp(36px, 4.6vw, 68px)/1 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.h2 em { font-style: italic; font-weight: 500; color: var(--saffron); }
.body { font-size: 15.5px; line-height: 1.7; color: var(--muted); }
.mr { font-family: var(--deva); }

.pin { position: relative; }
.pin__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }

/* Next chapter */
.next { min-height: 80svh; display: grid; place-items: center; padding: 100px var(--gutter); position: relative; overflow: hidden; }
.next::before { content: ''; position: absolute; inset: 0; background: radial-gradient(50% 60% at 50% 100%, rgba(255, 120, 40, .14), transparent 70%); opacity: .6; transition: opacity .6s; }
.next:hover::before { opacity: 1; }
.next__link { position: relative; display: grid; justify-items: center; text-align: center; gap: 10px; }
.next__label { font: 500 11px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--dim); }
.next__mr { font-family: var(--deva); font-size: clamp(64px, 11vw, 150px); line-height: 1.1; color: var(--gold); transition: text-shadow .6s, transform .8s var(--ease); }
.next__link:hover .next__mr { text-shadow: 0 0 50px rgba(255, 130, 40, .6); transform: translateY(-4px); }
.next__en { font: 400 clamp(24px, 2.4vw, 34px)/1 var(--serif); }
.next__en span { display: inline-block; transition: transform .5s var(--ease); color: var(--saffron); }
.next__link:hover .next__en span { transform: translateX(8px); }
.next__tag { font: italic 400 18px/1.4 var(--serif); color: var(--muted); }

.site-foot { padding: 28px var(--gutter); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font: 500 10.5px/1.5 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--dim); }

/* =========================================================
   I · Killa — map fly-through
   ========================================================= */
.killa-map { height: 960vh; }
.killa-map .pin__sticky { background: #0d0a0d; }
.map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.map__sea { fill: #0f1724; }
.map__land { fill: #1c1418; }
.map__coast { fill: none; stroke: rgba(150, 190, 230, .35); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.map__waves path { fill: none; stroke: rgba(150, 190, 230, .08); stroke-width: 1; vector-effect: non-scaling-stroke; }
.map__crest { fill: none; stroke: rgba(230, 180, 92, .28); stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; filter: blur(6px); }
.map__crest-line { fill: none; stroke: rgba(230, 180, 92, .45); stroke-width: 1; stroke-dasharray: 2 5; vector-effect: non-scaling-stroke; }
.map__hatch path { fill: rgba(230, 180, 92, .18); }
.map__label { font: 500 11px var(--mono); letter-spacing: .04em; text-transform: uppercase; fill: rgba(244, 234, 220, .3); }
.map__label--sea { fill: rgba(150, 190, 230, .3); }
.map__city circle { fill: rgba(244, 234, 220, .4); }
.map__city text { font: 500 10px var(--mono); letter-spacing: .04em; text-transform: uppercase; fill: rgba(244, 234, 220, .4); }
.map__route-bg { fill: none; stroke: rgba(255, 138, 42, .22); }
.map__route { fill: none; stroke: var(--saffron); stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(255, 120, 30, .8)); }
.fort-pin .pin-ring { fill: none; stroke: var(--saffron); stroke-width: 1.2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.fort-pin .pin-icon { fill: #3a2a26; stroke: rgba(244, 234, 220, .6); stroke-width: 1; transition: fill .5s; }
.fort-pin text { font-family: var(--deva); font-size: 15px; fill: rgba(244, 234, 220, .55); transition: fill .5s; opacity: var(--lbl, 1); }
.fort-pin.is-active text { opacity: 1; }
.fort-pin .en { font: 500 8px var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.fort-pin.is-visited .pin-icon { fill: #8a4a1e; }
.fort-pin.is-active .pin-icon { fill: var(--saffron); stroke: #fff3e0; }
.fort-pin.is-active text { fill: var(--ink); }
.fort-pin.is-active .pin-ring { animation: ring 2s var(--ease) infinite; }
@keyframes ring { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(2.6); } }

.map-vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(80% 80% at 40% 50%, transparent 50%, rgba(11, 7, 9, .85) 100%), linear-gradient(90deg, transparent 50%, rgba(11, 7, 9, .7) 75%); }

.fort-cards { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-46%); width: min(420px, 38vw); height: min(620px, 78svh); }
.fort-card {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  opacity: 0; transform: translateY(30px); pointer-events: none;
  transition: opacity .7s var(--ease), transform .9s var(--ease);
}
.fort-card.is-on { opacity: 1; transform: none; pointer-events: auto; }
.fort-card__art { position: relative; width: 100%; aspect-ratio: 2 / 1; margin-bottom: 22px; border-radius: 6px; overflow: hidden; background: #1b1218; box-shadow: 0 0 0 1px rgba(240, 200, 144, .14); }
.fort-card__art img { width: 100%; height: 100%; display: block; object-fit: cover; }
.fort-card__credit { position: absolute; right: 6px; bottom: 5px; padding: 2px 6px; border-radius: 3px; background: rgba(0, 0, 0, .45); font: 400 9.5px/1.3 var(--mono); color: rgba(255, 255, 255, .72); text-decoration: none; }
.fort-card__credit:hover, .fort-card__credit:focus-visible { color: #fff; }
.fort-card__meta { display: flex; justify-content: space-between; font: 500 10.5px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--dim); }
.fort-card__meta b { color: var(--saffron); font-weight: 500; }
.fort-card .fort-card__mr { margin-top: 16px; font-family: var(--display); font-weight: var(--display-weight, 700); font-size: clamp(40px, 4vw, 58px); line-height: 1.1; color: var(--gold); }
.fort-card__en { font: 400 clamp(22px, 2vw, 28px)/1.1 var(--serif); }
.fort-card__year { display: inline-block; margin-top: 14px; font: italic 400 18px/1 var(--serif); color: var(--saffron); }
.fort-card p { margin-top: 12px; font-size: 15px; line-height: 1.65; color: var(--muted); }
.fort-card--intro .h2 { margin-top: 14px; }
.killa-progress { position: absolute; left: var(--gutter); bottom: 32px; display: flex; gap: 6px; }
.killa-progress i { width: 26px; height: 2px; background: rgba(244, 234, 220, .15); position: relative; overflow: hidden; }
.killa-progress i::after { content: ''; position: absolute; inset: 0; background: var(--saffron); transform: scaleX(var(--f, 0)); transform-origin: left; }

.fort-types { padding: 140px var(--gutter); } /* the gutter already centres it in the 1440 frame */

/* =========================================================
   II · Chronicles — horizontal scroll painting
   ========================================================= */
.chron { height: 1000vh; }
.chron__sky { position: absolute; inset: 0; background: linear-gradient(180deg, var(--sky-a, #2a2140), var(--sky-b, #d9875a)); }
.chron__fx { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.chron__fx--stars { background-image: radial-gradient(1.2px 1.2px at 10% 20%, #fff, transparent), radial-gradient(1px 1px at 30% 8%, #fff, transparent), radial-gradient(1.4px 1.4px at 55% 25%, #fff, transparent), radial-gradient(1px 1px at 72% 12%, #fff, transparent), radial-gradient(1.2px 1.2px at 88% 30%, #fff, transparent), radial-gradient(1px 1px at 18% 40%, #fff, transparent), radial-gradient(1px 1px at 64% 42%, #fff, transparent), radial-gradient(1.3px 1.3px at 42% 15%, #fff, transparent); background-size: 600px 400px; }
.chron__fx--rain { background: repeating-linear-gradient(105deg, transparent 0 14px, rgba(200, 220, 240, .14) 14px 15px, transparent 15px 40px); background-size: 200px 200px; animation: rain .35s linear infinite; }
@keyframes rain { to { background-position: -60px 200px; } }
.chron__hills { position: absolute; left: 0; right: 0; bottom: 0; height: 34%; }
.chron__hills svg { position: absolute; bottom: 0; width: 100%; height: 100%; }
.chron__track { position: absolute; top: 0; left: 0; height: 100%; display: flex; will-change: transform; }
.chron-panel { position: relative; width: 100vw; height: 100%; flex: none; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 4vw; padding: 90px calc(var(--gutter) + 4vw) 130px; }
.chron-panel__year {
  position: absolute; left: 50%; top: 48%; transform: translate(calc(-50% + var(--yx, 0px)), -50%);
  font: 400 clamp(140px, 26vw, 420px)/1 var(--serif); color: transparent; -webkit-text-stroke: 1px rgba(255, 240, 220, .2);
  pointer-events: none; white-space: nowrap;
}
.chron-panel__art { justify-self: center; width: min(340px, 30vw); aspect-ratio: 1; transform: translateX(var(--ax, 0px)); color: #f6d48a; filter: drop-shadow(0 2px 14px rgba(0, 0, 0, .35)); }
.chron-panel__art svg { width: 100%; height: 100%; overflow: visible; }
.chron-panel__art .d { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.2s var(--ease); }
.chron-panel__art .f { fill: var(--saffron); opacity: 0; transition: opacity 1.2s var(--ease) 1.2s; }
.chron-panel.is-active .d { stroke-dashoffset: 0; }
.chron-panel.is-active .f { opacity: 1; }
.chron-panel__text { max-width: 470px; opacity: var(--o, 1); transform: translateX(var(--tx, 0px)); text-shadow: 0 2px 30px rgba(0, 0, 0, .45); }
.chron-panel__date { font: 500 11px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink); opacity: .75; }
.chron-panel__text .chron-panel__mr { margin-top: 18px; font-family: var(--display); font-weight: var(--display-weight, 700); font-size: clamp(38px, 4vw, 60px); line-height: 1.1; color: var(--gold); }
.chron-panel__en { font: 400 clamp(28px, 2.8vw, 42px)/1.05 var(--serif); }
.chron-panel__text p { margin-top: 18px; font-size: 16px; line-height: 1.7; color: rgba(244, 234, 220, .86); }
.chron-panel__age { display: inline-block; margin-top: 22px; padding: 7px 14px; border: 1px solid rgba(244, 234, 220, .25); border-radius: 999px; font: 500 10.5px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; }

.chron__rail { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 40px; height: 40px; }
.chron__rail-line { position: absolute; left: 0; right: 0; top: 20px; height: 1px; background: rgba(244, 234, 220, .25); }
.chron__rail-fill { position: absolute; left: 0; top: 20px; height: 1px; width: 100%; background: var(--saffron); transform-origin: left; transform: scaleX(var(--rail, 0)); box-shadow: 0 0 8px var(--saffron); }
.chron__tick { position: absolute; top: 14px; width: 1px; height: 13px; background: rgba(244, 234, 220, .5); }
.chron__tick span { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); font: 500 9.5px/1 var(--mono); letter-spacing: .04em; color: rgba(244, 234, 220, .6); }
.chron__marker { position: absolute; top: 14px; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: var(--saffron); box-shadow: 0 0 0 4px rgba(255, 138, 42, .25), 0 0 16px var(--saffron); }
.chron__marker b { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); font: 400 20px/1 var(--serif); white-space: nowrap; }

/* =========================================================
   III · Armory — forged vitrines
   ========================================================= */
.vitrine { height: 240vh; }
.vitrine .pin__sticky { display: grid; grid-template-columns: minmax(280px, 1fr) 2fr; align-items: center; gap: 3vw; padding: 90px var(--gutter) 60px; }
.vitrine .pin__sticky::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 45% at 62% 52%, rgba(255, 110, 30, calc(.05 + var(--heat, 0) * .22)), transparent 70%); }
.vitrine__copy { opacity: calc(.15 + var(--intro, 0) * .85); transform: translateY(calc((1 - var(--intro, 0)) * 30px)); }
.vitrine__idx { font: 500 11px/1 var(--mono); letter-spacing: .04em; color: var(--dim); }
.vitrine__mr { margin-top: 18px; font-family: var(--deva); font-size: clamp(48px, 5vw, 76px); line-height: 1.05; color: var(--gold); }
.vitrine__en { font: 400 clamp(26px, 2.6vw, 38px)/1.1 var(--serif); }
.vitrine__copy p { margin-top: 18px; max-width: 420px; }
.vitrine__specs { margin-top: 28px; display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; max-width: 420px; padding-top: 20px; border-top: 1px solid var(--line); }
.vitrine__specs dt { font: 500 10.5px/1.5 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--dim); }
.vitrine__specs dd { font-size: 14px; color: var(--ink); }
.vitrine__stage { position: relative; width: 100%; aspect-ratio: 1000 / 360; transform: rotate(var(--rot, 0deg)) scale(var(--sc, 1)); }
.vitrine__stage svg { width: 100%; height: 100%; overflow: visible; }
.w-outline { fill: none; stroke: #f4d9b0; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--draw, 0)); opacity: calc(1 - var(--heat, 0) * .55); }
.w-steel { opacity: var(--heat, 0); }
.w-hot { opacity: var(--glow, 0); mix-blend-mode: screen; filter: blur(.5px) drop-shadow(0 0 12px #ff6a1a); }
.w-note { opacity: 0; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.w-note.is-on { opacity: 1; }
.w-note line { stroke: rgba(255, 170, 110, .7); stroke-width: 1; }
.w-note circle { fill: var(--saffron); }
.w-note text { font: 500 13px var(--mono); letter-spacing: .04em; fill: var(--muted); }
.armory-intro-strip { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; margin-top: 40px; font: 500 11px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--dim); }

/* =========================================================
   IV · Legacy
   ========================================================= */
.seal { height: 320vh; }
.seal .pin__sticky { display: grid; grid-template-columns: 1fr 1.3fr; align-items: center; gap: 4vw; padding: 90px var(--gutter) 60px; }
.seal__copy p { margin-top: 20px; max-width: 440px; }
.seal__moon { width: 120px; height: 120px; margin-top: 40px; }
.seal__stage { position: relative; width: min(460px, 100%, 62svh); aspect-ratio: 1; justify-self: center; display: grid; place-items: center; container-type: inline-size; }
.seal__plate { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.seal__body { opacity: var(--plate, 0); transform: scale(calc(.94 + var(--plate, 0) * .06)); transform-origin: center; transform-box: fill-box; }
.seal__draw path { fill: none; stroke: #f0c890; stroke-width: 1.6; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--frame, 0)); opacity: calc(1 - var(--plate, 0) * .9); filter: drop-shadow(0 0 6px rgba(255, 160, 80, .6)); }
/* Raised, cast letters: lit from the upper left like the plate */
.seal__text {
  position: relative; margin-top: 1cqw; text-align: center;
  font: 600 8.3cqw/1.18 'Khand', var(--deva); letter-spacing: 0;
  color: #d89a5c;
  text-shadow: -.035em -.035em 0 rgba(255, 222, 176, .7), .045em .05em 0 rgba(40, 16, 4, .95), .08em .1em .14em rgba(20, 8, 2, .7);
}
.seal__line { display: block; white-space: nowrap; }
/* 3D seal: the canvas is larger than the stage so syllables can fly in from outside it */
.seal__gl { position: absolute; left: 50%; top: 50%; width: 150%; height: 150%; transform: translate(-50%, -50%); pointer-events: none; }
.seal__stage { touch-action: pan-y; border-radius: 12%; }
.seal__stage:focus-visible { outline: 2px solid var(--saffron); outline-offset: 8px; }
.seal--3d .seal__plate, .seal--3d .seal__text { opacity: 0; }
.seal__ak { display: inline-block; will-change: transform, opacity; }
.seal__tr { position: absolute; left: -20%; right: -20%; top: 103%; text-align: center; font: italic 400 clamp(16px, 1.4vw, 20px)/1.5 var(--serif); color: var(--muted); opacity: var(--tr, 0); }

.council { height: 420vh; }
.council .pin__sticky { display: grid; grid-template-columns: 1fr 1.2fr; align-items: center; gap: 4vw; padding: 90px var(--gutter) 60px; }
.council__wheel { position: relative; width: min(600px, 100%); aspect-ratio: 1; justify-self: center; }
.council__wheel svg { width: 100%; height: 100%; overflow: visible; }
.council__card { min-height: 220px; }

.navy { height: 300vh; }
.navy .pin__sticky { background: linear-gradient(180deg, #120e1c 0%, #3a2034 40%, #b65a3a 62%, #f0a05a 70%, #0e1a26 70.2%, #081018 100%); }
.navy__copy { position: absolute; left: var(--gutter); top: 16%; max-width: 480px; z-index: 3; }
.navy__copy p { margin-top: 18px; }
.navy__sea { position: absolute; left: 0; right: 0; bottom: 0; height: 30%; }
.navy__sea svg { position: absolute; left: 0; top: 0; height: 100%; }
.navy__ships .ship svg { width: 100%; height: 100%; display: block; }
.navy__ships { position: absolute; left: 0; right: 0; bottom: 22%; height: 22%; z-index: 2; }
.navy__fort { position: absolute; right: 6vw; bottom: 26%; width: min(380px, 34vw); z-index: 1; transform: translateY(calc((1 - var(--rise, 0)) * 60%)); opacity: var(--rise, 0); }
.navy__fort svg { width: 100%; display: block; }
.navy__sun { position: absolute; left: 58%; top: 70%; width: 30vmin; height: 30vmin; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, #fff1cc 0 18%, rgba(255, 190, 110, .5) 30%, transparent 66%); }

.raiyat { padding: 180px var(--gutter); text-align: center; position: relative; }
.raiyat__q { max-width: 900px; margin: 30px auto 0; font-family: var(--deva); font-size: clamp(34px, 4.6vw, 64px); line-height: 1.35; color: var(--gold); text-wrap: balance; }
.raiyat__en { max-width: 640px; margin: 22px auto 0; font: italic 400 clamp(20px, 1.8vw, 26px)/1.45 var(--serif); color: var(--ink); }
.raiyat__note { max-width: 520px; margin: 22px auto 0; font-size: 13.5px; color: var(--dim); }

.finale { height: 260vh; }
.finale .pin__sticky { display: grid; place-items: center; }
.finale__fig { position: absolute; bottom: 0; left: 50%; height: 92svh; aspect-ratio: 2 / 3; transform: translate(-50%, calc((1 - var(--up, 0)) * 25%)); opacity: calc(.2 + var(--up, 0) * .8); }
.finale__fig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.finale__fig img + img { --m: radial-gradient(circle at 58% 14%, #000 calc(var(--wake, 0) * 130% - 12%), transparent calc(var(--wake, 0) * 130%)); -webkit-mask-image: var(--m); mask-image: var(--m); }
/* the portrait fades out at its foot (a mask, not a page-coloured overlay, so lightning behind it never outlines a box) */
.finale__fig { -webkit-mask-image: linear-gradient(0deg, transparent 4%, #000 40%); mask-image: linear-gradient(0deg, transparent 4%, #000 40%); }
.finale__text { position: absolute; z-index: 2; left: 0; right: 0; bottom: 12svh; text-align: center; padding: 0 var(--gutter); opacity: var(--txt, 0); transform: translateY(calc((1 - var(--txt, 0)) * 30px)); }
.finale__text .h2 { font-size: clamp(40px, 6vw, 92px); text-shadow: 0 4px 40px rgba(0, 0, 0, .6); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 860px) {
  .fort-cards { left: var(--gutter); right: var(--gutter); width: auto; top: auto; bottom: 20px; transform: none; height: 54svh; }
  .fort-card { justify-content: flex-end; }
  .fort-card__art { display: none; }
  .fort-card p { font-size: 14px; }
  .map-vignette { background: linear-gradient(0deg, rgba(11, 7, 9, .97) 38%, rgba(11, 7, 9, .3) 62%, transparent 80%); }
  .killa-progress { display: none; }

  .chron-panel { grid-template-columns: 1fr; align-content: center; gap: 24px; padding: 90px var(--gutter) 120px; }
  .chron-panel__art { width: min(170px, 44vw); }
  .chron-panel__text p { font-size: 14.5px; }
  .chron__tick span { display: none; }

  .vitrine .pin__sticky { grid-template-columns: 1fr; align-content: center; gap: 20px; }
  .vitrine__stage { order: -1; }
  .vitrine__copy p { font-size: 14px; }
  .vitrine__specs { margin-top: 18px; padding-top: 14px; gap: 6px 16px; }
  .vitrine__specs dd { font-size: 13px; }
  .w-note { display: none; }

  .seal .pin__sticky, .council .pin__sticky { grid-template-columns: 1fr; align-content: center; gap: 24px; }
  .seal__moon { display: none; }
  .seal__tr { left: 0; right: 0; font-size: 15px; }
  .seal__copy p, .council__card .body { display: none; }
  .council__wheel { width: min(330px, 86vw); }
  .navy__copy p { font-size: 14px; }
  .navy__fort { width: 52vw; }
}

/* ---------- Chapter title: drawn on like a brush stroke ---------- */
.ch-intro__mr { clip-path: inset(-20% 100% -20% 0); transition: clip-path 1.7s cubic-bezier(.77, 0, .175, 1) .45s; }
.is-ready .ch-intro__mr { clip-path: inset(-20% 0 -20% 0); }
.next__mr { transition: text-shadow .6s, transform .8s var(--ease), letter-spacing .8s var(--ease); }
.next__link:active .next__mr { transform: scale(.98); }

/* ---------- 3D chapter layers ---------- */
.armory-gl { position: fixed; z-index: 1; pointer-events: none; }
.armory--3d .vitrine__stage { transform: none; aspect-ratio: 1000 / 620; } /* room for the 45° diagonal */
.armory--3d .vitrine__stage > svg { visibility: hidden; }
.w3d-notes { display: none; }
.armory--3d .w3d-notes { display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.w3d-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.w3d-lines line { stroke: rgba(255, 170, 110, .7); stroke-width: 1; }
.w3d-lines circle { fill: var(--saffron); }
.w3d-note { position: absolute; transform: translate(var(--ax), -100%); white-space: nowrap; font: 500 13px/1.3 var(--sans); color: var(--muted); opacity: 0; transition: opacity .5s var(--ease); text-shadow: 0 1px 8px rgba(0, 0, 0, .8); }
.w3d-note.is-on { opacity: 1; }
.armory--3d .vitrine__stage { cursor: grab; }
.armory--3d .vitrine__stage:active { cursor: grabbing; }
@media (max-width: 860px) { .armory--3d .w3d-notes { display: none; } }
.killa-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.killa--3d .map { visibility: hidden; }
.k3d-labels { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.killa--3d .fort-cards, .killa--3d .killa-progress { z-index: 2; }
.k3d-label, .k3d-city, .k3d-sea { position: absolute; left: 0; top: 0; translate: -50% -100%; white-space: nowrap; transition: opacity .4s; }
.k3d-label { pointer-events: auto; display: grid; justify-items: center; gap: 1px; padding: 4px 8px; border-radius: 999px; font: 15px/1.1 var(--deva); color: var(--ink); text-shadow: 0 1px 8px rgba(0, 0, 0, .9); }
.k3d-label::after { content: ''; position: absolute; left: 50%; top: 100%; width: 1px; height: var(--lead, 0px); background: linear-gradient(rgba(255, 138, 42, .7), rgba(255, 138, 42, .15)); pointer-events: none; }
.k3d-label small { font: 500 9px/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.k3d-label:hover, .k3d-label:focus-visible { background: rgba(20, 12, 14, .7); outline: none; box-shadow: 0 0 0 1px rgba(255, 138, 42, .6); }
.k3d-label.is-active span { color: var(--saffron); font-size: 18px; }
.k3d-city { font: 500 11px var(--sans); color: rgba(244, 234, 220, .55); }
.k3d-sea { font: 13px var(--deva); color: rgba(150, 190, 230, .6); letter-spacing: .04em; }
.chron-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.chron--3d .chron__hills, .chron--3d .chron__fx { display: none; }

/* ---------- Fort types: three illustrated cards ---------- */
.fort-types__grid { margin-top: 56px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; background: none; border: 0; perspective: 1200px; }
.ftype {
  --rx: 0deg; --ry: 0deg; --mx: 0; --my: 0;
  position: relative; display: flex; flex-direction: column; border-radius: 20px; padding: 10px;
  background: linear-gradient(180deg, #1c1216, #120c0f); box-shadow: inset 0 0 0 1px rgba(244, 234, 220, .07);
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), opacity 1.1s var(--ease), translate 1.1s var(--ease);
}
.ftype[data-reveal] { opacity: 0; translate: 0 28px; transform: rotateX(var(--rx)) rotateY(var(--ry)); }
.ftype[data-reveal].is-in { opacity: 1; translate: 0 0; }
.ftype__art { position: relative; aspect-ratio: 400 / 230; border-radius: 12px; overflow: hidden; margin: 0; }
.ftype__art svg { width: 100%; height: 100%; display: block; }
.ftype__art::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 80% at calc(50% + var(--mx) * 40%) calc(30% + var(--my) * 40%), rgba(255, 220, 170, .18), transparent 60%); opacity: 0; transition: opacity .4s; }
/* layers drift apart under the cursor */
.ft-l1 { transform: translate(calc(var(--mx) * -6px), calc(var(--my) * -3px)); transition: transform .5s var(--ease); }
.ft-l2 { transform: translate(calc(var(--mx) * -12px), calc(var(--my) * -5px)); transition: transform .5s var(--ease); }
.ft-l3 { transform: translate(calc(var(--mx) * -20px), calc(var(--my) * -7px)); transition: transform .5s var(--ease); }
.ft-flag { transform-box: fill-box; transform-origin: left center; animation: ft-flag 1.6s ease-in-out infinite; }
@keyframes ft-flag { 50% { transform: skewY(-6deg) scaleX(.9); } }
.ft-waves { animation: ft-waves 6s linear infinite; }
@keyframes ft-waves { to { transform: translateX(40px); } }
.ft-sun { animation: ft-sun 7s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ft-sun { 50% { transform: scale(1.06); opacity: .95; } }
.ftype__body { padding: 22px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.ftype__mr { --mr-face: var(--display); font-family: var(--display); font-weight: var(--display-weight, 700); font-size: clamp(34px, 3vw, 44px); line-height: 1.2; color: var(--gold); }
.ftype__en { margin-top: 2px; font: 500 15px/1.3 var(--sans); color: var(--ink); }
.ftype__en [lang="mr"] { font-size: 16px; }
.ftype__text { margin-top: 14px; font-size: 15px; line-height: 1.65; color: var(--muted); }
.ftype__eg { list-style: none; margin-top: auto; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.ftype__eg li { padding: 6px 12px; border-radius: 999px; font-size: 13px; color: var(--ink); background: rgba(244, 234, 220, .06); transition: background .3s, color .3s; }
.ftype--giri .ftype__eg li { box-shadow: inset 0 0 0 1px rgba(240, 160, 88, .3); }
.ftype--jal .ftype__eg li { box-shadow: inset 0 0 0 1px rgba(110, 160, 210, .35); }
.ftype--bhui .ftype__eg li { box-shadow: inset 0 0 0 1px rgba(232, 176, 96, .35); }
@media (hover: hover) and (pointer: fine) {
  .ftype:hover { box-shadow: inset 0 0 0 1px rgba(255, 138, 42, .45), 0 30px 60px -30px rgba(255, 110, 30, .35); }
  .ftype:hover .ftype__art::after { opacity: 1; }
  .ftype:hover .ftype__eg li { background: rgba(255, 138, 42, .1); }
}
@media (max-width: 860px) { .fort-types__grid { grid-template-columns: 1fr; gap: 18px; } }
@media (prefers-reduced-motion: reduce) { .ft-flag, .ft-waves, .ft-sun { animation: none; } .ftype { transform: none; } }

/* ---------- Chronicles legibility ---------- */
/* One even veil of shade over the whole landscape (not a blob behind the text), plus a darker floor for the year rail */
.chron-panel__text { position: relative; text-shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 2px 18px rgba(0, 0, 0, .4); }
.chron-panel__text p { color: #f6ece0; }
.chron-panel__year { -webkit-text-stroke: 1px rgba(255, 240, 220, .09); left: 30%; }
.chron .pin__sticky::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(0deg, rgba(8, 5, 8, .8) 0%, rgba(8, 5, 8, .4) 26%, rgba(8, 5, 8, .4));
}
.chron__track { z-index: 2; }
.chron__rail { z-index: 3; }
.chron__tick span { color: rgba(244, 234, 220, .75); }
@media (max-width: 860px) {
  .chron-panel__year { left: 50%; }
}

/* ---------- Council of eight: a turning court diagram ---------- */
.council__wheel svg { overflow: visible; }
.council__turn { transform-box: view-box; transform-origin: 300px 300px; transform: rotate(var(--turn, 0deg)); transition: transform 1.3s cubic-bezier(.65, 0, .35, 1); }
.council__upright { transform-box: view-box; transform-origin: var(--x) var(--y); transform: rotate(calc(var(--turn, 0deg) * -1)); transition: transform 1.3s cubic-bezier(.65, 0, .35, 1); }
.council__ticks { stroke: rgba(230, 180, 92, .22); stroke-width: 1; fill: none; }
.council__track { fill: none; stroke: rgba(230, 180, 92, .1); stroke-width: 10; }
.council__orbit { fill: none; stroke: rgba(230, 180, 92, .14); stroke-dasharray: 2 6; }
.council__arc { fill: none; stroke-width: 10; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s var(--ease) .3s; }
.council__arc.is-lit { stroke-dashoffset: 0; }
.council__arc--civ { stroke: #e6b45c; } .council__arc--war { stroke: #e0502a; } .council__arc--out { stroke: #5aa0c0; } .council__arc--law { stroke: #e8dcc8; }
.council__spoke { fill: none; stroke: rgba(230, 180, 92, .45); stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1s var(--ease); }
.council__spoke.is-lit { stroke-dashoffset: 0; }
.council__pulse { fill: none; stroke: #ffd08a; stroke-width: 3; stroke-linecap: round; stroke-dasharray: .14 .86; stroke-dashoffset: .14; opacity: 0; filter: drop-shadow(0 0 6px #ff8a2a); }
.council__pulse.is-on { animation: council-pulse 1.4s cubic-bezier(.3, 0, .2, 1) .5s 2; }
@keyframes council-pulse { 0% { stroke-dashoffset: .14; opacity: 1; } 90% { opacity: 1; } 100% { stroke-dashoffset: -1; opacity: 0; } }
.council__halo { fill: none; stroke: rgba(255, 138, 42, .0); stroke-width: 1; transition: stroke .6s; }
.council__disc { fill: url(#cNode); stroke: rgba(230, 180, 92, .3); stroke-width: 1; transition: stroke .6s, filter .6s; }
.council__icon { fill: none; stroke: rgba(244, 234, 220, .45); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: stroke .6s; }
.council__node text { font-family: var(--deva); font-size: 15px; fill: rgba(244, 234, 220, .5); text-anchor: middle; transition: fill .6s; }
.council__node.is-lit .council__disc { stroke: var(--gold); }
.council__node.is-lit .council__icon { stroke: var(--gold); }
.council__node.is-lit text { fill: var(--ink); }
.council__node.is-active .council__disc { fill: url(#cNodeOn); stroke: #fff3e0; filter: drop-shadow(0 0 18px rgba(255, 138, 42, .75)); }
.council__node.is-active .council__icon { stroke: #2a1408; stroke-width: 1.7; }
.council__node.is-active text { fill: #2a1408; font-weight: 700; }
.council__node.is-active .council__halo { stroke: rgba(255, 138, 42, .6); animation: council-halo 2.2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes council-halo { 0% { transform: scale(.75); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
.council__aura { animation: council-aura 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes council-aura { 50% { transform: scale(1.12); opacity: .7; } }
.council__throne { fill: #1d1210; stroke: var(--gold); stroke-width: 1.5; }
.council__throne-in { fill: none; stroke: rgba(230, 180, 92, .35); stroke-dasharray: 1 4; }
.council__icon--king { stroke: var(--gold); stroke-width: 1.3; fill: rgba(230, 180, 92, .12); }
.council__center text { font-family: var(--display); font-size: 24px; font-weight: var(--display-weight, 700); fill: var(--gold); text-anchor: middle; }
.council__center .council__step { font: 500 9.5px var(--sans); letter-spacing: .08em; fill: var(--muted); }
.council__card { min-height: 220px; }
.council__role { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.council__dots { display: flex; gap: 6px; margin-bottom: 18px; }
.council__dots i { flex: 1; height: 3px; border-radius: 2px; background: rgba(244, 234, 220, .1); transition: background .5s; }
.council__dots i.is-done { background: rgba(230, 180, 92, .55); }
.council__dots i.is-on { background: var(--saffron); box-shadow: 0 0 10px rgba(255, 138, 42, .7); }
.council__head { display: flex; align-items: center; gap: 18px; }
.council__badge { width: 64px; height: 64px; flex: none; animation: council-in .7s var(--ease); }
.council__badge circle { fill: rgba(255, 138, 42, .12); stroke: var(--saffron); stroke-width: .8; }
.council__badge path { fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.council__badge--war circle { stroke: #e0502a; fill: rgba(224, 80, 42, .14); }
.council__badge--out circle { stroke: #5aa0c0; fill: rgba(90, 160, 192, .14); }
.council__badge--law circle { stroke: #e8dcc8; fill: rgba(232, 220, 200, .1); }
@keyframes council-in { from { transform: scale(.6) rotate(-30deg); opacity: 0; } }
.council__role .mr { font-family: var(--display); font-weight: var(--display-weight, 700); font-size: 44px; line-height: 1.1; color: var(--gold); }
.council__role h3 { margin-top: 10px; font: 400 26px/1.1 var(--serif); }
.council__role p { margin-top: 10px; }
.council__role > * { animation: council-up .6s var(--ease) both; }
.council__role > :nth-child(3) { animation-delay: .08s; } .council__role > :nth-child(4) { animation-delay: .16s; }
@keyframes council-up { from { opacity: 0; transform: translateY(12px); } }
.council__count { font: 500 10.5px/1 var(--mono); letter-spacing: .04em; color: var(--dim); }
.council__dept { padding: 3px 8px; border-radius: 999px; background: rgba(230, 180, 92, .12); color: var(--gold); }
.council__dept--war { background: rgba(224, 80, 42, .15); color: #ff8a6a; } .council__dept--out { background: rgba(90, 160, 192, .15); color: #8ac8e0; } .council__dept--law { background: rgba(232, 220, 200, .12); color: #f0e6d8; }
@media (prefers-reduced-motion: reduce) { .council__turn, .council__upright { transition: none; } .council__pulse, .council__aura, .council__halo { animation: none !important; } }

/* ---------- Navy in 3D (js/navy3d.js) ---------- */
.navy-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.navy--3d { background: #0a0d14 !important; }
.navy--3d .navy__sun, .navy--3d .navy__fort, .navy--3d .navy__ships, .navy--3d .navy__sea { display: none; }
.navy--3d::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(8, 6, 12, .72) 0%, rgba(8, 6, 12, .35) 38%, transparent 62%), linear-gradient(0deg, rgba(8, 6, 12, .35), transparent 30%); }
@media (max-width: 860px) { .navy--3d::after { background: linear-gradient(180deg, rgba(8, 6, 12, .75) 0%, rgba(8, 6, 12, .3) 55%, transparent 80%); } }

/* ---------- Realistic hero landscapes (js/vista3d.js) ---------- */
.vista-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: -2; pointer-events: none; }
.ch-intro--3d::before {
  background:
    radial-gradient(55% 45% at 50% 50%, rgba(10, 6, 10, .5), transparent 75%),
    linear-gradient(180deg, rgba(10, 6, 10, .35) 0%, transparent 25%, transparent 70%, var(--bg, #0b0709) 100%);
}

/* ---------- Finale: the portrait keeps its aura; words sit beside it ---------- */
.finale__fig { left: 64%; height: 88svh; }
.finale__text { left: var(--gutter); right: auto; top: 50%; bottom: auto; max-width: min(520px, 40vw); text-align: left; padding: 0;
  transform: translateY(calc(-50% + (1 - var(--txt, 0)) * 30px)); }
.finale__text .h2 { font-size: clamp(36px, 4.4vw, 72px); }
.finale__embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: calc(var(--up, 0) * .55); mix-blend-mode: screen; }
@media (max-width: 860px) {
  .finale__fig { left: 50%; height: 62svh; bottom: auto; top: 8svh; }
  .finale__text { left: var(--gutter); right: var(--gutter); top: auto; bottom: 8svh; max-width: none; text-align: center; transform: translateY(calc((1 - var(--txt, 0)) * 30px)); }
}

/* Armory canvas: soften its edges so the background motes never end in a hard line */
.armory-gl {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent), linear-gradient(180deg, transparent, #000 9%, #000 91%, transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent), linear-gradient(180deg, transparent, #000 9%, #000 91%, transparent);
}

/* Finale storm (js/legacy.js): behind the portrait; the figure catches each flash on its rim */
.finale__storm { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* the landscape behind the storm: cold and colourless, as lightning shows it */
#finale .finale__land { z-index: 0; opacity: .05; filter: saturate(.3) brightness(1.15) contrast(1.15) hue-rotate(-12deg); }

/* ---------- Killa: one terrain behind the whole page (js/killa3d.js, page mode) ---------- */
.killa-gl.killa-gl--page { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }
.has-journey .killa-map .pin__sticky { background: transparent; }
.k3d-labels.k3d-labels--page { position: fixed; z-index: 1; }
.has-journey .next { min-height: 100vh; min-height: 100svh; }   /* the footer is one full shot at the mountain's foot */
.has-journey .ch-intro--3d::before { background: radial-gradient(55% 45% at 50% 50%, rgba(10, 6, 10, .5), transparent 75%), linear-gradient(180deg, rgba(10, 6, 10, .35) 0%, transparent 25%); }

/* Chronicles on the real Sahyadri (js/killaJourney.js): the land shows through, the CSS sky and SVG hills step aside */
.chron--journey .chron__sky, .chron--journey .chron__hills, .chron--journey .chron__fx { display: none; }
.chron--journey .pin__sticky::after { background: linear-gradient(0deg, rgba(8, 5, 8, .62) 0%, rgba(8, 5, 8, 0) 34%), linear-gradient(90deg, rgba(8, 5, 8, 0) 42%, rgba(8, 5, 8, .32) 100%); }
.chron--journey .chron-panel__art { visibility: hidden; }   /* the real place is the picture now; the slot stays so the text keeps its side */
.chron--journey .chron-panel__year { -webkit-text-stroke: 1.5px rgba(255, 240, 220, .38); color: rgba(255, 240, 220, .05); }
@media (max-width: 860px) { .chron--journey .chron-panel__art { display: none; } }   /* one column on phones: no empty slot above the text */

/* Armory as an exhibition (js/armoryHall.js): one walk through the hall, a card for the case you stand at */
.hall .pin__sticky { background: transparent; }
.hall .pin__sticky::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(6, 4, 4, 0) 44%, rgba(6, 4, 4, .42) 100%); }
.hall-cards { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); width: min(430px, 36vw); height: min(640px, 80svh); z-index: 1; }
.hall-card { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .9s var(--ease); pointer-events: none; text-shadow: 0 1px 2px rgba(0, 0, 0, .6), 0 2px 22px rgba(0, 0, 0, .5); }
.hall-card.is-on { opacity: 1; transform: none; pointer-events: auto; }
.hall-card .body { margin-top: 18px; color: #e8ddd0; }
.hall-notes { position: fixed; inset: 0; pointer-events: none; z-index: 1; }
.hall-notes__lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hall-notes__lines line { stroke: rgba(255, 214, 150, .55); stroke-width: 1; }
.hall-notes__lines circle { fill: var(--saffron); filter: drop-shadow(0 0 4px var(--saffron)); }
.hall-note { position: absolute; left: 0; top: 0; white-space: nowrap; font: 500 12px/1.2 var(--sans); letter-spacing: .02em; color: var(--ink); text-shadow: 0 1px 8px rgba(0, 0, 0, .9); opacity: 0; transition: opacity .6s; }
.hall-note.is-on { opacity: .92; }
@media (max-width: 860px) {
  .hall .pin__sticky::after { background: linear-gradient(0deg, rgba(6, 4, 4, .75) 0%, rgba(6, 4, 4, 0) 55%); }
  .hall-cards { left: var(--gutter); right: var(--gutter); width: auto; top: auto; bottom: 28px; transform: none; height: 52svh; }
  .hall-card { justify-content: flex-end; }
  .hall-card .vitrine__specs { display: none; }
}

/* Legacy as one film (js/legacyWorld.js): the world is the picture, the old drawn stages step aside */
.legacy--film .council__wheel { visibility: hidden; }
.legacy--film .navy .pin__sticky { background: transparent; }
.legacy--film :is(.navy__sun, .navy__fort, .navy__ships, .navy__sea) { display: none; }
.legacy--film .council .pin__sticky::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(6, 4, 4, .78) 0%, rgba(6, 4, 4, .45) 32%, rgba(6, 4, 4, 0) 58%); }
.legacy--film .council__card, .legacy--film .seal__copy, .legacy--film .navy__copy { position: relative; text-shadow: 0 1px 2px rgba(0, 0, 0, .6), 0 2px 22px rgba(0, 0, 0, .5); }
.legacy--film .raiyat { text-shadow: 0 1px 2px rgba(0, 0, 0, .6), 0 2px 30px rgba(0, 0, 0, .55); }
.legacy--film .raiyat__note { color: #e8ddd0; }
/* the council card: a title card, not an infographic */
.council__count { font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.council__name { margin-top: 14px; font-family: var(--display); font-weight: var(--display-weight, 700); font-size: clamp(44px, 4.6vw, 72px); line-height: 1.1; color: var(--gold); }
.council__role h3 { margin-top: 6px; font: 400 clamp(20px, 1.8vw, 26px)/1.2 var(--serif); }
.council__role .body { margin-top: 14px; max-width: 420px; }
.council__seats { display: flex; gap: 6px; margin-top: 26px; }
.council__seats i { width: 26px; height: 2px; background: rgba(244, 234, 220, .18); transition: background .6s; }
.council__seats i.is-done { background: rgba(230, 180, 92, .55); }
.council__seats i.is-on { background: var(--saffron); box-shadow: 0 0 10px var(--saffron); }
/* the seal: a soft dark at the text side and under the translation, so the hall stays behind the words */
/* the hall dims behind the seal (opacity set on scroll in js/legacy.js), then lifts for the council */
.film-veil { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0; background: radial-gradient(ellipse 70% 60% at 62% 50%, rgba(5, 3, 2, .74), rgba(5, 3, 2, .9) 100%); }
.legacy--film .seal__tr { color: #eadfce; text-shadow: 0 1px 2px rgba(0, 0, 0, .7), 0 2px 18px rgba(0, 0, 0, .6); }
.legacy--film .seal__moon { opacity: .8; }
/* the dawn sea in the film: its top and bottom edges melt into the black the film rests in, no hard seam */
.legacy--film .navy .pin__sticky { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 9%, #000 91%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 9%, #000 91%, transparent 100%); }
