/* =========================================================
   NEW WILLIAM LOUEY VIDEO CAROUSEL
   Fully isolated from the original carousel
   ========================================================= */


/* =========================================================
   ROOT
   ========================================================= */

.new-wl-video-carousel {
    width: 100%;
    overflow: hidden;
}


/* =========================================================
   SECTION
   ========================================================= */

.new-wl-video-carousel .new-wl-video-section {
    padding: 160px 5vw 120px;
    overflow: hidden;

    border-top:
        1px solid
        rgba(255, 255, 255, 0.16);
}


/* =========================================================
   HEADER
   ========================================================= */

.new-wl-video-carousel .new-wl-video-section__header {

    display: grid;

    grid-template-columns:
        minmax(0, 1.2fr)
        minmax(260px, 0.5fr);

    align-items: end;

    gap: 8vw;

    margin-bottom: 72px;
}


/* =========================================================
   KICKER
   ========================================================= */

.new-wl-video-carousel .new-wl-kicker {

    margin:
        0 0 18px;

    color: #aaa59b;

    font-size: 12px;

    letter-spacing:
        0.14em;

    text-transform:
        uppercase;
}


/* =========================================================
   MAIN HEADING
   ========================================================= */

.new-wl-video-carousel
.new-wl-video-section__header
h2 {

    max-width: 1050px;

    margin: 0;

    color: #f4f1ea;

    font-family:
        var(--tp-ff-marcellus);

    font-size:
        clamp(48px, 6vw, 106px);

    font-weight: 400;

    letter-spacing:
        -0.05em;

    line-height:
        0.96;
}


/* =========================================================
   HEADER DESCRIPTION
   ========================================================= */

.new-wl-video-carousel
.new-wl-video-section__aside
> p {

    max-width: 480px;

    margin:
        0 0 10px;

    color: #aaa59b;

    font-size: 18px;

    line-height: 1.6;
}


/* =========================================================
   CONTROLS
   ========================================================= */

.new-wl-video-carousel
.new-wl-video-controls {

    display: flex;

    align-items: center;

    gap: 14px;

    margin-top: 34px;
}


/* =========================================================
   CONTROL BUTTON
   ========================================================= */

.new-wl-video-carousel
.new-wl-video-controls
button {

    display: grid;

    width: 46px;
    height: 46px;

    padding: 0;

    place-items: center;

    border:
        1px solid
        rgba(255, 255, 255, 0.26);

    border-radius: 50%;

    background:
        transparent;

    color: #fff;

    font-size: 20px;

    cursor: pointer;

    transition:
        border-color 0.3s ease,
        background 0.3s ease,
        color 0.3s ease,
        opacity 0.3s ease;
}


.new-wl-video-carousel
.new-wl-video-controls
button:hover:not(:disabled) {

    border-color:
        #f3f1ec;

    background:
        #f3f1ec;

    color:
        #111;
}


.new-wl-video-carousel
.new-wl-video-controls
button:disabled {

    opacity:
        0.28;

    cursor:
        not-allowed;
}


/* =========================================================
   COUNTER
   ========================================================= */

.new-wl-video-carousel
.new-wl-video-controls
p {

    display: flex;

    min-width: 66px;

    margin: 0;

    justify-content: center;

    color: #77736b;

    font-size: 12px;

    letter-spacing:
        0.12em;
}


.new-wl-video-carousel
.new-wl-video-controls
strong {

    margin-right: 7px;

    color: #fff;

    font-weight: 500;
}


/* =========================================================
   VIDEO GRID / HORIZONTAL CAROUSEL
   ========================================================= */

.new-wl-video-carousel
.new-wl-video-grid {

    display: grid;

    grid-auto-flow: column;

    grid-auto-columns:
        clamp(286px, 31vw, 430px);

    align-items: start;

    gap: 24px;

    margin:
        0 -5vw;

    padding:
        0 5vw 32px;

    overflow-x: auto;
    overflow-y: hidden;

    overscroll-behavior-inline:
        contain;

    scroll-behavior:
        smooth;

    scroll-snap-type:
        x mandatory;

    scrollbar-width:
        none;
}


.new-wl-video-carousel
.new-wl-video-grid::-webkit-scrollbar {

    display: none;
}


/* =========================================================
   VIDEO CARD
   ========================================================= */

.new-wl-video-carousel
.new-wl-video-card {

    min-width: 0;

    opacity: 0;

    scroll-snap-align:
        start;

    scroll-snap-stop:
        always;

    transition:
        opacity
        0.8s
        ease;
}


/* =========================================================
   VISIBLE CARD
   ========================================================= */

.new-wl-video-carousel
.new-wl-video-card.is-visible {

    opacity: 1;
}


/* =========================================================
   VIDEO MEDIA
   ========================================================= */

.new-wl-video-carousel
.new-wl-video-card__media,
.new-wl-video-carousel
.new-wl-video-card__iframe {

    position: relative;

    display: block;

    width: 100%;

    aspect-ratio:
        16 / 9;

    padding: 0;

    overflow: hidden;

    border: 0;

    background:
        #171717;

    clip-path:
        inset(0 0 12% 0);

    transform:
        translateY(16px);

    transition:
        clip-path
        1.05s
        cubic-bezier(0.2, 0.7, 0.2, 1),

        transform
        0.75s
        cubic-bezier(0.2, 0.7, 0.2, 1),

        box-shadow
        0.75s ease;
}


/* =========================================================
   VISIBLE MEDIA
   ========================================================= */

