/* ==========================================================================
   cinematic.css — depth, motion and photography layer
   Built on CSS 3D transforms, SVG and Canvas 2D. No WebGL, no libraries.
   Everything here degrades to a flat, fast, readable page if JS is off or
   prefers-reduced-motion is set.
   ========================================================================== */

:root {
  --mx: 0;   /* pointer offset -1 … 1, set by cinematic.js */
  --my: 0;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ---------------------------------------------------- floating navigation */

.headwrap[data-float="true"] {
  position: fixed;
  inset-inline: 0;
  inset-block-start: 0;
  z-index: 100;
  background: transparent;
  transition: background-color .35s var(--ease-out), backdrop-filter .35s, box-shadow .35s;
}
.headwrap[data-float="true"] .topbar,
.headwrap[data-float="true"] .site-header {
  background: transparent;
  border-block-end-color: transparent;
  position: static;
}
.headwrap[data-float="true"] .topbar { border-block-end: 1px solid rgba(255, 255, 255, .12); }
.headwrap[data-float="true"].is-solid {
  background: rgba(5, 30, 57, .93);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .1);
}
.headwrap[data-float="true"].is-solid .topbar { border-block-end-color: rgba(255, 255, 255, .1); }

/* ------------------------------------------------------------ cinema hero */

.chero {
  position: relative;
  min-height: 92svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  isolation: isolate;
  background: var(--navy);
  color: #fff;
  perspective: 1200px;
}
@media (min-width: 900px) { .chero { min-height: 100svh; } }

.chero__layer {
  position: absolute;
  inset: -6%;
  z-index: -1;
  will-change: transform;
  transform: translate3d(calc(var(--mx) * var(--d, 0) * 1px), calc(var(--my) * var(--d, 0) * 1px), 0);
  transition: transform .6s var(--ease-out);
}
.chero__media { inset: -8%; }
.chero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  filter: saturate(.88) contrast(1.04);
}
/* navy grade so the photograph reads as brand environment, not stock */
.chero__grade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(3, 20, 42, .97) 4%, rgba(5, 30, 57, .72) 42%, rgba(5, 30, 57, .38) 100%),
    linear-gradient(to left, rgba(3, 20, 42, .9) 0%, rgba(3, 20, 42, .2) 55%, transparent 100%),
    radial-gradient(120% 90% at 78% 30%, rgba(212, 152, 54, .16), transparent 60%);
}
html[dir="ltr"] .chero__grade {
  background:
    linear-gradient(to top, rgba(3, 20, 42, .97) 4%, rgba(5, 30, 57, .72) 42%, rgba(5, 30, 57, .38) 100%),
    linear-gradient(to right, rgba(3, 20, 42, .9) 0%, rgba(3, 20, 42, .2) 55%, transparent 100%),
    radial-gradient(120% 90% at 22% 30%, rgba(212, 152, 54, .16), transparent 60%);
}
.chero__fx { position: absolute; inset: 0; z-index: -1; pointer-events: none; }

.chero__in {
  position: relative;
  padding-block: clamp(90px, 14vh, 150px) clamp(34px, 5vh, 58px);
  max-width: 880px;
}
.chero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--gold);
  margin-block-end: 24px;
  padding: 7px 16px 7px 7px;
  border: 1px solid rgba(212, 152, 54, .38);
  border-radius: 100px;
  background: rgba(3, 20, 42, .4);
  backdrop-filter: blur(6px);
}
html[dir="ltr"] .chero__eyebrow { padding: 7px 7px 7px 16px; }
.chero__eyebrow i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 0 4px rgba(212, 152, 54, .2);
  animation: beat 2.6s ease-in-out infinite;
}
@keyframes beat { 0%,100% { opacity: .45; } 50% { opacity: 1; } }

.chero h1 {
  color: #fff;
  font-size: clamp(2rem, 1rem + 4.1vw, 4.1rem);
  line-height: 1.16;
  max-width: 16ch;
  text-wrap: balance;
  text-shadow: 0 2px 40px rgba(3, 20, 42, .5);
}
html[dir="ltr"] .chero h1 { max-width: 20ch; }
.chero__lead {
  margin-block-start: 22px;
  font-size: var(--fs-lead);
  color: #d6e0ea;
  max-width: 58ch;
  line-height: 1.85;
}
.chero__cta { margin-block-start: 34px; display: flex; flex-wrap: wrap; gap: 14px; }

