/* ============================================================
   TRUEFLOW GUTTER SYSTEMS
   GALLERY
============================================================ */


/* ============================================================
   HERO
============================================================ */

.gallery-hero {
    position: relative;
    min-height: clamp(660px, 80vh, 860px);
    overflow: hidden;
    display: flex;
    color: var(--color-light);
    background: var(--color-dark);
}

.gallery-hero__media,
.gallery-hero__overlay {
    position: absolute;
    inset: 0;
}

.gallery-hero__media {
    overflow: hidden;
}

.gallery-hero__media img {
    width: 100%;
    height: 112%;
    object-fit: cover;
    object-position: center;
}

.gallery-hero__overlay {
    z-index: 1;
    background:
        linear-gradient(90deg,
            rgba(17, 24, 39, 0.97) 0%,
            rgba(17, 24, 39, 0.88) 42%,
            rgba(17, 24, 39, 0.52) 72%,
            rgba(17, 24, 39, 0.18) 100%);
}

.gallery-hero__lines {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.gallery-hero__lines span {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.07);
}

.gallery-hero__lines span:first-child {
    left: 34%;
}

.gallery-hero__lines span:last-child {
    left: 68%;
}

.gallery-hero__inner {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    align-items: center;
    gap: clamp(60px, 8vw, 120px);
    padding-top: clamp(90px, 8vw, 125px);
    padding-bottom: clamp(90px, 8vw, 125px);
}

.gallery-hero__content {
    max-width: 860px;
}

.gallery-hero__kicker {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 22px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.gallery-hero__kicker::before {
    content: "";
    width: 42px;
    height: 2px;
    background: var(--color-red);
}

.gallery-hero h1 {
    margin-bottom: 28px;
    font-size: clamp(60px, 7.2vw, 110px);
    font-weight: 620;
    line-height: 0.9;
    letter-spacing: -0.065em;
}

.gallery-hero h1 span {
    display: block;
    color: rgba(255, 255, 255, 0.48);
}

.gallery-hero__lead {
    max-width: 720px;
    margin-bottom: 34px;
    font-size: clamp(17px, 1.45vw, 21px);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
}

.gallery-hero__lead strong {
    color: var(--color-light);
}

.gallery-hero__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.gallery-hero__secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 750;
    color: rgba(255, 255, 255, 0.78);
}

.gallery-hero__secondary span {
    color: var(--color-red);
    transition: transform 220ms ease;
}

.gallery-hero__secondary:hover span {
    transform: translateX(4px);
}

.gallery-hero__card {
    align-self: end;
    padding: 28px;
    background: rgba(23, 71, 166, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 20px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.gallery-hero__card>span {
    display: block;
    margin-bottom: 14px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.56);
}

.gallery-hero__card>strong {
    display: block;
    margin-bottom: 12px;
    font-size: 28px;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.gallery-hero__card>p {
    margin-bottom: 22px;
    font-size: 12px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.64);
}

.gallery-hero__card>div {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.gallery-hero__card small {
    padding: 7px 10px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
}


/* ============================================================
   INTRO
============================================================ */

.gallery-intro {
    background: var(--color-light);
}

.gallery-intro__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: end;
    gap: clamp(60px, 9vw, 130px);
}

.gallery-intro__copy {
    max-width: 680px;
}

.gallery-intro__copy p:not(.section-lead) {
    color: var(--color-muted);
}


/* ============================================================
   FEATURED GALLERY
============================================================ */

.gallery-featured {
    padding: clamp(90px, 9vw, 140px) 0;
    color: var(--color-light);
    background: var(--color-dark);
}

.gallery-featured__heading {
    max-width: 900px;
    margin-bottom: 55px;
}

.gallery-featured__heading h2 {
    margin-bottom: 0;
    font-size: clamp(46px, 5.5vw, 82px);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.gallery-featured__heading h2 span {
    display: block;
    color: rgba(255, 255, 255, 0.48);
}

.gallery-featured__grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
    grid-template-rows: 340px 340px;
    gap: 14px;
}

.gallery-card {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: #0b1018;
    border-radius: 18px;
    isolation: isolate;
}

.gallery-card--hero {
    grid-row: 1 / 3;
}

.gallery-card--wide {
    grid-column: 2 / 4;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition:
        transform 800ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 400ms ease;
}

.gallery-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg,
            rgba(17, 24, 39, 0.03) 35%,
            rgba(17, 24, 39, 0.82) 100%);
}

