/* ============================================================
   fux_sitepackage_hsgm — Startseite (Master-Layout relaunch_home,
   Templates/Page/RelaunchHome.html; geladen per f:asset.css)

   Quelle: _prototypes/css/homepage.css (hero-section Z. 202-275,
   section-header Z. 505-522, news-section Z. 327-344,
   cta-section Z. 645-717). Header/Footer/Container: relaunch-frame.css.
   Produktlinien und "Warum HSGM?": CE "Kacheln" (tiles.css),
   News-Karten: news.css.

   Abweichungen mit Begruendung:
   - Tokens mit Fallback (var(--x, #wert)): dieses Paket haengt nicht von
     products.css ab, nutzt aber dieselben Werte.
   - Grau-Text #6e6e73 statt Prototyp #86868b (3,54:1 auf Weiss, zu wenig
     fuer WCAG 1.4.3) — projektweit gleicher Wert wie --gray-secondary.
   - Hero ohne min-height:70vh: Hoehe ergibt sich aus Innenabstand und
     Inhalt (Dachzeile, Kennzahlen-Leiste sind optional).
   - Kennzahlen als Liste (CE "Kennzahlen"); Beschriftung grau #6e6e73
     statt #86868b (s. o.).
   - Bewegung (fadeInUp, Hover-Hebung) nur bei prefers-reduced-motion:
     no-preference; die schwebenden CTA-Kreise (float-slow, 20-25 s
     Endlosanimation) entfallen ganz (WCAG 2.2.2 Pausieren).
   - CTA-Band mit 5rem weissem Abstand davor wie im Prototyp (Z. 647).

   Kontraste (nachgerechnet, WCAG 2.x relative Luminanz):
   - h1-Verlauf #1d1d1f -> #6e6e73 auf #fff..#f5f5f7 . . .  >= 4,66:1
   - Untertitel #6e6e73 auf #f5f5f7 / #fff . . . . . . . .  4,66 / 5,07:1
   - Primaer-Button #fff auf #0066cc / Hover #0051a3 . . .  5,57 / 7,76:1
   - Sekundaer-Button #0066cc auf #f5f5f7 (Hero-Ende) . . .  5,11:1
     Hover #fff auf #0066cc . . . . . . . . . . . . . . . .  5,57:1
   - Sektionstitel #1d1d1f auf #fff / #fbfbfd . . . . . . .  16,83 / 16,28:1
   - Sektions-Untertitel #6e6e73 auf #fbfbfd . . . . . . . .  4,91:1
   - CTA-Text #fff auf #0066cc..#0051a3 . . . . . . . . . .  5,57..7,76:1
   - CTA-Button #0066cc auf #fff . . . . . . . . . . . . . .  5,57:1
   - Dachzeile #6e6e73 auf #fff..#f5f5f7  . . . . . . . . .  >= 4,66:1
   - Kennzahl #0066cc / Beschriftung #6e6e73 auf #fff . . .  5,57 / 5,07:1
   - Fokusrahmen #0066cc auf hellem Grund >= 5,11:1, im CTA-Band
     #fff auf #0066cc 5,57:1 (WCAG 1.4.11 / 2.4.7)
   ============================================================ */

