/* EcomHutsy scroll performance layer — desktop + mobile.
   Goal: buttery native scroll without killing hero identity. */

html {
  scroll-behavior: auto !important;
}

body {
  overscroll-behavior-y: none;
}

/* While the user is actively scrolling, pause continuous GPU work
   on known heavy stages only (avoid universal * style thrash). */
html.eh-scrolling .product-universe-map,
html.eh-scrolling .product-universe-map *,
html.eh-scrolling .services-constellation,
html.eh-scrolling .services-constellation *,
html.eh-scrolling .home-core-stage,
html.eh-scrolling .home-core-stage *,
html.eh-scrolling .global-globe,
html.eh-scrolling .global-globe *,
html.eh-scrolling .feature-showcase,
html.eh-scrolling .feature-showcase *,
html.eh-scrolling .deep-dive-section,
html.eh-scrolling .deep-dive-section *,
html.eh-scrolling .security-glass-orbit,
html.eh-scrolling .security-glass-orbit *,
html.eh-scrolling .integration-marquee,
html.eh-scrolling .integration-marquee *,
html.eh-scrolling .eh-orbit,
html.eh-scrolling .eh-orbit * {
  animation-play-state: paused !important;
}

/* Keep hero cores gently alive even during scroll (cheap transform-only). */
html.eh-scrolling .product-universe-core > img,
html.eh-scrolling .services-core > img,
html.eh-scrolling .home-core-stage > img {
  animation-play-state: running !important;
}

/* Offscreen hosts paused via IntersectionObserver. */
.eh-offscreen,
.eh-offscreen * {
  animation-play-state: paused !important;
}

/* ---- Pointer / crystal ambient: freeze (was repainting whole page) ---- */
body.crystal-site::before {
  background: radial-gradient(circle 310px at 50vw 28vh, rgba(255, 179, 71, 0.12), transparent 72%),
    radial-gradient(circle at 18% 82%, rgba(255, 137, 32, 0.08), transparent 28%),
    radial-gradient(circle at 82% 72%, rgba(133, 84, 0, 0.1), transparent 31%) !important;
  transition: none !important;
}

.home-hero-aura,
.pointer-glow,
.site-pointer,
.ambient-pointer,
[class*="pointer-glow"] {
  display: none !important;
}

/* ---- Sticky header: opaque glass look without live backdrop blur ---- */
.site-header,
.crystal-site .site-header {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: #fffffff2 !important;
}

.crystal-site .site-header.is-scrolled,
.site-header.is-scrolled {
  background: #fffffff7 !important;
  box-shadow: 0 10px 28px #201f1a14 !important;
}

