/*
    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));
}

/*
    Wasserzeichen "Im Aufbau"
    -------------------------
    Ueber "Seiteneinstellungen → Badge Im Aufbau" im Admin schaltbar
    (Kontextvariable "seiteneinstellungen.aufbau_badge", siehe _hero.html).
    Sitzt als halbtransparenter, leicht gedrehter Stempel vor dem Hero-Bild
    auf der rechten Seite – der Textblock links bleibt frei.
*/
.hero__aufbau {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: clamp(16px, 6vw, 96px);
    transform: translateY(-50%) rotate(-12deg);
    pointer-events: none;
}

.hero__aufbau-text {
    display: inline-block;
    padding: 12px 28px;
    border: 3px solid rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-klein);
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(22px, 4vw, 44px);
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(36, 46, 87, 0.25);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
}

@media (max-width: 767px) {
    .hero__aufbau {
        top: 24px;
        right: 16px;
        transform: rotate(-12deg);
    }

    .hero__aufbau-text {
        padding: 8px 16px;
        border-width: 2px;
    }
}

.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);
        }
    }
}
