:root {
    --gallery-navy: #061f2f;
    --gallery-deep: #082a3c;
    --gallery-teal: #22c6c3;
    --gallery-mint: #65ddd6;
    --gallery-ink: #142f3e;
    --gallery-muted: #657984;
    --gallery-paper: #f4f8f8;
}

/* Page entrance and branded loader */
.loader-wrap .animation-preloader { width: min(310px, 74vw); }
.gallery-loader-brand { display: flex; align-items: center; flex-direction: column; gap: 16px; }
.gallery-loader-brand img { width: 185px; height: auto; opacity: 0; transform: translateY(14px); animation: galleryLoaderLogo .55s cubic-bezier(.2,.7,.2,1) .12s forwards; }
.gallery-loader-brand__line { position: relative; display: block; width: 150px; height: 2px; overflow: hidden; background: rgba(255,255,255,.14); }
.gallery-loader-brand__line i { position: absolute; inset: 0; background: var(--gallery-mint); transform: translateX(-105%); animation: galleryLoaderLine .8s cubic-bezier(.65,0,.35,1) .22s forwards; }
.gallery-loader-brand small { color: rgba(255,255,255,.58); font-size: 10px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; opacity: 0; animation: galleryLoaderText .45s ease .48s forwards; }
.loader-wrap.gallery-loader-leave { pointer-events: none; animation: galleryLoaderLeave .5s cubic-bezier(.65,0,.35,1) forwards; }
@keyframes galleryLoaderLogo { to { opacity: 1; transform: translateY(0); } }
@keyframes galleryLoaderLine { to { transform: translateX(0); } }
@keyframes galleryLoaderText { to { opacity: 1; } }
@keyframes galleryLoaderLeave { to { opacity: 0; visibility: hidden; } }

