/* ============================================
   SunTrack Network - Animations & Effects
   Solar Trajectory Animation System
   ============================================ */

/* Fade In Animations */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-down {
    opacity: 0;
    transform: translateY(-30px);
    animation: fadeInDown 0.8s ease forwards;
}

@keyframes fadeInDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide Animations */
.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 0.8s ease forwards;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    animation: slideInRight 0.8s ease forwards;
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale Animations */
.scale-in {
    opacity: 0;
    transform: scale(0.8);
    animation: scaleIn 0.8s ease forwards;
}

@keyframes scaleIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Rotate Animations */
.rotate-in {
    opacity: 0;
    transform: rotate(-10deg) scale(0.9);
    animation: rotateIn 0.8s ease forwards;
}

@keyframes rotateIn {
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

/* Solar Glow Effect */
.solar-glow {
    position: relative;
}

.solar-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 184, 0, 0.3), transparent 70%);
    animation: pulse-glow 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* Arc Progress Animation */
.arc-progress {
    stroke-dasharray: 0 100;
    animation: arcProgress 2s ease forwards;
}

@keyframes arcProgress {
    to {
        stroke-dasharray: var(--progress, 75) 100;
    }
}

/* Number Counter Animation */
.counter {
    animation: counter 2s ease forwards;
}

@keyframes counter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Shimmer Loading Effect */
.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 248, 231, 0.1) 0%,
        rgba(255, 184, 0, 0.3) 50%,
        rgba(255, 248, 231, 0.1) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Floating Animation for Solar Elements */
.float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 184, 0, 0.5);
    transform: translate(-50%, -50%);
    animation: ripple 1.5s ease-out;
}

@keyframes ripple {
    to {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* Spinning Sun Icon */
.spin-slow {
    animation: spin 20s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Gradient Animation */
.gradient-animate {
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Solar Ray Animation */
.solar-rays {
    position: relative;
}

.solar-rays::before,
.solar-rays::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(255, 184, 0, 0.1) 45deg,
        transparent 90deg,
        transparent 180deg,
        rgba(255, 184, 0, 0.1) 225deg,
        transparent 270deg
    );
    transform: translate(-50%, -50%);
    animation: rotate-rays 10s linear infinite;
    pointer-events: none;
}

.solar-rays::after {
    animation-direction: reverse;
    animation-duration: 15s;
}

@keyframes rotate-rays {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Progress Bar Fill Animation */
.progress-fill {
    width: 0;
    animation: progressFill 1.5s ease forwards;
}

@keyframes progressFill {
    to {
        width: var(--progress, 100%);
    }
}

/* Stagger Delay Classes */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.delay-600 {
    animation-delay: 0.6s;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 32px rgba(26, 31, 53, 0.2);
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(255, 184, 0, 0.4);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Loading Spinner - Solar Theme */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 184, 0, 0.2);
    border-top-color: var(--color-golden-sun);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(26, 31, 53, 0.1) 25%,
        rgba(26, 31, 53, 0.05) 50%,
        rgba(26, 31, 53, 0.1) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Particle Effect Background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--color-golden-sun);
    border-radius: 50%;
    opacity: 0;
    animation: particle-float 10s ease-in infinite;
}

@keyframes particle-float {
    0% {
        opacity: 0;
        transform: translateY(0) translateX(0) scale(0);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-100vh) translateX(50px) scale(1);
    }
}

/* Text Gradient Animation */
.text-gradient {
    background: var(--gradient-arc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 100%;
    animation: textGradient 3s ease infinite;
}

@keyframes textGradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Sun Rise Effect */
.sunrise-effect {
    animation: sunrise 3s ease forwards;
}

@keyframes sunrise {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.8);
        filter: brightness(0.5);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: brightness(1);
    }
}

/* Solar Eclipse Effect */
.eclipse {
    position: relative;
    overflow: hidden;
}

.eclipse::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(26, 31, 53, 0.8),
        transparent
    );
    animation: eclipse 5s ease-in-out infinite;
}

@keyframes eclipse {
    0%, 100% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
}

/* Twinkle Effect */
.twinkle {
    animation: twinkle 2s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.95);
    }
}

/* Orbit Animation */
.orbit {
    animation: orbit 20s linear infinite;
}

@keyframes orbit {
    from {
        transform: rotate(0deg) translateX(100px) rotate(0deg);
    }
    to {
        transform: rotate(360deg) translateX(100px) rotate(-360deg);
    }
}

/* Wave Animation */
.wave {
    animation: wave 3s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(5deg);
    }
    75% {
        transform: translateY(10px) rotate(-5deg);
    }
}

/* Reveal Animation for Sections */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Performance - Will Change */
.will-animate {
    will-change: transform, opacity;
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 3px solid var(--color-golden-sun);
    outline-offset: 2px;
}

/* Smooth Scroll Snap */
.scroll-snap-container {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
}

.scroll-snap-item {
    scroll-snap-align: start;
}

/* Page Transition */
.page-transition {
    animation: pageTransition 0.5s ease;
}

@keyframes pageTransition {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}