/* BinaMora living background (assets/bg/bg.js). Fixed layer behind all content; pointer-events none.
   Everything below is gated on html.bm-bg-on, which bg.js only adds once the layer is running,
   so without JS the page keeps its original solid backgrounds. */
.bm-bg{position:fixed;left:0;top:0;width:100%;height:100vh;height:100lvh;z-index:-1;overflow:hidden;pointer-events:none;contain:strict;background:transparent}
.bm-bg__cv{position:absolute;left:0;top:0;width:100%;height:100%;display:block}
/* the devil: a faint, large silhouette (poster first on phones, live WebGL on desktop); position/opacity driven by bg.js */
.bm-bg__devil{position:absolute;left:0;top:0;opacity:0;pointer-events:none;will-change:transform,opacity;filter:blur(1.6px) brightness(.9);
  -webkit-mask-image:radial-gradient(ellipse 52% 50% at 50% 50%,#000 52%,transparent 100%);mask-image:radial-gradient(ellipse 52% 50% at 50% 50%,#000 52%,transparent 100%)}
.bm-bg__devil img,.bm-bg__devil canvas{position:absolute;left:0;top:0;width:100%;height:100%;display:block;object-fit:contain}
.bm-bg__devil canvas{opacity:0;transition:opacity .9s ease}
.bm-bg__devil.is-live canvas{opacity:1}
.bm-bg__devil.is-live img{opacity:0;transition:opacity .9s ease .3s}
/* fine static grain over the glow: dithers the 8-bit gradients so dark falloffs never band */
.bm-bg::after{content:"";position:absolute;inset:0;opacity:.05;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>")}

/* Let the fixed layer show through the section washes (the layer itself is darker than the old gradients' brightest point) */
.bm-bg-on .film,.bm-bg-on .projects,.bm-bg-on .contact,.bm-bg-on .tutor-hero{background:transparent}
/* Hero photo and vignette dissolve at the bottom edge into the live background instead of a hard seam */
.bm-bg-on .hero__bg,.bm-bg-on .hero__vignette{-webkit-mask-image:linear-gradient(#000 0,#000 72%,transparent 100%);mask-image:linear-gradient(#000 0,#000 72%,transparent 100%)}

@media (prefers-reduced-motion:reduce){.bm-bg__devil{display:none}}
