/* =====================================================================
   UNIVERSE — the black hole behind the home page (styles of the scene only)
   assets/universe.js draws a ray-traced black hole into .u-canvas. The scene is a backdrop:
   the page (assets/deck.css) decides where the element with class .u sits and how large it is,
   the stage simply fills it. Everything here keeps the renderer's own u- names.
   Classes universe.js puts on <html>: u-live (the script ran to its end). Nothing here styles the page.

     <div class="u ...">                         the scene (the page positions and sizes it)
       <div class="u-stage">
         <div class="u-sky" aria-hidden="true">
           <canvas class="u-canvas"></canvas>
           <div class="u-fallback"><i></i></div>  CSS stand-in: no WebGL, or the context was lost
         </div>
       </div>
     </div>
   ===================================================================== */

.u { position: relative; }

/* ---------- stage ---------- */
.u-stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #020203;
}
.u-sky { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.u-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }


/* ---------- stand-in when WebGL isn't available, or its context was lost ----------
   universe.js puts .u--fallback on .u and keeps the hole's place on the stage: --u-cx / --u-cy
   (centre, px), --u-r2 (the shadow's diameter, px), --u-roll (rad). When the page moves the hole
   to another pose the stand-in glides there (the real scene travels; this is its plain cousin);
   --u-slow is only set by the dkslow test switch. */
.u-fallback {
  --u-glide: calc(0.9s * var(--u-slow, 1)) cubic-bezier(0.3, 0, 0.1, 1);
  display: none;
  position: absolute;
  left: var(--u-cx, 50%);
  top: var(--u-cy, 50%);
  width: var(--u-r2, 160px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(var(--u-roll, 0rad));
  transition: left var(--u-glide), top var(--u-glide), width var(--u-glide), transform var(--u-glide);
}
@media (prefers-reduced-motion: reduce) {
  .u-fallback { transition: none; }
}
.u--fallback .u-fallback { display: block; }
/* a canvas whose WebGL context is lost paints white once its layer is repainted: keep it out of sight */
.u--fallback .u-canvas { visibility: hidden; }
.u-fallback::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 50%;
  background: #000;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.85), 0 0 24px 4px rgba(255, 255, 255, 0.3), 0 0 110px 30px rgba(255, 255, 255, 0.07);
}
.u-fallback i {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 230%;
  height: 230%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, transparent 42%, rgba(255, 255, 255, 0.7) 45%, rgba(228, 228, 231, 0.2) 58%, transparent 74%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 46%, transparent 54%);
          mask-image: linear-gradient(to bottom, #000 0, #000 46%, transparent 54%);
}
.u-fallback::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 560%;
  height: 16%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.95), rgba(228, 228, 231, 0.5) 28%, rgba(161, 161, 170, 0.16) 60%, transparent 100%);
  filter: blur(3px);
}