/* =====================================================
   VANTI BG HERO
===================================================== */

.vbh-hero{
    position:relative;
    width:100%;
    overflow:hidden;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    color:#fff;
}

/* =====================================================
   VIDEO
===================================================== */

.vbh-hero__video{
    position:absolute;
    inset:0;
    z-index:0;
    overflow:hidden;
    container-type:size;
}

.vbh-hero__iframe{
    position:absolute;
    top:50%;
    left:65%;
    width:100%;
    height:100%;
    transform:translate(-50%,-50%);
    border:0;
    pointer-events:none;
}

@media (min-width:769px){
    .vbh-hero__iframe{
        /* At 65% from the left, 72% width covers the right edge with 1% bleed. */
        width:max(72cqw, calc(100cqh * 16 / 9));
        height:auto;
        aspect-ratio:16 / 9;
    }
}

/* =====================================================
   OVERLAY IMAGE
===================================================== */

.vbh-hero__overlay{
    position:absolute;
    inset:0;
    z-index:1;

    background-repeat:no-repeat;
    background-position:center bottom;
    background-size:cover;

    pointer-events:none;
}

/* =====================================================
   MASK
===================================================== */

.vbh-hero::before{

    content:"";

    position:absolute;
    inset:0;

    z-index:2;

    pointer-events:none;

    background:

    linear-gradient(
        90deg,
        rgb(2,6,12) 0%,
        rgb(2,6,12) 35%,
        rgba(2,6,12,.88) 42%,
        rgba(2,6,12,.32) 56%,
        rgba(2,6,12,.04) 70%,
        rgba(2,6,12,0) 76%
    ),

    linear-gradient(
        180deg,
        rgba(2,6,12,.45) 0%,
        rgba(2,6,12,.04) 18%,
        transparent 30%
    ),

    linear-gradient(
        180deg,
        transparent 74%,
        rgba(2,6,12,.12) 90%,
        rgba(2,6,12,.42) 100%
    );
}

/* =====================================================
   ALIGNMENTS
===================================================== */

.vbh-hero--align-top{
    align-items:flex-start;
}

.vbh-hero--align-center{
    align-items:center;
}

.vbh-hero--align-bottom{
    align-items:flex-end;
}

/* =====================================================
   CONTENT
===================================================== */

.vbh-hero__inner{

    position:relative;
    z-index:3;

    width:100%;
    max-width:1320px;

    margin:0 auto;

    display:grid;
    grid-template-columns:50% 50%;
}

.vbh-hero__inner-inner{

    width:100%;
    max-width:none;

    padding:
        clamp(5rem,8vw,9rem)
        clamp(2rem,5vw,4rem);

    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:flex-start;

    text-align:left;
}

.vbh-hero__inner-inner .wp-block-buttons{
    justify-content:flex-start !important;
}

@media (min-width:1025px){
    .vbh-hero:is(.is-style-wide-copy,.is-style-video-bottom) .vbh-hero__inner{
        grid-template-columns:minmax(0, 68%) minmax(0, 1fr);
    }

    .vbh-hero:is(.is-style-wide-copy,.is-style-video-bottom) .vbh-hero__inner-inner{
        box-sizing:border-box;
        padding-right:clamp(1rem, 2vw, 2rem);
    }
}

/* =====================================================
   TYPOGRAPHY
===================================================== */

.vbh-hero__inner *{
    text-shadow:0 3px 18px rgba(0,0,0,.65); 
}

.vbh-hero h1{
    margin-bottom:.35em; font-size:3.3em!important; line-height:1em; 
}

.vbh-hero h1 em{
  
}

.vbh-hero h2{
    margin-bottom:.6em; font-weight:400!important;
}

.vbh-hero h4{
    line-height:1.45; font-weight:400!important;
}

.vbn-hero p{color:white!important;}

/* =====================================================
   EDITOR
===================================================== */

.vbh-hero--editor-preview{
    background-size:cover;
    background-position:center;
}

.vbh-hero__video-placeholder{
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#111;
    color:#fff;
    z-index:1;
}

