.gallery-page {
    background: #0f0d0c;
}

.gallery-page .nav-links a[aria-current="page"],
.gallery-page .mobile-nav-menu a[aria-current="page"] {
    color: var(--accent-gold);
}

.gallery-page .footer-links a {
    color: inherit;
    text-decoration: none;
}

.gallery-page .footer-links a:hover,
.gallery-page .footer-links a:focus-visible {
    color: var(--accent-gold);
}

.gallery-hero {
    position: relative;
    min-height: 680px;
    height: 92vh;
    height: 92svh;
    overflow: hidden;
    display: grid;
    place-items: center;
    isolation: isolate;
}

.gallery-hero > img {
    position: absolute;
    inset: 0;
    z-index: -3;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 58%;
    animation: gallery-hero-reveal 1.2s cubic-bezier(.2,.7,.2,1) both;
}

.gallery-hero-shade {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(180deg, rgba(7, 6, 5, .72) 0%, rgba(7, 6, 5, .12) 36%, rgba(7, 6, 5, .35) 70%, #0f0d0c 100%),
        linear-gradient(90deg, rgba(7, 6, 5, .35), transparent 55%);
}

.gallery-hero-content {
    width: min(1200px, calc(100% - 3rem));
    margin: 6rem auto 0;
    text-align: center;
    animation: gallery-copy-reveal .9s .25s ease-out both;
}

.gallery-kicker {
    color: var(--accent-gold);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .28em;
    text-transform: uppercase;
    margin-bottom: 1.4rem;
}

.gallery-hero h1 {
    font-size: clamp(4rem, 8.5vw, 8.4rem);
    line-height: .84;
    letter-spacing: -.045em;
    text-wrap: balance;
}

.gallery-hero h1 em {
    font-weight: 400;
}

.gallery-hero-content > p:last-child {
    margin-top: 2rem;
    color: rgba(249, 246, 239, .78);
    font-size: clamp(.9rem, 1.25vw, 1.05rem);
    letter-spacing: .08em;
}

.gallery-scroll-cue {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .8rem;
    transform: translateX(-50%);
    color: var(--text-main);
    text-decoration: none;
    font-size: .62rem;
    letter-spacing: .28em;
}

.gallery-scroll-line {
    width: 1px;
    height: 42px;
    background: linear-gradient(var(--accent-gold), transparent);
    animation: gallery-scroll-pulse 1.8s ease-in-out infinite;
}

.gallery-experience {
    padding: clamp(5rem, 10vw, 9rem) 0 clamp(5rem, 9vw, 8rem);
    overflow: hidden;
}

.gallery-heading-row,
.gallery-toolbar,
.gallery-controls {
    width: min(1320px, calc(100% - 8rem));
    margin-inline: auto;
}

.gallery-heading-row {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    gap: 5rem;
    align-items: end;
}

.gallery-heading-row h2 {
    font-size: clamp(2.7rem, 5vw, 5rem);
    line-height: 1.03;
    letter-spacing: -.035em;
}

.gallery-intro {
    max-width: 510px;
    color: var(--text-muted);
    line-height: 1.85;
    font-size: .96rem;
    padding-bottom: .55rem;
}

.gallery-toolbar {
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.gallery-filter {
    min-height: 44px;
    padding: .7rem 1.15rem;
    border: 1px solid rgba(206, 170, 123, .25);
    border-radius: 999px;
    color: var(--text-muted);
    background: transparent;
    font: 500 .68rem/1 var(--font-body);
    letter-spacing: .14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}

.gallery-filter:hover,
.gallery-filter:focus-visible,
.gallery-filter.is-active {
    color: #0f0d0c;
    border-color: var(--accent-gold);
    background: var(--accent-gold);
    outline: none;
}

.gallery-filter:focus-visible {
    box-shadow: 0 0 0 3px #0f0d0c, 0 0 0 5px var(--accent-gold);
}

.gallery-swipe-hint {
    color: var(--text-muted);
    font-size: .7rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.gallery-track {
    display: flex;
    gap: 1.25rem;
    padding: 0 max(4rem, calc((100vw - 1320px) / 2)) 1.5rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    cursor: grab;
}

.gallery-track::-webkit-scrollbar {
    display: none;
}

.gallery-track:active {
    cursor: grabbing;
}

.gallery-track.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    user-select: none;
}

.gallery-track:focus-visible {
    outline: 1px solid var(--accent-gold);
    outline-offset: 5px;
}

.gallery-panel {
    flex: 0 0 min(1040px, calc(100vw - 12rem));
    height: clamp(480px, 57vw, 650px);
    max-height: 650px;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, .8fr);
    grid-template-rows: 1fr 1fr;
    grid-template-areas: "main top" "main bottom";
    gap: .75rem;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

.gallery-panel[hidden] {
    display: none;
}

.gallery-panel-reverse {
    grid-template-columns: minmax(260px, .8fr) minmax(0, 1.4fr);
    grid-template-areas: "top main" "bottom main";
}

.gallery-card {
    position: relative;
    grid-area: top;
    min-width: 0;
    overflow: hidden;
    border: 0;
    padding: 0;
    background: #181411;
    color: var(--text-main);
    cursor: zoom-in;
    text-align: left;
}

.gallery-card:last-child {
    grid-area: bottom;
}

.gallery-card-main {
    grid-area: main;
}

.gallery-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 56%, rgba(6, 5, 4, .82));
    opacity: .78;
    transition: opacity .35s ease;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    transition: transform .65s cubic-bezier(.2,.75,.2,1), filter .4s ease;
}

