/* Mobile performance layer: keeps all controls and content intact while
   avoiding effects that trigger continuous, full-screen GPU repaints. */

@media (max-width: 820px), (pointer: coarse) {
    html {
        scroll-behavior: auto !important;
    }

    body::before,
    body::after,
    .hero::before,
    .hero::after,
    .main-content::before,
    .main-content::after {
        animation: none !important;
        transform: none !important;
    }

    /* Decorative particles are the main source of mobile scroll jank. */
    .particles,
    .particle-field,
    .particle,
    .glow-particle,
    .glow-orb,
    .energy-orb,
    .floating-music-note {
        display: none !important;
        animation: none !important;
        filter: none !important;
        box-shadow: none !important;
    }

    /* Backdrop blur is particularly expensive on fixed and scrolling layers. */
    .navbar,
    .nav-menu,
    .fixed-player,
    .player-card,
    .content-section,
    .notification,
    .notification-inner,
    .modal,
    .modal-content,
    .glass,
    [class$="-card"],
    [class*="-card "] {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }

    .navbar,
    .nav-menu {
        background-color: rgba(10, 15, 31, 0.97) !important;
    }

    .fixed-player,
    .notification,
    .notification-inner {
        background-color: rgba(15, 23, 42, 0.97) !important;
    }

    /* Preserve the glow look as a static effect instead of repainting it. */
    .glow-text,
    .section-title,
    .live-dot,
    .online-dot,
    .status-dot,
    .download-icon,
    .logo {
        animation: none !important;
    }

    main > section,
    .content-section,
    .feature-grid,
    .team-grid,
    .timeline,
    footer {
        content-visibility: auto;
        contain-intrinsic-size: 1px 500px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
