/* Hero Banner - flex layout `hero_banner`
   Like for like with nordicstorm.net .block-landingpagehero:
   - full-bleed video/image, navy edge gradient (--overlay-hero) on top
   - min-height 80vh, content column left/centre, 64px 30px padding
   - Teko h1 80px/500 uppercase, Plus Jakarta Sans 19.2px paragraph (max 600px)
   - button row, wraps; everything centred and stacked under 768px
   - optional bottom banner strip (.has_banner) */
.hero_banner {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    min-height: 80vh;
    color: var(--white);
    overflow: hidden;
    background: var(--primary);

    &.full {
        min-height: 100vh;
        min-height: 100dvh;
    }

    @media (max-width: 768px) {
        min-height: unset;
        max-height: 900px;
    }

    /* Media layer ------------------------------------------------------- */
    & .hero_banner_media {
        position: absolute;
        inset: 0;
        z-index: 0;

        /* Live navy edge gradient (STYLE-GUIDE §3 Overlays). Written literally:
           cssnano mangles gradient values stored in custom properties. */
        &::before {
            content: "";
            position: absolute;
            inset: 0;
            background:
                linear-gradient(-90deg, rgba(8, 35, 60, 0) 0%, rgba(8, 35, 60, .85) 100%),
                linear-gradient(to right, rgba(8, 35, 60, 0) 0%, rgba(8, 35, 60, .85) 100%);
            z-index: 1;
        }

        & video,
        & img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            z-index: 0;
        }
    }

    /* Optional extra darkening (ACF "enable_cover") */
    & .cover {
        position: absolute;
        inset: 0;
        background: rgba(8, 35, 60, .35);
        z-index: 1;
    }

    /* Content ------------------------------------------------------------- */
    & > .container {
        position: relative;
        z-index: 2;
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 100%;
        min-height: 80vh;
        padding: 64px 30px;
        color: var(--white);
        text-align: left;

        &.center {
            align-items: center;
            text-align: center;
        }

        &.right {
            align-items: flex-end;
            text-align: right;
        }

        @media (max-width: 768px) {
            align-items: center;
            justify-content: center;
            min-height: 0;
            padding: 128px 15px 64px;
            text-align: center;
        }
    }

    &.full > .container {
        min-height: 100vh;
        min-height: 100dvh;
    }

    &.has_banner > .container {
        padding-bottom: calc(64px + 8vw);

        @media (max-width: 768px) {
            padding-bottom: calc(32px + 10vw);
        }
    }

    & .hero_banner_inner {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;

        @media (min-width: 992px) {
            &.top    { justify-content: flex-start; }
            &.middle { justify-content: center; }
            &.bottom { justify-content: flex-end; }
        }

        .center & { align-items: center; }
        .right &  { align-items: flex-end; }

        @media (max-width: 768px) {
            align-items: center;
        }
    }

    & .eyebrow {
        margin: 0 0 14px;
    }

    & .hero_banner_title {
        margin: 0 0 16px;
        font-family: var(--font-display);
        font-size: 80px;
        font-weight: 500;
        line-height: 1.1;
        letter-spacing: .01em;
        text-transform: uppercase;
        color: var(--white);

        @media (max-width: 768px) {
            font-size: 48px;
            text-align: center;
        }
    }

    & .hero_banner_text {
        max-width: 600px;
        margin: 0 0 32px;
        font-family: var(--font-body);
        font-size: 19.2px;
        line-height: 1.5;
        color: var(--white);

        @media (max-width: 658px) {
            max-width: 300px;
            font-size: 16px;
            text-align: center;
        }
    }

    & .hero_banner_buttons {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 16px;
        margin: 0;

        .center & { justify-content: center; }
        .right &  { justify-content: flex-end; }

        @media (max-width: 658px) {
            flex-direction: column;
            justify-content: center;
        }
    }

    /* Bottom banner strip -------------------------------------------------- */
    & .hero_banner_strip {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 3;
        display: block;
        line-height: 0;

        & img {
            display: block;
            width: 100%;
            height: auto;
        }

        &:focus-visible {
            outline: 3px solid var(--white);
            outline-offset: -6px;
        }
    }
}
