/* TSWG_LCP_MOBILE_PERFORMANCE_RESCUE_PASS1 */

/*
  Purpose:
  - Reduce mobile LCP and CLS pressure.
  - Keep layout visible.
  - Stop decorative animation cost on mobile.
  - Avoid touching PHP routing, database, schema, index.php, or request.php.
*/

html[data-tswg-lcp-rescue="1"] img{
  max-width:100%;
  height:auto;
}

/* Reserve stable space for hero/landing media to reduce layout shift */
.landing_header_bg,
.landing_header_bg.dynamic-bg,
.landing_section,
.landing_section_in{
  contain:layout paint;
}

/* Mobile: keep the hero readable but stop expensive visual movement */
@media (max-width:768px){
  html[data-tswg-lcp-rescue="1"] .landing_header_bg,
  html[data-tswg-lcp-rescue="1"] .landing_header_bg.dynamic-bg{
    background-position:center center !important;
    background-size:cover !important;
  }

  html[data-tswg-lcp-rescue="1"] .dollar-bubbles,
  html[data-tswg-lcp-rescue="1"] .dollar-bubbles span,
  html[data-tswg-lcp-rescue="1"] .money-rain-container,
  html[data-tswg-lcp-rescue="1"] [class*="money-rain"],
  html[data-tswg-lcp-rescue="1"] [class*="ripple"],
  html[data-tswg-lcp-rescue="1"] [class*="pulse"],
  html[data-tswg-lcp-rescue="1"] [class*="float"],
  html[data-tswg-lcp-rescue="1"] .drift-note,
  html[data-tswg-lcp-rescue="1"] .tswg_desc_pill{
    animation:none !important;
    transition:none !important;
  }

  /* Lower paint cost from huge shadows/filters on mobile */
  html[data-tswg-lcp-rescue="1"] *{
    scroll-behavior:auto !important;
  }

  html[data-tswg-lcp-rescue="1"] .tswg_welcome_title_layer,
  html[data-tswg-lcp-rescue="1"] .footer_showcase,
  html[data-tswg-lcp-rescue="1"] [class*="showcase"],
  html[data-tswg-lcp-rescue="1"] [class*="glass"],
  html[data-tswg-lcp-rescue="1"] [class*="glow"]{
    box-shadow:none !important;
    filter:none !important;
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
  }

  /* Below-the-fold embeds/popups should not compete with first render */
  html[data-tswg-lcp-rescue="1"] .em-ad,
  html[data-tswg-lcp-rescue="1"] .em-banner,
  html[data-tswg-lcp-rescue="1"] .landing-sticky-footer-in{
    contain:layout paint;
  }
}

/* Reduced motion everywhere */
@media (prefers-reduced-motion: reduce){
  html[data-tswg-lcp-rescue="1"] *,
  html[data-tswg-lcp-rescue="1"] *::before,
  html[data-tswg-lcp-rescue="1"] *::after{
    animation:none !important;
    transition:none !important;
    scroll-behavior:auto !important;
  }
}
