/* ---- Stowe's hero intro video: plays once on load, then hands over to the slide ---- */

/* the slide itself is the positioning context for the overlay */
.single-slide{ position:relative; }

#hero-intro{
    position:absolute;
    top:0; left:0;
    width:100%; height:100%;
    z-index:20;                 /* over the slide, under the header (z-index 99) */
    background:#000;
    overflow:hidden;
    opacity:1;
    transition:opacity 1s ease;
}
#hero-intro video{
    width:100%; height:100%;
    object-fit:cover;
    display:block;
}

/* fading out once the clip has finished */
#hero-intro.is-done{
    opacity:0;
    pointer-events:none;
}
#hero-intro.is-gone{ display:none; }

/* the first slide's elements stay put until the video is over */
body.hero-intro-playing .single-slide:first-child [data-animation]{
    opacity:0;
}

/* dark logo for as long as the video is on screen */
body.hero-intro-playing .header-logo .light{ display:none; }
body.hero-intro-playing .header-logo .dark{ display:block; }

/* everything in the header except the logo steps aside during the clip */
body.hero-intro-playing .header-menu-wrap,
body.hero-intro-playing .header-right{
    opacity:0;
    transform:translateY(-12px);
    pointer-events:none;
}
.header-menu-wrap,
.header-right{
    transition:opacity .6s ease, transform .6s ease;
}
body.hero-intro-playing .header{ border-bottom-color:transparent; }

/* arrows and dots stay away through the video and the slide's own animations,
   and are released only once those have finished */
.slick-dots,
.slick-prev,
.slick-next{
    transition:opacity .6s ease, transform .6s ease;
}
body.hero-intro-playing .slick-dots,
body.hero-intro-playing .slick-next,
body.hero-intro-hold .slick-dots,
body.hero-intro-hold .slick-next{
    opacity:0;
    pointer-events:none;
    transform:translateX(16px);
}
body.hero-intro-playing .slick-prev,
body.hero-intro-hold .slick-prev{
    opacity:0;
    pointer-events:none;
    transform:translateX(-16px);
}

@media (prefers-reduced-motion:reduce){
    #hero-intro{ display:none; }
}