.crystal-site .site-brand,
.crystal-site .site-nav {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* Sandwich / site nav panel must be fully opaque on every device. */
.site-nav,
.site-nav.is-open,
.crystal-site .site-nav,
.crystal-site .site-nav.is-open {
  background: #ffffff !important;
  background-image: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  opacity: 1 !important;
  isolation: isolate;
  z-index: 80;
}

.site-nav > a:not(.site-dashboard),
.crystal-site .site-nav > a:not(.site-dashboard) {
  background: #ffffff !important;
}

.site-nav > a:not(.site-dashboard):hover,
.crystal-site .site-nav > a:not(.site-dashboard):hover {
  background: #f3f7ff !important;
}

/* ---- Crystal cards: keep color, drop expensive live blur ---- */
:root {
  --crystal-filter: none;
}

.crystal-site,
.crystal-site.object-glass,
body.crystal-site {
  --crystal-filter: none;
}

.crystal-site :is(
  .site-header,
  .mac-frame,
  .mac-sidebar,
  .mac-experience,
  .feature-tree-core,
  .deep-dive-metrics,
  .synthetic-workspace,
  .faq-list details,
  .integration-logo,
  .service-disclaimer,
  .home-node-card,
  .solution-card,
  .proof-card,
  .capability-glass,
  .industry-glass-grid article,
  .workspace-card,
  .service-route-card,
  .why-card,
  .gateway-card,
  .gateway-panel,
  .stat-rail,
  .feature-icon-rail,
  .mac-window,
  .universe-node,
  .universe-system,
  .universe-core-label,
  .product-universe-map,
  .services-constellation,
  .deep-glass-layer,
  .deep-feature-rail > button,
  .deep-feature-rail > a,
  .deep-dive-arrow,
  .feature-scene-copy,
  .trust-logo-flow .integration-logo,
  .dark-integration-grid .integration-logo,
  .button-primary,
  .button-secondary,
  .v3-btn-primary,
  .v3-btn-ghost,
  .site-dashboard,
  .dark-button,
  .eh-offer,
  .eh-modal-panel
),
.site-header,
.mac-frame,
.mac-sidebar,
.mac-experience,
.home-node-card,
.solution-card,
.proof-card,
.workspace-card,
.gateway-card,
.faq-list details,
.product-universe-map,
.services-constellation,
.universe-node,
.universe-system,
.universe-core-label,
.capability-glass,
.industry-glass-grid article,
.service-route-card,
.stat-rail,
.feature-icon-rail,
.mac-window,
.deep-dive-metrics,
.deep-glass-layer,
.deep-feature-rail > button,
.deep-feature-rail > a,
.deep-dive-arrow,
.feature-scene-copy {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* Solid-enough fills so cards still read as glass without blur cost. */
.home-node-card,
.solution-card,
.proof-card,
.workspace-card,
.service-route-card,
.why-card,
.gateway-card,
.faq-list details,
.capability-glass,
.industry-glass-grid article,
.universe-node,
.universe-system,
.universe-core-label {
  background-color: #fffffff0 !important;
}

/* ---- Paint containment for heavy stages ---- */
.product-universe-map,
.services-constellation,
.home-core-stage,
.global-globe,
.feature-showcase,
.deep-dive-section,
.mac-experience {
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: 1px 680px;
}

.feature-showcase,
.deep-dive-section,
.mac-experience {
  contain-intrinsic-size: 1px 520px;
}

/* Heroes above the fold should not defer rendering. */
.universe-hero .product-universe-map,
.services-hero .services-constellation,
.home-hero .home-core-stage {
  content-visibility: visible;
  contain-intrinsic-size: auto;
}

/* Soften continuous decorative animations when far down the page. */
.screen-scan,
.crystalSweep,
[class*="crystalSweep"],
.glassTileShine,
.integrationSheen,
.deepPanelSheen,
.deepPanelFloat {
  animation-duration: 12s !important;
}

/* Prefer compositor-friendly transforms on floating cores. */
.product-universe-core > img,
.services-core > img,
.home-core-stage > img {
  will-change: transform;
  transform: translateZ(0);
}

/* Reduce drop-shadow paint storms on dense icon grids while scrolling. */
html.eh-scrolling .integration-logo img,
html.eh-scrolling .v3-mark img,
html.eh-scrolling .universe-system img,
html.eh-scrolling .product-service-icon img {
  filter: none !important;
}

body.cinematic-lock {
  overflow: visible !important;
}

/* Native momentum on iOS / touch. */
.site-main,
main,
body {
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 900px) {
  .product-universe-map,
  .services-constellation,
  .home-core-stage,
  .global-globe,
  .feature-showcase,
  .deep-dive-section,
  .mac-experience {
    contain-intrinsic-size: 1px 420px;
  }

  /* Keep product graph line animation (desktop benchmark). Soften only services. */
  .services-constellation > svg path {
    animation: none !important;
  }
}

/* Deep-dive carousel arrows: force clean glyphs (avoid mojibake < >). */
.deep-dive-arrow {
  font-family: "Segoe UI Symbol", "Arial Unicode MS", sans-serif !important;
  font-weight: 600;
  letter-spacing: 0;
}
.deep-dive-arrow.is-prev,
.deep-dive-arrow.is-next {
  color: inherit;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
