/* 411 Mold Expert — illustration video as the Divi hero section's
   background. Target section: .et_pb_section_0.et_pb_with_background
   (the exact et_pb_section_0 class token occurs once in the homepage
   body markup; the header/footer template parts use the distinct
   et_pb_section_0_tb_header / et_pb_section_0_tb_footer tokens).
   The video and scrim start at opacity 0 and only fade in under
   .me411-hero-on, a class the JS adds after the video fires "canplay".
   Without JS, or if the video fails, no visible rule ever applies and
   the hero keeps its current photo background exactly as it is. */

/* Background layer: fills the hero section's existing box (the section
   is position:relative in Divi core), so the layout cannot shift.
   object-position: center top keeps the burned-in "411MoldExpert.com"
   brand strip in frame and matches the photo's background-position:
   center top. */
.et_pb_section_0.et_pb_with_background .me411-hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    z-index: 0;
    display: block;
    border: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}

/* Readability scrim above the video, below the hero row. The hero's
   white headline (et_pb_text_0, et_pb_bg_layout_dark) and the CTA sit
   in the left 3/5 column; the video's opening aerial and wall-cutaway
   frames are bright peach/pink, so the gradient darkens most on the
   left and along the top/bottom edges. */
.et_pb_section_0.et_pb_with_background .me411-hero-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(6, 17, 34, 0.22), rgba(6, 17, 34, 0.10) 55%, rgba(6, 17, 34, 0.28)),
        linear-gradient(90deg, rgba(6, 17, 34, 0.58) 0%, rgba(6, 17, 34, 0.36) 55%, rgba(6, 17, 34, 0.42) 100%);
    opacity: 0;
    transition: opacity 0.6s ease;
}

/* On-state: clip the layers to the section box, fade them in, and lift
   the hero's row (headline, CTA button, offer text, form column) above
   both layers. Video and scrim are pointer-events:none, so the CTA
   button and the Ninja Forms block stay fully interactive. */
.et_pb_section_0.et_pb_with_background.me411-hero-on {
    overflow: hidden;
}

.et_pb_section_0.et_pb_with_background.me411-hero-on .me411-hero-video,
.et_pb_section_0.et_pb_with_background.me411-hero-on .me411-hero-scrim {
    opacity: 1;
}

.et_pb_section_0.et_pb_with_background.me411-hero-on > .et_pb_row {
    position: relative;
    z-index: 2;
}
