.bfg-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    min-height: clamp(370px, 57vh, 590px);
    overflow: hidden;
    padding: 48px 20px;
    background: #222;
    color: #fff;
    text-align: center;
}

.bfg-hero--showreel { min-height: clamp(430px, 72vh, 750px); }
.bfg-hero__media, .bfg-hero__media img, .bfg-hero__video, .bfg-hero::before {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.bfg-hero__media, .bfg-hero__video { z-index: -2; }
.bfg-hero__media img, .bfg-hero__video { object-fit: cover; object-position: center; }
.bfg-hero__video { opacity: 0; }
.bfg-hero__video.is-playing { opacity: 1; }
.bfg-hero::before { content: ''; z-index: -1; background: rgba(0, 0, 0, .54); }
.bfg-hero__content { width: min(100%, 850px); }
.bfg-hero__eyebrow { margin-bottom: 12px; color: #fff; font-weight: 700; }
.bfg-hero .bfg-hero__title {
    margin: 0 0 22px;
    color: #fff;
    font-size: clamp(28px, 5vw, 46px);
    line-height: 1.16;
    letter-spacing: .10em;
    overflow-wrap: anywhere;
}

.bfg-hero__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 12px; }
.bfg-hero__actions .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin: 0; }
.bfg-hero__pause { position: absolute; bottom: 12px; right: 12px; min-height: 44px; padding: 8px 12px; color: #fff; background: #181818; border: 1px solid #fff; }
.bfg-hero__pause[hidden] { display: none; }

.casesarea .noicon { overflow-wrap: anywhere; }
.casesarea h2.noicon { color: inherit; font-size: 24px; line-height: 1.25; }
.casesarea .yellowtextarea h2.noicon { color: #000; }
.casesarea .blue-area a .leistungen-link-inside { color: #111; }

.overlay .tb.overlay_close { color: #262626; text-decoration: underline; }
.overlay button.overlay_close { min-height: 44px; }

.bfg-form-label { display: block; margin-bottom: 4px; font-size: 15px; font-weight: 600; }
#contact input:not([type='checkbox']), #contact button[type='submit'] { min-height: 44px; }
#contact textarea, #contact input { max-width: 100%; }
#contact input:focus-visible, #contact textarea:focus-visible, #contact button:focus-visible {
    outline: 2px solid #126ccd !important;
    outline-offset: 3px;
}

.bfg-case-media { display: block; width: 100%; aspect-ratio: 682 / 448; object-fit: cover; background: #111; }
.bfg-case-card h2, #blog h2 { font-size: clamp(18px, 2.4vw, 25px); line-height: 1.25; letter-spacing: .07em; }
.bfg-case-card img { height: auto; }

.bfg-navigation #menu-button, .bfg-navigation #bfg-menu-toggle { display: none; }
.bfg-navigation #menu-button { display: none !important; }
.bfg-static-page .scroll-top.bfg-show-top { display: block; }
.bfg-media-dialog {
    width: min(94vw, 960px);
    max-height: 92vh;
    padding: 12px;
    border: 0;
    background: #161616;
    color: #fff;
}
.bfg-media-dialog::backdrop { background: #000b; }
.bfg-media-dialog button { display: block; margin: 0 0 8px auto; min-height: 44px; padding: 0 14px; color: #fff; background: #161616; border: 1px solid; }
.bfg-media-dialog video, .bfg-media-dialog iframe { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 73vh; border: 0; background: #000; }

@media (max-width: 991px) {
    .header .navigation #bfg-menu-toggle {
        display: grid;
        place-items: center;
        min-width: 44px;
        min-height: 64px;
        margin-left: 0;
        padding: 0;
        background: transparent;
        border: 0;
    }
    .navigation #bfg-menu-toggle::before {
        content: '';
        width: 19px;
        height: 2px;
        background: currentColor;
        box-shadow: 0 -6px currentColor, 0 6px currentColor;
    }
    .navigation #bfg-menu-toggle:focus-visible { outline: 2px solid #126ccd; outline-offset: -3px; }
    .header .navigation > ul { overscroll-behavior: contain; }
    .header .navigation.bfg-nav-open > ul { display: block !important; }
    .home #about { padding: 34px 0 38px; }
    .home #about .head-main {
        font-size: clamp(22px, 4vw, 28px);
        line-height: 1.22;
        letter-spacing: .045em;
        overflow-wrap: anywhere;
    }
    .home #about .lead { font-size: 16px; line-height: 1.5; letter-spacing: .02em; }
    .bfg-case-card { padding-top: 40px; padding-bottom: 40px; }
}

@media (max-width: 650px) {
    .bfg-hero, .bfg-hero--showreel { min-height: 310px; padding: 34px 15px; }
    .bfg-hero .bfg-hero__title { letter-spacing: .065em; }
    .casesarea h2.noicon { font-size: 20px; letter-spacing: .06em; }
    .casesarea .regular-spacing { padding-top: 40px; padding-bottom: 40px; }
}

.home .bfg-hero--showreel {
    min-height: 100vh;
    min-height: 100svh;
    padding-top: 132px;
}
.home .bfg-hero .header-main {
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 38px;
    line-height: 40px;
    letter-spacing: 6px;
}
.home .bfg-hero__eyebrow { font-weight: 600; }
.scroll-top { width: 44px; height: 44px; line-height: 44px; }
.scroll-top img { width: 40px; height: 40px; max-width: none; vertical-align: middle; }

@media (max-width: 991px) {
    .home .bfg-hero--showreel { min-height: clamp(420px, 58svh, 560px); padding-top: 112px; }
    .home .bfg-hero .header-main { font-size: 28px; line-height: 34px; }
}
@media (max-width: 650px) {
    .home .bfg-hero .header-main { font-size: 22px; line-height: 25px; }
}

/* Preserve centered titles while keeping them below the overlaid header. */
html:not(.home) .bfg-hero {
    --hero-padding: 48px;
    --hero-clearance: 156px;
    padding-block: var(--hero-padding);
    grid-template-rows: minmax(calc(var(--hero-clearance) - var(--hero-padding)), 1fr) auto minmax(0, 1fr);
}
html:not(.home) .bfg-hero__content { grid-row: 2; }

#mission { padding-top: clamp(56px, 8vw, 100px); padding-bottom: 0; }
#mission h2 { font-size: 26px; }

/* The single legacy Owl slide must follow the header during a viewport resize. */
.bfg-group-hero { container-type: inline-size; }
.bfg-group-hero .fullwidth-slider .owl-item { width: 100vw !important; width: 100cqw !important; }
#kunden .container-grid { overflow-x: clip; }
#aulendorf, #berlin { scroll-margin-top: 152px; }

@media (max-width: 991px) {
    html:not(.home) .bfg-hero { --hero-clearance: 119px; }
    #aulendorf, #berlin { scroll-margin-top: 119px; }
    .bfg-static-page #service,
    .bfg-static-page .bfg-hero + .clearfix + .leistungen-form,
    .bfg-hero + .clearfix + section.ptb { padding-top: clamp(32px, 7vw, 56px); }
    #mission { padding-top: clamp(32px, 7vw, 56px); }
    #mission h2 {
        padding-top: 0;
        font-size: clamp(21px, 4.7vw, 26px);
        line-height: 1.28;
        letter-spacing: .045em;
        text-wrap: balance;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 650px) {
    html:not(.home) .bfg-hero { --hero-padding: 34px; }
}
