/* ============================================
   Sky Transition Styles
   Day-to-night background transition system
   ============================================ */

/* ===================
   Transition Zone (Day → Night Fade)
   =================== */

.sky-transition {
  position: relative;
  height: 150vh;
  background: #68b8d7;  /* Solid light blue */
  overflow: hidden;
  z-index: 10;
}

/* Gradient overlay for transition to night */
.sky-transition::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100vh;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    #4a6b8a 30%,          /* Medium blue */
    #2d4a5e 60%,          /* Darker blue */
    #0A0F1C 100%          /* Night sky (--color-primary) */
  );
  z-index: 1;
}


/* ===================
   Static Star Background (All Sections After Hero)
   =================== */

.services,
.showcase,
.process,
.results,
.cta,
.footer {
  position: relative;
}

.services::before,
.showcase::before,
.process::before,
.results::before,
.cta::before,
.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(2px 2px at 20% 30%, white, transparent),
    radial-gradient(2px 2px at 60% 70%, white, transparent),
    radial-gradient(1px 1px at 50% 50%, white, transparent),
    radial-gradient(1px 1px at 80% 10%, white, transparent),
    radial-gradient(2px 2px at 90% 60%, white, transparent),
    radial-gradient(1px 1px at 33% 80%, white, transparent),
    radial-gradient(2px 2px at 15% 90%, white, transparent),
    radial-gradient(1px 1px at 70% 40%, white, transparent);
  background-size: 200px 200px;
  background-position: 0 0, 40px 60px, 130px 270px, 70px 100px;
  opacity: 0.6;
}

/* ===================
   Starfield Canvas Positioning
   =================== */

#starfield-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
  clip-path: inset(0 0 0 0);
}

#starfield-canvas.active {
  opacity: 1;
}


/* ===================
   Responsive Adjustments
   =================== */

@media (max-width: 768px) {
  /* Reduce transition zone height on mobile */
  .sky-transition {
    height: 20vh;
  }

  /* Reduce star density on mobile */
  .services::before,
  .showcase::before,
  .process::before,
  .results::before,
  .cta::before,
  .footer::before {
    background-size: 300px 300px;
    opacity: 0.4;
  }
}

/* ===================
   Reduced Motion Support
   =================== */

@media (prefers-reduced-motion: reduce) {
  /* Disable canvas animations (handled in JS) */
  #starfield-canvas {
    display: none;
  }

  /* Keep static stars only */
  .services::before,
  .showcase::before,
  .process::before,
  .results::before,
  .cta::before,
  .footer::before {
    opacity: 0.5;
  }
}