.gallery-card figcaption {
    position: absolute;
    z-index: 2;
    right: 20px;
    bottom: 20px;
    left: 20px;
}

.gallery-card small,
.gallery-card strong {
    display: block;
}

.gallery-card small {
    margin-bottom: 5px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffd2d4;
}

.gallery-card strong {
    font-size: 18px;
    line-height: 1.1;
}

.gallery-card--hero strong {
    max-width: 520px;
    font-size: clamp(26px, 3vw, 40px);
}

.gallery-card:hover img {
    transform: scale(1.055);
}


/* ============================================================
   DETAILS
============================================================ */

.gallery-details {
    background: var(--color-light);
}

.gallery-details__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.gallery-details__grid figure {
    margin: 0;
}

.gallery-details__grid figure>img {
    width: 100%;
    height: 330px;
    object-fit: cover;
    border-radius: 18px;
}

.gallery-details__grid figcaption {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: start;
    gap: 13px;
    padding-top: 15px;
}

.gallery-details__grid figcaption>span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    font-size: 8px;
    font-weight: 800;
    color: var(--color-light);
    background: var(--color-blue);
    border-radius: 50%;
}

.gallery-details__grid figcaption small,
.gallery-details__grid figcaption strong {
    display: block;
}

.gallery-details__grid figcaption small {
    margin-bottom: 3px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-red);
}

.gallery-details__grid figcaption strong {
    font-size: 14px;
    line-height: 1.25;
}


/* ============================================================
   TRANSFORMATIONS
============================================================ */

.gallery-transformations {
    padding: clamp(90px, 9vw, 140px) 0;
    color: var(--color-light);
    background: var(--color-blue);
}

.gallery-transformations__heading {
    max-width: 880px;
    margin-bottom: 55px;
}

.gallery-transformations__heading h2 {
    margin-bottom: 20px;
    font-size: clamp(48px, 5.8vw, 88px);
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.gallery-transformations__heading h2 span {
    display: block;
    color: rgba(255, 255, 255, 0.5);
}

.gallery-transformations__heading p {
    max-width: 700px;
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
}

.gallery-transformations__projects {
    display: grid;
    gap: 70px;
}

.gallery-transformation {
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) minmax(260px, 0.72fr);
    align-items: center;
    gap: clamp(40px, 6vw, 85px);
    padding-bottom: 70px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.gallery-transformation:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.gallery-transformation__images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.gallery-transformation__images figure {
    position: relative;
    min-height: 390px;
    margin: 0;
    overflow: hidden;
    background: var(--color-dark);
    border-radius: 18px;
}

.gallery-transformation__images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-transformation__images figcaption {
    position: absolute;
    top: 16px;
    padding: 8px 12px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-light);
    border-radius: 999px;
}

.gallery-transformation__images figure:first-child figcaption {
    left: 16px;
    background: rgba(17, 24, 39, 0.82);
}

.gallery-transformation__images figure:last-child figcaption {
    right: 16px;
    background: var(--color-red);
}

.gallery-transformation__copy small {
    display: block;
    margin-bottom: 8px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffd2d4;
}

.gallery-transformation__copy h3 {
    margin-bottom: 16px;
    font-size: clamp(28px, 3.2vw, 44px);
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.gallery-transformation__copy p {
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
}

.gallery-transformations__action {
    margin-top: 55px;
}


/* ============================================================
   COLLECTIONS
============================================================ */

.gallery-collection {
    background: var(--color-light);
}

.gallery-collection--grey {
    background: var(--color-grey);
}

.gallery-collection__heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 45px;
    margin-bottom: 50px;
}

