/* Mobile Responsive */
@media (max-width: 650px) {
    #scroll-container {
        display: none;
    }

    #scroll-headline {
        display: none;
    }
}
    @media (min-width: 651px) {
    #statistik {
        display: none;
    }
}

#scroll-container {
    position: relative;
    width: 100%;
    /* Gesamthöhe bestimmt die Scroll-Länge der Animation */
    height: 158vh; 
    margin: 0;
    margin-top: -80vh;
    z-index: 1;
    transition: all .5s ease-in-out;
}

@media (max-width: 1200px) {
    #scroll-container 
    {
        height: 150vh;
        margin-top: -90vh;
    }

}

#glow-section{
    z-index: 2;
}

.tilted-section{
    z-index: 2;
}

/* Spacer: Schiebt den Text aus dem ersten sichtbaren Bereich */
.text-spacer {
    height: 100vh; /* Exakt eine Bildschirmhöhe leerer Raum */
}

/* --- LAYER 1: GLOBE (Sticky) --- */
.sticky-globe-layer {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    z-index: 2;
    /* Flexbox hilft nicht beim Canvas-Inhalt, aber zentriert das Canvas-Element selbst */
    display: flex;
    justify-content: center;
}

#myCanvas {
    display: block;
    max-width: 1920px;
    filter: drop-shadow(10px -20px 20px rgba(129, 37, 37, 0.425));
    animation: earthGlow 5s ease-in-out infinite;
}




/* Der Verlauf unten (sauber positioniert) */
.gradient-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: min(20%, 10vw);
    background: linear-gradient(to top, #202020 0%, transparent 100%);
    pointer-events: none;
    z-index: 3;
}

/* --- LAYER 2: TEXT (Scrolling) --- */
.scrolling-text-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Nimmt die volle Höhe des Containers (300vh) an */
    z-index: 1;
    pointer-events: none; /* Wichtig: Lässt Maus-Events zum Scrollen durch, wenn kein Text da ist */
}

.stat-row {
    display: flex;
    justify-content: center;
    gap: 10vw;
    padding: 2rem 5%;
}

.stat-item {
    text-align: start;
    color: #fff;
    transform: translateY(-15%);
}

.stat-item .highlight {
    color: var(--c-red);
    font-family: 'Bebas Neue', 'Be Vietnam Pro', sans-serif;
}

.stat-item:nth-child(2) {
    transform: translateY(-80%);
}

.stat-item h2 { 
    margin: 0; 
    margin-bottom: -20px;
    font-family: 'Bebas Neue', 'Be Vietnam Pro', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: clamp(1rem, 8vw, 5rem);
    letter-spacing: -1%;
}
.stat-item p { color: var(--c-text-secondary); margin-top: 0.5rem; }

/* --- LAYER 3: SVG --- */

.overlay-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none; /* Klicks gehen durch */
    
    /* Optional: Leuchteffekt */
    filter: drop-shadow(0 0 5px rgba(255, 50, 50, 0.7));
}

#globe-svg-overlay {
    position: absolute;
    top: 0;
    left: 50%;
    /* Breite und Höhe werden vom JS gesetzt */
    z-index: 3;
    pointer-events: none;
    transform-origin: top left;
    max-width: 1920px;

    /* Standardmäßig unsichtbar und mit sanftem Übergang */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

#globe-svg-overlay svg {
    width: 100%;
    height: 100%;
    display: block;
}

.network-line {
    opacity: 0;
    fill: none; 
    stroke-dasharray: var(--length);
    stroke-dashoffset: var(--length);
}

.network-line.animating {
    animation: draw-fade 3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes draw-fade {
    0% { opacity: 1; stroke-dashoffset: var(--length); }
    40% { opacity: 1; stroke-dashoffset: 0; }
    70% { opacity: 1; stroke-dashoffset: 0; }
    100% { opacity: 0; stroke-dashoffset: 0; }
}