/* ════════════════════════════════════════════════════════════
   ASTROVIBE — parallax.css
   Epic Parallax Layers · Cosmic Design · Zodiac Aesthetic
   ════════════════════════════════════════════════════════════ */

/* ── PARALLAX CONTAINER ── */
.parallax-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.parallax-layer {
  position: absolute;
  inset: -30%;
  width: 160%;
  height: 160%;
  will-change: transform;
}

/* Layer 1: Deep stars (slowest) */
.layer-stars {
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,0.9) 0%, transparent 100%),
    radial-gradient(1px 1px at 48% 72%, rgba(255,255,255,0.8) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 74% 33%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 91% 57%, rgba(255,255,255,0.9) 0%, transparent 100%),
    radial-gradient(1px 1px at 33% 89%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 66% 11%, rgba(255,255,255,0.8) 0%, transparent 100%),
    radial-gradient(1px 1px at 22% 55%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 81% 78%, rgba(255,255,255,0.9) 0%, transparent 100%),
    radial-gradient(2px 2px at 5% 42%, rgba(204,68,255,0.6) 0%, transparent 100%),
    radial-gradient(2px 2px at 94% 28%, rgba(119,51,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 57% 95%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 38% 4%, rgba(255,255,255,0.8) 0%, transparent 100%);
  background-size: 800px 800px;
  animation: layer-drift-slow 60s linear infinite;
}

/* Layer 2: Nebula glow left */
.layer-nebula-1 {
  background:
    radial-gradient(ellipse 600px 400px at 20% 30%, rgba(119,51,255,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 400px 600px at 80% 70%, rgba(204,68,255,0.12) 0%, transparent 70%);
  animation: layer-drift-med 40s ease-in-out infinite alternate;
}

/* Layer 3: Nebula glow right */
.layer-nebula-2 {
  background:
    radial-gradient(ellipse 500px 300px at 70% 20%, rgba(255,68,221,0.10) 0%, transparent 70%),
    radial-gradient(ellipse 350px 500px at 25% 75%, rgba(34,238,255,0.06) 0%, transparent 70%);
  animation: layer-drift-fast 25s ease-in-out infinite alternate-reverse;
}

/* Layer 4: Constellation lines */
.layer-constellations {
  background:
    linear-gradient(rgba(204,68,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(204,68,255,0.04) 1px, transparent 1px);
  background-size: 200px 200px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 70%);
  animation: layer-drift-slow 80s linear infinite reverse;
  opacity: 0.4;
}

@keyframes layer-drift-slow {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-15px, -8px); }
  50%  { transform: translate(-5px, -20px); }
  75%  { transform: translate(10px, -12px); }
  100% { transform: translate(0, 0); }
}
@keyframes layer-drift-med {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -20px) scale(1.05); }
}
@keyframes layer-drift-fast {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-25px, 18px) scale(1.03); }
}

/* ── SHOOTING STARS ── */
.shooting-star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px #cc44ff, 0 0 12px rgba(204,68,255,0.5);
  opacity: 0;
}
.shooting-star::after {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(204,68,255,0.6), #fff);
}
.shooting-star.s1 {
  top: 15%;
  left: 100%;
  animation: shoot1 8s ease-in-out 2s infinite;
}
.shooting-star.s2 {
  top: 42%;
  left: 100%;
  animation: shoot1 8s ease-in-out 5s infinite;
}
.shooting-star.s3 {
  top: 68%;
  left: 100%;
  animation: shoot1 8s ease-in-out 11s infinite;
}
@keyframes shoot1 {
  0%, 90%, 100% { opacity: 0; transform: translateX(0) translateY(0); }
  5%   { opacity: 1; }
  40%  { opacity: 0.8; transform: translateX(-100vw) translateY(30vh); }
  41%  { opacity: 0; }
}