.gallery-collection__grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr 0.9fr;
    grid-auto-rows: 320px;
    gap: 14px;
}

.gallery-collection__grid--seamless figure:first-child {
    grid-row: span 2;
}

.gallery-collection__grid--seamless figure:last-child {
    grid-column: 2 / 4;
}

.gallery-collection__grid figure {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: var(--color-dark);
    border-radius: 18px;
}

.gallery-collection__grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 750ms cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-collection__grid figure::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(17, 24, 39, 0.02) 40%,
            rgba(17, 24, 39, 0.78) 100%);
}

.gallery-collection__grid figcaption {
    position: absolute;
    z-index: 2;
    right: 18px;
    bottom: 17px;
    left: 18px;
}

.gallery-collection__grid small,
.gallery-collection__grid strong {
    display: block;
}

.gallery-collection__grid small {
    margin-bottom: 3px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffd2d4;
}

.gallery-collection__grid strong {
    font-size: 15px;
    color: white !important;
}

.gallery-collection__grid figure:hover img {
    transform: scale(1.055);
}


/* ============================================================
   SERVICE WORK
============================================================ */

.gallery-service-work {
    background: var(--color-light);
}

.gallery-service-work__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.gallery-service-panel {
    position: relative;
    min-height: 540px;
    overflow: hidden;
    color: var(--color-light);
    background: var(--color-dark);
    border-radius: 20px;
}

.gallery-service-panel img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 800ms cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-service-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(17, 24, 39, 0.05) 30%,
            rgba(17, 24, 39, 0.88) 100%);
}

.gallery-service-panel>div {
    position: absolute;
    z-index: 2;
    right: 28px;
    bottom: 26px;
    left: 28px;
}

.gallery-service-panel small {
    display: block;
    margin-bottom: 8px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffd2d4;
}

.gallery-service-panel h3 {
    max-width: 560px;
    margin-bottom: 20px;
    font-size: clamp(28px, 3.5vw, 48px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.gallery-service-panel span {
    font-size: 11px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.78);
}

.gallery-service-panel:hover img {
    transform: scale(1.055);
}


/* ============================================================
   STATEMENT
============================================================ */

.gallery-statement {
    padding: clamp(90px, 9vw, 145px) 0;
    color: var(--color-light);
    background: var(--color-dark);
}

.gallery-statement__inner {
    max-width: 1120px;
}

.gallery-statement__kicker {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 25px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.gallery-statement__kicker::before {
    content: "";
    width: 40px;
    height: 2px;
    background: var(--color-red);
}

.gallery-statement p {
    margin: 0;
    font-size: clamp(44px, 6vw, 88px);
    font-weight: 550;
    line-height: 0.98;
    letter-spacing: -0.06em;
    color: rgba(255, 255, 255, 0.48);
}

.gallery-statement p strong {
    font-weight: 600;
    color: var(--color-light);
}


/* ============================================================
   CTA
============================================================ */

.gallery-cta {
    padding: 65px 0;
    color: var(--color-light);
    background: var(--color-red);
}

.gallery-cta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.gallery-cta__inner>div:first-child>span {
    display: block;
    margin-bottom: 6px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.68);
}

.gallery-cta h2 {
    max-width: 880px;
    margin-bottom: 8px;
    font-size: clamp(31px, 3.8vw, 54px);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.gallery-cta p {
    max-width: 700px;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
}

.gallery-cta__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    flex: none;
}

.gallery-cta__phone {
    font-size: 15px;
    font-weight: 800;
}


/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 1100px) {

    .gallery-hero__inner {
        grid-template-columns: 1fr 310px;
    }

    .gallery-details__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-collection__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-collection__grid--seamless figure:first-child,
    .gallery-collection__grid--seamless figure:last-child {
        grid-row: auto;
        grid-column: auto;
    }
}