/* staged entrance — one orchestrated moment, not per-section fades */
.chero__in > * { opacity: 0; transform: translateY(18px); }
.chero.is-ready .chero__in > * { animation: rise .9s var(--ease-out) forwards; }
.chero.is-ready .chero__in > *:nth-child(1) { animation-delay: .05s; }
.chero.is-ready .chero__in > *:nth-child(2) { animation-delay: .16s; }
.chero.is-ready .chero__in > *:nth-child(3) { animation-delay: .27s; }
.chero.is-ready .chero__in > *:nth-child(4) { animation-delay: .38s; }
@keyframes rise { to { opacity: 1; transform: none; } }

.chero__strip {
  position: relative;
  border-block-start: 1px solid rgba(255, 255, 255, .14);
  background: rgba(3, 20, 42, .55);
  backdrop-filter: blur(10px);
}

.scrollcue {
  position: absolute;
  inset-block-end: 118px;
  inset-inline-start: var(--gutter);
  z-index: 2;
  display: none;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, .6);
}
@media (min-width: 900px) { .scrollcue { display: flex; } }
.scrollcue span { display: block; width: 1px; height: 46px; background: linear-gradient(to bottom, var(--gold), transparent); }

/* ------------------------------------------------------------ logo intro */

.logointro {
  background: var(--navy-900);
  padding-block: clamp(54px, 7vw, 92px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.logointro__inner { position: relative; display: inline-block; }
.logointro img {
  height: clamp(110px, 14vw, 176px);
  width: auto;
  margin-inline: auto;
  filter: drop-shadow(0 18px 44px rgba(0, 0, 0, .55));
  transform: translateZ(0) scale(.94);
  opacity: 0;
  transition: opacity 1s var(--ease-out), transform 1.4s var(--ease-out);
}
.logointro.is-in img { opacity: 1; transform: none; }
/* gold light sweep across the mark, once, on entry */
.logointro__inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(212, 152, 54, .38) 48%, transparent 58%);
  transform: translateX(-140%);
  pointer-events: none;
}
.logointro.is-in .logointro__inner::after { animation: sweep 1.9s .5s var(--ease-out) 1; }
@keyframes sweep { to { transform: translateX(140%); } }
.logointro p {
  margin-block-start: 26px;
  color: #9db0c4;
  font-size: var(--fs-sm);
  max-width: 54ch;
  margin-inline: auto;
  opacity: 0;
  transition: opacity .9s .5s var(--ease-out);
}
.logointro.is-in p { opacity: 1; }

/* -------------------------------------------------- floating photo stack */

.stack {
  position: relative;
  perspective: 1400px;
  min-height: 420px;
  display: grid;
  place-items: center;
}
@media (min-width: 900px) { .stack { min-height: 560px; } }
.stack__plate {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 30px 70px rgba(3, 20, 42, .45);
  overflow: hidden;
  background: var(--navy-900);
  will-change: transform;
  transform:
    translate3d(calc(var(--mx) * var(--d) * 1px), calc(var(--my) * var(--d) * .6px), 0)
    rotateY(calc(var(--mx) * -2.4deg)) rotateX(calc(var(--my) * 1.6deg));
  transition: transform .7s var(--ease-out);
}
.stack__plate img { width: 100%; height: 100%; object-fit: cover; }
.stack__main { position: relative; width: min(100%, 620px); aspect-ratio: 3/2; z-index: 3; --d: 14; }
.stack__back {
  width: min(72%, 420px); aspect-ratio: 3/2; z-index: 1; --d: 26;
  inset-block-start: 6%; inset-inline-end: 2%;
  opacity: .62; filter: saturate(.7);
}
.stack__chip {
  width: clamp(120px, 17vw, 200px); aspect-ratio: 1/1; z-index: 4; --d: 40;
}
.stack__chip--a { inset-block-end: 4%; inset-inline-start: 1%; }
.stack__chip--b { inset-block-start: 2%; inset-inline-start: 12%; --d: 52; }
@media (max-width: 899px) {
  .stack__back, .stack__chip--b { display: none; }
  .stack__chip--a { inset-block-end: -4%; inset-inline-start: -2%; }
}
.stack__tag {
  position: absolute;
  inset-block-end: 0; inset-inline: 0;
  padding: 26px 20px 14px;
  background: linear-gradient(to top, rgba(3, 20, 42, .92), transparent);
  font-size: var(--fs-xs);
  color: #d9e3ed;
  font-weight: 600;
}

