/* =========================================================
   CORBETT ULTIMUS
   GALLERY
========================================================= */

.cu-gallery {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #073c34;
    color: #f1eee4;
}


/* =========================================================
   CONTAINER
========================================================= */

.cu-gallery__container {
    padding-top: 125px;
    padding-bottom: 120px;
}


/* =========================================================
   INTRO
========================================================= */

.cu-gallery__intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, .42fr);
    column-gap: 80px;
    align-items: end;
    margin-bottom: 85px;
}


/* =========================================================
   EYEBROW
========================================================= */

.cu-gallery__eyebrow {
    grid-column: 1 / -1;

    display: flex;
    align-items: center;

    margin-bottom: 22px;

    font-family: "Space Grotesk", sans-serif;
    font-size: 9px;
    font-weight: 600;

    letter-spacing: .17em;
    text-transform: uppercase;

    color: rgba(241, 238, 228, .55);
}


.cu-gallery__eyebrow::before {
    content: "";

    width: 28px;
    height: 1px;

    margin-right: 11px;

    background: #b69643;
}


/* =========================================================
   TITLE
========================================================= */

.cu-gallery__title {
    margin: 0;

    font-family: Georgia, "Times New Roman", serif;

    font-size: clamp(48px, 6vw, 82px);
    font-weight: 400;

    line-height: .91;
    letter-spacing: -.05em;

    color: #f1eee4;
}


.cu-gallery__title em {
    font-style: normal;
    color: #c2a75c;
}


/* =========================================================
   DESCRIPTION
========================================================= */

.cu-gallery__text {
    max-width: 330px;

    margin: 0 0 5px auto;

    font-family: "Space Grotesk", sans-serif;

    font-size: 10px;

    line-height: 1.8;

    color: rgba(241, 238, 228, .62);
}


/* =========================================================
   GALLERY GRID
=========================================================

   FIGMA STRUCTURE

   TOP ROW
   ┌──────────────────────────────┬───────────────┐
   │                              │               │
   │           IMAGE 01           │    IMAGE 02   │
   │            LARGE             │               │
   │                              │               │
   └──────────────────────────────┴───────────────┘

   BOTTOM ROW
   ┌──────────────┬────────────────────┬──────────────┐
   │   IMAGE 03   │      IMAGE 04      │   IMAGE 05   │
   │              │        WIDE        │              │
   └──────────────┴────────────────────┴──────────────┘

========================================================= */

.cu-gallery__grid {
    display: grid;

    /*
     * Three columns are used so the bottom row
     * can have three separate images.
     */
    grid-template-columns:
        1.05fr
        .72fr
        1.05fr;

    /*
     * Only two rows.
     * This removes the old masonry layout.
     */
    grid-template-rows:
        360px
        255px;

    gap: 18px;

    width: 100%;
}


/* =========================================================
   ITEM
========================================================= */

.cu-gallery__item {
    position: relative;

    margin: 0;

    min-width: 0;
    min-height: 0;

    overflow: hidden;
}


/* =========================================================
   IMAGE WRAPPER
========================================================= */

.cu-gallery__image-wrap {
    position: relative;

    width: 100%;
    height: 100%;

    overflow: hidden;

    background: #0c4b42;
}


/* =========================================================
   IMAGE
========================================================= */

.cu-gallery__image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transform: scale(1.02);

    transition:
        transform 1.15s cubic-bezier(.16, 1, .3, 1),
        filter .7s ease;
}


.cu-gallery__item:hover .cu-gallery__image {
    transform: scale(1.07);
    filter: saturate(1.05);
}


/* =========================================================
   FIGMA IMAGE POSITIONS
========================================================= */


/*
   IMAGE 01
   ---------------------------------
   Large top-left image.
   Spans first two columns.
*/

.cu-gallery__item--01 {
    grid-column: 1 / span 2;
    grid-row: 1;
}


/*
   IMAGE 02
   ---------------------------------
   Top-right image.
*/

.cu-gallery__item--02 {
    grid-column: 3;
    grid-row: 1;
}


/*
   IMAGE 03
   ---------------------------------
   Bottom-left image.
*/

.cu-gallery__item--03 {
    grid-column: 1;
    grid-row: 2;
}


/*
   IMAGE 04
   ---------------------------------
   Bottom-center wide image.
*/

.cu-gallery__item--04 {
    grid-column: 2;
    grid-row: 2;
}


/*
   IMAGE 05
   ---------------------------------
   Bottom-right image.
*/

.cu-gallery__item--05 {
    grid-column: 3;
    grid-row: 2;
}


/* =========================================================
   IMAGE CROP CONTROL
========================================================= */


/* Image 01 — wide landscape */
.cu-gallery__item--01 .cu-gallery__image {
    object-position: center center;
}


/* Image 02 */
.cu-gallery__item--02 .cu-gallery__image {
    object-position: center center;
}


/* Image 03 */
.cu-gallery__item--03 .cu-gallery__image {
    object-position: center center;
}


/* Image 04 */
.cu-gallery__item--04 .cu-gallery__image {
    object-position: center center;
}


/* Image 05 */
.cu-gallery__item--05 .cu-gallery__image {
    object-position: center center;
}


/* =========================================================
   CAPTION
========================================================= */

.cu-gallery__caption {
    position: absolute;

    left: 15px;
    bottom: 14px;

    padding: 6px 8px;

    background: rgba(5, 38, 33, .68);

    backdrop-filter: blur(7px);

    font-family: "Space Grotesk", sans-serif;

    font-size: 7px;
    font-weight: 600;

    letter-spacing: .15em;

    color: rgba(241, 238, 228, .9);

    opacity: 0;

    transform: translateY(7px);

    transition:
        opacity .35s ease,
        transform .35s ease;
}


