/* ─── PERFORMANCE TIERS ──────────────────────────────────── */

/* Touch-устройства: убираем cursor, hover-эффекты, тяжёлые тени */
.is-touch #cursor-ring,
.is-touch #cursor-dot { display: none !important; }
.is-touch body { cursor: auto !important; }
.is-touch .btn-glow,
.is-touch .btn-ghost,
.is-touch a { cursor: pointer !important; }

/* Touch: reveal-анимации отключены — показывать элементы сразу, без мигания */
.is-touch .reveal,
.is-touch .reveal-l,
.is-touch .reveal-r {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Low-end: отключаем все тяжёлые эффекты */
.perf-low .mesh-blob { display: none; }
.perf-low .case-card,
.perf-low .review-card,
.perf-low .svc-card { box-shadow: 0 2px 12px rgba(0,0,0,0.4) !important; transition: none !important; }
.perf-low .stat-item::before { display: none; }
.perf-low .eyebrow-dot { animation: none !important; box-shadow: none !important; }
.perf-low #particles-canvas { display: none; }

/* Save-data / slow network: убираем тяжёлые эффекты */
.save-data #particles-canvas { display: none; }
.save-data .mesh-blob { display: none; }
.save-data .hero-aurora { display: none; }
.save-data * { box-shadow: none !important; text-shadow: none !important; }
.save-data .holo-shine { display: none !important; }

/* Desktop-only: cursor: none на карточках чтобы custom cursor работал */
.is-desktop .svc-card:hover,
.is-desktop .case-card:hover,
.is-desktop .review-card:hover { cursor: none; }

/* prefers-reduced-motion — системная настройка */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* GPU-хинты для анимируемых элементов */
.mesh-blob, .hero-scroll-hint, #cursor-ring { will-change: transform; }
#cursor-dot { will-change: left, top; }
#progress-bar { will-change: width; }

/* ─── RESPONSIVE ────────────────────────────────────────── */
/* RESPONSIVE */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .reviews-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  section { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
  .container { padding-left: 1.25rem; padding-right: 1.25rem; }
  #hero { overflow: visible; }
  .hero-content { padding: 2rem 1.75rem !important; max-width: 100%; box-sizing: border-box; width: 100%; }
  .hero-desc { overflow-wrap: break-word; max-width: 100%; padding: 0; }
  .hero-title { letter-spacing: -2px; }
  nav { padding: 1rem 1.5rem; }
  nav.scrolled { padding: 0.75rem 1.5rem; }
  .burger { display: flex; }
  .nav-links {
    position: fixed; right: -100%; top: 0; height: 100vh; width: 70%;
    background: rgba(5,5,15,0.97); flex-direction: column;
    justify-content: center; align-items: center; gap: 2.5rem;
    transition: right 0.4s cubic-bezier(0.4,0,0.2,1);
    border-left: 1px solid rgba(255,255,255,0.06);
    z-index: 999;
  }
  .nav-links.open { right: 0; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3) { border-top: 1px solid rgba(255,255,255,0.05); }
  .services-grid { grid-template-columns: 1fr; }
  .cases-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr 1fr; }
  .process-steps::before { display: none; }
  .reviews-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 4rem; }
  .exp-pill { right: 0; bottom: -1rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  footer { flex-direction: column; gap: 1rem; text-align: center; }
  .foot-socials { justify-content: center; }
  .foot-social { width: 44px; height: 44px; }
  .cta-inner { padding: 3rem 1.5rem; }
  .cta-guarantees { flex-direction: column; gap: 0.5rem; }
  .cta-g-sep { display: none; }
  .cta-g-item { padding: 0; }
  #cursor-ring, #cursor-dot { display: none; }
  body { cursor: auto; }
  .btn-glow, .btn-ghost, .f-submit, a { cursor: pointer; }
  .f-row { grid-template-columns: 1fr; }
  .case-kpi { flex-wrap: wrap; }
  .s-sub { max-width: 100%; }
}
@media (max-width: 480px) {
  section { padding: 5rem 1.25rem; }
  .hero-title { letter-spacing: -2px; }
  .typing-wrap { min-width: 0 !important; width: 100%; }
  .hero-scroll-hint { display: none; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .cta-inner { padding: 2.5rem 1.25rem; }
  footer { padding: 2rem 1.25rem; }
  .stat-n { font-size: 2.8rem; }
  .about-grid { gap: 3rem; }
  .exp-pill { right: 0.5rem; bottom: -0.5rem; padding: 1rem 1.5rem; }
  .exp-pill .num { font-size: 2rem; }
  .hero-badges-row { gap: 1rem; }
  nav { padding: 1rem; }
  .form-box { padding: 1.5rem 1.25rem; }
  #tech { padding: 4rem 0; }
  .review-card { width: 260px; }
  .rts-item { padding: 0 0.75rem; }
  .rts-sep { height: 1.5rem; }
  .review-form-wrap { padding: 1.5rem; }
  .rfm-head { flex-direction: column; align-items: flex-start; }
  .rfm-row { grid-template-columns: 1fr; }
  .rfm-foot { flex-direction: column; align-items: stretch; }
  .rv-submit { justify-content: center; }
}
@media (max-width: 375px) {
  .hero-title { font-size: clamp(2rem, 10vw, 3rem); }
  .hero-badges-row { flex-wrap: wrap; }
  .contact-grid { gap: 2rem; }
  .f-row { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: 1fr; }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item { border-right: none; border-top: 1px solid rgba(255,255,255,0.05); }
  .stat-item:first-child { border-top: none; }
}