/* =====================================================
   MOBILE
===================================================== */

@media (769px <= width <= 1024px){
    .vbh-hero h1{
        font-size:clamp(2rem, 4.5vw, 3.3rem)!important;
        overflow-wrap:anywhere;
    }
}

@media (max-width:768px){
    .vbh-hero{
        display:block;
        min-height:0 !important;
        background-color:#02060c;
        background-image:none !important;
    }

    .vbh-hero.alignfull{
        padding-inline:0 !important;
    }

    .vbh-hero__video,
    .vbh-hero__overlay,
    .vbh-hero::before{
        width:100%;
        height:auto;
        aspect-ratio:16 / 9;
    }

    .vbh-hero__video{
        position:relative;
        inset:auto;
        container-type:normal;
    }

    .vbh-hero__iframe{
        top:0;
        left:0;
        width:100%;
        height:100%;
        transform:none;
    }

    .vbh-hero::before{
        inset:0 0 auto;
        background:linear-gradient(
            180deg,
            transparent 55%,
            rgba(2,6,12,.12) 70%,
            rgba(2,6,12,.55) 86%,
            #02060c 100%
        ), linear-gradient(
            180deg,
            rgba(2,6,12,.28) 0%,
            transparent 33%
        ) !important;
    }

    .vbh-hero[data-vbh-id=""][data-vbh-overlay=""] .vbh-hero__video{
        display:none;
    }

    .vbh-hero > .vbh-hero__inner{
        display:block;
        margin-block:-.375rem 0 !important;
        padding-block:0 !important;
    }

    .vbh-hero[data-vbh-id=""][data-vbh-overlay=""] > .vbh-hero__inner{
        margin-top:0 !important;
        padding-top:3rem !important;
    }

    .vbh-hero[data-vbh-id=""][data-vbh-overlay=""]::before{
        content:none;
    }

    .vbh-hero .vbh-hero__inner-inner{
        box-sizing:border-box;
        padding:0 25% 2rem clamp(1.25rem, 5vw, 2rem) !important;
        gap:.625rem;
        text-align:left;
        align-items:flex-start;
    }

    .vbh-hero .vbh-hero__inner-inner > *{
        margin-block:0 !important;
    }

    /* Keep the desktop spacer between the copy and the CTA out of mobile flow. */
    .vbh-hero .vbh-hero__inner-inner > .wp-block-spacer:has(+ .wp-block-buttons){
        display:none !important;
    }

    /* The wide-copy hero opens with an eyebrow followed by the main headline. */
    .vbh-hero:is(.is-style-wide-copy,.is-style-video-bottom) .vbh-hero__inner-inner
    > :nth-child(1 of :is(h1,h2,h3,h4,p,.wp-block-heading)){
        font-size:clamp(.7rem, 3vw, .82rem) !important;
        line-height:1.2 !important;
    }

    .vbh-hero:is(.is-style-wide-copy,.is-style-video-bottom) .vbh-hero__inner-inner
    > :nth-child(2 of :is(h1,h2,h3,h4,p,.wp-block-heading)){
        font-size:clamp(1.4rem, 6.3vw, 1.95rem) !important;
        font-weight:700 !important;
        line-height:1.1 !important;
        text-wrap:pretty;
    }

    .vbh-hero .vbh-hero__inner-inner .wp-block-buttons{
        display:flex !important;
        flex-flow:row wrap !important;
        justify-content:flex-start !important;
        align-self:flex-start !important;
        width:100% !important;
        max-width:100% !important;
        margin:0 !important;
        padding:0 !important;
    }

    .vbh-hero .vbh-hero__inner-inner .wp-block-buttons .wp-block-button{
        flex:0 1 auto !important;
        width:max-content !important;
        min-width:0 !important;
        max-width:100% !important;
        margin:0 !important;
    }

    .vbh-hero .vbh-hero__inner-inner .wp-block-button .wp-block-button__link{
        box-sizing:border-box;
        display:inline-flex !important;
        align-items:center !important;
        justify-content:center !important;
        width:max-content !important;
        min-width:0 !important;
        max-width:100% !important;
        min-height:44px;
        margin:0 !important;
        padding:.625rem .875rem !important;
        font-size:.875rem !important;
        line-height:1.2 !important;
        text-align:left !important;
        white-space:normal !important;
        text-wrap:wrap !important;
        overflow-wrap:normal !important;
    }

    .vbh-hero .vbh-hero__inner-inner .wp-block-button .wp-block-button__link::after{
        flex:none;
    }
}