.gallery-card > span {
    position: absolute;
    z-index: 1;
    left: 1.4rem;
    bottom: 1.2rem;
    font: 400 clamp(1rem, 1.6vw, 1.4rem)/1.2 var(--font-heading);
    letter-spacing: .01em;
    transform: translateY(5px);
    transition: transform .35s ease;
    pointer-events: none;
}

.gallery-card:hover img,
.gallery-card:focus-visible img {
    transform: scale(1.045);
    filter: saturate(1.08);
}

.gallery-card:hover::after,
.gallery-card:focus-visible::after {
    opacity: 1;
}

.gallery-card:hover > span,
.gallery-card:focus-visible > span {
    transform: translateY(0);
}

.gallery-card:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: -4px;
}

.gallery-controls {
    display: grid;
    grid-template-columns: auto minmax(120px, 1fr) auto;
    align-items: center;
    gap: 2rem;
    margin-top: 1.1rem;
}

.gallery-arrows {
    display: flex;
    gap: .55rem;
}

.gallery-arrow {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(206, 170, 123, .42);
    border-radius: 50%;
    background: transparent;
    color: var(--accent-gold);
    font-size: 1.25rem;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, opacity .2s ease;
}

.gallery-arrow:hover:not(:disabled),
.gallery-arrow:focus-visible {
    background: var(--accent-gold);
    color: #0f0d0c;
    outline: none;
}

.gallery-arrow:disabled {
    opacity: .25;
    cursor: default;
}

.gallery-progress {
    height: 1px;
    overflow: hidden;
    background: rgba(206, 170, 123, .2);
}

.gallery-progress span {
    display: block;
    width: 25%;
    height: 100%;
    background: var(--accent-gold);
    transform-origin: left center;
    transition: width .35s ease;
}

.gallery-counter {
    min-width: 68px;
    color: var(--text-muted);
    font-size: .72rem;
    letter-spacing: .18em;
}

.gallery-counter span:first-child {
    color: var(--accent-gold);
}

.gallery-cta {
    min-height: 560px;
    padding: 7rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background:
        linear-gradient(rgba(8, 7, 6, .72), rgba(8, 7, 6, .92)),
        url('../hero-2.webp') center/cover no-repeat;
}

.gallery-cta h2 {
    margin-top: 1.4rem;
    font-size: clamp(2.8rem, 5.5vw, 5rem);
    line-height: 1.05;
}

.gallery-cta-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 2.5rem;
}

.gallery-page .gallery-sunday {
    font-size: 1.2rem;
    margin-top: .8rem;
}

.gallery-book-link {
    display: block;
    margin-top: .5rem;
}

.gallery-lightbox[hidden] {
    display: none;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: grid;
    place-items: center;
    padding: 2rem;
}

.gallery-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 4, 3, .96);
    backdrop-filter: blur(10px);
}

.gallery-lightbox-shell {
    position: relative;
    z-index: 1;
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 56px;
    align-items: center;
    gap: 1.25rem;
}

.gallery-lightbox figure {
    margin: 0;
    min-width: 0;
    text-align: center;
}

.gallery-lightbox figure img {
    display: block;
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
}

.gallery-lightbox figcaption {
    min-height: 1.5rem;
    margin-top: 1rem;
    color: rgba(249, 246, 239, .76);
    font: 400 1rem/1.5 var(--font-heading);
}

