/* PeppolBridge — scene3d.css
   Fixed WebGL canvas behind the page; content floats above it.
   Loaded after style.css + light.css on inner pages. */

#bg3d {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
}

/* the canvas paints the ivory ground, so the page body goes transparent
   and content layers sit above it */
html.has-bg3d body { background: transparent; }
html.has-bg3d main { position: relative; z-index: 1; }
html.has-bg3d footer { position: relative; z-index: 1; }

/* soft edge vignette so motifs dissolve into the margins */
html.has-bg3d body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(130% 100% at 50% 45%, transparent 55%, rgba(246, 245, 241, 0.55) 100%);
}

/* if WebGL is unavailable or reduced-motion, nothing changes: the ivory
   body background from light.css remains and the canvas is simply absent */
html.no-bg3d #bg3d { display: none; }

/* on narrow viewports (601-760px; scene3d.js adds no-bg3d at <=600px so the
   canvas is gone entirely there) the motifs sit behind the full-width text
   column — drop them to a whisper and keep the solid ivory ground under the
   now mostly-transparent canvas so copy never fights the strokes.
   Breakpoint matches the JS isMobile query (760px). */
@media (max-width: 760px) {
  #bg3d { opacity: 0.18; }
  html.has-bg3d body { background: var(--bg, #f6f5f1); }
}

/* frost content surfaces so copy stays crisp while the 3D reads through */
html.has-bg3d .card,
html.has-bg3d .gcard,
html.has-bg3d .ccard,
html.has-bg3d .pcard,
html.has-bg3d .rcard,
html.has-bg3d .tcard,
html.has-bg3d .cat-item,
html.has-bg3d .faq-item,
html.has-bg3d .fc-box,
html.has-bg3d .table-wrap,
html.has-bg3d .form,
html.has-bg3d .band {
  background: rgba(255, 255, 255, 0.74);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}
/* keep gradient-border feature cards and the dark code window intact */
html.has-bg3d .pcard.feat,
html.has-bg3d .fc-box.core,
html.has-bg3d .promo { background: linear-gradient(#ffffff, #ffffff) padding-box, var(--grad) border-box; }
html.has-bg3d .code-win { background: #10233a; }
