/* ==================================================
   MODERN GALLERY
================================================== */

.gallery-page {
    background: #f3f4f2;
    color: #1c252a;
}

.gallery-hero {
    position: relative;
    min-height: min(84vh, 820px);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: clamp(90px, 10vw, 150px) clamp(28px, 7vw, 110px) clamp(60px, 7vw, 100px);
    box-sizing: border-box;
    isolation: isolate;
    background: #182126;
}

.gallery-hero-media {
    position: absolute;
    inset: 0;
    z-index: -3;
    background-size: cover;
    background-position: center;
    transform: scale(1.035);
    transition: opacity .8s ease, transform 7s ease;
}

.gallery-hero-media.is-changing {
    opacity: .12;
    transform: scale(1.08);
}

.gallery-hero-shade {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(90deg, rgba(9,15,19,.88) 0%, rgba(11,20,26,.69) 40%, rgba(12,21,26,.16) 77%),
        linear-gradient(0deg, rgba(9,15,19,.52), transparent 55%);
}

.gallery-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(120deg, rgba(255,255,255,.11), transparent 28%);
    mix-blend-mode: soft-light;
    pointer-events: none;
}

.gallery-hero-copy {
    width: min(760px, 78vw);
    color: #fff;
}

.gallery-kicker,
.gallery-section-label {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: 11px;
    letter-spacing: .28em;
    font-weight: 700;
    text-transform: uppercase;
}

.gallery-kicker::before,
.gallery-section-label::before {
    content: "";
    width: 34px;
    height: 1px;
    background: currentColor;
    opacity: .55;
}

.gallery-hero-copy h1 {
    margin: 26px 0 22px;
    font-size: clamp(54px, 7vw, 106px);
    line-height: .93;
    letter-spacing: -.055em;
    max-width: 980px;
    font-weight: 650;
}

.gallery-hero-copy h1 span {
    display: block;
    color: rgba(255,255,255,.58);
    font-weight: 300;
}

.gallery-hero-copy p {
    max-width: 650px;
    margin: 0 0 34px;
    font-size: clamp(16px, 1.35vw, 20px);
    line-height: 1.7;
    color: rgba(255,255,255,.78);
}

.gallery-hero-link {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.4);
    padding: 0 0 9px;
    font-size: 14px;
    transition: gap .3s ease, border-color .3s ease;
}

.gallery-hero-link:hover {
    gap: 25px;
    border-color: #fff;
}

.gallery-hero-index {
    position: absolute;
    right: clamp(28px, 6vw, 90px);
    bottom: clamp(58px, 7vw, 100px);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    letter-spacing: .16em;
}

.gallery-hero-index i {
    width: 54px;
    height: 1px;
    background: rgba(255,255,255,.45);
}

.gallery-intro {
    max-width: 1320px;
    margin: auto;
    padding: clamp(85px, 10vw, 150px) clamp(24px, 5vw, 70px) 55px;
    display: grid;
    grid-template-columns: 1.45fr .65fr;
    gap: 70px;
    align-items: end;
}

.gallery-section-label {
    color: #6b7f88;
}

.gallery-intro h2 {
    margin: 20px 0 0;
    font-size: clamp(48px, 5.6vw, 83px);
    line-height: .98;
    letter-spacing: -.05em;
    font-weight: 650;
}

.gallery-intro h2 span {
    display: block;
    color: #8b969b;
    font-weight: 300;
}

.gallery-intro-copy {
    margin: 0 0 8px;
    color: #66747a;
    font-size: 16px;
    line-height: 1.8;
}

.gallery-browser {
    max-width: 1440px;
    margin: auto;
    padding: 0 clamp(18px, 4vw, 56px) clamp(100px, 10vw, 160px);
}

.gallery-filter-shell {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    gap: 30px;
    align-items: center;
    padding: 18px 0;
    margin-bottom: 28px;
    background: rgba(243,244,242,.88);
    backdrop-filter: blur(16px);
    border-top: 1px solid #d7dcda;
    border-bottom: 1px solid #d7dcda;
}

.gallery-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gallery-filter {
    border: 0;
    background: transparent;
    padding: 10px 14px;
    color: #738087;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    transition: background .25s ease, color .25s ease;
}

.gallery-filter.active,
.gallery-filter:hover {
    color: #fff;
    background: #33434b;
}

.gallery-count {
    min-width: 95px;
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 8px;
    color: #33434b;
}

.gallery-count span {
    font-size: 22px;
    font-weight: 650;
}

.gallery-count small {
    font-size: 9px;
    letter-spacing: .18em;
}

.gallery-masonry {
    columns: 3 340px;
    column-gap: 18px;
}

.gallery-project {
    position: relative;
    display: block;
    margin: 0 0 18px;
    break-inside: avoid;
    overflow: hidden;
    background: #dfe3e1;
    cursor: zoom-in;
}

.gallery-project img {
    width: 100%;
    display: block;
    transition: transform .8s cubic-bezier(.2,.7,.2,1), filter .4s ease;
}

.gallery-project::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(7,13,16,.78), rgba(7,13,16,0) 58%);
    opacity: .75;
    transition: opacity .4s ease;
}

