/* Keep the desktop sequence, but let compact screens scroll through its content. */
@media (max-width: 600px), (max-height: 540px), (prefers-reduced-motion: reduce) {
    #video-sequence {
        height: auto;
        min-height: 0;
    }

    .video-sticky-container {
        position: relative;
        height: auto;
        min-height: 0;
        padding: 100px 0 36px;
    }

    #video-sequence .hero-layer {
        position: relative;
        height: auto;
        padding: 20px 0;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
        transition: none;
    }

    #video-sequence .scroll-indicator {
        display: none;
    }
}

@media (max-width: 1024px) {
    .hero-features-grid,
    .hero-stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: clamp(8px, 2vw, 20px);
        padding-inline: 0;
    }

    .hero-stat {
        padding: 18px 8px;
    }

    .hero-stat-number {
        font-size: clamp(1.35rem, 5vw, 2.5rem);
    }

    .hero-stat-label {
        font-size: clamp(.63rem, 1.6vw, .8rem);
        letter-spacing: .04em;
        overflow-wrap: anywhere;
    }

    .hero-stats-title {
        margin-bottom: 24px;
    }
}

@media (max-width: 900px) {
    #header .container {
        justify-content: space-between;
    }

    #header .container > div:last-child,
    #header .desktop-nav {
        display: none;
    }

    #header .mobile-menu-toggle {
        display: inline-grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
        color: var(--text-white);
        background: var(--bg-card);
        border: 1px solid var(--glass-border);
        border-radius: 10px;
    }

    #header.mobile-open .desktop-nav {
        display: block;
        position: absolute;
        inset: 100% 0 auto;
        max-height: calc(100vh - 100px);
        max-height: calc(100dvh - 100px);
        overflow-y: auto;
        padding: 8px 20px;
        background: var(--bg-dark);
        border-bottom: 1px solid var(--glass-border);
    }

    #header .nav-links { display: grid; gap: 0; }
    #header .nav-link { display: block; padding: 12px 0; }
}

@media (max-width: 600px) {
    .hero-actions .btn {
        flex: 0 1 auto;
    }

    .hero-feature-card {
        overflow-wrap: anywhere;
    }

    .home-card-grid {
        gap: 20px !important;
    }
}

@media (max-width: 768px), (max-height: 540px) {
    #cookieBanner {
        max-height: 70vh;
        max-height: 70dvh;
        overflow-y: auto;
    }
}