/* ------------------------------------------------ scroll story (sticky) */

.story { position: relative; background: var(--navy-900); color: #fff; }
.story__rail { position: relative; }
.story__stage {
  position: sticky;
  inset-block-start: 0;
  height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.story__frame {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s var(--ease-out), transform 1.4s var(--ease-out);
  transform: scale(1.14);
  z-index: -1;
}
.story__frame.is-on { opacity: 1; transform: scale(1); }
.story__frame img { width: 100%; height: 100%; object-fit: cover; }
.story__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(3, 20, 42, .96), rgba(3, 20, 42, .55) 55%, rgba(3, 20, 42, .82));
}
.story__svg { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .8s; }
.story__svg.is-on { opacity: 1; }

.story__caption {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 44ch;
  padding-inline: var(--gutter);
}
.story__num {
  display: inline-grid;
  place-items: center;
  width: 54px; height: 54px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-block-end: 20px;
}
.story__caption h3 { color: #fff; font-size: clamp(1.5rem, 1rem + 2.2vw, 2.6rem); }
.story__caption p { margin-block-start: 14px; color: #c2d1e0; line-height: 1.85; }
.story__caption > * { opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .5s var(--ease-out); }
.story__caption.is-on > * { opacity: 1; transform: none; }
.story__caption.is-on > *:nth-child(2) { transition-delay: .07s; }
.story__caption.is-on > *:nth-child(3) { transition-delay: .13s; }

.story__step { height: 100svh; }
.story__dots {
  position: absolute;
  inset-block: 0;
  inset-inline-end: clamp(14px, 3vw, 34px);
  z-index: 3;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
@media (min-width: 900px) { .story__dots { display: flex; } }
.story__dots b {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255, 255, 255, .28);
  transition: background-color .3s, transform .3s;
}
.story__dots b.is-on { background: var(--gold); transform: scale(1.5); }

/* ------------------------------------------------- interactive 3D meter */

.meterwrap { display: grid; gap: clamp(30px, 4vw, 56px); align-items: center; }
@media (min-width: 900px) { .meterwrap { grid-template-columns: .9fr 1.1fr; } }

.meterstage { position: relative; perspective: 1000px; display: grid; place-items: center; min-height: 440px; }
.meter3d {
  position: relative;
  width: clamp(180px, 24vw, 244px);
  transform-style: preserve-3d;
  transform: rotateX(8deg) rotateY(-16deg) translateX(var(--enter, 0));
  transition: transform 1.2s var(--ease-out);
  animation: sway 14s ease-in-out infinite;
}
.meterstage.is-in .meter3d { --enter: 0; }
@keyframes sway {
  0%, 100% { transform: rotateX(8deg) rotateY(-16deg); }
  50%      { transform: rotateX(6deg) rotateY(14deg); }
}
.meter3d__face {
  position: relative;
  aspect-ratio: 5/7;
  border-radius: 10px;
  background: linear-gradient(155deg, #f4f6f9 0%, #dde4ec 46%, #c3ccd8 100%);
  box-shadow:
    0 40px 70px rgba(3, 20, 42, .55),
    inset 0 1px 0 rgba(255, 255, 255, .9),
    inset 0 -3px 10px rgba(5, 30, 57, .18);
  padding: 13%  12% 10%;
  transform: translateZ(20px);
}
.meter3d__side {
  position: absolute;
  inset-block: 4px;
  inset-inline-start: 0;
  width: 40px;
  border-radius: 10px;
  background: linear-gradient(to bottom, #8e9aa8, #5d6875);
  transform: translateZ(-2px) translateX(-19px) rotateY(58deg);
}
.meter3d__screen {
  background: #0d1b2a;
  border-radius: 4px;
  padding: 11px 12px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, .7);
  border: 1px solid rgba(255, 255, 255, .12);
}
.meter3d__screen b {
  display: block;
  color: var(--gold);
  font-size: clamp(.95rem, 2vw, 1.25rem);
  font-weight: 700;
  letter-spacing: .12em;
  font-variant-numeric: tabular-nums;
  direction: ltr;
}
.meter3d__screen small { display: block; color: #6d8199; font-size: .62rem; letter-spacing: .18em; margin-block-start: 3px; }
.meter3d__dial {
  margin-block-start: 14%;
  aspect-ratio: 1;
  width: 54%;
  margin-inline: auto;
  border-radius: 50%;
  border: 3px solid var(--gold);
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 34% 28%, #fff, #d5dde6);
  box-shadow: inset 0 2px 8px rgba(5, 30, 57, .22);
}
.meter3d__dial i {
  display: block;
  width: 2px; height: 34%;
  background: var(--navy);
  transform-origin: bottom center;
  transform: translateY(-17%) rotate(0deg);
  animation: spin 9s linear infinite;
}
@keyframes spin { to { transform: translateY(-17%) rotate(360deg); } }
.meter3d__bars { margin-block-start: 13%; display: flex; gap: 6px; justify-content: center; }
.meter3d__bars i { width: 15%; height: 6px; background: var(--gold); border-radius: 2px; opacity: .3; }
.meter3d__bars i:nth-child(1) { animation: lit 2.4s infinite .0s; }
.meter3d__bars i:nth-child(2) { animation: lit 2.4s infinite .3s; }
.meter3d__bars i:nth-child(3) { animation: lit 2.4s infinite .6s; }
.meter3d__bars i:nth-child(4) { animation: lit 2.4s infinite .9s; }
@keyframes lit { 0%, 70%, 100% { opacity: .3; } 30% { opacity: 1; } }

.meterlabels { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.meterlabels li {
  display: flex; align-items: center; gap: 15px;
  padding-block: 18px;
  border-block-end: 1px solid rgba(255, 255, 255, .13);
  font-weight: 600;
}
.meterlabels li:first-child { border-block-start: 1px solid rgba(255, 255, 255, .13); }
.meterlabels em {
  font-style: normal; font-variant-numeric: tabular-nums;
  color: var(--gold); font-size: .78rem; letter-spacing: .1em;
}
.meterlabels span { color: #c6d3e0; font-weight: 400; font-size: var(--fs-sm); }

/* ------------------------------------------------- network visualisation */

.netviz { position: relative; border: 1px solid rgba(255, 255, 255, .13); background: rgba(255, 255, 255, .02); }
.netviz canvas { display: block; width: 100%; height: auto; }

/* --------------------------------------------------- full-width photo band */

.band { position: relative; overflow: hidden; isolation: isolate; background: var(--navy); }
.band__media { position: absolute; inset: 0; z-index: -2; }
.band__media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.8); }
.band__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to left, rgba(3, 20, 42, .94) 6%, rgba(3, 20, 42, .62) 54%, rgba(3, 20, 42, .45));
}
html[dir="ltr"] .band__media::after {
  background: linear-gradient(to right, rgba(3, 20, 42, .94) 6%, rgba(3, 20, 42, .62) 54%, rgba(3, 20, 42, .45));
}
.band__ruler { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.band__in { position: relative; padding-block: clamp(80px, 11vw, 160px); color: #fff; }
.band__in h2 { color: #fff; }
.band__in p { color: #cbd8e5; max-width: 56ch; margin-block-start: 16px; line-height: 1.9; }
.bandtags { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 30px; }
.bandtags span {
  font-size: .68rem; letter-spacing: .16em; font-weight: 600;
  color: var(--gold);
  border: 1px solid rgba(212, 152, 54, .42);
  padding: 8px 15px;
  direction: ltr;
}

/* ------------------------------------------------------------- gallery */

.gallery { display: grid; gap: 14px; }
@media (min-width: 760px) { .gallery { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 180px; } }
.gitem {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-3);
  cursor: zoom-in;
  padding: 0;
  transform-style: preserve-3d;
  transition: transform .4s var(--ease-out), box-shadow .4s;
}
@media (min-width: 760px) {
  .gitem--wide { grid-column: span 2; grid-row: span 2; }
  .gitem--tall { grid-row: span 2; }
}
.gitem img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3/2; transition: transform .7s var(--ease-out); }
@media (min-width: 760px) { .gitem img { aspect-ratio: auto; } }
.gitem:hover { box-shadow: 0 24px 48px rgba(5, 30, 57, .26); }
.gitem:hover img { transform: scale(1.06); }
.gitem figcaption {
  position: absolute;
  inset-block-end: 0; inset-inline: 0;
  padding: 30px 16px 13px;
  background: linear-gradient(to top, rgba(3, 20, 42, .9), transparent);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-align: start;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(3, 20, 42, .96);
  display: none;
  place-items: center;
  padding: clamp(16px, 4vw, 54px);
}
.lightbox[data-open="true"] { display: grid; }
.lightbox img { max-width: 100%; max-height: 78vh; object-fit: contain; border: 1px solid rgba(255, 255, 255, .16); }
.lightbox__cap { color: #c6d3e0; text-align: center; margin-block-start: 16px; font-size: var(--fs-sm); }
.lightbox__btn {
  position: absolute;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
  width: 46px; height: 46px;
  font-size: 1.2rem;
  cursor: pointer;
  display: grid; place-items: center;
}
.lightbox__btn:hover { border-color: var(--gold); color: var(--gold); }
.lightbox__close { inset-block-start: 18px; inset-inline-end: 18px; }
.lightbox__prev { inset-inline-end: 18px; inset-block-start: 50%; }
.lightbox__next { inset-inline-start: 18px; inset-block-start: 50%; }

/* ------------------------------------------- citizen service interaction */

.svcpick { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 680px) { .svcpick { grid-template-columns: repeat(4, 1fr); } }
.svcpick__opt {
  background: var(--paper);
  border: 0;
  font: inherit;
  text-align: start;
  padding: clamp(22px, 2.4vw, 30px);
  cursor: pointer;
  display: grid;
  gap: 10px;
  align-content: start;
  transition: background-color .3s, transform .3s var(--ease-out);
}
.svcpick__opt svg { width: 28px; height: 28px; color: var(--gold); }
.svcpick__opt b { font-size: 1.1rem; color: var(--navy); }
.svcpick__opt span {
  color: var(--muted); font-size: var(--fs-sm); line-height: 1.75;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .4s var(--ease-out), opacity .3s;
}
.svcpick__opt:hover, .svcpick__opt:focus-visible { background: var(--paper-2); }
.svcpick__opt:hover span, .svcpick__opt:focus-visible span { max-height: 8em; opacity: 1; }

/* --------------------------------------------------- emergency with photo */

.emergency--photo { position: relative; overflow: hidden; isolation: isolate; }
.emergency--photo .band__media::after {
  background: linear-gradient(to left, rgba(3, 20, 42, .95), rgba(3, 20, 42, .78));
}
.emergency__badge {
  font-size: clamp(2.4rem, 1.4rem + 3.4vw, 4.2rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  direction: ltr;
  letter-spacing: -.02em;
  margin-block-end: 18px;
}
.pulseline { display: block; width: 100%; height: 30px; margin-block: 22px; }

/* --------------------------------------------------- micro-interactions */

.btn { position: relative; will-change: transform; }
.btn--magnet { transition: transform .35s var(--ease-out), background-color .18s, color .18s, border-color .18s; }

.tilt { transform-style: preserve-3d; transition: transform .5s var(--ease-out); }

.figure--lift { transition: transform .6s var(--ease-out), box-shadow .6s; }
.figure--lift:hover { transform: translateY(-4px); box-shadow: 0 26px 54px rgba(5, 30, 57, .16); }

/* photos in a light section */
.photo { position: relative; overflow: hidden; border: 1px solid var(--line); }
.photo img { width: 100%; height: auto; display: block; }
.photo figcaption {
  padding: 13px 16px;
  font-size: var(--fs-xs);
  color: var(--muted);
  border-block-start: 1px solid var(--line);
  background: var(--paper);
}

/* ------------------------------------------------------------ restraint */

@media (prefers-reduced-motion: reduce) {
  .chero__layer, .stack__plate { transform: none !important; transition: none !important; }
  .chero__in > * { opacity: 1 !important; transform: none !important; animation: none !important; }
  .logointro img, .logointro p { opacity: 1 !important; transform: none !important; }
  .logointro__inner::after { display: none; }
  .meter3d { animation: none; }
  .meter3d__dial i, .meter3d__bars i { animation: none; }
  .story__frame { transition: opacity .01ms; transform: none; }
  .story__caption > * { opacity: 1; transform: none; }
}

/* Coarse pointers get no pointer-parallax and a shorter story */
@media (pointer: coarse) {
  .chero__layer { transform: none; }
  .stack__plate { transform: none; }
}


/* ------------------------------------------------- pieces added at wiring */

.chero__gridsvg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .75; }

.chero__credit, .illus {
  font-size: .62rem;
  letter-spacing: .04em;
  font-weight: 600;
  color: rgba(255, 255, 255, .62);
  border: 1px solid rgba(255, 255, 255, .28);
  padding: 3px 9px;
  border-radius: 100px;
  white-space: nowrap;
}
.chero__credit {
  position: absolute;
  z-index: 2;
  inset-block-end: 118px;
  inset-inline-end: var(--gutter);
}
.illus {
  display: inline-block;
  margin-inline-start: 8px;
  color: var(--muted);
  border-color: var(--line);
  vertical-align: middle;
}
.gitem figcaption .illus, .stack__tag .illus { color: rgba(255, 255, 255, .6); border-color: rgba(255, 255, 255, .28); }

.story__caption-wrap { position: relative; z-index: 2; margin: 0; display: grid; place-items: center; }
.story__caption[hidden] { display: none; }

.lightbox > div { display: grid; place-items: center; max-width: 1100px; }

/* the meter needs a touch more room to breathe on small screens */
@media (max-width: 899px) { .meterstage { min-height: 360px; } }

/* <picture> is inline by default — give every media wrapper a real box so
   object-fit: cover has a height to resolve against. */
.chero__media picture,
.band__media picture,
.story__frame picture,
.stack__plate picture,
.gitem picture { display: block; width: 100%; height: 100%; }
.photo picture { display: block; width: 100%; }
.chero__media picture img,
.band__media picture img,
.story__frame picture img,
.stack__plate picture img,
.gitem picture img { width: 100%; height: 100%; object-fit: cover; }

/* scroll cue reads as one line */
.scrollcue { flex-direction: column; align-items: center; gap: 8px; }
.scrollcue .scrollcue__t { white-space: nowrap; }

/* the photo stack now runs the full container width, below the intro copy */
.stack { margin-block-start: clamp(36px, 5vw, 64px); }
@media (min-width: 900px) {
  .stack__main { width: min(58%, 620px); }
  .stack__back { width: min(34%, 400px); inset-block-start: 3%; inset-inline-end: 0; }
  .stack__chip--a { inset-block-end: 2%; inset-inline-start: 0; }
  .stack__chip--b { inset-block-start: 0; inset-inline-start: 4%; }
}

/* --- composition cleanup ------------------------------------------------ */

/* three plates, clear triangle, no pile-up */
.stack__chip--b { display: none; }
@media (min-width: 900px) {
  .stack { min-height: 540px; }
  .stack__main { width: min(54%, 600px); }
  .stack__back  { width: min(29%, 340px); inset-block-start: 0; inset-inline-end: 1%; }
  .stack__chip--a { width: clamp(130px, 15%, 190px); inset-block-end: 0; inset-inline-start: 1%; }
}
@media (max-width: 899px) {
  .stack { min-height: 0; display: block; }
  .stack__plate { position: static; width: 100%; }
  .stack__main { width: 100%; }
  .stack__chip--a { display: none; }
}

/* story captions need to sit on their own pool of shadow, not on a face */
.story__caption {
  padding: clamp(26px, 4vw, 44px) clamp(24px, 4vw, 46px);
  background: radial-gradient(120% 120% at 50% 50%, rgba(3, 20, 42, .88) 30%, rgba(3, 20, 42, 0) 78%);
  text-shadow: 0 2px 18px rgba(3, 20, 42, .8);
}
.story__frame::after {
  background:
    linear-gradient(to top, rgba(3, 20, 42, .97), rgba(3, 20, 42, .5) 52%, rgba(3, 20, 42, .86)),
    radial-gradient(70% 55% at 50% 50%, rgba(3, 20, 42, .55), transparent 70%);
}

@media (min-width: 760px) { .gallery { grid-auto-flow: dense; } }

/* disclosure badge sits in the hero copy flow, never over the strip */
.chero__credit { position: static; display: inline-block; margin-block-start: 26px; }
