/* ============================================================
   ГК Две столицы — perf.css
   Быстродействие и упрощение мобильной версии.
   Подключается ПОСЛЕДНИМ стилем на всех страницах (после redesign.css).

   1) content-visibility: не рендерить секции ниже первого экрана;
   2) .anim-paused — пауза бесконечных анимаций вне вьюпорта
      (класс ставит main.js через IntersectionObserver);
   3) ≤768px — мобильная версия без blur-орбов, backdrop-стекла,
      частиц, glow-стака карточек и тяжёлых теней;
   4) ≤768px — reveal-блоки сразу в финальном состоянии;
   5) тач (hover:none) — бесконечные анимации выключены полностью.
   ============================================================ */

/* ---------- 1. Секции ниже fold ---------- */
main > section:not(.hero) {
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
}

/* ---------- 2. Пауза бесконечных анимаций вне вьюпорта ---------- */
.anim-paused,
.anim-paused::before,
.anim-paused::after {
    animation-play-state: paused !important;
}

/* ---------- 3–4. Упрощение мобильной версии (≤768px) ---------- */
@media (max-width: 768px) {

    /* Фоновые частицы */
    .particle-container {
        display: none !important;
    }

    /* Backdrop-стекло → плоские поверхности */
    *,
    *::before,
    *::after {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }

    /* Blur-орбы (градиентные подсветки секций) */
    .types-section::before,
    .finishing-section::before,
    .photo-gallery::before,
    .price-section::before,
    .why-section::before,
    .calculator-section::before,
    .dostavka-hero::before,
    .dostavka-hero::after,
    .dostavka-steps::before,
    .svc-hero::before,
    .svc-hero::after,
    .kpp-objects-section::before,
    .kpp-objects-section::after,
    .kpp-sizes-section::before,
    .kpp-equip-section::before,
    .kpp-price-section::before,
    .search-section::before,
    .use-cases-section::before,
    .bzv-products-section::before,
    .products-section::before,
    .checklist-section::before,
    .str-benefits-section::before,
    .contact-cta-grid::before {
        filter: none !important;
    }

    /* Glow-стак карточек (многослойные тени redesign) → одна простая тень */
    .whom-card,
    .gallery-card,
    .gallery-card--featured,
    .kpp-equip-card,
    .kpp-price-card,
    .kpp-price-card--hit,
    .mz-catalog-card,
    .mz-finishing-card,
    .mz-finishing-card--hit,
    .mz-price-card,
    .mz-price-card--hit,
    .price-card,
    .price-card--list,
    .product-card,
    .search-result,
    .service-card,
    .solution-card,
    .solution-card--featured,
    .stage-card,
    .stage-card--horizontal,
    .step-card,
    .str-benefit-card,
    .str-tech-card,
    .svc-card,
    .svc-card--wide,
    .type-card,
    .usage-card,
    .use-case-card,
    .why-card,
    .bzv-compare-card,
    .bzv-tech-card,
    .contact-cta-card {
        box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .65) !important;
    }

    /* Reveal — сразу финальное состояние (без анимации появления) */
    .reveal,
    .reveal .stat-item {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ---------- 5. Тач: бесконечные анимации выключить полностью ---------- */
@media (hover: none) and (pointer: coarse) {
    .particle,
    .marquee-logos-track,
    .glass-border-glow,
    .calc-fab,
    .search-submit,
    .section-subtitle,
    .glass-border-glow::before,
    .calc-fab::before,
    .search-submit::before,
    .section-subtitle::before {
        animation: none !important;
    }
}