.home-page {
    --home-blue: var(--hsgm-blue, #0066cc);
    --home-blue-dark: var(--hsgm-blue-dark, #0051a3);
    --home-text: var(--gray-primary, #1d1d1f);
    --home-muted: #6e6e73;
    --home-border: var(--gray-tertiary, #d2d2d7);
    --home-surface: var(--gray-quaternary, #f5f5f7);
    --home-background: var(--gray-background, #fbfbfd);
}

/* ---------- Hero ---------- */
/* Abstand zum fixen Header: auf anderen Relaunch-Seiten traegt ihn der
   Breadcrumb (relaunch-frame.css .breadcrumb-nav, gleiche Formel); die
   Startseite hat keinen Breadcrumb (Prototyp: hero-section margin-top
   72px). Ohne JS scrollt der Header bis 1199.98px mit -> kein Abstand. */
.home-hero {
    margin-top: calc(var(--fux-navbar-inner-height, 40px) + 2rem + 1px);
    padding: var(--space-xl, 5rem) 0;
    background: linear-gradient(180deg, #fff 0%, var(--home-surface) 100%);
    text-align: center;
}

.home-hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.home-hero .page-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 1.5rem;
    color: var(--home-text);
    hyphens: auto;
    overflow-wrap: break-word;
}

/* Verlaufsschrift wie Prototyp (Z. 253-255); Endfarbe #6e6e73 haelt auch
   auf #f5f5f7 4,66:1. Ohne background-clip gilt die Vollfarbe oben. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .home-hero .page-title {
        background: linear-gradient(180deg, var(--home-text) 0%, var(--home-muted) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}

.home-hero .page-subtitle {
    font-size: 1.375rem;
    line-height: 1.5;
    color: var(--home-muted);
    max-width: 700px;
    margin: 0 auto;
}

.home-hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
}

/* Dachzeile des Seiten-Hero (Prototyp .hero-badge, Z. 223-246) */
.home-hero .page-overline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 2rem;
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--home-muted);
}

.home-hero .page-overline::after {
    content: '';
    flex-shrink: 0;
    width: 40px;
    height: 1px;
    margin-left: 0.5rem;
    background: var(--home-border);
}

/* Kennzahlen-Leiste: Gestaltung im Element (key-figures.css, CE „Kennzahlen“) */

/* ---------- Buttons (Prototyp btn-primary-custom / -secondary / btn-white) ---------- */
.home-btn {
    /* border-box: width:100% (mobil) inklusive Rahmen und Innenabstand,
       sonst Ueberbreite bei 320px */
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.875rem 2rem;
    font-size: 1.0625rem;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 3rem;
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.home-btn svg {
    flex-shrink: 0;
}

.home-btn--primary {
    background: var(--home-blue);
    color: #fff;
}

.home-btn--primary:hover {
    background: var(--home-blue-dark);
    color: #fff;
    box-shadow: 0 8px 16px rgba(0, 102, 204, 0.2);
}

.home-btn--secondary {
    background: transparent;
    color: var(--home-blue);
    border-color: var(--home-blue);
}

.home-btn--secondary:hover {
    background: var(--home-blue);
    color: #fff;
}

.home-btn--white {
    background: #fff;
    color: var(--home-blue);
    font-weight: 600;
    padding: 1rem 2.5rem;
}

.home-btn--white:hover {
    color: var(--home-blue-dark);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* body.fux-relaunch-Varianten schlagen die Rahmenregel
   body.fux-relaunch a:focus-visible (0,2,2), sonst nur 2px
   (A11y-Review Startseite 2026-10-10, M2) */
.home-btn:focus-visible,
body.fux-relaunch .home-btn:focus-visible {
    outline: 3px solid var(--home-blue);
    outline-offset: 2px;
}

.home-cta .home-btn:focus-visible,
body.fux-relaunch .home-cta .home-btn:focus-visible {
    outline-color: #fff;
}

/* ---------- Sektionen ---------- */
.home-section {
    position: relative;
    padding: var(--space-section, 8rem) 0;
}

/* Feine Trennlinie oben (Prototyp ::before der Sektionen) */
.home-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 10%, var(--home-border) 50%, transparent 90%);
}

.home-section-header {
    text-align: center;
    margin-bottom: var(--space-xl, 5rem);
}

.home-section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
    color: var(--home-text);
    hyphens: auto;
    overflow-wrap: break-word;
}

.home-section-subtitle {
    font-size: 1.25rem;
    line-height: 1.5;
    color: var(--home-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* ---------- Aktuelles (News-Plugin homeTeaser, news.css) ---------- */
.home-news {
    background: var(--home-background);
}

.home-news .news {
    padding: 0;
}

.home-news .news-grid {
    margin-top: 0;
}

/* Sektionskopf im Karussell-Muster (carousel.css .fux-carousel-head,
   Nachtrag User 2026-10-13): linksbuendig statt zentriert wie die
   uebrigen Startseiten-Sektionen; Abstand wie .home-section-header */
.home-news .fux-carousel-head {
    margin-bottom: var(--space-xl, 5rem);
}

.home-news .fux-carousel-head > h2.home-section-title {
    margin: 0;
}

.home-news .fux-carousel-head > .home-section-subtitle {
    margin: 0.75rem 0 0;
}

@media (max-width: 768px) {
    .home-news .fux-carousel-head {
        margin-bottom: var(--space-lg, 3rem);
    }
}

/* ---------- CTA-Band ---------- */
.home-cta {
    margin-top: var(--space-xl, 5rem);
    padding: var(--space-section, 8rem) 0;
    background: linear-gradient(135deg, var(--home-blue) 0%, var(--home-blue-dark) 100%);
    color: #fff;
    text-align: center;
}

.home-cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 1.5rem;
    color: #fff;
    hyphens: auto;
    overflow-wrap: break-word;
}

.home-cta-text {
    font-size: 1.25rem;
    line-height: 1.5;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    color: #fff;
}

/* ---------- Bewegung nur ohne Wunsch nach reduzierter Bewegung ---------- */
@media (prefers-reduced-motion: no-preference) {
    .home-hero-content,
    .home-hero-buttons {
        animation: fux-home-fade-in-up 0.6s ease-out both;
    }

    .home-hero-buttons {
        animation-delay: 0.2s;
    }

    .home-btn--primary:hover,
    .home-btn--secondary:hover,
    .home-btn--white:hover {
        transform: translateY(-2px);
    }
}

@keyframes fux-home-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1199.98px) {
    html:not(.fux-nav-js) .home-hero {
        margin-top: 0;
    }
}

/* ---------- Responsive (Prototyp Z. 831-856) ---------- */
@media (max-width: 767px) {
    .home-hero {
        padding: var(--space-lg, 3rem) 0;
    }

    .home-hero .page-title {
        font-size: 2rem;
    }

    .home-hero .page-subtitle {
        font-size: 1.125rem;
    }

    .home-hero-buttons {
        margin-top: 2rem;
    }

    /* Zierstrich nur einzeilig sinnvoll; bricht die Dachzeile um, stuende
       er abgesetzt neben dem Block */
    .home-hero .page-overline::after {
        display: none;
    }

    .home-hero .page-overline {
        margin-bottom: 1.5rem;
    }

    .home-section-header {
        margin-bottom: var(--space-lg, 3rem);
    }

    .home-section-subtitle,
    .home-cta-text {
        font-size: 1.125rem;
    }


    .home-cta {
        margin-top: var(--space-lg, 3rem);
    }

    /* Schmale Viewports: Buttons volle Breite, Text darf umbrechen */
    .home-btn {
        width: 100%;
        max-width: 22rem;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

@media print {
    .home-cta {
        display: none;
    }

    .home-hero {
        background: none;
    }
}