.new-wl-video-carousel
.new-wl-video-card.is-visible
.new-wl-video-card__media,

.new-wl-video-carousel
.new-wl-video-card.is-visible
.new-wl-video-card__iframe {

    clip-path:
        inset(0);

    transform:
        translateY(0);
}


/* =========================================================
   MEDIA HOVER
   ========================================================= */

.new-wl-video-carousel
.new-wl-video-card.is-visible
.new-wl-video-card__media:hover {

    transform:
        translateY(-7px);

    box-shadow:
        0 24px 70px
        rgba(0, 0, 0, 0.38);
}


/* =========================================================
   VIDEO IFRAME
   ========================================================= */

.new-wl-video-carousel
.new-wl-video-card__iframe {

    display: block;

    width: 100%;
    height: 100%;

    border: 0;

    aspect-ratio:
        16 / 9;
}


/* =========================================================
   IMAGE OVERLAY
   ========================================================= */

.new-wl-video-carousel
.new-wl-video-card__media::after {

    position: absolute;

    inset: 0;

    z-index: 1;

    content: "";

    pointer-events:
        none;

    background:
        linear-gradient(
            180deg,
            transparent 52%,
            rgba(0, 0, 0, 0.34)
        );

    transition:
        background 0.45s ease;
}


/* =========================================================
   THUMBNAIL
   ========================================================= */

.new-wl-video-carousel
.new-wl-video-card__media
img {

    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform
        0.7s
        cubic-bezier(0.2, 0.7, 0.2, 1);
}


.new-wl-video-carousel
.new-wl-video-card__media:hover
img {

    transform:
        scale(1.035);
}


/* =========================================================
   PLAY BUTTON
   ========================================================= */

.new-wl-video-carousel
.new-wl-video-card__play {

    position: absolute;

    bottom: 22px;
    left: 24px;

    z-index: 2;

    width: 62px;

    color: #fff;

    pointer-events:
        none;
}


.new-wl-video-carousel
.new-wl-video-card__play
svg {

    display: block;

    width: 100%;

    fill: none;
}


.new-wl-video-carousel
.new-wl-video-card__play
circle {

    stroke:
        currentColor;
}


.new-wl-video-carousel
.new-wl-video-card__play
path {

    fill:
        currentColor;
}


/* =========================================================
   CARD COPY
   ========================================================= */

.new-wl-video-carousel
.new-wl-video-card__copy {

    display: grid;

    grid-template-columns:
        72px
        minmax(0, 1fr);

    gap: 20px;

    padding-top:
        22px;
}


/* =========================================================
   FILM NUMBER
   ========================================================= */

.new-wl-video-carousel
.new-wl-video-card__copy
p {

    margin:
        4px 0 0;

    color:
        #77736b;

    font-size:
        12px;

    letter-spacing:
        0.14em;

    text-transform:
        uppercase;
}


/* =========================================================
   VIDEO TITLE
   ========================================================= */

.new-wl-video-carousel
.new-wl-video-card__copy
h3 {

    min-height:
        2.3em;

    margin:
        0;

    color:
        #f2efe9;

    font-family:
        var(--tp-ff-marcellus);

    font-size:
        clamp(18px, 1.4vw, 27px);

    font-weight:
        400;

    letter-spacing:
        -0.025em;

    line-height:
        1.15;
}


/* =========================================================
   YOUTUBE LINK
   ========================================================= */

.new-wl-video-carousel
.new-wl-video-card__copy
a {

    grid-column:
        2;

    width:
        fit-content;

    margin-top:
        9px;

    color:
        #99948a;

    font-size:
        13px;

    letter-spacing:
        0.08em;

    text-transform:
        uppercase;

    text-decoration:
        none;
}


.new-wl-video-carousel
.new-wl-video-card__copy
a:hover {

    color:
        #fff;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991px) {

    .new-wl-video-carousel
    .new-wl-video-section__header {

        grid-template-columns:
            1fr;

        gap:
            30px;
    }


    .new-wl-video-carousel
    .new-wl-video-grid {

        grid-auto-columns:
            min(62vw, 390px);
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .new-wl-video-carousel
    .new-wl-video-section {

        padding:
            100px 18px 80px;
    }


    .new-wl-video-carousel
    .new-wl-video-section__header {

        margin-bottom:
            52px;
    }


    .new-wl-video-carousel
    .new-wl-video-section__header
    h2 {

        font-size:
            clamp(40px, 11vw, 64px);

        line-height:
            0.98;
    }


    .new-wl-video-carousel
    .new-wl-video-section__aside
    > p {

        font-size:
            16px;
    }


    .new-wl-video-carousel
    .new-wl-video-grid {

        grid-auto-columns:
            min(82vw, 340px);

        gap:
            16px;

        margin:
            0 -18px;

        padding:
            0 18px 24px;
    }


    .new-wl-video-carousel
    .new-wl-video-card__copy {

        grid-template-columns:
            60px
            minmax(0, 1fr);

        gap:
            14px;
    }


    .new-wl-video-carousel
    .new-wl-video-card__play {

        bottom:
            18px;

        left:
            18px;

        width:
            54px;
    }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .new-wl-video-carousel
    .new-wl-video-grid {

        scroll-behavior:
            auto;
    }


    .new-wl-video-carousel
    .new-wl-video-card {

        opacity:
            1;

        transition:
            none;
    }


    .new-wl-video-carousel
    .new-wl-video-card__media,
    .new-wl-video-carousel
    .new-wl-video-card__iframe {

        transform:
            none;

        clip-path:
            inset(0);

        transition:
            none;
    }

}