.gallery-motion .gallery-intro .gallery-kicker,
.gallery-motion .gallery-intro h1,
.gallery-motion .gallery-intro p { opacity: 0; transform: translateY(28px); }
.gallery-motion.gallery-page-ready .gallery-intro .gallery-kicker,
.gallery-motion.gallery-page-ready .gallery-intro h1,
.gallery-motion.gallery-page-ready .gallery-intro p { opacity: 1; transform: translateY(0); transition: opacity .8s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.gallery-motion.gallery-page-ready .gallery-intro .gallery-kicker { transition-delay: .08s; }
.gallery-motion.gallery-page-ready .gallery-intro h1 { transition-delay: .18s; }
.gallery-motion.gallery-page-ready .gallery-intro p { transition-delay: .34s; }
.gallery-motion .gallery-reveal { opacity: 0; transform: translateY(42px); }
.gallery-motion .gallery-reveal.is-visible { opacity: 1; transform: translateY(0); transition: opacity .8s ease var(--gallery-reveal-delay, 0ms), transform .9s cubic-bezier(.2,.7,.2,1) var(--gallery-reveal-delay, 0ms); }
.gallery-motion .gallery-feature.gallery-reveal { transform: translateY(48px) scale(.985); }
.gallery-motion .gallery-feature.gallery-reveal.is-visible { transform: translateY(0) scale(1); }
.gallery-motion .gallery-feature.gallery-reveal .gallery-feature__overlay > * { opacity: 0; transform: translateY(20px); }
.gallery-motion .gallery-feature.gallery-reveal.is-visible .gallery-feature__overlay > * { opacity: 1; transform: translateY(0); transition: opacity .65s ease, transform .75s cubic-bezier(.2,.7,.2,1); }
.gallery-motion .gallery-feature.gallery-reveal.is-visible .gallery-feature__overlay > :nth-child(1) { transition-delay: .2s; }
.gallery-motion .gallery-feature.gallery-reveal.is-visible .gallery-feature__overlay > :nth-child(2) { transition-delay: .3s; }
.gallery-motion .gallery-feature.gallery-reveal.is-visible .gallery-feature__overlay > :nth-child(3) { transition-delay: .4s; }
.gallery-motion .gallery-feature.gallery-reveal.is-visible .gallery-feature__overlay > :nth-child(4) { transition-delay: .5s; }
.gallery-card.is-filter-entering { animation: galleryFilterEnter .48s cubic-bezier(.2,.7,.2,1) both; }
@keyframes galleryFilterEnter { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.gallery-lightbox:not([hidden]) .gallery-lightbox__backdrop { animation: galleryBackdropIn .28s ease both; }
.gallery-lightbox:not([hidden]) .gallery-lightbox__dialog { animation: galleryDialogIn .38s cubic-bezier(.2,.7,.2,1) both; }
@keyframes galleryBackdropIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes galleryDialogIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

.gallery-content { overflow: hidden; background: #fff; }
.gallery-intro { padding: 105px 0 80px; }
.gallery-intro__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); gap: 70px; align-items: end; }
.gallery-kicker { display: inline-flex; align-items: center; gap: 12px; color: #198f93; font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.gallery-kicker::before { content: ""; width: 34px; height: 2px; background: var(--gallery-teal); }
.gallery-intro h1 { margin: 20px 0 0; color: var(--gallery-navy); font-size: clamp(40px, 5vw, 70px); line-height: 1.06; letter-spacing: -.035em; }
.gallery-intro h1 span { color: #1b9da0; }
.gallery-intro p { margin: 0 0 8px; color: var(--gallery-muted); font-size: 17px; line-height: 1.85; }
.gallery-showcase { padding: 0 0 120px; }
.gallery-feature { position: relative; min-height: 590px; overflow: hidden; border-radius: 4px 42px 4px 4px; background: var(--gallery-navy); box-shadow: 0 28px 70px rgba(5, 37, 52, .15); }
.gallery-media-placeholder { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, #0a3549 0%, #116274 55%, #0b8790 100%); color: rgba(255,255,255,.88); }
.gallery-media-placeholder::before { content: ""; position: absolute; inset: 0; opacity: .55; background: repeating-linear-gradient(120deg, transparent 0 92px, rgba(255,255,255,.06) 93px 94px); }
.gallery-media-placeholder::after { content: ""; position: absolute; width: 360px; height: 360px; right: -80px; top: -110px; border: 1px solid rgba(101,221,214,.38); border-radius: 50%; box-shadow: 0 0 0 65px rgba(101,221,214,.035), 0 0 0 130px rgba(101,221,214,.025); }
.gallery-media-placeholder > * { position: relative; z-index: 1; }
.gallery-media-placeholder > i { font-size: 38px; opacity: .7; }
.gallery-feature > img, .gallery-card__button > img, .gallery-card__button > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .65s cubic-bezier(.2,.7,.2,1); }
.gallery-card__button:hover > img, .gallery-card__button:hover > video { transform: scale(1.035); }
.gallery-media-placeholder--feature { display: flex; align-items: flex-end; justify-content: flex-end; padding: 50px; }
.gallery-slot-number { position: absolute; top: 24px; left: 26px; font-size: 13px; font-weight: 700; letter-spacing: .16em; }
.gallery-slot-label { display: flex; align-items: center; gap: 12px; padding: 13px 17px; border: 1px solid rgba(255,255,255,.22); background: rgba(4,31,47,.36); backdrop-filter: blur(8px); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.gallery-feature__overlay { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; width: 68%; padding: 68px; color: #fff; background: linear-gradient(90deg, rgba(3,25,39,.94) 0%, rgba(3,25,39,.73) 58%, transparent 100%); }
.gallery-card__eyebrow { color: var(--gallery-mint); font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.gallery-feature h2 { max-width: 680px; margin: 16px 0; color: #fff; font-size: clamp(34px, 4vw, 55px); line-height: 1.12; }
.gallery-feature p { max-width: 570px; margin: 0 0 28px; color: rgba(255,255,255,.72); font-size: 16px; line-height: 1.8; }
.gallery-open { font: inherit; }
.gallery-feature .gallery-open { display: inline-flex; width: fit-content; align-items: center; gap: 22px; border: 0; padding: 15px 0; color: #fff; background: transparent; font-size: 14px; font-weight: 700; cursor: pointer; }
.gallery-feature .gallery-open i { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; color: var(--gallery-navy); background: var(--gallery-mint); transition: transform .25s ease; }
.gallery-feature .gallery-open:hover i { transform: translateX(5px); }
.gallery-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin: 74px 0 38px; padding-bottom: 24px; border-bottom: 1px solid #dbe6e8; }
.gallery-toolbar__label { display: flex; flex-direction: column; gap: 5px; min-width: 180px; }
.gallery-toolbar__label span { color: var(--gallery-ink); font-weight: 700; }
.gallery-toolbar__label strong { color: #82949d; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.gallery-filters { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.gallery-filters button { border: 1px solid #cbdadc; border-radius: 50px; padding: 10px 17px; color: #4f6874; background: #fff; font-size: 12px; font-weight: 700; transition: .25s ease; cursor: pointer; }
.gallery-filters button:hover, .gallery-filters button.is-active { border-color: var(--gallery-teal); color: var(--gallery-navy); background: var(--gallery-mint); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 330px; gap: 22px; }
.gallery-card { position: relative; min-width: 0; transition: opacity .3s ease, transform .3s ease; }
.gallery-card--wide { grid-column: span 2; }
.gallery-card--tall { grid-row: span 2; }
.gallery-card.is-hidden { display: none; }
.gallery-card__button { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; border: 0; border-radius: 3px 25px 3px 3px; padding: 0; color: #fff; background: var(--gallery-deep); text-align: left; cursor: pointer; }
.gallery-card__button::after { content: ""; position: absolute; inset: 30% 0 0; z-index: 1; background: linear-gradient(transparent, rgba(3,25,39,.92)); }
.gallery-card__button .gallery-media-placeholder { transition: transform .65s cubic-bezier(.2,.7,.2,1), filter .4s ease; }
.gallery-card:nth-child(3n+2) .gallery-media-placeholder { background: linear-gradient(145deg, #12374a, #167f83); }
.gallery-card:nth-child(3n+3) .gallery-media-placeholder { background: linear-gradient(145deg, #08283b, #125064); }
.gallery-card__button:hover .gallery-media-placeholder { transform: scale(1.035); filter: brightness(1.08); }
.gallery-card__content { position: absolute; left: 26px; right: 70px; bottom: 25px; z-index: 2; display: flex; flex-direction: column; gap: 4px; }
.gallery-card__content strong { color: #fff; font-size: 22px; line-height: 1.25; }
.gallery-card__content small { color: rgba(255,255,255,.62); font-size: 12px; }
.gallery-card__action { position: absolute; right: 22px; bottom: 24px; z-index: 2; display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; }
.gallery-play { display: grid; width: 72px; height: 72px; place-items: center; border: 1px solid rgba(255,255,255,.42); border-radius: 50%; color: var(--gallery-navy); background: var(--gallery-mint); box-shadow: 0 0 0 12px rgba(101,221,214,.12); }
.gallery-play i { margin-left: 4px; }
.gallery-card__duration { position: absolute; top: 22px; right: 22px; z-index: 2; padding: 6px 9px; border-radius: 3px; color: #fff; background: rgba(3,25,39,.72); font-size: 11px; }
.gallery-cta { padding: 105px 0; color: #fff; background: var(--gallery-navy); }
.gallery-cta__inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 50px; overflow: hidden; border-left: 3px solid var(--gallery-teal); padding: 18px 0 18px 42px; }
.gallery-cta h2 { margin: 14px 0 8px; color: #fff; font-size: clamp(34px, 4vw, 52px); }
.gallery-cta p { margin: 0; color: rgba(255,255,255,.65); }
.gallery-cta__button { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 22px; border-radius: 50px; padding: 18px 26px; color: var(--gallery-navy); background: var(--gallery-mint); font-size: 13px; font-weight: 700; }
.gallery-cta__button:hover { color: var(--gallery-navy); transform: translateY(-2px); }
.gallery-lightbox[hidden] { display: none; }
.gallery-lightbox { position: fixed; inset: 0; z-index: 999999; display: grid; place-items: center; padding: 32px; }
.gallery-lightbox__backdrop { position: absolute; inset: 0; background: rgba(2,18,28,.94); backdrop-filter: blur(12px); }
.gallery-lightbox__dialog { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, .55fr); width: min(1180px, 100%); max-height: calc(100vh - 64px); overflow: auto; color: #fff; background: #082839; box-shadow: 0 35px 100px rgba(0,0,0,.45); }
.gallery-lightbox__media { position: relative; min-height: 610px; background: linear-gradient(135deg, #0a3549, #0b8790); }
.gallery-lightbox__media::before { content: "Media preview"; position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.75); font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.gallery-lightbox__media.has-media::before { display: none; }
.gallery-lightbox__media img, .gallery-lightbox__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #031923; }
.gallery-lightbox__details { display: flex; flex-direction: column; justify-content: center; padding: 54px 42px 100px; }
.gallery-lightbox__details span { color: var(--gallery-mint); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.gallery-lightbox__details h2 { margin: 15px 0; color: #fff; font-size: 34px; }
.gallery-lightbox__details p { color: rgba(255,255,255,.64); line-height: 1.8; }
.gallery-lightbox__close { position: absolute; top: 18px; right: 18px; z-index: 3; display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; color: #fff; background: rgba(3,25,39,.62); cursor: pointer; }
.gallery-lightbox__controls { position: absolute; right: 42px; bottom: 34px; z-index: 2; display: flex; align-items: center; gap: 16px; }
.gallery-lightbox__controls button { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; color: #fff; background: transparent; cursor: pointer; }
.gallery-lightbox__controls span { min-width: 55px; text-align: center; font-size: 11px; letter-spacing: .08em; }
body.gallery-lightbox-open { overflow: hidden; }

@media (max-width: 991px) {
    .gallery-intro { padding: 80px 0 60px; }
    .gallery-intro__grid { grid-template-columns: 1fr; gap: 28px; }
    .gallery-feature { min-height: 520px; }
    .gallery-feature__overlay { width: 88%; padding: 48px; }
    .gallery-toolbar { align-items: flex-start; flex-direction: column; }
    .gallery-filters { justify-content: flex-start; }
    .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gallery-card--tall { grid-row: span 1; }
    .gallery-cta__inner { align-items: flex-start; flex-direction: column; }
    .gallery-lightbox__dialog { grid-template-columns: 1fr; }
    .gallery-lightbox__media { min-height: 50vh; }
}

@media (max-width: 767px) {
    .gallery-intro { padding: 64px 0 48px; }
    .gallery-intro h1 { font-size: 38px; }
    .gallery-showcase { padding-bottom: 80px; }
    .gallery-feature { min-height: 550px; border-radius: 3px 24px 3px 3px; }
    .gallery-feature__overlay { width: 100%; padding: 32px 24px; background: linear-gradient(0deg, rgba(3,25,39,.96), rgba(3,25,39,.28)); }
    .gallery-feature h2 { font-size: 35px; }
    .gallery-toolbar { margin-top: 50px; }
    .gallery-filters { width: calc(100vw - 30px); flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
    .gallery-filters::-webkit-scrollbar { display: none; }
    .gallery-filters button { flex: 0 0 auto; }
    .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 360px; }
    .gallery-card--wide { grid-column: span 1; }
    .gallery-cta { padding: 78px 0; }
    .gallery-cta__inner { padding-left: 24px; }
    .gallery-lightbox { padding: 12px; }
    .gallery-lightbox__dialog { max-height: calc(100vh - 24px); }
    .gallery-lightbox__media { min-height: 42vh; }
    .gallery-lightbox__details { padding: 32px 24px 90px; }
    .gallery-lightbox__controls { right: 24px; bottom: 25px; }
}

@media (prefers-reduced-motion: reduce) {
    .loader-wrap .gallery-loader-brand *, .loader-wrap.gallery-loader-leave,
    .gallery-card, .gallery-card__button .gallery-media-placeholder, .gallery-feature .gallery-open i,
    .gallery-motion .gallery-intro .gallery-kicker, .gallery-motion .gallery-intro h1, .gallery-motion .gallery-intro p,
    .gallery-motion .gallery-reveal, .gallery-motion .gallery-reveal.is-visible,
    .gallery-motion .gallery-feature.gallery-reveal .gallery-feature__overlay > *,
    .gallery-card.is-filter-entering, .gallery-lightbox__backdrop, .gallery-lightbox__dialog { animation: none !important; transition: none !important; }
    .gallery-motion .gallery-intro .gallery-kicker, .gallery-motion .gallery-intro h1, .gallery-motion .gallery-intro p,
    .gallery-motion .gallery-reveal, .gallery-motion .gallery-feature.gallery-reveal,
    .gallery-motion .gallery-feature.gallery-reveal .gallery-feature__overlay > * { opacity: 1 !important; transform: none !important; }
}
