/* atLocal Deep space ground — the canonical copy.
 *
 * An approved exception to "no gradients": a purple and black space ground
 * for the hero band of a marketing web page. Rules: START_HERE.md, "Deep
 * space ground". Approved by Heath 2026-11-30 (HeyHeathbar/atlocal-back-office#603).
 *
 * Use: load this file and atlocal-deepspace.js, then put class="al-deepspace"
 * on the hero band. Content inside needs nothing extra.
 *
 * Night (#0a0520) exists only as the base of this ground. It is not a seventh
 * brand color: never use it as a flat fill, a text color or a border.
 * The clouds are Royal, Ruby and Coral from atlocal.css at the strengths
 * below. Don't add hues, and don't raise Ruby or Coral.
 */
.al-deepspace {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: #0a0520; /* Night */
  color: #ffffff;
}

/* The nebula: soft clouds, blurred, drifting very slowly. */
.al-deepspace::before {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: -2;
  pointer-events: none;
  filter: blur(30px);
  background-repeat: no-repeat;
  background-image:
    radial-gradient(ellipse 75% 80% at 76% 24%, rgb(59 32 171 / 1), rgb(59 32 171 / 0) 72%),      /* Royal */
    radial-gradient(ellipse 65% 70% at 14% 76%, rgb(59 32 171 / 0.8), rgb(59 32 171 / 0) 72%),    /* Royal */
    radial-gradient(ellipse 52% 46% at 45% 50%, rgb(59 32 171 / 0.55), rgb(59 32 171 / 0) 70%),   /* Royal */
    radial-gradient(ellipse 36% 40% at 62% 74%, rgb(225 69 101 / 0.28), rgb(225 69 101 / 0) 70%), /* Ruby */
    radial-gradient(ellipse 30% 30% at 30% 16%, rgb(255 125 128 / 0.14), rgb(255 125 128 / 0) 70%); /* Coral */
  animation: al-deepspace-nebula 50s ease-in-out infinite alternate;
}

@keyframes al-deepspace-nebula {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.16) translate(-3%, 2%); }
}

/* The stars: a canvas added by atlocal-deepspace.js. */
.al-deepspace > canvas.al-deepspace-stars {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .al-deepspace::before { animation: none; }
}
