/* Eigenständige Startseite (layout/home.php) - bewusst ohne Sidebar/Topbar-Navigation,
   damit nicht eingeloggte Besucher nicht den Eindruck einer gesperrten App-Oberfläche
   bekommen (vorher: geblurrte Sidebar mit Platzhalter-Links über layout/base.php). */

body.page-home {
    min-height: 100vh;
    background: var(--body-bg);
    position: relative;
    overflow-x: hidden;
}

.home-beta-banner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 25px;
    background: var(--accent-yellow);
    color: #000;
    font-size: .9rem;
    font-weight: 400;
    text-align: center;
    opacity: 0;
    animation: home-beta-banner-fade-in .6s ease forwards;
    animation-delay: 5s;
}
@keyframes home-beta-banner-fade-in {
    to { opacity: 1; }
}
.home-beta-banner-track {
    position: relative;
    display: inline-grid;
    min-height: 1.3em;
}
.home-beta-banner-msg {
    grid-area: 1 / 1;
    opacity: 0;
    transition: opacity .5s ease;
}
.home-beta-banner-msg--active { opacity: 1; }

#home-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.home-topbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 40px 0;
}

.home-logo { height: 29px; width: auto; display: block; opacity: 0; transition: opacity .25s ease; margin: 0 50px 0 10px; }
.home-logo--visible { opacity: 1; }

/* Intro-Animation: großes, zentriertes Logo, das per JS (FLIP-Technik) in die
   Topbar-Position wandert - siehe Script am Seitenende. */
.home-intro-logo {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
/* Sanftes Einblenden, dann 2,2s groß stehen bleiben, bevor das JS die Wanderung
   in die Topbar-Position startet (Timing dort auf diese Animation abgestimmt).
   Die drei Balken wackeln/blinken währenddessen leicht per SVG-eigener Animation
   (siehe <animateTransform>/<animate> im Markup) - ein <img> könnte das nicht. */
#home-intro-logo-img { height: 150px; width: auto; opacity: 0; animation: home-intro-fade-in 1.8s ease forwards; animation-delay: .5s; }
.home-intro-logo-text { fill: #000; }
[data-theme="dark"] .home-intro-logo-text { fill: #f2f2f2; }

@keyframes home-intro-fade-in {
    to { opacity: 1; }
}

/* Login-Box und Software-Paket-Box blenden erst nach der Logo-Animation ein (Klasse
   wird per JS gesetzt) - gestaffelt, Login-Box zuerst. */
.home-fade-in { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.home-fade-in--visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    .home-intro-logo { display: none; }
    .home-logo { opacity: 1; transition: none; }
    .home-fade-in { opacity: 1; transform: none; transition: none; }
}

.home-topbar-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    animation: home-beta-banner-fade-in .6s ease forwards;
    animation-delay: 5.6s;
}

.home-webseite-btn { display: inline-flex; align-items: center; gap: 6px; }

.home-lang-menu { position: relative; }
.home-topbar-link {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 16px; border-radius: 50px; color: var(--body-text);
    font-size: .85rem; text-decoration: none;
    transition: background .18s ease, color .18s ease;
}
.home-topbar-link:hover { background: var(--bg-hover); text-decoration: none; }
.home-lang-dropdown {
    display: none;
    position: absolute; right: 0; top: calc(100% + 4px);
    background: var(--bg-white); border: 1px solid var(--border);
    border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
    min-width: 160px; padding: 6px; z-index: 5;
}
.home-lang-menu:hover .home-lang-dropdown,
.home-lang-menu:focus-within .home-lang-dropdown { display: block; }
.home-lang-item { display: block; padding: 8px 10px; border-radius: 6px; color: var(--body-text); }
.home-lang-item:hover { background: var(--bg-hover); }
.home-lang-item--active { font-weight: 600; }

.home-shell {
    position: relative;
    z-index: 1;
    max-width: 1360px;
    margin: 0 auto;
    padding: 20px 40px 80px;
}

.home-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 40px;
    margin-top: 20px;
}

.home-split-left { display: flex; align-items: center; }
.home-split-right { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

.home-hero-media {
    position: relative;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

/* Rundung direkt am Bild statt per overflow:hidden am Container - sonst würde das
   den Schatten der darüberliegenden Feature-Box (.home-glass--overlay) abschneiden. */
.home-hero-img { display: block; width: 100%; height: auto; border-radius: 20px; }

/* Liquid-Glass-Box: Frosted-Glass-Panel mit Login/Neuanmeldung, steht vor dem
   animierten Canvas-Hintergrund der Seite - deshalb weiterhin transparent/blur. */
.home-glass {
    width: 100%;
    padding: 32px 32px 28px;
    border-radius: 18px;
    background: rgba(255,255,255,.5);
    /* Wichtig: nur ein leichter Blur - bei starkem Radius (z.B. 18px) verwäscht der
       dünne Canvas-Inhalt dahinter zu einer einheitlichen Fläche und wirkt dann
       wieder wie undurchsichtig, statt als "Glas" erkennbar zu sein. */
    backdrop-filter: blur(4px) saturate(160%);
    -webkit-backdrop-filter: blur(4px) saturate(160%);
    border: 1px solid rgba(255,255,255,.4);
    box-shadow: var(--glass-shadow), 0 16px 48px -8px rgba(0,0,0,.14);
}

[data-theme="dark"] .home-glass {
    background: rgba(20,20,22,.3);
    border-color: rgba(255,255,255,.14);
}

.home-glass h1 { margin: 0 0 12px; font-size: 1.6rem; }
.home-glass .home-intro {
    font-size: 1.15rem;
    color: var(--body-text);
    margin-bottom: 36px;
}
.home-actions { display: flex; gap: 36px; flex-wrap: wrap; }
.home-actions .btn { font-size: 1.05rem; padding: 14px 24px; }
.home-actions .btn .ti-rocket { font-size: 1.3rem; }

/* Overlay-Variante: liegt wie beim Login (layout/auth.php) direkt über der
   Verpackungsgrafik statt frei daneben zu stehen. */
.home-glass--overlay {
    position: absolute;
    width: auto;
    left: -16px;
    right: -16px;
    /* Direkt unter den Tabs beginnen (die als eigene Zeile oberhalb des Bildes liegen) -
       wächst beim Vergrößern nach unten, statt die Tabs selbst zu überdecken. */
    top: 0;
    padding: 28px 32px;
}

/* Nur diese Box: liegt über der Verpackungsgrafik (echte Bilddetails dahinter), nicht
   nur vor dem flachen Seiten-Hintergrund - ein stärkerer Blur ist hier sichtbar sinnvoll. */
#home-overlay-box {
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
}

/* Jetzt Teil der Topbar statt über der Verpackungsgrafik. */
.home-overlay-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.22);
    backdrop-filter: blur(4px) saturate(160%);
    -webkit-backdrop-filter: blur(4px) saturate(160%);
    border: 1px solid rgba(255,255,255,.4);
    box-shadow: var(--glass-shadow), 0 12px 32px -6px rgba(0,0,0,.12);
    opacity: 0;
    transition: opacity .25s ease;
}
.home-overlay-tabs--visible { opacity: 1; }
[data-theme="dark"] .home-overlay-tabs {
    background: rgba(20,20,22,.35);
    border-color: rgba(255,255,255,.14);
}

