/* Keep the fixed video inside the home hero, behind its existing overlay. */
.hero--video {
    isolation: isolate;
    clip-path: inset(0);
}

.hero--video::before {
    z-index: 1;
    pointer-events: none;
}

.hero--video > .container {
    position: relative;
    z-index: 2;
    min-width: 0;
}

.hero-media {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 700ms ease;
}

.hero--video.is-playing .hero-video {
    opacity: var(--hero-video-opacity, 1);
}

.hero--video.is-ending .hero-video {
    transition: opacity 250ms linear;
}

.hero-video-toggle {
    position: absolute;
    right: 24px;
    bottom: 24px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background: rgba(5, 5, 5, 0.55);
    color: #fff;
    cursor: pointer;
}

.hero-video-toggle[hidden] {
    display: none;
}

.hero-video-toggle:hover,
.hero-video-toggle:focus-visible {
    background: var(--primary-red);
}

.hero-video-toggle:focus-visible {
    outline: 2px solid white;
    outline-offset: 4px;
}

.hero-video-toggle-icon {
    width: 12px;
    height: 14px;
    border-left: 4px solid currentColor;
    border-right: 4px solid currentColor;
}

.hero-video-toggle.is-paused .hero-video-toggle-icon {
    width: 0;
    height: 0;
    margin-left: 3px;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 11px solid currentColor;
    border-right: 0;
}

@media (prefers-reduced-motion: reduce) {
    .hero-media,
    .hero-video-toggle {
        display: none;
    }
}
