/**
 * Astrology-themed animations for Rashidham Vedic Astrology website.
 * Subtle, elegant effects: twinkling stars, orbits, scroll-reveal, cosmic pulse.
 */

/* ========== Twinkling stars ========== */
@keyframes astro-twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

@keyframes astro-twinkle-slow {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.astro-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.astro-star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #fff;
    border-radius: 50%;
    animation: astro-twinkle 2s ease-in-out infinite;
}

.astro-star:nth-child(odd) {
    animation-name: astro-twinkle-slow;
    animation-duration: 3s;
}

.astro-star:nth-child(3n) { animation-delay: 0.5s; }
.astro-star:nth-child(5n) { animation-delay: 1s; }
.astro-star:nth-child(7n) { animation-delay: 1.5s; }

/* ========== Orbit / mandala rotation ========== */
@keyframes astro-orbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes astro-orbit-reverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

.astro-orbit-slow {
    animation: astro-orbit 25s linear infinite;
}

.astro-orbit-reverse {
    animation: astro-orbit-reverse 30s linear infinite;
}

/* ========== Cosmic gradient pulse (subtle) ========== */
@keyframes astro-glow-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.astro-glow-pulse {
    animation: astro-glow-pulse 4s ease-in-out infinite;
}

/* ========== Section scroll-reveal (triggered by .astro-reveal class when in view) ========== */
.astro-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.astro-reveal.astro-visible {
    opacity: 1;
    transform: translateY(0);
}

.astro-reveal-delay-1 { transition-delay: 0.1s; }
.astro-reveal-delay-2 { transition-delay: 0.2s; }
.astro-reveal-delay-3 { transition-delay: 0.3s; }
.astro-reveal-delay-4 { transition-delay: 0.4s; }

/* ========== Icon pulse (for Vedic / astrology icons) ========== */
@keyframes astro-icon-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

.astro-icon-pulse {
    animation: astro-icon-pulse 3s ease-in-out infinite;
}

/* ========== Moon phase style glow ========== */
@keyframes astro-moon-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.15); }
    50% { box-shadow: 0 0 35px rgba(255, 255, 255, 0.25); }
}

.astro-moon-glow {
    animation: astro-moon-glow 3s ease-in-out infinite;
}

/* ========== Floating (gentle rise) for decorative elements ========== */
@keyframes astro-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.astro-float {
    animation: astro-float 5s ease-in-out infinite;
}

.astro-float-slow {
    animation: astro-float 7s ease-in-out infinite;
    animation-delay: 1s;
}

/* ========== Zodiac ring (rotating border accent) ========== */
@keyframes astro-ring-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.astro-ring {
    position: relative;
}

.astro-ring::before {
    content: '';
    position: absolute;
    inset: -4px;
    border: 1px solid rgba(244, 163, 54, 0.35);
    border-radius: 50%;
    animation: astro-ring-rotate 20s linear infinite;
    pointer-events: none;
}
