/*
==================================================
Hero CSS
==================================================
*/

.dsbb-hero
{
    --dsbb-hero-viewport-height: 78vh;
    --dsbb-hero-viewport-height: 78dvh;
    --dsbb-header-height: 3rem;

    --dsbb-hero-overlay-opacity: 0.35;
    --dsbb-avci-inset: clamp(.8rem, 2vw, 2rem);

    --dsbb-hero-min-height: 350px;
    --dsbb-hero-max-height: 800px;

    --dsbb-hero-headline-size: clamp(2.7rem, 9vw, 3.5rem);
    --dsbb-hero-subtitle-size: clamp(2.3rem, 7vw, 2.9rem);
    --dsbb-hero-content-size: clamp(1rem, 2.5vw, 1.5rem);
    --dsbb-hero-cta-size: clamp(1.25rem, 5vw, 2rem);

    position: relative;

    display: flex;

    height: clamp(
        var(--dsbb-hero-min-height),
        calc(
            var(--dsbb-hero-viewport-height)
            - var(--dsbb-header-height)
        ),
        var(--dsbb-hero-max-height)
    );

    align-items: flex-end;
    justify-content: center;

    overflow: hidden;
}


.dsbb-hero.center-content
{
    align-items: center;
}


/*
==================================================
Hero media
==================================================
*/

.dsbb-hero__media
{
    position: absolute;
    inset: 0;
    z-index: 0;
}


.dsbb-hero__media picture
{
    display: block;
    width: 100%;
    height: 100%;
}


.dsbb-hero__media picture img
{
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}


.dsbb-hero__media img.avci-logo
{
    position: absolute;
    right: var(--dsbb-avci-inset);
    bottom: var(--dsbb-avci-inset);

    width: clamp(3.5rem, 7vw, 7.5rem);
    height: auto;

    object-fit: contain;

    filter: drop-shadow(0 0 0.3rem #333);
}


/*
==================================================
Hero overlay
==================================================
*/

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

    background: rgba(
        0 0 0 / var(--dsbb-hero-overlay-opacity)
    );
}


/*
==================================================
Hero content
==================================================
*/

.dsbb-hero__content
{
    position: relative;
    z-index: 2;

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

    width: 100%;
    max-width: 60rem;
    margin: 0 auto;

    padding:
        var(--dsbb-space-sm)
        var(--dsbb-space-lg)
        clamp(
            var(--dsbb-space-lg),
            6vh,
            var(--dsbb-space-xl)
        );

    color: #fff;

    font-size: var(--dsbb-hero-content-size);
    text-align: center;
}


/*
==================================================
Hero headline
==================================================
*/

.dsbb-hero__headline
{
    margin: 0.5rem 0 0;

    color: var(--dsbb-color-brand-dark);

    font-weight: 700;
    font-size: var(--dsbb-hero-headline-size);
    line-height: 1.25;

    text-shadow: var(--dsbb-text-shadow-white-xxs);
}

.dsbb-hero.text-inverted .dsbb-hero__headline
{
    color: var(--dsbb-color-brand-accent);
    text-shadow: var(--dsbb-text-shadow-brand-dark-sm);
}


/*
==================================================
Hero subtitle
==================================================
*/

.dsbb-hero__subtitle
{
    margin: var(--dsbb-space-md) auto;

    color: var(--dsbb-color-brand-accent);

    font-weight: 600;
    font-size: var(--dsbb-hero-subtitle-size);
    line-height: 1.25;

    text-shadow: var(--dsbb-text-shadow-brand-dark-sm);

    transform: scaleX(0.95);
    transform-origin: center center;
}

.dsbb-hero.text-inverted .dsbb-hero__subtitle
{
    color: var(--dsbb-color-brand-dark);
    font-weight: var(--dsbb-font-weight-bold);
    text-shadow: var(--dsbb-text-shadow-white-xxs);
}


/*
==================================================
Hero text
==================================================
*/

.dsbb-hero__text
{
    max-width: 45rem;
    margin: 0 0 2rem;

    font-size: var(--dsbb-hero-content-size);
    font-weight: 600;
    line-height: 1.5;
}


/*
==================================================
Hero CTA
==================================================
*/

.dsbb-hero .dsbb-hero__cta
{
    margin: var(--dsbb-space-md) auto;
    padding: 0.6em 1.2em;

    font-size: var(--dsbb-hero-cta-size);
}


/*
==================================================
Responsive layout
==================================================
*/

/*
--------------------------------------------------
Portrait
--------------------------------------------------
*/

@media (max-aspect-ratio: .5)
{
    .dsbb-hero.move-up-vp-tall .dsbb-hero__content
    {
        transform: translateY(clamp(
                -7rem,
                calc(-7svh - 1rem),
                -4rem
            ));
    }
}

/*
--------------------------------------------------
Landscape
--------------------------------------------------
*/

@media (orientation: landscape)
{
    .dsbb-hero
    {
        --dsbb-hero-viewport-height: 90vh;
        --dsbb-hero-viewport-height: 90dvh;
    }
}


