/* webfront/css/components/hero_gallery.css — the shared animated hero gallery ("ss-hg").
 *
 * One component for every public page:
 *   - native pages render it server-side (webfront/native/_hero_slides.html + _hero_bar.html);
 *   - legacy pages get the same DOM from shell.js (initGalleries -> hydrateLegacyHero), which
 *     turns the legacy "header gallery" section into .ss-hg.ss-hg--legacy.
 * Motion: 1.2 s cross-fade + slow zoom per frame, auto-advance every `data-interval` seconds,
 * paused while hidden / off-screen / by the visitor; reduced motion starts paused with no zoom.
 * The hero is always a dark photo, so its text stays light in every theme.
 */
.ss-hg { --hg-red: var(--cp-red, #e4002b); --hg-red-bright: var(--cp-red-soft, #ff3355);
    position: relative; isolation: isolate; overflow: hidden; color: #fff; background: #0b0c10; }

/* ---------------- photo layer ---------------- */
.ss-hg__slides, .ss-hg__slide, .ss-hg__shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.ss-hg__slides { z-index: 0; margin: 0; overflow: hidden; }
.ss-hg__slide { margin: 0; opacity: 0; visibility: hidden; transition: opacity 1.2s ease, visibility 1.2s ease; }
.ss-hg__slide.is-active { opacity: 1; visibility: visible; }
.ss-hg__slide img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; border-radius: 0;
    margin: 0; transform: scale(1.015); transform-origin: 50% 50%; filter: saturate(.55); will-change: transform; }
.ss-hg__slide.is-active img { animation: ss-hg-zoom calc(var(--hg-interval, 6s) + 2s) ease-out both; }
.ss-hg__slide:nth-child(2n).is-active img { animation-name: ss-hg-zoom-pan; }
@keyframes ss-hg-zoom { from { transform: scale(1.015); } to { transform: scale(1.08); } }
@keyframes ss-hg-zoom-pan { from { transform: scale(1.08) translate3d(-1.5%, 0, 0); } to { transform: scale(1.08) translate3d(1.5%, 0, 0); } }
.ss-hg__shade { z-index: 1; pointer-events: none;
    background: linear-gradient(180deg, rgba(4, 5, 7, .34), rgba(4, 5, 7, .44) 45%, rgba(4, 5, 7, .9)),
                linear-gradient(90deg, rgba(4, 5, 7, .28), transparent 65%); }

/* ---------------- copy (native pages) ---------------- */
.ss-hg--native { display: flex; flex-direction: column; min-height: clamp(540px, calc(100vh - var(--ss-header-h, 64px)), 800px); }
.ss-hg__copy { position: relative; z-index: 2; flex: 1 1 auto; display: flex; flex-direction: column; align-items: center;
    justify-content: center; text-align: center; width: 100%; max-width: 1000px; margin: 0 auto;
    padding: clamp(56px, 9vh, 120px) clamp(20px, 4vw, 40px) clamp(120px, 15vh, 150px); box-sizing: border-box; }
.ss-hg__copy :is(h1, h2, h3, h4, h5, h6) { color: #fff; margin: 0; font-family: var(--cp-font); }
.ss-hg__eyebrow { position: relative; }
.ss-hg__eyebrow .wb-layout-link { position: absolute; inset: -6px -10px; z-index: 1; border-radius: 6px; }
.ss-hg__copy h3 { font-size: 13px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; margin-bottom: 20px; }
.ss-hg__copy h1 { font-size: clamp(40px, 5.8vw, 78px); font-weight: 900; line-height: 1.06; letter-spacing: -.045em;
    text-shadow: 0 3px 45px rgba(0, 0, 0, .4); }
.ss-hg__copy h5 { font-size: clamp(15px, 1.6vw, 19px); font-weight: 500; line-height: 1.65; margin-top: 24px; max-width: 680px; color: #f1f1f4; }
.ss-hg__actions { margin-top: 32px; }
.ss-hg__actions a { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px;
    padding: 15px 26px; border-radius: 8px; background: var(--cp-btn-bg, var(--hg-red)); color: #fff; font-weight: 700; font-size: 15px;
    text-decoration: none; box-shadow: 0 16px 34px rgba(0, 0, 0, .35); transition: background .18s ease, transform .18s ease; }
.ss-hg__actions a:hover { background: var(--cp-btn-bg-hover, var(--hg-red-bright)); color: #fff; transform: translateY(-2px); }

/* ---------------- bottom bar ---------------- */
.ss-hg__bar { position: absolute; z-index: 3; left: clamp(20px, 4vw, 48px); right: clamp(20px, 4vw, 48px); bottom: 26px;
    display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .19); font-family: var(--cp-font); font-size: 11px; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase; line-height: 1.4; color: #fff; text-align: left; }
.ss-hg__note { display: flex; align-items: center; gap: 10px; flex: 1 1 0; min-width: 0; }
.ss-hg__dot { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; display: inline-block;
    background: var(--hg-red-bright, #ff3355); box-shadow: 0 0 14px var(--hg-red, #e4002b); }
.ss-hg__controls { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.ss-hg__pos { min-width: 5.5em; margin-right: 6px; color: rgba(255, 255, 255, .86); font-variant-numeric: tabular-nums; text-align: right; }
.ss-hg__btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0;
    border: 1px solid rgba(255, 255, 255, .42); border-radius: 50%; background: rgba(0, 0, 0, .18); color: #fff; cursor: pointer;
    transition: background .15s ease, border-color .15s ease; }
.ss-hg__btn:hover { background: rgba(255, 255, 255, .16); border-color: #fff; }
.ss-hg__btn:focus-visible, .ss-hg__explore:focus-visible, .ss-hg__eyebrow .wb-layout-link:focus-visible {
    outline: 3px solid var(--hg-red-bright); outline-offset: 3px; }
.ss-hg .ss-hg__bar svg { width: 16px; height: 16px; max-width: none; max-height: none; flex: 0 0 auto; fill: none; stroke: currentColor;
    stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ss-hg .ss-hg__bar .ss-hg__ic-play path { fill: currentColor; stroke: none; }
.ss-hg__ic-play { display: none; }
.ss-hg__btn[aria-pressed="true"] .ss-hg__ic-play { display: block; }
.ss-hg__btn[aria-pressed="true"] .ss-hg__ic-pause { display: none; }
.ss-hg a.ss-hg__explore { display: inline-flex; align-items: center; justify-content: flex-end; gap: 14px; flex: 1 1 0;
    color: #fff; text-decoration: none; }
.ss-hg a.ss-hg__explore:hover { color: #fff; }
.ss-hg .ss-hg__bar a.ss-hg__explore svg { width: 18px; height: 18px; transition: transform .2s ease; }
.ss-hg a.ss-hg__explore:hover svg { transform: translateY(3px); }
.ss-hg--single .ss-hg__controls { display: none; }
.no-js .ss-hg__controls { display: none; }

/* ---------------- legacy pages (hydrated by shell.js) ---------------- */
.ss-hg--legacy { padding-bottom: clamp(120px, 14vh, 150px) !important; }
.ss-hg--legacy [data-plugin="Gallery"] { background: #0b0c10; }
.ss-hg .ss-hg__bar, .ss-hg .ss-hg__slides, .ss-hg .ss-hg__shade { margin: 0; }
.ss-hg .ss-hg__bar { width: auto; }

@media (max-width: 900px) {
    .ss-hg--native { min-height: clamp(520px, 74vh, 680px); }
}
@media (max-width: 600px) {
    .ss-hg--native { min-height: 590px; }
    .ss-hg__copy { padding: 48px 22px 132px; }
    .ss-hg__copy h1 { font-size: clamp(36px, 11vw, 46px); line-height: 1.1; }
    .ss-hg__copy h3 { font-size: 11px; margin-bottom: 16px; }
    .ss-hg__copy h5 { font-size: 15px; line-height: 1.7; max-width: 32ch; margin-top: 18px; }
    .ss-hg__actions { margin-top: 26px; }
    .ss-hg__actions a { font-size: 14px; padding: 13px 20px; min-height: 48px; }
    .ss-hg__bar { left: 18px; right: 18px; bottom: 18px; gap: 10px; padding-top: 14px; font-size: 10px; letter-spacing: .08em; }
    .ss-hg__note { max-width: 150px; line-height: 1.6; }
    .ss-hg__pos { min-width: 0; margin-right: 2px; }
    .ss-hg__controls { gap: 8px; }
    .ss-hg__btn { width: 38px; height: 38px; }
    .ss-hg a.ss-hg__explore { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .ss-hg__slide { transition: none; }
    .ss-hg__slide img, .ss-hg__slide.is-active img { animation: none !important; transform: none; }
    .ss-hg__actions a, .ss-hg .ss-hg__bar a.ss-hg__explore svg { transition: none; }
}
