/* Axencia.co — Performance: Instant response, minimal lag */

/* Disable will-change — reduces memory, prevents layer explosion */
.space-particle, .space-orb, .space-grid,
.hero-float, .hero-beam, .hero-shine { will-change: auto !important; }

/* Faster animations — 3–4x shorter */
.space-particle { animation-duration: 1.5s !important; }
.space-grid { animation-duration: 4s !important; }
.space-orb { animation-duration: 8s !important; }

/* GPU containment — isolate repaints */
.space-bg { contain: layout paint; }
.space-particles { contain: layout paint; }
.space-grid { contain: layout paint; }

/* Lighter blur — filter is expensive */
.space-orb { filter: blur(25px); opacity: 0.3; }

/* Fewer particles — 3 on mobile, 6 on desktop */
@media (max-width: 768px) {
  .space-particle:nth-child(n+4) { display: none !important; }
  /* Mobile: lighter animations, faster transitions */
  .space-particle { animation-duration: 1.2s !important; }
  .space-grid { animation-duration: 3s !important; }
  .space-orb { animation-duration: 6s !important; filter: blur(20px); opacity: 0.25; }
  /* Reduce backdrop-filter cost on mobile */
  .mobile-bottom-bar::before { -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
}
@media (min-width: 769px) {
  .space-particle:nth-child(n+7) { display: none !important; }
}

/* Content visibility for below-fold sections */
.section { content-visibility: auto; contain-intrinsic-size: auto 400px; }
.expertise-grid,
.ci-grid,
.plans-grid,
.globe-section { content-visibility: auto; }

/* Faster transitions — 0.15s max (hero buttons keep smooth 0.3s) */
* {
  -webkit-tap-highlight-color: transparent;
}
a, button, .expertise-card, .plan-card, .globe-feature,
.dev-highlight-banner, .globe-stat, .globe-feature {
  transition-duration: 0.15s !important;
  transition-timing-function: ease-out !important;
}

/* Hero buttons — smooth hover animation (override performance) */
.hero-actions .btn {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.35s ease, box-shadow 0.35s ease, border-color 0.3s ease,
    color 0.25s ease !important;
}

/* Respect reduced motion - disable heavy animations */
@media (prefers-reduced-motion: reduce) {
  .space-particle,
  .space-grid,
  .space-orb,
  .hero-float,
  .hero-beam,
  .hero-shine,
  .hero-bg::before,
  .hero-bg::after,
  .hero::before {
    animation: none !important;
  }
  .space-orb { filter: blur(30px); opacity: 0.5; }
  .hero-float { opacity: 0.6; }
  .page-header .section-tag::before,
  .hero-page-header .hero-content .section-tag::before,
  .cs-hero .section-tag.cs-hero-tag::before,
  .section-header .section-tag::before,
  .section-tag::before {
    animation: none;
    box-shadow: 0 0 8px rgba(96, 165, 250, 0.5);
  }
}