/*
--------------------------------------------------
Mobile
--------------------------------------------------
*/

@media (max-width: 47.999rem)
{
    .dsbb-hero.compact
    {
        --dsbb-hero-max-height: 100vw;
    }


    .dsbb-hero.compact .dsbb-hero__content
    {
        transform: none;
    }


    .dsbb-hero.compact .dsbb-hero__headline
    {
        text-shadow: var(--dsbb-text-shadow-white-xs);
    }


    .dsbb-hero.compact .dsbb-hero__subtitle
    {
        text-shadow: var(--dsbb-text-shadow-brand-dark-xs);
    }


    .dsbb-hero.heading-reduced .dsbb-hero__headline
    {
        font-size: clamp(2.3rem, 9vw, 3.5rem);
    }
}


/*
--------------------------------------------------
Tablet and larger
--------------------------------------------------
*/

@media (min-width: 48rem)
{
    .dsbb-hero
    {
        --dsbb-hero-min-height: 60vh;
    }


    .dsbb-hero__content
    {
        padding:
            var(--dsbb-space-xl)
            var(--dsbb-space-lg);
    }


    .dsbb-hero__subtitle
    {
        margin: .5em auto;
    }


    .dsbb-hero .dsbb-hero__cta
    {
        padding: 0.3em 0.6em;
    }
}


/*
--------------------------------------------------
Short viewport
--------------------------------------------------
*/

@media (max-height: 28rem)
{
    .dsbb-hero
    {
        min-height: 0;

        max-height: calc(100vh - var(--dsbb-header-height));
        height: calc(100vh - var(--dsbb-header-height));

        max-height: calc(100dvh - var(--dsbb-header-height));
        height: calc(100dvh - var(--dsbb-header-height));
    }


    .about-us .dsbb-hero
    {
        align-items: center;
    }


    .dsbb-hero__subtitle
    {
        margin: var(--dsbb-space-sm) auto;
    }


    .dsbb-hero__content
    {
        padding: 4rem 2rem;
        transform: translateY(-0.5rem);
    }


    header
    {
        max-height: 3rem;
    }


    header .header-review-badge
    {
        max-height: 2.3rem;
    }


    header .inside-navigation
    {
        line-height: 1;
        height: auto;
    }


    header #primary-menu > ul > li > a
    {
        line-height: 1;
    }
}


/*
--------------------------------------------------
Landscape viewport with high width/height ratio
--------------------------------------------------
*/

@media (min-aspect-ratio: 16 / 9)
{
    .dsbb-hero
    {
        --dsbb-hero-headline-size: clamp(2rem, 5vw, 2.9rem);
        --dsbb-hero-subtitle-size: clamp(1.5rem, 4.8vw, 2.2rem);
        --dsbb-hero-cta-size: clamp(.8rem, 4.5vw, 1.5rem);
    }
}


/*
--------------------------------------------------
Very short landscape viewport
--------------------------------------------------
*/

@media (max-height: 28rem) and (orientation: landscape)
{
    .dsbb-hero
    {
        --dsbb-hero-headline-size: clamp(2.2rem, 5vw, 2.5rem);
        --dsbb-hero-subtitle-size: clamp(2rem, 4.8vw, 2.2rem);
        --dsbb-hero-cta-size: clamp(.9rem, 4.55vw, 1.6rem);
    }


    .dsbb-hero__content
    {
        padding: 4rem 2rem;
        transform: translateY(2rem);
    }

    .dsbb-hero__subtitle
    {
        margin: var(--dsbb-space-sm) auto;
        margin-bottom: 0;
    }


    .dsbb-hero .dsbb-hero__cta
    {
        padding: 0.3em 1em;
    }
}


/*
--------------------------------------------------
Wide landscape viewport
--------------------------------------------------
*/

@media (min-width: 76rem) and (orientation: landscape)
{
    .dsbb-hero
    {
        --dsbb-hero-headline-size: clamp(3.5rem, 9vw, 5rem);
        --dsbb-hero-subtitle-size: clamp(3rem, 8vw, 4rem);
        --dsbb-hero-cta-size: clamp(2rem, 5vw, 2.5rem);
    }

    .dsbb-hero.move-up-vp-wide .dsbb-hero__content
    {
        transform: translateY(clamp(
                -5rem,
                calc(-5svh - 1rem),
                -4rem
            ));
    }

    .dsbb-hero.move-top-vp-wide .dsbb-hero__content
    {
        transform: translateY(clamp(
                -5rem,
                calc(-5svh - 1rem),
                -4rem
            ));
    }


    .dsbb-hero__subtitle
    {
        margin: 3.5rem auto;
    }
}

/*
==================================================
Page adjustments
==================================================
*/

.trial-training .dsbb-hero
{
    --dsbb-hero-subtitle-size: clamp(2.5rem, 7vw, 4.5rem);
}


@media (max-height: 28rem)
{
    .about-us .dsbb-hero
    {
        align-items: center;
    }
}