/* =========================================================================
 * Dot Grid — backdrop layer styles. Companion to assets/js/dot-grid.js.
 * ====================================================================== */

.hero-dot-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 620px;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  /* soften the lower edge so the grid dissolves into the page */
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}

/* content following the backdrop paints above it */
.hero-dot-grid ~ .container,
.hero-dot-grid ~ .main-nav {
  position: relative;
  z-index: 1;
}

.dot-grid-canvas {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  transition: opacity 600ms ease;
}

.dot-grid-canvas[data-ready="true"] {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .dot-grid-canvas {
    transition: none;
  }
}
