/*
    Bueren / Hero (Titelbereich)
    ============================
    Großformatige Titelsektion mit optionalem Hintergrundbild, Verlaufs-
    Overlay (von --farbe-primary bei 90% Deckkraft nach transparent),
    Badge, Überschrift, Text und zwei Buttons (siehe partials/_hero.html).

    Funktioniert bewusst auch ganz ohne hochgeladenes Bild: Die Sektion
    selbst hat --farbe-primary als Hintergrund, sodass der Verlauf
    weiterhin sichtbar bleibt und nichts "leer" wirkt.
*/

.hero {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: max(600px, calc(100dvh - var(--nav-hoehe)));
    overflow: hidden;
    background: var(--farbe-primary);
}

.hero__bild {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(36, 46, 87, 0.9), rgba(36, 46, 87, 0));
}

.hero__inhalt {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--rand-mobil);
}

@media (min-width: 768px) {
    .hero__inhalt {
        padding-inline: var(--rand-desktop);
    }
}

.hero__textblock {
    max-width: 640px;
    color: var(--farbe-weiss);
}

.hero__badge {
    display: inline-block;
    margin-bottom: 16px;
    padding: 4px 12px;
    background: var(--farbe-primary-fixed);
    color: var(--farbe-on-primary-fixed);
    font-size: 12px;             /* Skalenstufe "label-md" */
    font-weight: 600;
    letter-spacing: 0.05em;
    border-radius: var(--radius-klein);
}

.hero__headline {
    margin-bottom: 16px;
    font-size: 32px;             /* mobil: einen Schritt kleiner als die Vorlage (48px), bessere Lesbarkeit */
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .hero__headline {
        font-size: clamp(48px, 5vw, 68px);
    }
}

.hero__text {
    margin-bottom: 32px;
    font-size: 18px;             /* Skalenstufe "body-lg" */
    line-height: 1.5;
    opacity: 0.9;
}

.hero__aktionen {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* Einblend-Animation des Hero-Textblocks beim Seitenaufruf */
@media (prefers-reduced-motion: no-preference) {
    .hero__textblock {
        animation: hero-einblenden 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    .hero__badge {
        animation: hero-einblenden 0.7s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    .hero__headline {
        animation: hero-einblenden 0.8s 0.15s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    .hero__text {
        animation: hero-einblenden 0.8s 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    .hero__aktionen {
        animation: hero-einblenden 0.8s 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    @keyframes hero-einblenden {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}
