/* ===== Scroll-driven, interactive pictures (all pages)
   · .zband  a photo that grows from a framed card to full screen as you scroll, a headline fades in over it
   · .hgal   a pinned gallery: scrolling down slides the photos sideways
   · every framed photo wipes in, drifts with the scroll (parallax) and tilts toward the pointer
   Hidden starting states apply only once the script runs (html.sx-on), and never with reduced motion. ===== */
.zband { position: relative; height: 230vh; background: #000000; }
.zb-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.zb-frame { position: absolute; inset: 0; overflow: hidden;
  clip-path: inset(calc(var(--zi, 0) * 13%) calc(var(--zi, 0) * 9%) calc(var(--zi, 0) * 13%) calc(var(--zi, 0) * 9%) round calc(var(--zi, 0) * 2rem)); }
.zb-frame img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%);
  transform: translate3d(calc(var(--mx, 0) * -1.2%), calc(var(--my, 0) * -1.2%), 0) scale(calc(1.04 + var(--zi, 0) * .16)); will-change: transform; }
.zb-frame::after { content: ""; position: absolute; inset: 0; opacity: var(--zt, 0);
  background: linear-gradient(90deg, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .38) 48%, rgba(0, 0, 0, .05) 80%), linear-gradient(0deg, rgba(0, 0, 0, .5) 0%, transparent 45%); }
.zb-copy { position: absolute; left: 0; right: 0; bottom: clamp(3rem, 10vh, 6rem); z-index: 2; display: grid; gap: 1rem; justify-items: start; color: #fff;
  opacity: var(--zt, 0); transform: translate3d(0, calc((1 - var(--zt, 0)) * 3rem), 0); }
.zb-copy h2 { color: #fff; max-width: 15ch; font-size: clamp(2.2rem, 5vw, 4.75rem); line-height: 1.04; }
.zb-copy p { color: rgba(255, 255, 255, .85); max-width: 34rem; font-size: clamp(1.02rem, 1.3vw, 1.18rem); }
.zb-copy .label { color: #fff; }
.zb-copy .grad, .zb-copy .em { color: transparent; -webkit-text-fill-color: transparent; background: linear-gradient(90deg, #FFFFFF, #53E6D4); -webkit-background-clip: text; background-clip: text; }
.zb-copy .btn { background: linear-gradient(90deg, #FFFFFF, #53E6D4); border-color: transparent; color: #000; }
.zb-copy .btn:hover { background: #fff; color: #000; }
.zb-hint { position: absolute; left: 50%; bottom: 1.5rem; z-index: 2; translate: -50% 0; font: 600 .72rem/1 var(--font, "Montserrat", sans-serif); letter-spacing: .14em; text-transform: uppercase; color: #000; opacity: calc(var(--zi, 0) * .7); }

.hgal { overflow: visible; }
.hgal .sec-head { margin-bottom: 0; }
.hg-pin { position: relative; height: calc(var(--n, 6) * 62vh); }
.hg-sticky { position: sticky; top: calc(var(--top-h, 5rem) + 1rem); height: calc(100vh - var(--top-h, 5rem) - 2rem); display: flex; flex-direction: column; justify-content: center; gap: 1.5rem; overflow: hidden; }
.hg-track { display: flex; gap: clamp(1rem, 2vw, 1.75rem); padding-inline: var(--gutter, 24px); width: max-content; transform: translate3d(var(--hx, 0px), 0, 0); will-change: transform; }
.hg-card { flex: none; width: min(40rem, 72vw); display: grid; gap: 1rem; }
.hg-card figure { position: relative; margin: 0; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 1.25rem; }
.hg-card img { width: 100%; height: 100%; object-fit: cover; transform: scale(calc(1.16 - var(--c, 0) * .16)); transition: transform .2s linear; }
.hg-card figcaption { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; align-items: baseline; opacity: calc(.35 + var(--c, 0) * .65); }
.hg-card .hg-no { grid-row: span 2; font: 800 2rem/1 var(--font, "Montserrat", sans-serif); letter-spacing: -.04em; color: transparent; -webkit-text-fill-color: transparent; background: linear-gradient(90deg, #53E6D4, #9EF0E4); -webkit-background-clip: text; background-clip: text; }
.hg-card:nth-child(even) .hg-no { background: linear-gradient(90deg, #53E6D4, #9EF0E4); -webkit-background-clip: text; background-clip: text; }
.hg-card h3 { font-size: clamp(1.15rem, 1.6vw, 1.45rem); }
.hg-card p { color: rgba(255, 255, 255, 0.62); font-size: .98rem; }
.hg-bar { margin-inline: var(--gutter, 24px); height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.hg-bar span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--hp, 0)); background: linear-gradient(90deg, #53E6D4, #9EF0E4, #53E6D4); }

/* every framed photo: wipe in, parallax, pointer tilt with a soft glare */
.sx-par { overflow: hidden; }
.sx-par img { transform: translate3d(0, calc(var(--sp, 0) * -6%), 0) scale(1.14); will-change: transform; }
.zb-frame.sx-par img, .hg-card .sx-par img { transform: none; }
.sx-tilt { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s cubic-bezier(.16, .84, .24, 1); transform-style: preserve-3d; }
.sx-tilt.sx-hov { transition: transform .12s linear; }
.sx-glare { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(40% 40% at var(--gx, 50%) var(--gy, 50%), rgba(0, 0, 0, 0.35), transparent 70%); mix-blend-mode: soft-light; }
.sx-tilt.sx-hov .sx-glare { opacity: 1; }
.sx-on .sx-rev { clip-path: inset(100% 0 0 0 round 1rem); }
.sx-on .sx-rev.sx-in { clip-path: inset(0 0 0 0 round 1rem); transition: clip-path 1.15s cubic-bezier(.65, 0, .35, 1), transform .5s cubic-bezier(.16, .84, .24, 1); }
.sx-on .sx-rev.sx-done { clip-path: none; }

@media (max-width: 900px) {
  .zband { height: 180vh; }
  .zb-copy h2 { font-size: clamp(2rem, 8.5vw, 3rem); }
  .hg-pin { height: auto; }
  .hg-sticky { position: static; height: auto; overflow: visible; padding-block: 1.5rem 0; }
  .hg-track { width: auto; transform: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: .5rem; }
  .hg-track::-webkit-scrollbar { display: none; }
  .hg-card { width: 82vw; scroll-snap-align: center; }
  .hg-card img { transform: none; }
  .hg-card figcaption { opacity: 1; }
  .hg-bar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .zband { height: auto; }
  .zb-sticky { position: relative; height: 80vh; }
  .zb-frame { clip-path: none; }
  .zb-frame img { transform: none; }
  .zb-frame::after, .zb-copy { opacity: 1; transform: none; }
  .zb-hint { display: none; }
  .hg-pin { height: auto; }
  .hg-sticky { position: static; height: auto; }
  .hg-track { transform: none; overflow-x: auto; width: auto; }
  .hg-card img, .sx-par img { transform: none; }
  .hg-card figcaption { opacity: 1; }
}