.cu-gallery__item:hover .cu-gallery__caption {
    opacity: 1;
    transform: translateY(0);
}


/* =========================================================
   BOTTOM CTA
========================================================= */

.cu-gallery__bottom {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-top: 48px;
}


.cu-gallery__bottom-line {
    flex: 1;

    height: 1px;

    margin-right: 35px;

    background: rgba(241, 238, 228, .16);
}


.cu-gallery__cta {
    display: inline-flex;

    align-items: center;

    gap: 15px;

    padding: 12px 17px;

    border: 1px solid rgba(241, 238, 228, .27);

    color: #f1eee4;

    font-family: "Space Grotesk", sans-serif;

    font-size: 8px;
    font-weight: 600;

    letter-spacing: .13em;

    text-decoration: none;

    transition:
        background-color .35s ease,
        border-color .35s ease,
        color .35s ease;
}


.cu-gallery__cta-arrow {
    font-size: 13px;

    transition:
        transform .35s ease;
}


.cu-gallery__cta:hover {
    background: #f1eee4;

    border-color: #f1eee4;

    color: #073c34;
}


.cu-gallery__cta:hover
.cu-gallery__cta-arrow {
    transform: translate(3px, -3px);
}


/* =========================================================
   SCROLL REVEAL
========================================================= */

.cu-gallery-reveal {
    opacity: 0;

    transform: translateY(38px);

    transition:
        opacity .9s cubic-bezier(.16, 1, .3, 1),
        transform .9s cubic-bezier(.16, 1, .3, 1);
}


.cu-gallery-reveal.is-visible {
    opacity: 1;

    transform: translateY(0);
}


/* =========================================================
   STAGGER
========================================================= */

.cu-gallery__item--01 {
    transition-delay: .03s;
}

.cu-gallery__item--02 {
    transition-delay: .09s;
}

.cu-gallery__item--03 {
    transition-delay: .15s;
}

.cu-gallery__item--04 {
    transition-delay: .21s;
}

.cu-gallery__item--05 {
    transition-delay: .27s;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1000px) {

    .cu-gallery__container {
        padding-top: 95px;
        padding-bottom: 95px;
    }


    .cu-gallery__intro {
        grid-template-columns: 1fr .6fr;

        column-gap: 45px;

        margin-bottom: 60px;
    }


    /* -----------------------------------------
       TABLET GALLERY
    ----------------------------------------- */

    .cu-gallery__grid {
        grid-template-columns:
            1fr
            .72fr
            1fr;

        grid-template-rows:
            300px
            220px;

        gap: 14px;
    }


    /*
       Image 01
       Large top-left
    */

    .cu-gallery__item--01 {
        grid-column: 1 / span 2;
        grid-row: 1;
    }


    /*
       Image 02
       Top-right
    */

    .cu-gallery__item--02 {
        grid-column: 3;
        grid-row: 1;
    }


    /*
       Image 03
       Bottom-left
    */

    .cu-gallery__item--03 {
        grid-column: 1;
        grid-row: 2;
    }


    /*
       Image 04
       Bottom-center
    */

    .cu-gallery__item--04 {
        grid-column: 2;
        grid-row: 2;
    }


    /*
       Image 05
       Bottom-right
    */

    .cu-gallery__item--05 {
        grid-column: 3;
        grid-row: 2;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .cu-gallery__container {
        padding-top: 72px;
        padding-bottom: 75px;
    }


    .cu-gallery__intro {
        display: block;

        margin-bottom: 45px;
    }


    .cu-gallery__eyebrow {
        margin-bottom: 19px;
    }


    .cu-gallery__title {
        font-size: clamp(43px, 11vw, 60px);

        line-height: .94;
    }


    .cu-gallery__text {
        max-width: 430px;

        margin: 25px 0 0;

        font-size: 9px;
    }


    /* -----------------------------------------
       MOBILE GRID
    ----------------------------------------- */

    .cu-gallery__grid {
        display: grid;

        grid-template-columns: 1fr 1fr;

        grid-template-rows: none;

        gap: 12px;
    }


    /*
       Mobile:
       Image 01 full width
    */

    .cu-gallery__item--01 {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;

        height: 430px;
    }


    /*
       Image 02
       Full width
    */

    .cu-gallery__item--02 {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;

        height: 310px;
    }


    /*
       Image 03
       Half width
    */

    .cu-gallery__item--03 {
        grid-column: 1 !important;
        grid-row: auto !important;

        height: 250px;
    }


    /*
       Image 04
       Half width
    */

    .cu-gallery__item--04 {
        grid-column: 2 !important;
        grid-row: auto !important;

        height: 250px;
    }


    /*
       Image 05
       Full width
    */

    .cu-gallery__item--05 {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;

        height: 310px;
    }


    .cu-gallery__caption {
        opacity: 1;

        transform: none;
    }


    .cu-gallery__bottom {
        margin-top: 35px;
    }


    .cu-gallery__bottom-line {
        margin-right: 15px;
    }


    .cu-gallery__cta {
        white-space: nowrap;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .cu-gallery__container {
        padding-top: 62px;
        padding-bottom: 65px;
    }


    .cu-gallery__item--01 {
        height: 350px;
    }


    .cu-gallery__item--02 {
        height: 280px;
    }


    .cu-gallery__item--03,
    .cu-gallery__item--04 {
        height: 210px;
    }


    .cu-gallery__item--05 {
        height: 280px;
    }


    .cu-gallery__bottom-line {
        display: none;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .cu-gallery-reveal {
        opacity: 1;

        transform: none;

        transition: none;
    }


    .cu-gallery__image {
        transition: none;
    }


    .cu-gallery__caption {
        transition: none;
    }

}