/* Dream Taken · scroll / paint performance
   Loaded after theme.css. Goal: keep look, stop jank while scrolling. */

/* Ambient fixed layers are the #1 scroll cost — kill them sitewide. */
.dl-bg__flow,
.dl-bg__orb,
.dl-bg__particles {
  display: none !important;
}

.dl-bg {
  contain: strict;
  transform: translateZ(0);
}

.dl-bg__grid {
  animation: none !important;
  opacity: 0.28;
}

/* Header / sticky glass: solid while scrolling, lighter always */
html.is-scrolling .dl-header,
html.is-scrolling .dl-stickybar,
html.is-scrolling .sf-bar,
html.is-scrolling .desk-sticky,
html.is-scrolling .vx-lb,
html.is-scrolling .hs-strike__glass,
html.is-scrolling .hs-ai__panel,
html.is-scrolling .hs-room__cap,
html.is-scrolling .hs-room__live,
html.is-scrolling .hs-browser__chrome,
html.is-scrolling .desk-sales .sf-quote,
html.is-scrolling .sf-page .sf-quote,
html.is-scrolling .desk-sales .sf-bar-wrap .sf-bar {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Freeze decorative motion while the finger/wheel is moving */
html.is-scrolling .dl-orbit--go .dl-orbit__spin,
html.is-scrolling .dl-orbit--go .dl-orbit__icon-wrap,
html.is-scrolling .dl-hero--harbor .dl-hero__partners-runner,
html.is-scrolling .dl-hero--harbor .dl-hero__aura img,
html.is-scrolling .hs-browser__view img.is-on,
html.is-scrolling .hs-room--grow .hs-room__stage img,
html.is-scrolling .hs-room--vis .hs-room__stage img,
html.is-scrolling .hs-room__live::before,
html.is-scrolling .sf-partners__track,
html.is-scrolling .dl-hero__partners-track,
html.is-scrolling [class*="__track"] {
  animation-play-state: paused !important;
}

/* Below-fold sections: skip layout/paint until near viewport */
.hs-rooms,
.dl-sec,
.vx-how,
.vx-faq,
.sf-worries,
.sf-team,
.sf-trust,
.sf-flow,
.combo-faq,
.seo-faq,
.cx-rules,
.cx-else,
.cx-faq,
.dl-footer {
  content-visibility: auto;
  contain-intrinsic-size: 1px 720px;
}

.hs-room__stage img,
.hs-browser__view img {
  will-change: auto;
}

.hs-room.is-offscreen .hs-browser__view img.is-on,
.hs-room.is-offscreen .hs-room__stage img,
.hs-room.is-offscreen .hs-room__live::before {
  animation-play-state: paused !important;
}

/* Soften remaining glass permanently */
.hs-strike__glass,
.hs-ai__panel {
  backdrop-filter: blur(6px) saturate(1.1);
  -webkit-backdrop-filter: blur(6px) saturate(1.1);
}

.dl-header {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Sticky bar: prefer solid over heavy blur */
.desk-sales .sf-bar-wrap .sf-bar,
.desk-sales .sf-bar {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(18, 14, 10, 0.96);
}

/* Don't hold main at opacity 0 forever if boot JS is slow */
body:not(.dl-ready) main {
  animation: dl-main-fallback 0s 0.6s forwards;
}

@keyframes dl-main-fallback {
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .dl-bg__grid,
  .hs-browser__view img.is-on,
  .hs-room--grow .hs-room__stage img {
    animation: none !important;
    filter: none;
  }
}

/* Low-end / coarse pointer */
@media (max-width: 48rem), (pointer: coarse) {
  .dl-bg__grid {
    opacity: 0.15;
  }
  .hs-strike__glass,
  .hs-ai__panel,
  .hs-room__live,
  .hs-room__cap {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}