@media (max-width: 900px) {

    .gallery-hero {
        min-height: auto;
    }

    .gallery-hero__inner {
        grid-template-columns: 1fr;
        padding-top: 85px;
        padding-bottom: 90px;
    }

    .gallery-hero__card {
        display: none;
    }

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

    .gallery-featured__grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: 380px 320px;
    }

    .gallery-card--hero {
        grid-row: auto;
    }

    .gallery-card--wide {
        grid-column: 1 / 3;
    }

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

    .gallery-transformation__copy {
        max-width: 720px;
    }

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

    .gallery-cta__inner {
        align-items: flex-start;
        flex-direction: column;
    }
}


@media (max-width: 700px) {

    .gallery-hero__inner {
        padding-top: 70px;
        padding-bottom: 75px;
    }

    .gallery-hero h1 {
        font-size: clamp(46px, 13vw, 66px);
    }

    .gallery-hero__lead {
        font-size: 16px;
    }

    .gallery-hero__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .gallery-hero__actions .button {
        width: 100%;
    }

    .gallery-hero__secondary {
        justify-content: center;
    }

    .gallery-featured__grid {
        display: flex;
        gap: 13px;
        overflow-x: auto;
        padding-bottom: 12px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

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

    .gallery-card,
    .gallery-card--hero,
    .gallery-card--wide,
    .gallery-card--portrait {
        width: min(84vw, 430px);
        min-width: min(84vw, 430px);
        height: 500px;
        grid-column: auto;
        grid-row: auto;
        scroll-snap-align: start;
    }

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

    .gallery-details__grid figure>img {
        height: 360px;
    }

    .gallery-transformations__projects {
        gap: 55px;
    }

    .gallery-transformation {
        padding-bottom: 55px;
    }

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

    .gallery-transformation__images figure {
        min-height: 320px;
    }

    .gallery-collection__heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .gallery-collection__grid {
        display: flex;
        gap: 13px;
        overflow-x: auto;
        padding-bottom: 12px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

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

    .gallery-collection__grid figure {
        width: min(84vw, 430px);
        min-width: min(84vw, 430px);
        height: 430px;
        scroll-snap-align: start;
    }

    .gallery-service-panel {
        min-height: 460px;
    }

    .gallery-statement p {
        font-size: clamp(40px, 11vw, 62px);
    }

    .gallery-cta__actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .gallery-cta__actions .button {
        width: 100%;
    }

    .gallery-cta__phone {
        text-align: center;
    }
}


@media (max-width: 520px) {

    .gallery-hero h1 {
        font-size: clamp(43px, 12.5vw, 58px);
    }

    .gallery-card,
    .gallery-card--hero,
    .gallery-card--wide,
    .gallery-card--portrait {
        width: 86vw;
        min-width: 86vw;
        height: 440px;
    }

    .gallery-details__grid figure>img {
        height: 300px;
    }

    .gallery-transformation__images figure {
        min-height: 280px;
    }

    .gallery-collection__grid figure {
        width: 86vw;
        min-width: 86vw;
        height: 390px;
    }

    .gallery-service-panel {
        min-height: 410px;
    }

    .gallery-service-panel>div {
        right: 20px;
        bottom: 20px;
        left: 20px;
    }

    .gallery-service-panel h3 {
        font-size: 30px;
    }
}


/* ============================================================
   GALLERY V5 — FULL VISUAL REFINEMENT
   Keeps all original rules above and improves scale, spacing,
   image density, readability and responsive behaviour.
============================================================ */

.gallery-page {
    overflow-x: clip;
}

.gallery-page .section {
    padding-top: clamp(82px, 8vw, 128px);
    padding-bottom: clamp(82px, 8vw, 128px);
}

/* ---------- HERO ---------- */
.gallery-hero {
    min-height: clamp(620px, 76vh, 790px);
}

.gallery-hero__media img {
    height: 106%;
    object-position: center 48%;
    filter: saturate(.92) contrast(1.04);
}

.gallery-hero__overlay {
    background:
        linear-gradient(90deg, rgba(12, 20, 36, .97) 0%, rgba(12, 20, 36, .90) 38%, rgba(12, 20, 36, .60) 66%, rgba(12, 20, 36, .28) 100%),
        linear-gradient(180deg, rgba(9, 16, 29, .08) 0%, rgba(9, 16, 29, .36) 100%);
}

.gallery-hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: clamp(46px, 7vw, 100px);
}

.gallery-hero__content {
    max-width: 760px;
}

.gallery-hero h1 {
    font-size: clamp(58px, 6.25vw, 94px);
    line-height: .92;
}

.gallery-hero__lead {
    max-width: 650px;
    font-size: clamp(16px, 1.25vw, 19px);
}

.gallery-hero__card {
    align-self: center;
    padding: 30px;
    background: linear-gradient(145deg, rgba(28, 84, 190, .94), rgba(20, 62, 151, .88));
    border-radius: 18px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .30);
}

