.homepage-gallery {
    position: relative;
    overflow: hidden;
    padding: clamp(4rem, 8vw, 7rem) clamp(1.25rem, 4vw, 4rem);
    background:
        linear-gradient(90deg, rgba(128, 0, 0, .05) 1px, transparent 1px),
        linear-gradient(0deg, rgba(128, 0, 0, .04) 1px, transparent 1px),
        radial-gradient(circle at 82% 28%, rgba(128, 0, 0, .28), transparent 42%),
        linear-gradient(115deg, #f7eeee 0%, #ead8d8 48%, #d5b9b9 100%);
    background-size: 54px 54px, 54px 54px, 100% 100%, 100% 100%;
}

.homepage-gallery::before {
    content: '';
    position: absolute;
    right: -12rem;
    top: -10rem;
    width: 36rem;
    height: 36rem;
    border-radius: 50%;
    background: rgba(128, 0, 0, .18);
    filter: blur(4px);
}

.homepage-gallery-heading {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto clamp(2rem, 5vw, 3.5rem);
    padding-left: 1.25rem;
}

.homepage-gallery-heading::before {
    content: '';
    position: absolute;
    left: 0;
    top: .2rem;
    width: 5px;
    height: 100%;
    background: var(--maroon);
    border-radius: 999px;
}

.homepage-gallery-eyebrow {
    margin: 0 0 .75rem;
    color: var(--maroon);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.homepage-gallery h2 {
    max-width: 580px;
    margin: 0;
    color: #252122;
    font-family: 'Lato', sans-serif;
    font-size: clamp(2.1rem, 4vw, 3.8rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -.02em;
}

.homepage-gallery-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(1rem, 2.5vw, 1.5rem);
    max-width: 1160px;
    margin: 0 auto;
    align-items: stretch;
}

.gallery-card {
    position: relative;
    display: block;
    min-width: 0;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #800000;
    box-shadow: 0 22px 48px rgba(37, 33, 34, .22);
    outline: 1px solid rgba(255, 255, 255, .24);
    outline-offset: -1px;
    transition: transform .35s ease, box-shadow .35s ease;
}

.gallery-card-feature {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: 1;
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(37, 33, 34, .32);
}

.gallery-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .7s ease;
}

.gallery-card-feature img {
    object-position: center 28%;
}

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

@media (max-width: 900px) {
    .homepage-gallery::before {
        width: 24rem;
        height: 24rem;
    }

    .homepage-gallery-heading {
        max-width: 560px;
    }

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

@media (max-width: 640px) {
    .homepage-gallery {
        padding-inline: 1rem;
    }

    .homepage-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .8rem;
    }

    .gallery-card-feature {
        grid-column: 1 / -1;
        grid-row: auto;
        aspect-ratio: 3 / 4;
    }

    .gallery-card {
        box-shadow: 0 14px 30px rgba(37, 33, 34, .18);
    }
}
