/* ==========================================================
   SERGIO

   File: home-collection-hero.css
   Version: 2.6

   Purpose:
   Featured Collection Hero
========================================================== */


/* ==========================================================
   COLLECTION HERO
========================================================== */

.collection-hero {
    position: relative;

    margin-top: 2.5rem;

    background: #ffffff;
}


/* ==========================================================
   IMAGE
========================================================== */

.collection-hero-image-wrapper {
    position: relative;

    margin: 0;
    overflow: hidden;
}

.collection-hero-image {
    display: block;

    width: 100%;
    height: auto;
}


/* Mobile portraits share one fixed frame and dissolve without movement. */
.collection-hero-image--alternate,
.collection-hero-pause {
    display: none;
}

@media (max-width: 767px) {
    .collection-hero-image-wrapper {
        aspect-ratio: 2 / 3;
    }

    .collection-hero-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .collection-hero-image--alternate:not([hidden]) {
        position: absolute;
        inset: 0;
        display: block;
        opacity: 0;
        transition: opacity var(--collection-dissolve-duration, 900ms) ease-in-out;
        pointer-events: none;
    }

    .collection-hero-image-wrapper.is-second-frame .collection-hero-image--alternate {
        opacity: 1;
    }

    .collection-hero-pause:not([hidden]) {
        position: absolute;
        z-index: 4;
        right: 1.5rem;
        bottom: 2.5rem;
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
        color: #ffffff;
        background: transparent;
        border: 0;
        border-radius: 0;
        cursor: pointer;
    }

    .collection-hero-pause:focus-visible {
        outline: 2px solid #ffffff;
        outline-offset: 3px;
    }

    .collection-hero-pause svg {
        width: 18px;
        height: 18px;
        opacity: .22;
        transition: opacity 200ms ease;
    }

    .collection-hero-pause:focus-visible svg {
        opacity: .8;
    }

    .collection-hero-pause__play,
    .collection-hero-pause[aria-pressed="true"] .collection-hero-pause__pause {
        display: none;
    }

    .collection-hero-pause[aria-pressed="true"] .collection-hero-pause__play {
        display: block;
    }
}


@media (max-width: 767px) and (hover: hover) {
    .collection-hero-pause:hover svg {
        opacity: .8;
    }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
    .collection-hero-image--alternate {
        transition: none;
    }
}


/* ==========================================================
   LABEL
========================================================== */

.collection-hero-label {
    position: absolute;
    z-index: 3;

    top: 1.5rem;
    left: 1.5rem;

    color: #ffffff;

    pointer-events: none;
}

.collection-hero-label .section-label {
    margin: 0;

    font-size: .7rem;
    line-height: 1;
    letter-spacing: .18em;
    text-transform: uppercase;

    opacity: .9;
}


/* ==========================================================
   EXPLORE LINK
========================================================== */

.collection-hero-link {
    position: absolute;
    z-index: 3;

    right: 0;
    bottom: 2.5rem;
    left: 0;

    width: fit-content;
    margin-inline: auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    pointer-events: auto;
}

/* ==========================================================
   TABLET
========================================================== */

@media (min-width: 768px) {

    .collection-hero-label {
        top: 2.5rem;
        left: 2.5rem;
    }

    .collection-hero-link {
        bottom: 3rem;
    }

}


/* ==========================================================
   DESKTOP
========================================================== */

@media (min-width: 1200px) {

    .collection-hero {
        margin-top: 4rem;
    }

    .collection-hero-image-wrapper {
        height: auto;
    }

    .collection-hero-image {
        width: 100%;
        height: auto;

        object-fit: contain;
        object-position: center;
    }

    .collection-hero-label {
        top: 3rem;
        left: 3rem;
    }

    .collection-hero-link {
        bottom: 3.5rem;
    }

}

/* ==========================================================
   REVEAL STAGGER
========================================================== */

.collection-hero-image-wrapper.reveal.is-visible {
    transition-delay: 0ms;
}

.collection-hero-label.reveal.is-visible {
    transition-delay: 50ms;
}

.collection-hero-link.reveal.is-visible {
    transition-delay: 100ms;
}


/* ==========================================================
   REVEAL EXIT STAGGER
========================================================== */

.collection-hero-image-wrapper.reveal.is-out {
    transition-delay: 0ms;
}

.collection-hero-label.reveal.is-out {
    transition-delay: 25ms;
}

.collection-hero-link.reveal.is-out {
    transition-delay: 50ms;
}