/* Stonebridge Continuous Bridge Environment V7
   Universal 60% opening dim hotfix.
   Remove only legacy hero background layers on homepage + normal pages.
   Preserve all real content images and media.
*/

html.sb-bridge-ready,
html.sb-bridge-ready body.sb-continuous-bridge {
  background-color: #050504;
}

body.sb-continuous-bridge {
  --sb-bridge-darkness: .60;
  --sb-bridge-tint: .08;
  position: relative;
  isolation: isolate;
  background-color: transparent !important;
}

#sb-continuous-bridge-environment {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 50% 18%, rgba(176, 128, 62, var(--sb-bridge-tint)), transparent 58%),
    url('/assets/images/stonebridge-bridge-approved-4k.webp');
  background-size: cover, cover;
  background-repeat: no-repeat;
  background-position: center, center 18%;
  transform: translateZ(0);
  overflow: hidden;
}

#sb-continuous-bridge-environment::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(3,3,3,.72), #030303 100%);
  opacity: var(--sb-bridge-darkness);
  pointer-events: none;
}

body.sb-continuous-bridge main,
body.sb-continuous-bridge .page-main,
body.sb-continuous-bridge .site-main,
body.sb-continuous-bridge .landing-main,
body.sb-continuous-bridge main > section,
body.sb-continuous-bridge .page-main > section,
body.sb-continuous-bridge .site-main > section,
body.sb-continuous-bridge .landing-main > section {
  background-color: transparent !important;
}

body.sb-continuous-bridge.sb-page-landing {
  --sb-bridge-darkness: .60;
}

/* Homepage + normal pages: hero wrapper itself must not render a separate bridge image. */
body.sb-page-home .page-hero,
body.sb-page-home .home-hero,
body.sb-page-home .service-hero,
body.sb-page-home .hero-section,
body.sb-page-standard .page-hero,
body.sb-page-standard .home-hero,
body.sb-page-standard .service-hero,
body.sb-page-standard .hero-section {
  background-color: transparent !important;
  background-image: none !important;
}

body.sb-page-home .page-hero::before,
body.sb-page-home .page-hero::after,
body.sb-page-home .home-hero::before,
body.sb-page-home .home-hero::after,
body.sb-page-home .service-hero::before,
body.sb-page-home .service-hero::after,
body.sb-page-home .hero-section::before,
body.sb-page-home .hero-section::after,
body.sb-page-standard .page-hero::before,
body.sb-page-standard .page-hero::after,
body.sb-page-standard .home-hero::before,
body.sb-page-standard .home-hero::after,
body.sb-page-standard .service-hero::before,
body.sb-page-standard .service-hero::after,
body.sb-page-standard .hero-section::before,
body.sb-page-standard .hero-section::after {
  background-image: none !important;
}

/* Only background-carrier elements are suppressed. Real content images are untouched. */
body.sb-page-home .page-hero-bg,
body.sb-page-home .home-hero-bg,
body.sb-page-home .hero-bg,
body.sb-page-home [class*="hero-bg"],
body.sb-page-home [class*="hero__bg"],
body.sb-page-home [class*="hero-background"],
body.sb-page-home [class*="bridge-bg"],
body.sb-page-standard .page-hero-bg,
body.sb-page-standard .home-hero-bg,
body.sb-page-standard .hero-bg,
body.sb-page-standard [class*="hero-bg"],
body.sb-page-standard [class*="hero__bg"],
body.sb-page-standard [class*="hero-background"],
body.sb-page-standard [class*="bridge-bg"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  background: none !important;
  background-image: none !important;
}

/* V7 safety class added only to detected decorative hero background carriers. */
body.sb-page-home .sb-legacy-hero-background,
body.sb-page-standard .sb-legacy-hero-background {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  background: none !important;
  background-image: none !important;
}

/* Recovery from earlier overreach: never hide legitimate images/media. */
body.sb-page-home img,
body.sb-page-home picture,
body.sb-page-home video,
body.sb-page-home canvas,
body.sb-page-standard img,
body.sb-page-standard picture,
body.sb-page-standard video,
body.sb-page-standard canvas {
  visibility: inherit;
}

@media (max-width: 760px) {
  #sb-continuous-bridge-environment {
    background-position: center, center top;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.sb-continuous-bridge {
    --sb-bridge-darkness: .70 !important;
  }
  #sb-continuous-bridge-environment {
    transform: none;
  }
}
