/* The supplied Rust clip stays behind the page; cards keep their own surfaces. */
body.has-site-background { isolation: isolate; }

.site-background {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: #171819 url('/assets/video/storm-background-poster-20261121-720p60-trim3.webp') center / cover no-repeat;
}
.site-background::after {
  position: absolute;
  inset: 0;
  content: '';
  background: rgba(8, 9, 11, .86);
}
.site-background-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}
.site-background.has-frame:not(.show-poster) .site-background-video { opacity: 1; }
body.has-site-background .site-footer { background: rgba(12, 13, 15, .5); }

.site-background-toggle {
  position: fixed;
  z-index: 1000;
  left: max(14px, env(safe-area-inset-left));
  bottom: max(14px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(244, 244, 237, .2);
  border-radius: 12px;
  background: rgba(17, 18, 20, .85);
  color: #e0e0da;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.site-background-toggle:hover { background: #242628; color: #fff; }
.site-background-toggle:active { background: #303234; }
.site-background-toggle:focus-visible { outline: 2px solid #f4f4ed; outline-offset: 3px; }
.site-background-toggle[hidden], .site-background-toggle svg[hidden] { display: none; }
body:has(.auth-modal.open, .site-header.nav-open) .site-background-toggle,
body.demo-expanded .site-background-toggle { visibility: hidden; }

@media (max-width: 700px) {
  .site-background { background-image: url('/assets/video/storm-background-poster-mobile-20261121-720p60-trim3.webp'); }
  .site-background::after { background: rgba(8, 9, 11, .89); }
}
@media (prefers-reduced-motion: reduce) {
  .site-background-toggle { transition: none; }
}
