/* ==========================================
   Soulution Aura - Animation Styles
   Gentle, thoughtful animations for conscious experience
   ========================================== */

/* ==========================================
   Keyframe Animations
   ========================================== */

/* Pulse Effect for Aura */
@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.15;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.25;
    }
}

/* Scroll Down Indicator */
@keyframes scrollDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide In From Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In From Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Glow Effect */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(64, 224, 208, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(64, 224, 208, 0.4);
    }
}

/* Float Effect */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Rotate Slow */
@keyframes rotateSlow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================
   Animation Utility Classes
   ========================================== */

/* Fade In Up with Delays */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

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

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

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

.delay-4 {
    animation-delay: 0.8s;
}

.delay-5 {
    animation-delay: 1s;
}

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

/* Scale In */
.scale-in {
    animation: scaleIn 0.6s ease-out forwards;
    opacity: 0;
}

/* Slide In */
.slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
    opacity: 0;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
    opacity: 0;
}

/* Float Effect */
.float {
    animation: float 3s ease-in-out infinite;
}

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

/* ==========================================
   Scroll-Triggered Animations
   ========================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

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

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

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

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(64, 224, 208, 0.3);
}

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

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

/* ==========================================
   Loading & Transition States
   ========================================== */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-light-gray);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ==========================================
   Page Transitions
   ========================================== */
.page-transition {
    position: fixed;
    inset: 0;
    background: var(--color-white);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.page-transition.active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================
   Reduced Motion Support
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .aura-effect {
        animation: none;
    }
    
    .scroll-line {
        animation: none;
    }
}

/* ==========================================
   Parallax Effect (Optional Enhancement)
   ========================================== */
.parallax {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

/* ==========================================
   Stagger Animations for Lists
   ========================================== */
.stagger-fade > * {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.stagger-fade > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-fade > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-fade > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-fade > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-fade > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-fade > *:nth-child(6) { animation-delay: 0.6s; }
.stagger-fade > *:nth-child(7) { animation-delay: 0.7s; }
.stagger-fade > *:nth-child(8) { animation-delay: 0.8s; }

/* ==========================================
   Smooth Entrance for Modals/Overlays
   ========================================== */
.modal-enter {
    animation: scaleIn 0.3s ease-out;
}

.modal-exit {
    animation: scaleIn 0.3s ease-out reverse;
}

/* ==========================================
   Text Gradient Animation
   ========================================== */
.text-gradient {
    background: linear-gradient(
        90deg,
        var(--color-primary),
        var(--color-secondary),
        var(--color-primary)
    );
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textGradient 3s ease infinite;
}

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