.vbh-hero .wp-block-button__link{

    display:inline-flex;
    align-items:center;
    gap:.75rem;
}

.vbh-hero .wp-block-button__link::after{

    content:"›";

    font-size:1.35em;
    font-weight:300;
    line-height:1;

    transition:transform .25s ease;
}

.vbh-hero .wp-block-button:hover .wp-block-button__link::after{

    transform:translateX(4px);
}

.after-CTA{margin-top:20px!important;}

/* Mobile layout with copy above the video. */
@media (max-width:768px){
    .vbh-hero.is-style-video-bottom{
        --vbh-mobile-accent:#00e6ed;
        --vbh-mobile-video-overlap:clamp(4.75rem, 21vw, 6rem);
        display:flex;
        flex-direction:column;
        align-items:stretch;
        container-type:inline-size;
    }

    .vbh-hero.is-style-video-bottom > .vbh-hero__inner{
        margin-block:0 !important;
    }

    .vbh-hero.is-style-video-bottom .vbh-hero__inner-inner{
        padding:calc(clamp(5.5rem, 22vw, 7rem) - 10px) clamp(1.25rem, 5vw, 2rem) 1.25rem
            clamp(1.25rem, 5vw, 2rem) !important;
        gap:.125rem;
    }

    .vbh-hero.is-style-video-bottom .vbh-hero__inner-inner
    > :nth-child(1 of :is(h1,h2,h3,h4,p,.wp-block-heading)){
        max-inline-size:100% !important;
        text-wrap:balance;
        margin-block-end:0 !important;
    }

    .vbh-hero.is-style-video-bottom .vbh-hero__inner-inner
    > :nth-child(2 of :is(h1,h2,h3,h4,p,.wp-block-heading)){
        box-sizing:border-box;
        margin-block-start:10px !important;
        max-inline-size:calc(82% + .64 * clamp(1.25rem, 5vw, 2rem));
        font-size:clamp(1.55rem, 7vw, 2.25rem) !important;
    }

    .vbh-hero.is-style-video-bottom .vbh-hero__inner-inner
    > :nth-child(2 of :is(h1,h2,h3,h4,p,.wp-block-heading)) em{
        color:var(--vbh-mobile-accent);
        font-style:normal;
    }

    .vbh-hero.is-style-video-bottom .vbh-hero__inner-inner > .wp-block-buttons{
        margin-block-start:.75rem !important;
    }

    .vbh-hero.is-style-video-bottom .vbh-hero__inner-inner
    .wp-block-button:first-child .wp-block-button__link{
        background:var(--vbh-mobile-accent) !important;
        border-color:var(--vbh-mobile-accent) !important;
        color:#02060c !important;
        text-shadow:none;
    }

    .vbh-hero.is-style-video-bottom > .vbh-hero__video{
        order:1;
        flex:none;
        margin-block-start:calc(10px - var(--vbh-mobile-video-overlap));
    }

    .vbh-hero.is-style-video-bottom > .vbh-hero__overlay,
    .vbh-hero.is-style-video-bottom::before{
        inset:auto 0 0;
    }

    .vbh-hero.is-style-video-bottom::before{
        /* Bleed the opaque start of the fade over the iframe edge. */
        height:calc(56.25cqw + 2px);
        aspect-ratio:auto;
        background:linear-gradient(
            to bottom,
            #02060c 4px,
            rgba(2,6,12,.72) 20%,
            transparent 54%
        ) !important;
    }
}
