/* ==========================================================
   ICX HOMEPAGE PHOTO GALLERY V3
   FIVE PHOTOS / ALL VISIBLE / CATEGORY-FIRST
========================================================== */

.icx-home-gallery-v3 {
    padding: clamp(64px, 7vw, 96px) 0;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 98% 4%,
            rgba(20, 101, 143, .06),
            transparent 25%
        ),
        #f5f8f9;
}

.icx-home-gallery-v3__head {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto;
    gap: 34px;
    align-items: end;
    margin-bottom: 30px;
}

.icx-home-gallery-v3__head > div {
    max-width: 790px;
}

.icx-home-gallery-v3__head h2 {
    max-width: 760px;
    margin: 11px 0 0;
    color: var(--icx-navy-dark, #061f31);
    font-family:
        var(--icx-font-display, "Fraunces"),
        Georgia,
        serif;
    font-size: clamp(2.65rem, 4.8vw, 4.45rem);
    line-height: .99;
    letter-spacing: -.04em;
}

.icx-home-gallery-v3__head p {
    max-width: 650px;
    margin: 16px 0 0;
    color: #607680;
    font-size: .97rem;
    line-height: 1.68;
}

/*
 * Desktop: one strong image on the left,
 * four evenly weighted images on the right.
 *
 * The crop never distorts a source image:
 * object-fit preserves image ratio and
 * object-position favours faces/subjects near the top.
 */
.icx-home-gallery-v3__grid {
    display: grid;
    grid-template-columns:
        repeat(12, minmax(0, 1fr));
    grid-template-rows:
        repeat(2, minmax(190px, 1fr));
    gap: 10px;
    min-height: 560px;
}

.icx-home-gallery-v3__photo {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: #dbe6ea;
}

.icx-home-gallery-v3__photo--1 {
    grid-column: span 6;
    grid-row: span 2;
    border-radius: 2px 28px 2px 2px;
}

.icx-home-gallery-v3__photo--2,
.icx-home-gallery-v3__photo--3,
.icx-home-gallery-v3__photo--4,
.icx-home-gallery-v3__photo--5 {
    grid-column: span 3;
}

.icx-home-gallery-v3__photo--2 {
    border-radius: 2px 20px 2px 2px;
}

.icx-home-gallery-v3__photo--5 {
    border-radius: 2px 2px 20px 2px;
}

.icx-home-gallery-v3__photo > a {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    color: #fff;
    text-decoration: none;
}

.icx-home-gallery-v3__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 16%;
    transition: transform 240ms ease;
}

.icx-home-gallery-v3__photo:hover img,
.icx-home-gallery-v3__photo:focus-within img {
    transform: scale(1.025);
}

.icx-home-gallery-v3__photo > a:focus-visible {
    outline: 4px solid var(--icx-orange, #f58220);
    outline-offset: -4px;
}

.icx-home-gallery-v3__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            transparent 52%,
            rgba(2, 29, 45, .78) 100%
        );
    pointer-events: none;
}

.icx-home-gallery-v3__category {
    position: absolute;
    right: 16px;
    bottom: 15px;
    left: 16px;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: end;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .045em;
    line-height: 1.28;
    text-transform: uppercase;
}

.icx-home-gallery-v3__photo--1
.icx-home-gallery-v3__category {
    right: 24px;
    bottom: 22px;
    left: 24px;
    font-size: .8rem;
}

.icx-home-gallery-v3__category > span {
    flex: 0 0 auto;
    color: #ffd4af;
    font-size: 1rem;
}

@media (max-width: 980px) {
    .icx-home-gallery-v3__head {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .icx-home-gallery-v3__grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        grid-template-rows: auto;
        min-height: 0;
    }

    .icx-home-gallery-v3__photo--1 {
        grid-column: 1 / -1;
        grid-row: auto;
        aspect-ratio: 16 / 9;
    }

    .icx-home-gallery-v3__photo--2,
    .icx-home-gallery-v3__photo--3,
    .icx-home-gallery-v3__photo--4,
    .icx-home-gallery-v3__photo--5 {
        grid-column: span 1;
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 680px) {
    .icx-home-gallery-v3 {
        padding: 54px 0;
    }

    .icx-home-gallery-v3__head {
        gap: 20px;
        margin-bottom: 24px;
    }

    .icx-home-gallery-v3__head h2 {
        font-size: clamp(
            2.45rem,
            11.5vw,
            3.35rem
        );
    }

    .icx-home-gallery-v3__grid {
        gap: 6px;
    }

    .icx-home-gallery-v3__photo--1 {
        aspect-ratio: 4 / 3;
        border-radius: 2px 22px 2px 2px;
    }

    .icx-home-gallery-v3__photo--2,
    .icx-home-gallery-v3__photo--3,
    .icx-home-gallery-v3__photo--4,
    .icx-home-gallery-v3__photo--5 {
        aspect-ratio: 1 / 1;
        border-radius: 0;
    }

    .icx-home-gallery-v3__photo img {
        object-position: 50% 12%;
    }

    .icx-home-gallery-v3__category {
        right: 9px;
        bottom: 9px;
        left: 9px;
        font-size: .6rem;
        letter-spacing: .025em;
    }

    .icx-home-gallery-v3__photo--1
    .icx-home-gallery-v3__category {
        right: 16px;
        bottom: 15px;
        left: 16px;
        font-size: .7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .icx-home-gallery-v3__photo img {
        transition: none;
    }
}