.home-overlay-tab {
    padding: 12px 20px;
    border-radius: 999px;
    font-size: .98rem;
    font-weight: 600;
    color: var(--body-text);
}
.home-overlay-tab:hover { background: var(--body-bg); text-decoration: none; }
.home-overlay-tab--active { color: var(--body-text); background: #e4e1da; text-shadow: 0 0 .3px currentColor, 0 0 .3px currentColor; }

/* Skaliert mit der Bildschirmhöhe statt fest 340px - auf hohen Displays bleibt
   sonst unten ungenutzter Platz in der Box übrig. */
.home-overlay-panel { max-height: min(420px, 90vh); overflow-y: auto; padding-right: 14px; }

/* Feature-Karten (Neuigkeiten/Funktionen): zwei Karten nebeneinander statt einer Liste */
.home-features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.home-features-card {
    padding: 18px 16px;
    border-radius: 10px;
    background: rgba(255,255,255,.7);
    border: 1px solid rgba(255,255,255,.5);
}
[data-theme="dark"] .home-features-card {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.16);
}

.home-features-card .ti { font-size: 1.3rem; color: var(--accent); display: block; margin-bottom: 6px; }
.home-features-card strong { display: block; color: var(--body-text); font-size: .98rem; }
.home-features-card p { margin: 4px 0 0; color: var(--muted-heavy); font-size: .85rem; line-height: 1.4; }

@media (max-width: 480px) {
    .home-features-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .home-split { grid-template-columns: 1fr; }
    .home-glass { text-align: center; }
    .home-actions { justify-content: center; }
    .home-features-item { text-align: left; }
}

@media (max-width: 600px) {
    .home-topbar { padding: 16px 20px 0; }
    .home-shell { padding: 32px 20px 60px; }
    .home-glass { padding: 20px; }
    .home-glass--overlay { left: 12px; right: 12px; bottom: 12px; padding: 14px 16px; }
}
