/* Non-visual performance optimizations for rendering and motion */
.section,
.content-section,
.client-testimonials,
.clients,
.calculator,
.gated-resources,
.faq,
.portfolio,
.services,
.about,
.contact,
.industries,
.solutions,
.blog-posts {
  content-visibility: auto;
  contain-intrinsic-size: 1px 900px;
}

/* Keep above-the-fold and interactive overlays immediately rendered */
.header,
.hero,
.page-header,
.footer,
.loader-wrapper,
.cookie-banner,
.back-to-top,
.resource-modal-overlay {
  content-visibility: visible;
}

/* Improve compositing for frequently animated tracks */
.marquee-content,
.testimonial-track,
.reviews-track {
  will-change: transform;
}

/* Respect user preference and reduce costly continuous animations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Reserve space for animated hero content to reduce CLS */
.hero-title {
  min-height: 2.5em;
}

.hero-title .typewrite,
.hero-title .typewrite .wrap {
  display: inline-block;
  min-height: 1.2em;
}

.fomo-badge {
  min-height: 44px;
}

/* Improve Lighthouse mobile accessibility touch target sizing */
.r-dot {
  min-width: 44px;
  min-height: 44px;
}

/* Ensure links are distinguishable without relying only on color */
.footer-bottom a,
.footer-links a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.whatsapp-btn {
  color: #062413 !important;
  font-weight: 700;
}

.feature-text h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--text-white);
}

.client-info h3 {
  font-size: 1.2rem;
  margin: 0 0 4px;
  color: var(--text-white);
}

/* Mobile-specific performance and CLS controls */
@media screen and (max-width: 768px) {
  .loader-wrapper {
    display: none !important;
  }

  .hero-title {
    min-height: 3.4em;
  }

  .hero-title .typewrite,
  .hero-title .typewrite .wrap {
    min-width: 14ch;
  }

  .fomo-badge::before,
  .pulse-btn,
  .btn-primary,
  .typewrite > .wrap {
    animation: none !important;
  }

  .hero-circle,
  .hero-dev-element,
  .dev-circle,
  .dev-code {
    display: none !important;
  }

  .btn-primary,
  .pulse-btn {
    box-shadow: 0 4px 10px rgba(0, 229, 255, 0.22) !important;
  }

  .header,
  .nav-links,
  .review-card,
  .calc-wrapper,
  .resource-modal-overlay {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .fomo-badge,
  .hero-description,
  .hero-buttons,
  .testimonial-dots,
  #reviewsDots {
    contain: layout paint;
  }

  .testimonial-dots,
  #reviewsDots {
    min-height: 44px;
  }

  /* Skip expensive marquee rendering on small screens only */
  .clients .marquee-row:nth-child(2) {
    display: none;
  }
}
