/* ==========================================================
   Animated dotted background
   Add the class  dots-bg-section  to any section/group/cover block.
   The JS adds the canvas layer automatically.
   ========================================================== */

.dots-bg-section {
  /* Easy knobs */
  --dots-bg: #0B0D0F;      /* section background colour */
  --dots-color: #ffffff;   /* dot colour (opacity is handled by the JS) */

  position: relative;
  overflow: hidden;
  background-color: var(--dots-bg);
}

/* The dot layer sits behind everything else in the section */
.dots-bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  color: var(--dots-color);

  /* Dots are faint in the centre and stronger toward the edges.
     Delete these two lines for an even dot field. */
  -webkit-mask-image: radial-gradient(rgba(0,0,0,.15) 25%, rgba(0,0,0,.55) 60%, #000 90%);
          mask-image: radial-gradient(rgba(0,0,0,.15) 25%, rgba(0,0,0,.55) 60%, #000 90%);
}

.dots-bg-layer canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Keep your own content above the dots (zero specificity, so your
   theme's own positioning rules still win) */
:where(.dots-bg-section > :not(.dots-bg-layer)) {
  position: relative;
  z-index: 1;
}
