/* Backdrops (2026-11-17): the styles for backdrop.js, as a real file so a strict
   Content-Security-Policy (style-src 'self', as on Pecky Intelligence) never
   blocks them. Pecky's live site blocked the engine's injected <style> on day
   one, which left the layer as a plain block at the top of the page instead of
   a fixed ground behind it.
   The accent arrives as RGB triplets set by backdrop.js through the CSSOM
   (root.style.setProperty), which CSP allows: --bd-a, --bd-a72, --bd-a55, --bd-a90. */
:root { --bd-ground: #fff; --bd-a: 255, 122, 0; --bd-a72: 184, 88, 0; --bd-a55: 140, 67, 0; --bd-a90: 230, 110, 0; }
html[data-bd-mode="night"] { --bd-ground: #000; }
html:not([data-bd="none"]) { background: var(--bd-ground); }
/* z-index -1: the ground sits under ALL page content, so it only shows where a page is meant to be clear;
   a page with its own solid background (TATM sign-in) simply covers it. */
#bd-layer { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bd-ground); display: none; }
html:not([data-bd="none"]) #bd-layer { display: block; }
#bd-layer .bd-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
html[data-bd="lava"] #bd-layer .bd-gl, html[data-bd="neon"] #bd-layer .bd-gl { display: block; }
#bd-layer .bd-cond, #bd-layer .bd-ember { position: absolute; inset: 0; display: none; }
html[data-bd="condensation"] #bd-layer .bd-cond { display: block; }
html[data-bd="ember"] #bd-layer .bd-ember { display: block; }
#bd-layer .bd-cond canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* Condensation: pulsing accent glows under the fogged pane */
#bd-layer .bd-glow { position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgb(var(--bd-a)) 0%, rgba(var(--bd-a), .55) 36%, transparent 70%);
  filter: blur(34px); opacity: .8; animation: bd-pulse var(--pd, 8s) ease-in-out infinite alternate; }
html[data-bd-mode="day"] #bd-layer .bd-glow { opacity: .55; animation-name: bd-pulse-day; }
@keyframes bd-pulse { 0% { opacity: .8; transform: scale(.82); } 100% { opacity: 1; transform: scale(1.24); } }
@keyframes bd-pulse-day { 0% { opacity: .45; transform: scale(.82); } 100% { opacity: .62; transform: scale(1.24); } }
#bd-layer .g1 { width: 28vmax; height: 28vmax; top: -14%; left: -10%; --pd: 7s; }
#bd-layer .g2 { width: 22vmax; height: 22vmax; top: -10%; right: -8%; --pd: 9s; }
#bd-layer .g3 { width: 26vmax; height: 26vmax; bottom: -14%; left: -8%; --pd: 8s; }
#bd-layer .g4 { width: 20vmax; height: 20vmax; bottom: -10%; right: -10%; --pd: 10s; }
#bd-layer .g5 { width: 16vmax; height: 16vmax; top: 8%; left: 42%; --pd: 6s; }
#bd-layer .g6 { width: 18vmax; height: 18vmax; top: 42%; left: 4%; --pd: 8.5s; }
#bd-layer .g7 { width: 17vmax; height: 17vmax; top: 38%; right: 4%; --pd: 7.5s; }

/* Ember: three still accent pools, on black by night, on white by day */
#bd-layer .bd-ember { background:
  radial-gradient(70% 45% at 12% 10%, rgba(var(--bd-a), .75), transparent 72%),
  radial-gradient(60% 40% at 94% 52%, rgba(var(--bd-a72), .85), transparent 72%),
  radial-gradient(85% 48% at 30% 100%, rgba(var(--bd-a55), 1), transparent 74%), #000; }
html[data-bd-mode="day"] #bd-layer .bd-ember { background:
  radial-gradient(70% 45% at 12% 10%, rgba(var(--bd-a), .6), transparent 72%),
  radial-gradient(60% 40% at 94% 52%, rgba(var(--bd-a), .55), transparent 72%),
  radial-gradient(85% 48% at 30% 100%, rgba(var(--bd-a90), .66), transparent 74%), #fff; }

@media (prefers-reduced-motion: reduce) { #bd-layer .bd-glow { animation: none; } }