/* ── LOGO SVG ── */
.logo-svg {
  flex-shrink: 0;
  animation: logo-spin 30s linear infinite;
  filter: drop-shadow(0 0 8px rgba(204,68,255,0.7));
  transition: filter 0.3s ease;
}
.logo:hover .logo-svg {
  filter: drop-shadow(0 0 16px rgba(204,68,255,1));
}
@keyframes logo-spin {
  to { transform: rotate(360deg); }
}

/* ── HERO PARALLAX RINGS ── */
.hero-parallax-rings {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
}
.hpr {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(204,68,255,0.15);
  animation: hpr-expand 12s ease-in-out infinite;
}
.hpr-1 { width: 300px; height: 300px; animation-delay: 0s; }
.hpr-2 { width: 500px; height: 500px; animation-delay: -3s; border-color: rgba(119,51,255,0.12); }
.hpr-3 { width: 800px; height: 800px; animation-delay: -6s; border-color: rgba(255,68,221,0.08); }
.hpr-4 { width: 1200px; height: 1200px; animation-delay: -9s; border-color: rgba(204,68,255,0.05); }
@keyframes hpr-expand {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.06); opacity: 1; }
}

/* ── WHEEL SVG ── */
.wheel-svg {
  width: 100%;
  height: 100%;
  animation: wheel-spin-3d 45s linear infinite;
  filter: drop-shadow(0 0 20px rgba(204,68,255,0.4));
}
@keyframes wheel-spin-3d {
  0%   { transform: rotateY(0deg) rotateX(8deg); }
  100% { transform: rotateY(360deg) rotateX(8deg); }
}

/* Override old wheel-scene */
.wheel-scene {
  width: 420px;
  height: 420px;
  perspective: 1000px;
}
@media (max-width: 768px) {
  .wheel-scene { width: 290px; height: 290px; }
}

/* ── SCROLL HINT ── */
.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(232,216,255,0.5);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(204,68,255,0.7), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { transform: scaleY(1); opacity: 0.6; }
  50% { transform: scaleY(1.3); opacity: 1; }
}

/* ── SECTION DIVIDER GLOW ── */
.section-divider-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(204,68,255,0.4), rgba(119,51,255,0.6), rgba(204,68,255,0.4), transparent);
}

/* ── FOOTER ENHANCEMENTS ── */
.footer-logo-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
  text-decoration: none;
}
.footer-logo-link:hover .footer-logo {
  color: #fff;
  text-shadow: 0 0 20px rgba(204,68,255,0.8);
}

/* ── ZCARD ENHANCEMENTS ── */
.zcard {
  position: relative;
}
.zcard-glow-ring {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: conic-gradient(from 0deg, transparent 0deg, var(--c-neon, #cc44ff) 60deg, transparent 120deg);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}
.zcard:hover .zcard-glow-ring {
  opacity: 0.6;
  animation: ring-rotate 3s linear infinite;
}
@keyframes ring-rotate {
  to { transform: rotate(360deg); }
}

/* ── FEAT CARD ICON WRAP ── */
.feat-icon-wrap {
  position: relative;
  display: inline-block;
}

/* ── CTA PARALLAX BAND ── */
.cta-parallax-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.cta-cosmic-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(ellipse, rgba(204,68,255,0.08) 0%, rgba(119,51,255,0.04) 40%, transparent 70%);
  animation: burst-pulse 6s ease-in-out infinite;
}
@keyframes burst-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

/* ── PERFORMANCE: GPU compositing ── */
.parallax-container,
.parallax-layer,
.hpr,
.wheel-svg,
.logo-svg,
.orb,
.shooting-star {
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .parallax-layer,
  .shooting-star,
  .logo-svg,
  .wheel-svg,
  .hpr,
  .cta-cosmic-burst,
  .scroll-line {
    animation: none !important;
    transform: none !important;
  }
  .logo-svg { filter: drop-shadow(0 0 8px rgba(204,68,255,0.6)); }
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .scroll-hint { display: none; }
  .hpr-3, .hpr-4 { display: none; }
}
