/* Impact Gallery page (v2, cinematic). Loads after premium.css and home.css.
   Scoped to body.gallery (page also carries class "home" for shared header/footer/buttons). */
html{scroll-behavior:smooth}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* ---------- hero: centred headline + moving filmstrips ---------- */
body.gallery .gh-hero{background:#fff;padding:12px 12px 0}
body.gallery .gh-panel{--pad:clamp(22px,3.4vw,52px);position:relative;overflow:hidden;background-color:var(--navy);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72'%3E%3Cpath d='M72 0H0v72' fill='none' stroke='%23ffffff' stroke-opacity='.055' stroke-width='1'/%3E%3C/svg%3E");border-radius:var(--r-xl);padding:150px var(--pad) clamp(34px,4vw,56px)}
body.gallery .gh-text{position:relative;z-index:2;max-width:1000px;margin:0 auto;text-align:center}
body.gallery .gh-text .pill{margin-bottom:26px}
body.gallery .gh-text h1{color:#fff;font-size:clamp(2.8rem,7vw,6.2rem);line-height:.98;letter-spacing:-.045em;margin:0 auto 24px;max-width:15ch}
body.gallery .gh-text>p{color:#b9ccd5;font-size:1.18rem;line-height:1.65;margin:0 auto 32px;max-width:54ch}
body.gallery .gh-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-bottom:22px}
body.gallery .gh-facts{display:flex;gap:10px 22px;justify-content:center;flex-wrap:wrap;color:#8fa9b6;font-weight:600;font-size:.92rem}
body.gallery .gh-facts span{display:inline-flex;align-items:center;gap:10px}
body.gallery .gh-facts span+span:before{content:"";width:6px;height:6px;border-radius:50%;background:var(--gold)}
body.gallery .strips{position:relative;z-index:2;margin:clamp(40px,5vw,72px) calc(-1*var(--pad)) 0;display:grid;gap:16px}
body.gallery .strip{display:flex;width:max-content;gap:16px}
body.gallery .strip-set{display:flex;gap:16px;flex:none}
body.gallery .strip figure{margin:0;flex:none;height:clamp(150px,15vw,210px);border-radius:22px;overflow:hidden;background:#0c2434;box-shadow:0 14px 34px rgba(0,0,0,.3)}
body.gallery .strip.r2 figure{height:clamp(130px,13vw,180px)}
body.gallery .strip img{height:100%;width:auto;display:block}
body.gallery .strip.r2{margin-left:-180px}
@media(prefers-reduced-motion:no-preference){
  body.gallery .strip.r1{animation:strip 70s linear infinite}
  body.gallery .strip.r2{animation:strip 85s linear infinite reverse}
  body.gallery .strips:hover .strip{animation-play-state:paused}
  @keyframes strip{to{transform:translateX(calc(-50% - 8px))}}
  body.gallery .gh-text>*{animation:rise .85s cubic-bezier(.2,.7,.2,1) both}
  body.gallery .gh-text>*:nth-child(2){animation-delay:.08s}
  body.gallery .gh-text>*:nth-child(3){animation-delay:.16s}
  body.gallery .gh-text>*:nth-child(4){animation-delay:.24s}
  body.gallery .gh-text>*:nth-child(5){animation-delay:.3s}
}
@media(prefers-reduced-motion:reduce){body.gallery .strips{overflow-x:auto}}

/* ---------- featured moment ---------- */
body.gallery .feature{position:relative;display:block;width:100%;padding:0;border:0;cursor:zoom-in;text-align:left;border-radius:var(--r-xl);overflow:hidden;aspect-ratio:21/9;min-height:400px;background:var(--navy-2)}
body.gallery .feature>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform 1s}
body.gallery .feature:hover>img{transform:scale(1.03)}
body.gallery .feature:before{content:"";position:absolute;inset:0;background:rgba(8,28,41,.3);z-index:1}
body.gallery .feature .fcard{position:absolute;z-index:2;left:clamp(16px,3vw,40px);bottom:clamp(16px,3vw,40px);width:min(440px,calc(100% - 32px));padding:28px 30px;border-radius:var(--r-lg);background:rgba(10,32,46,.7);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border:1px solid rgba(255,255,255,.24);color:#fff}
body.gallery .fcard .pill{margin:0 0 16px;font-size:.8rem;padding:6px 14px}
body.gallery .fcard h3{color:#fff;font-size:clamp(1.7rem,2.6vw,2.3rem);margin:0 0 10px}
body.gallery .fcard p{color:#cfdde3;margin:0 0 18px;font-size:1rem;line-height:1.55}
body.gallery .fcard .more{display:inline-flex;align-items:center;gap:10px;font-weight:700;color:var(--gold);font-size:.95rem}
body.gallery .fcard .more svg{width:18px;height:18px}

/* ---------- themes ---------- */
body.gallery .themes{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
body.gallery .theme{position:relative;display:flex;flex-direction:column;justify-content:flex-end;overflow:hidden;border-radius:var(--r-xl);aspect-ratio:4/5;padding:16px;color:#fff;background:var(--navy-2)}
body.gallery .theme>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .8s}
body.gallery .theme:hover>img{transform:scale(1.06)}
body.gallery .theme:before{content:"";position:absolute;inset:0;background:rgba(8,28,41,.2);transition:background .3s;z-index:1}
body.gallery .theme:hover:before{background:rgba(8,28,41,.4)}
body.gallery .theme>*{position:relative;z-index:2}
body.gallery .theme .count{position:absolute;left:24px;top:24px;padding:8px 16px;border-radius:999px;background:var(--gold);color:var(--navy);font-weight:700;font-size:.85rem}
body.gallery .theme h3{color:#fff;font-size:clamp(1.6rem,2.3vw,2.1rem);margin:0 0 6px}
body.gallery .theme p{color:#d3e0e6;margin:0;font-size:.95rem;line-height:1.45;max-width:26ch}
body.gallery .theme .tcard{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 20px 20px 24px;border-radius:24px;background:rgba(10,32,46,.7);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.22)}
body.gallery .theme .go{flex:none;width:54px;height:54px;border-radius:50%;background:#fff;color:var(--navy);display:grid;place-items:center;transition:background .25s,color .25s,transform .25s}
body.gallery .theme .go svg{width:22px;height:22px}
body.gallery .theme:hover .go{background:var(--gold);transform:rotate(-45deg)}

/* ---------- sticky filter bar ---------- */
body.gallery .bar{position:sticky;top:104px;z-index:30;display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;padding:12px 14px 12px 22px;margin-bottom:28px;border-radius:999px;background:rgba(255,255,255,.92);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:1px solid rgba(17,47,67,.12);box-shadow:0 16px 40px rgba(17,47,67,.1)}
body.gallery .bar .shown{font-weight:700;color:var(--navy);font-size:.95rem}
body.gallery .bar .shown span{color:var(--muted);font-weight:600}
body.gallery .filters{display:flex;flex-wrap:wrap;gap:8px}
body.gallery .filters button{display:inline-flex;align-items:center;gap:9px;padding:11px 20px;border-radius:999px;border:1.5px solid transparent;background:var(--mist);color:var(--navy);font:700 .92rem 'Figtree',sans-serif;cursor:pointer;transition:background .2s,color .2s}
body.gallery .filters button b{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#fff;color:var(--muted);font-size:.74rem}
body.gallery .filters button:hover{background:var(--mint)}
body.gallery .filters button[aria-pressed="true"]{background:var(--navy);color:#fff}
body.gallery .filters button[aria-pressed="true"] b{background:var(--gold);color:var(--navy)}

/* ---------- masonry ---------- */
body.gallery .masonry{columns:3;column-gap:18px}
body.gallery .shot{position:relative;break-inside:avoid;margin:0 0 18px;border-radius:var(--r-lg);overflow:hidden;background:#d7e2dc}
body.gallery .shot[hidden]{display:none}
body.gallery .shot button{display:block;width:100%;padding:0;border:0;background:none;cursor:zoom-in;text-align:left}
body.gallery .shot img{display:block;width:100%;height:auto;transition:transform .7s}
body.gallery .shot:hover img{transform:scale(1.05)}
body.gallery .shot:after{content:"";position:absolute;inset:0;background:rgba(8,28,41,.3);opacity:0;transition:opacity .3s;pointer-events:none}
body.gallery .shot:hover:after,body.gallery .shot:focus-within:after{opacity:1}
body.gallery .shot .cap{position:absolute;z-index:2;left:14px;bottom:14px;right:14px;display:flex;align-items:center;justify-content:space-between;gap:10px;transform:translateY(12px);opacity:0;transition:opacity .3s,transform .3s}
body.gallery .shot:hover .cap,body.gallery .shot:focus-within .cap{opacity:1;transform:none}
body.gallery .shot .cap span{padding:9px 16px;border-radius:999px;background:#fff;color:var(--navy);font-weight:700;font-size:.88rem}
body.gallery .shot .cap i{flex:none;width:40px;height:40px;border-radius:50%;background:var(--gold);color:var(--navy);display:grid;place-items:center}
body.gallery .shot .cap i svg{width:18px;height:18px}
@media(hover:none){body.gallery .shot .cap{opacity:1;transform:none}body.gallery .shot:after{opacity:1;background:rgba(8,28,41,.12)}}
@media(prefers-reduced-motion:no-preference){body.gallery .shot{animation:rise .6s cubic-bezier(.2,.7,.2,1) both}}

/* ---------- lightbox ---------- */
body.gallery .lb{position:fixed;inset:0;z-index:200;display:none;align-items:center;justify-content:center;padding:24px;background:rgba(6,20,30,.95)}
body.gallery .lb.open{display:flex}
body.gallery .lb figure{margin:0;max-width:min(1100px,100%);max-height:100%;display:flex;flex-direction:column;align-items:center;gap:16px}
body.gallery .lb img{max-width:100%;max-height:calc(100vh - 150px);border-radius:var(--r-md);object-fit:contain;background:#0c2434}
body.gallery .lb figcaption{display:flex;align-items:center;gap:14px;color:#fff;font-weight:600}
body.gallery .lb figcaption small{color:#9bb3bf;font-weight:500}
body.gallery .lb button{position:absolute;width:52px;height:52px;border-radius:50%;border:1px solid rgba(255,255,255,.3);background:rgba(255,255,255,.1);color:#fff;display:grid;place-items:center;cursor:pointer;transition:background .2s,color .2s}
body.gallery .lb button:hover{background:var(--gold);color:var(--navy);border-color:var(--gold)}
body.gallery .lb button svg{width:22px;height:22px}
body.gallery .lb .x{top:20px;right:20px}
body.gallery .lb .pv{left:20px;top:50%;margin-top:-26px}
body.gallery .lb .nx{right:20px;top:50%;margin-top:-26px}

/* ---------- responsive ---------- */
@media(max-width:900px){
  body.gallery .themes{grid-template-columns:1fr}
  body.gallery .theme{aspect-ratio:16/11}
  body.gallery .masonry{columns:2}
  body.gallery .feature{aspect-ratio:auto;min-height:480px}
}
@media(max-width:760px){
  body.gallery .gh-hero{padding:8px}
  body.gallery .gh-panel{padding-top:118px;border-radius:28px}
  body.gallery .bar{top:92px;border-radius:26px;padding:12px}
  body.gallery .bar .shown{display:none}
  body.gallery .filters{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;width:100%}
  body.gallery .filters button{flex:none}
  body.gallery .masonry{column-gap:12px}
  body.gallery .shot{margin-bottom:12px;border-radius:20px}
  body.gallery .feature{border-radius:28px}
  body.gallery .theme{border-radius:28px}
  body.gallery .lb .pv,body.gallery .lb .nx{top:auto;bottom:20px;margin:0}
  body.gallery .lb .pv{left:calc(50% - 64px)}
  body.gallery .lb .nx{right:calc(50% - 64px)}
}
@media(max-width:520px){body.gallery .masonry{columns:1}}