.gallery-hero__card>strong {
    font-size: 25px;
}

/* ---------- INTRO ---------- */
.gallery-intro__grid {
    align-items: center;
    gap: clamp(45px, 7vw, 100px);
}

.gallery-intro__copy {
    max-width: 610px;
}

.gallery-intro__copy .section-lead {
    margin-bottom: 16px;
}

/* ---------- FEATURED MOSAIC ---------- */
.gallery-featured {
    padding: clamp(88px, 8vw, 126px) 0;
}

.gallery-featured__heading {
    margin-bottom: 42px;
}

.gallery-featured__heading h2 {
    font-size: clamp(44px, 5vw, 74px);
}

.gallery-featured__grid {
    grid-template-columns: 1.18fr .82fr .82fr;
    grid-template-rows: 300px 300px 250px;
    gap: 12px;
}

.gallery-card {
    border-radius: 14px;
}

.gallery-card--hero {
    grid-row: 1 / 3;
}

.gallery-card--wide {
    grid-column: 2 / 4;
}

.gallery-card--extra:nth-last-child(2) {
    grid-column: 1 / 2;
}

.gallery-card--extra:last-child {
    grid-column: 2 / 4;
}

.gallery-card figcaption {
    right: 18px;
    bottom: 17px;
    left: 18px;
}

.gallery-card strong {
    font-size: 17px;
}

.gallery-card--hero strong {
    font-size: clamp(25px, 2.7vw, 37px);
}

/* ---------- DETAILS ---------- */
.gallery-details__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 26px 14px;
}

.gallery-details__grid figure>img {
    height: clamp(260px, 24vw, 340px);
    border-radius: 14px;
}

.gallery-details__grid figcaption {
    grid-template-columns: 38px 1fr;
    gap: 11px;
    padding-top: 13px;
}

.gallery-details__grid figcaption>span {
    width: 34px;
    height: 34px;
}

/* ---------- TRANSFORMATIONS ---------- */
.gallery-transformations {
    padding: clamp(88px, 8vw, 126px) 0;
    background:
        radial-gradient(circle at 92% 8%, rgba(255, 255, 255, .08), transparent 30%),
        var(--color-blue);
}

.gallery-transformations__heading {
    margin-bottom: 48px;
}

.gallery-transformations__heading h2 {
    font-size: clamp(46px, 5.2vw, 76px);
}

.gallery-transformations__projects {
    gap: 58px;
}

.gallery-transformation {
    grid-template-columns: minmax(0, 1.36fr) minmax(270px, .64fr);
    gap: clamp(34px, 5vw, 68px);
    padding-bottom: 58px;
}

.gallery-transformation:nth-child(even) .gallery-transformation__images {
    order: 2;
}

.gallery-transformation:nth-child(even) .gallery-transformation__copy {
    order: 1;
}

.gallery-transformation__images figure {
    min-height: 350px;
    border-radius: 14px;
}

