/* Honeybadger performance overrides — smoother scroll + film video */

/* Smooth scroll on html makes long pages feel laggy; keep native wheel */
html {
  scroll-behavior: auto !important;
}

/* Promote video to its own layer; CSS filters on <video> are a major stutter source */
.film__video {
  filter: none !important;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Soften grain: mix-blend + repeating gradients are expensive every frame */
.film__grain {
  opacity: 0.035 !important;
  mix-blend-mode: soft-light !important;
  will-change: auto;
}

html.is-scrolling .film__grain,
html.is-film-playing .film__grain {
  opacity: 0 !important;
  visibility: hidden;
}

/* During playback, skip Ken-Burns filter animations on stills (video is the hero) */
html.is-film-playing .film__shot:is(.is-active, .is-previous) img {
  animation: none !important;
  will-change: auto !important;
  transform: scale(1.06);
  filter: brightness(0.82) saturate(0.78) contrast(1.12);
}

/* Cheaper blur during scroll / always slightly cheaper */
.nav,
.hero__ledger {
  -webkit-backdrop-filter: blur(8px) !important;
  backdrop-filter: blur(8px) !important;
}

html.is-scrolling .nav,
html.is-scrolling .hero__ledger {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: #020303f0 !important;
}

html.is-scrolling .hero__ledger {
  background: #07131cf2 !important;
}

/* Pause infinite marquee while the user is scrolling */
html.is-scrolling .signal__track {
  animation-play-state: paused !important;
}

/* Skip painting off-screen sections until needed */
.manifesto,
.mandate,
.portfolio,
.principle,
.approach,
.network,
.principal,
.closing,
.footer,
.signal {
  content-visibility: auto;
  contain-intrinsic-size: 1px 720px;
}

/* Anchor targets without smooth-behavior jank */
[id] {
  scroll-margin-top: 5.5rem;
}

/* Contain film compositor work */
.film {
  transform: translateZ(0);
  contain: layout style paint;
}

.film__video,
.film__shots,
.film__shot img {
  max-width: none;
}

/* Prefer reduced paint on large decorative orbs while scrolling */
html.is-scrolling .network__orb,
html.is-scrolling .portfolio-card:before,
html.is-scrolling .mandate-card:before {
  opacity: 0 !important;
}