.gallery-project-info {
    position: absolute;
    z-index: 2;
    left: 24px;
    right: 24px;
    bottom: 22px;
    color: #fff;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.gallery-project-category {
    display: block;
    margin-bottom: 7px;
    font-size: 9px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: rgba(255,255,255,.66);
}

.gallery-project h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
}

.gallery-project-arrow {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 1px solid rgba(255,255,255,.5);
    display: grid;
    place-items: center;
    border-radius: 50%;
    transition: background .3s ease, color .3s ease, transform .3s ease;
}

.gallery-project:hover img {
    transform: scale(1.035);
}

.gallery-project:hover::after {
    opacity: .9;
}

.gallery-project:hover .gallery-project-arrow {
    background: #fff;
    color: #182126;
    transform: rotate(45deg);
}

.gallery-project.is-hidden {
    display: none;
}

.gallery-empty {
    padding: 80px 20px;
    text-align: center;
    color: #7b888e;
}

.gallery-material-note {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 82% 25%, rgba(129,152,162,.24), transparent 27%),
        linear-gradient(135deg, #26353d 0%, #33444d 48%, #1d292f 100%);
    color: #fff;
    padding: clamp(95px, 11vw, 165px) 24px;
}

.gallery-material-note::after {
    content: "";
    position: absolute;
    width: 58vw;
    height: 58vw;
    right: -27vw;
    top: -30vw;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 50%;
    box-shadow: 0 0 0 80px rgba(255,255,255,.018), 0 0 0 180px rgba(255,255,255,.012);
}

.gallery-material-note-inner {
    position: relative;
    z-index: 2;
    width: min(880px, 86vw);
    margin: auto;
    text-align: center;
}

.gallery-material-note-inner > span {
    font-size: 10px;
    letter-spacing: .28em;
    color: #aebdc3;
}

.gallery-material-note h2 {
    margin: 24px 0;
    font-size: clamp(48px, 6vw, 86px);
    line-height: .98;
    letter-spacing: -.05em;
    font-weight: 650;
}

.gallery-material-note h2 em {
    display: block;
    font-style: normal;
    font-weight: 300;
    color: #aeb8bc;
}

.gallery-material-note p {
    max-width: 660px;
    margin: auto;
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255,255,255,.7);
}

/* LIGHTBOX */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    grid-template-columns: 90px 1fr 90px;
    align-items: center;
    background: rgba(6,10,13,.96);
    padding: 28px;
    box-sizing: border-box;
}

.gallery-lightbox.active {
    display: grid;
}

.gallery-lightbox-stage {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-lightbox-stage img {
    max-width: min(1200px, 82vw);
    max-height: 76vh;
    object-fit: contain;
    display: block;
    box-shadow: 0 30px 90px rgba(0,0,0,.35);
}

.gallery-lightbox-meta {
    width: min(1200px, 82vw);
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: end;
    color: #fff;
}

.gallery-lightbox-meta span {
    font-size: 9px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: #92a4ad;
}

.gallery-lightbox-meta h3 {
    margin: 7px 0 0;
    font-size: 20px;
    font-weight: 500;
}

.gallery-lightbox-counter {
    font-size: 12px;
    letter-spacing: .14em;
}

.gallery-lightbox-close,
.gallery-lightbox-nav {
    border: 0;
    background: none;
    color: rgba(255,255,255,.78);
    cursor: pointer;
}

.gallery-lightbox-close {
    position: fixed;
    top: 18px;
    right: 25px;
    font-size: 42px;
}

.gallery-lightbox-nav {
    font-size: 34px;
    transition: transform .25s ease, color .25s ease;
}

.gallery-lightbox-nav:hover {
    color: #fff;
    transform: scale(1.15);
}

@media (max-width: 900px) {
    .gallery-hero {
        min-height: 680px;
        padding-left: 26px;
        padding-right: 26px;
    }

    .gallery-hero-copy {
        width: 100%;
    }

    .gallery-hero-copy h1 {
        font-size: clamp(52px, 13vw, 78px);
    }

    .gallery-hero-index {
        display: none;
    }

    .gallery-intro {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-left: 22px;
        padding-right: 22px;
    }

    .gallery-filter-shell {
        position: relative;
        align-items: flex-start;
    }

    .gallery-masonry {
        columns: 2 260px;
    }

    .gallery-lightbox {
        grid-template-columns: 44px 1fr 44px;
        padding: 18px 8px;
    }

    .gallery-lightbox-stage img,
    .gallery-lightbox-meta {
        max-width: 100%;
        width: 100%;
    }
}

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

    .gallery-hero-copy h1 {
        font-size: 51px;
    }

    .gallery-intro h2,
    .gallery-material-note h2 {
        font-size: 44px;
    }

    .gallery-filter-shell {
        display: block;
    }

    .gallery-count {
        justify-content: flex-start;
        margin-top: 12px;
    }

    .gallery-masonry {
        columns: 1;
    }

    .gallery-project-info {
        left: 18px;
        right: 18px;
        bottom: 18px;
    }

    .gallery-lightbox {
        grid-template-columns: 1fr;
    }

    .gallery-lightbox-nav {
        position: fixed;
        bottom: 24px;
        z-index: 2;
    }

    .gallery-lightbox-nav.prev { left: 24px; }
    .gallery-lightbox-nav.next { right: 24px; }

    .gallery-lightbox-meta {
        padding-bottom: 52px;
    }
}
