/* PA-WEB-006-A07 / MATRIX RECOVERY — REV8
   Uses the actual transparent phase-grid 0/1 PNG as a directly rendered
   background. No mask-image; it works in local file previews and browsers.
   Applies only to homepage, collective overview and dossier library. */

/* Explicitly preserve the existing base layout and imagery. */
.atmos-home .hero,
.atmos-home .scenic-section,
.atmos-home .vision {
  position: relative;
  isolation: isolate;
}

/* Rain layer directly OVER the scenic artwork, UNDER the readable text. */
.atmos-home .hero::after,
.atmos-home .scenic-section::after,
.atmos-home .vision::after {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background-image: url("assets/phase-atmospheres/matrix-06.png");
  background-repeat: repeat;
  background-position: center 0;
  background-size: 900px 1300px;
  opacity: 0.91;
  /* Remove any legacy masking that made the code invisible. */
  -webkit-mask-image: none;
  mask-image: none;
  animation: atmos-rain-rev8 23s linear infinite;
}

.atmos-home .hero-mission,
.atmos-home .intro-copy,
.atmos-home .vision-copy,
.atmos-home .impact-copy,
.atmos-home .impact-icons {
  position: relative;
  z-index: 3;
}

/* The overview pages' original ::before was below the painted page.
   Draw real transparent glyphs above that background with no mask. */
body.research-hub {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
}
body.research-hub::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: url("assets/phase-atmospheres/matrix-06.png") center 0 / 900px 1300px repeat;
  opacity: 0.83;
  -webkit-mask-image: none;
  mask-image: none;
  animation: atmos-rain-rev8 23s linear infinite;
}
body.research-hub > .site-header { position: relative; z-index: 10; }
body.research-hub > main,
body.research-hub > .site-footer { position: relative; z-index: 1; }

@keyframes atmos-rain-rev8 {
  from { background-position: center 0; }
  to   { background-position: center 1300px; }
}

@media (prefers-reduced-motion: reduce) {
  .atmos-home .hero::after,
  .atmos-home .scenic-section::after,
  .atmos-home .vision::after,
  body.research-hub::before { animation: none; }
}