.gallery-lightbox-close,
.gallery-lightbox-nav {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(206, 170, 123, .45);
    border-radius: 50%;
    background: rgba(15, 13, 12, .6);
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
}

.gallery-lightbox-close:hover,
.gallery-lightbox-close:focus-visible,
.gallery-lightbox-nav:hover,
.gallery-lightbox-nav:focus-visible {
    background: var(--accent-gold);
    color: #0f0d0c;
    outline: none;
}

.gallery-lightbox-close {
    position: absolute;
    z-index: 2;
    top: -4rem;
    right: 0;
    font-size: 1.7rem;
}

body.gallery-lightbox-open {
    overflow: hidden;
}

@keyframes gallery-hero-reveal {
    from { opacity: 0; transform: scale(1.06); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes gallery-copy-reveal {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes gallery-scroll-pulse {
    0%, 100% { opacity: .35; transform: scaleY(.55); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

@media (max-width: 1024px) {
    .gallery-heading-row,
    .gallery-toolbar,
    .gallery-controls {
        width: min(100% - 4rem, 900px);
    }

    .gallery-heading-row {
        gap: 2.5rem;
    }

    .gallery-track {
        padding-inline: 2rem;
    }

    .gallery-panel {
        flex-basis: calc(100vw - 6rem);
        grid-template-columns: minmax(0, 1.25fr) minmax(220px, .75fr);
    }

    .gallery-panel-reverse {
        grid-template-columns: minmax(220px, .75fr) minmax(0, 1.25fr);
    }
}

@media (max-width: 768px) {
    .gallery-hero {
        min-height: 620px;
        height: 86svh;
    }

    .gallery-hero > img {
        object-position: 57% center;
    }

    .gallery-hero-content {
        width: calc(100% - 2rem);
    }

    .gallery-hero h1 {
        font-size: clamp(3.4rem, 17vw, 5.5rem);
        line-height: .9;
    }

    .gallery-heading-row,
    .gallery-toolbar,
    .gallery-controls {
        width: calc(100% - 2rem);
    }

    .gallery-heading-row {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .gallery-heading-row h2 {
        font-size: clamp(2.45rem, 11vw, 4rem);
    }

    .gallery-toolbar {
        margin-top: 2.25rem;
        align-items: flex-start;
    }

    .gallery-swipe-hint {
        display: none;
    }

    .gallery-track {
        gap: .75rem;
        padding-inline: 1rem;
    }

    .gallery-panel,
    .gallery-panel-reverse {
        flex-basis: 86vw;
        height: min(72svh, 590px);
        min-height: 500px;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1.55fr .75fr;
        grid-template-areas: "main main" "top bottom";
        gap: .5rem;
    }

    .gallery-card > span {
        left: 1rem;
        bottom: .9rem;
        font-size: .96rem;
    }

    .gallery-controls {
        grid-template-columns: auto 1fr auto;
        gap: 1rem;
    }

    .gallery-arrow {
        width: 44px;
        height: 44px;
    }

    .gallery-cta {
        min-height: 520px;
    }

    .gallery-cta-actions {
        flex-direction: column;
        gap: 1.5rem;
    }

    .gallery-lightbox {
        padding: 1rem;
    }

    .gallery-lightbox-shell {
        grid-template-columns: 1fr 1fr;
        gap: .75rem;
    }

    .gallery-lightbox figure {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .gallery-lightbox-nav {
        grid-row: 2;
        width: 100%;
        border-radius: 2px;
    }

    .gallery-lightbox-next {
        justify-self: end;
    }

    .gallery-lightbox-close {
        top: -3.8rem;
    }
}

@media (max-width: 430px) {
    .gallery-kicker {
        font-size: .62rem;
        letter-spacing: .2em;
    }

    .gallery-filter {
        padding-inline: .9rem;
        font-size: .62rem;
    }

    .gallery-panel,
    .gallery-panel-reverse {
        flex-basis: 88vw;
        min-height: 470px;
    }

    .gallery-controls {
        grid-template-columns: auto auto;
    }

    .gallery-progress {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .gallery-counter {
        justify-self: end;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-hero > img,
    .gallery-hero-content,
    .gallery-scroll-line {
        animation: none;
    }

    .gallery-card img,
    .gallery-progress span {
        transition: none;
    }

    .gallery-track {
        scroll-behavior: auto;
    }
}
