/* Tower page hero gallery (November 3, 2026). Shared by the three sites (tools/sync-shared.mjs);
   markup from tools/pages/hero-gallery.mjs, behavior from hero-gallery.js. The box keeps the hero
   photo's size from building.css (.b-hero-img), so nothing moves as photos load. */
.hero-gal { position: relative; overflow: hidden; background: var(--stone); display: flex; flex-direction: column; }
.hg-track { flex: 1 1 auto; min-height: 0; position: relative; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; outline: none; }
.hg-track::-webkit-scrollbar { display: none; }
.hg-track:focus-visible { box-shadow: inset 0 0 0 3px var(--lake-light, #a9c7d4); }
.hg-slide { flex: 0 0 100%; position: relative; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; }
.b-hero-img .hg-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }
.hg-slide img { cursor: zoom-in; }
.hg-cap { position: absolute; right: .75rem; bottom: .6rem; max-width: calc(100% - 6.5rem); margin: 0; text-align: right; font-family: var(--font-ui); font-size: var(--fs-2xs); line-height: 1.35; color: #fff; text-shadow: 0 1px 2px rgb(0 0 0 / .7); }
.hg-cap a { color: #fff; }
.hg-count { position: absolute; left: .75rem; bottom: .55rem; margin: 0; padding: .2rem .6rem; border-radius: 999px; background: rgb(15 18 20 / .62); color: #fff; font: 600 var(--fs-xs)/1.4 var(--font-ui); font-variant-numeric: tabular-nums; pointer-events: none; }
.hg-note { flex: none; margin: 0; padding: .55rem .9rem; background: var(--ink); color: #fff; font-family: var(--font-ui); font-size: var(--fs-xs); line-height: 1.4; }

/* Arrows: big, round and always shown, on phones too, so nobody has to guess the photos swipe. */
.hg-btn { position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; margin-top: -24px; padding: 0; border: 0; border-radius: 50%; background: rgb(255 255 255 / .92); color: var(--ink); box-shadow: 0 2px 10px rgb(0 0 0 / .22); cursor: pointer; transition: background-color .15s ease, transform .15s ease; }
.hg-btn[hidden], .hg-full[hidden], .hg-count[hidden] { display: none; }
.hg-btn:hover { background: #fff; }
.hg-btn:active { transform: scale(.94); }
.hg-prev, .hg-dprev { left: .75rem; }
.hg-next, .hg-dnext { right: .75rem; }
.hg-full { position: absolute; top: .75rem; right: .75rem; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgb(15 18 20 / .55); color: #fff; cursor: pointer; transition: background-color .15s ease; }
.hg-full:hover { background: rgb(15 18 20 / .75); }
.hg-btn:focus-visible, .hg-full:focus-visible, .hg-x:focus-visible { outline: 3px solid var(--lake-light, #a9c7d4); outline-offset: 2px; }
@media (max-width: 560px) {
  .hg-btn { width: 44px; height: 44px; margin-top: -22px; }
  .hg-prev { left: .5rem; } .hg-next { right: .5rem; }
  .hg-full { top: .5rem; right: .5rem; }
}

/* Full screen: the same photos, the same arrows, Esc or the close button to leave. */
.hg-dlg { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(10 12 14 / .97); color: #fff; overflow: hidden; }
.hg-dlg[open] { display: grid; place-items: center; }
.hg-dlg::backdrop { background: rgb(10 12 14 / .9); }
.hg-big { display: block; width: calc(100vw - 8rem); height: calc(100vh - 6rem); height: calc(100dvh - 6rem); object-fit: contain; }
.hg-x { position: absolute; top: .75rem; right: .75rem; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: rgb(255 255 255 / .14); color: #fff; cursor: pointer; }
.hg-x:hover { background: rgb(255 255 255 / .26); }
.hg-dcount { position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%); margin: 0; font: 600 var(--fs-sm)/1.4 var(--font-ui); font-variant-numeric: tabular-nums; color: #fff; }
@media (max-width: 760px) {
  .hg-big { width: 100vw; height: calc(100vh - 9rem); height: calc(100dvh - 9rem); }
  .hg-dlg .hg-btn { top: auto; bottom: .75rem; margin-top: 0; }
  .hg-dcount { bottom: 1.6rem; }
}
html:has(.hg-dlg[open]) { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .hg-btn, .hg-full { transition: none; } .hg-btn:active { transform: none; } }
