/**
 * Mobile / low-end performance — applied when html.perf-lite is set
 */

html.perf-lite {
  scroll-behavior: auto;
}

/* No expensive backdrop blur */
html.perf-lite .site-header,
html.perf-lite .filter-tabs,
html.perf-lite .portfolio-tabs,
html.perf-lite .service-tabs,
html.perf-lite .main-header {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: var(--site-header-bg) !important;
}

/* Lighter page transitions */
html.perf-lite #page-transition-root,
html.perf-lite.page-transitions-ready #page-transition-root {
  will-change: auto !important;
  transform: none !important;
}

html.perf-lite.page-transitions-ready body.is-entering #page-transition-root,
html.perf-lite.page-transitions-ready body:not(.is-loaded):not(.is-navigating) #page-transition-root,
html.perf-lite.page-transitions-ready body.is-navigating #page-transition-root {
  transform: none !important;
}

html.perf-lite.page-transitions-ready body.is-loaded #page-transition-root {
  transition: opacity 0.18s ease !important;
}

/* Scroll reveal — instant */
html.perf-lite .gm-reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Decorative grids & blurs */
html.perf-lite .gm-hero-wrap::before,
html.perf-lite .gm-showcase-wrap::before,
html.perf-lite .gm-services-wrap::before,
html.perf-lite .gm-steps-wrap::before,
html.perf-lite .gm-about-wrap::before,
html.perf-lite .gm-pricing-wrap::before,
html.perf-lite .gm-clients-wrap::before,
html.perf-lite .gm-testimonials-wrap::before,
html.perf-lite .gm-cta-wrap::before,
html.perf-lite .gm-marquee-wrap::before {
  display: none !important;
}

html.perf-lite .hero-glow {
  display: none !important;
}

/* Filter / card animations */
html.perf-lite .filter-item-enter,
html.perf-lite .review-card {
  animation: none !important;
}

html.perf-lite .marquee-dot {
  animation: none !important;
}

/* Theme toggle spin */
html.perf-lite .theme-toggle.is-to-light,
html.perf-lite .theme-toggle.is-to-dark,
html.perf-lite .theme-toggle.is-to-light .theme-icon,
html.perf-lite .theme-toggle.is-to-dark .theme-icon {
  animation: none !important;
}

/* Progress bar — static on lite */
html.perf-lite #page-progress.is-active:not(.is-complete) .page-progress-bar {
  animation: none !important;
  width: 72% !important;
  opacity: 0.85;
}

/* Paused marquees (toggled by JS when off-screen) */
.marquee-track.is-paused,
.clients-marquee.is-paused {
  animation-play-state: paused !important;
}

/* Below-fold sections — skip layout work until near viewport */
@media (max-width: 768px) {
  html.perf-lite .gm-services-wrap,
  html.perf-lite .gm-steps-wrap,
  html.perf-lite .gm-about-wrap,
  html.perf-lite .gm-pricing-wrap,
  html.perf-lite .gm-clients-wrap,
  html.perf-lite .gm-testimonials-wrap,
  html.perf-lite .gm-cta-wrap,
  html.perf-lite .main-footer {
    content-visibility: auto;
    contain-intrinsic-size: auto 480px;
  }
}
