/* ================================================================
   ai-motion.css — Animated AI/surveillance canvas layer
   Pairs with js/ai-motion.js.
   Opt-in via data-ai-motion attribute on any section element.
   ================================================================ */

/* ── Host element: stacking context ─────────────────────────── */
[data-ai-motion] {
  position: relative;
}

/* ── Canvas: fills host, sits ABOVE the sec-grid (z:0) but BELOW content ── */
/* z-order within [data-ai-motion]: sec-grid(0) < canvas(1) < content(2)    */
.ai-motion-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  display: block;
}

/* ── Ensure host children stack above the canvas ─────────────── */
[data-ai-motion] > *:not(.ai-motion-canvas) {
  position: relative;
  z-index: 2;
}

/* ── Reduced-motion: JS skips animation; canvas still renders    */
/*    one static frame. This rule is informational only —         */
/*    the actual pause logic lives in ai-motion.js.              */
@media (prefers-reduced-motion: reduce) {
  .ai-motion-canvas {
    /* static frame is painted by JS; no CSS animation to disable */
  }
}