.gallery-transformation__copy h3 {
    font-size: clamp(27px, 2.8vw, 39px);
}

/* ---------- COLLECTIONS ---------- */
.gallery-collection__heading {
    margin-bottom: 38px;
}

.gallery-collection__grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 265px;
    gap: 12px;
}

.gallery-collection__grid--seamless figure:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-collection__grid--seamless figure:nth-child(4) {
    grid-column: span 2;
}

.gallery-collection__grid--seamless figure:last-child {
    grid-column: span 2;
}

.gallery-collection__grid figure {
    border-radius: 14px;
}

.gallery-collection__grid figcaption {
    right: 16px;
    bottom: 15px;
    left: 16px;
}

/* roofline six-image rhythm */
.gallery-collection--grey .gallery-collection__grid figure:first-child,
.gallery-collection--grey .gallery-collection__grid figure:nth-child(4) {
    grid-column: span 2;
}

/* ---------- REPAIRS / DRAINAGE ---------- */
.gallery-service-work__grid {
    gap: 12px;
}

.gallery-service-panel {
    min-height: 480px;
    border-radius: 16px;
}

.gallery-service-panel h3 {
    font-size: clamp(27px, 3vw, 42px);
}

.gallery-service-work__supporting {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.gallery-service-work__supporting figure {
    position: relative;
    min-height: 210px;
    margin: 0;
    overflow: hidden;
    border-radius: 14px;
    background: var(--color-dark);
}

.gallery-service-work__supporting img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 650ms cubic-bezier(.22, 1, .36, 1);
}

.gallery-service-work__supporting figure::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(10, 17, 29, .82) 100%);
}

.gallery-service-work__supporting figcaption {
    position: absolute;
    z-index: 2;
    right: 15px;
    bottom: 14px;
    left: 15px;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.2;
    color: #fff;
}

.gallery-service-work__supporting figure:hover img {
    transform: scale(1.05);
}

/* ---------- STATEMENT ---------- */
.gallery-statement {
    padding: clamp(80px, 7.5vw, 120px) 0;
}

.gallery-statement__inner {
    max-width: 1000px;
}

.gallery-statement p {
    font-size: clamp(40px, 5.2vw, 72px);
}

/* ---------- CTA ---------- */
.gallery-cta {
    padding: 58px 0;
}

.gallery-cta__inner {
    gap: 38px;
}

.gallery-cta h2 {
    font-size: clamp(30px, 3.2vw, 46px);
}

