/* Homepage hero: a background video in place of the theme's carousel.
 *
 * The theme hides the hero copy (opacity: 0) and only reveals it through
 * .owl-item.active rules, so with the carousel gone those rules never fire
 * and the text would stay invisible. The block at the bottom puts it back.
 */

.home-hero {
    position: relative;
    z-index: 1;
    overflow: hidden;
    background-color: var(--thm-dark-black);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.home-hero-video {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 0;
}

/* Darkened, or white text on a bright frame becomes unreadable. */
.home-hero-video::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

/* A 16:9 iframe scaled to cover the hero however the window is shaped:
 * full width when the hero is wide, full height when it is tall.
 */
.home-hero-video iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw;
    min-width: 177.78vh;
    min-height: 100%;
    transform: translate(-50%, -50%);
    border: 0;
    /* Clicks belong to the button on top, not to YouTube. */
    pointer-events: none;
}

.home-hero .container {
    position: relative;
    z-index: 2;
}

/* Someone who has asked for less movement gets the still instead. */
@media (prefers-reduced-motion: reduce) {
    .home-hero-video iframe {
        display: none;
    }
}

/* The hero copy, which the theme leaves faded out and offset ready for the
 * carousel's entrance animation. Nothing animates it in now, so it is shown
 * where it belongs.
 */
.home-hero .slider-tagline-two,
.home-hero .slider-content-two .section-title,
.home-hero .slider-content-two .btn-primary {
    transform: translateY(0);
    opacity: 1;
}
