/* =============================================================================
   space.css — Premium space background: Milky Way, nebulae, stars, satellite
   ============================================================================= */

/* ─── Deep space base ──────────────────────────────────────────────────────── */

/* The canvas #space-canvas renders on top of this for stars/nebulae/milky way */

.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(ellipse 150% 150% at 50% 50%, #05080f 0%, var(--clr-bg-deep) 100%);
}

.space-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ─── Three.js satellite canvas (fixed, scroll-driven) ────────────────────── */

.sat-canvas-fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 280px;
  z-index: 1;
  pointer-events: none;
  /* GSAP and satellite.js control transform */
}

/* Loading spinner */

.sat-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 280px;
  z-index: 2;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: rgba(5, 8, 16, 0.65);
  border-radius: 50%;
  transition: opacity 0.5s ease;
}

.sat-loader span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--clr-text-muted);
  text-transform: uppercase;
}

.sat-loader-ring {
  width: 38px;
  height: 38px;
  border: 2px solid var(--clr-border);
  border-top-color: var(--clr-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Lightweight fallback for compact or reduced-motion devices */

@media (max-width: 760px), (prefers-reduced-motion: reduce) {
  .sat-canvas-fixed,
  .sat-loader {
    display: none !important;
  }
}