/* ---------- ACCESSIBILITY / ANIMATION FALLBACK ---------- */
@media (prefers-reduced-motion: reduce) {

    .gallery-page *,
    .gallery-page *::before,
    .gallery-page *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ---------- TABLET ---------- */
@media (max-width: 1100px) {
    .gallery-featured__grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 390px 280px 280px 250px;
    }

    .gallery-card--hero {
        grid-column: 1 / 3;
        grid-row: auto;
    }

    .gallery-card--wide,
    .gallery-card--extra:nth-last-child(2),
    .gallery-card--extra:last-child {
        grid-column: auto;
    }

    .gallery-details__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-collection__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-collection__grid--seamless figure:first-child,
    .gallery-collection__grid--seamless figure:nth-child(4),
    .gallery-collection__grid--seamless figure:last-child,
    .gallery-collection--grey .gallery-collection__grid figure:first-child,
    .gallery-collection--grey .gallery-collection__grid figure:nth-child(4) {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (max-width: 900px) {
    .gallery-hero__inner {
        padding-top: 78px;
        padding-bottom: 78px;
    }

    .gallery-hero__content {
        max-width: 680px;
    }

    .gallery-hero h1 {
        max-width: 650px;
    }

    .gallery-featured__grid {
        grid-template-rows: 360px 260px 260px 260px;
    }

    .gallery-details__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-transformation,
    .gallery-transformation:nth-child(even) {
        grid-template-columns: 1fr;
    }

    .gallery-transformation:nth-child(even) .gallery-transformation__images,
    .gallery-transformation:nth-child(even) .gallery-transformation__copy {
        order: initial;
    }

    .gallery-collection__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-service-work__supporting {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---------- MOBILE ---------- */
@media (max-width: 700px) {
    .gallery-page .section {
        padding-top: 68px;
        padding-bottom: 68px;
    }

    .gallery-hero {
        min-height: 590px;
    }

    .gallery-hero__media img {
        object-position: 61% center;
    }

    .gallery-hero__overlay {
        background: linear-gradient(90deg, rgba(11, 19, 33, .96) 0%, rgba(11, 19, 33, .85) 62%, rgba(11, 19, 33, .54) 100%);
    }

    .gallery-hero__inner {
        padding-top: 62px;
        padding-bottom: 62px;
    }

    .gallery-hero h1 {
        font-size: clamp(45px, 13vw, 61px);
        letter-spacing: -.055em;
    }

    .gallery-featured {
        padding: 70px 0;
    }

    .gallery-featured__heading {
        margin-bottom: 30px;
    }

    .gallery-featured__grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: none;
        overflow: visible;
        gap: 9px;
        padding-bottom: 0;
    }

    .gallery-card,
    .gallery-card--hero,
    .gallery-card--wide,
    .gallery-card--portrait,
    .gallery-card--landscape,
    .gallery-card--extra {
        width: auto;
        min-width: 0;
        height: 235px;
        grid-column: auto;
        grid-row: auto;
    }

    .gallery-card--hero,
    .gallery-card--wide {
        grid-column: 1 / 3;
        height: 320px;
    }

    .gallery-card figcaption {
        right: 12px;
        bottom: 12px;
        left: 12px;
    }

    .gallery-card strong {
        font-size: 14px;
    }

    .gallery-card--hero strong {
        font-size: 23px;
    }

    .gallery-details__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px 10px;
    }

    .gallery-details__grid figure>img {
        height: 230px;
    }

    .gallery-details__grid figcaption {
        grid-template-columns: 30px 1fr;
        gap: 8px;
    }

    .gallery-details__grid figcaption>span {
        width: 28px;
        height: 28px;
    }

    .gallery-details__grid figcaption strong {
        font-size: 12px;
    }

    .gallery-transformation__images {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .gallery-transformation__images figure {
        min-height: 260px;
    }

    .gallery-collection__heading {
        margin-bottom: 28px;
    }

    .gallery-collection__grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 240px;
        overflow: visible;
        gap: 9px;
        padding-bottom: 0;
    }

    .gallery-collection__grid figure {
        width: auto;
        min-width: 0;
        height: auto;
    }

    .gallery-collection__grid figure:first-child {
        grid-column: 1 / 3;
        grid-row: auto;
    }

    .gallery-service-panel {
        min-height: 390px;
    }

    .gallery-service-work__supporting {
        gap: 9px;
    }

    .gallery-service-work__supporting figure {
        min-height: 180px;
    }

    .gallery-statement p {
        font-size: clamp(38px, 10vw, 54px);
    }
}

@media (max-width: 520px) {
    .gallery-hero__actions {
        gap: 16px;
    }

    .gallery-featured__grid,
    .gallery-details__grid,
    .gallery-collection__grid,
    .gallery-service-work__supporting {
        grid-template-columns: 1fr 1fr;
    }

    .gallery-card,
    .gallery-card--portrait,
    .gallery-card--landscape,
    .gallery-card--extra {
        height: 205px;
    }

    .gallery-card--hero,
    .gallery-card--wide {
        grid-column: 1 / 3;
        height: 290px;
    }

    .gallery-details__grid figure>img {
        height: 190px;
    }

    .gallery-transformation__images figure {
        min-height: 220px;
    }

    .gallery-collection__grid {
        grid-auto-rows: 205px;
    }

    .gallery-service-work__supporting figure {
        min-height: 155px;
    }
}