/* ============================================
   PlaceIt - Animations & Transitions
   Smooth, Modern Animations
   ============================================ */

/* ============================================
   Scroll Animations
   ============================================ */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ============================================
   Gradient Animations
   ============================================ */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient {
    background: linear-gradient(270deg, #8B5CF6, #06B6D4, #EC4899, #8B5CF6);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* ============================================
   Floating Animation
   ============================================ */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.float {
    animation: float 6s ease-in-out infinite;
}

.float-slow {
    animation: float 8s ease-in-out infinite;
}

/* ============================================
   Pulse Glow Animation
   ============================================ */
@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(139, 92, 246, 0.6);
    }
}

.pulse-glow {
    animation: pulseGlow 3s ease-in-out infinite;
}

/* ============================================
   Rotate Animation
   ============================================ */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.rotate-slow {
    animation: rotate 20s linear infinite;
}

/* ============================================
   Scale on Hover
   ============================================ */
.hover-scale {
    transition: transform var(--transition-base);
}

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

.hover-scale-lg {
    transition: transform var(--transition-base);
}

.hover-scale-lg:hover {
    transform: scale(1.1);
}

/* ============================================
   Shimmer Effect
   ============================================ */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0) 100%);
    background-size: 1000px 100%;
    animation: shimmer 3s infinite;
}

/* ============================================
   Fade In Animations
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

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

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in-down {
    animation: fadeInDown 0.8s ease-out;
}

/* Staggered animations */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

.stagger-5 {
    animation-delay: 0.5s;
}

/* ============================================
   Background Orbs (Animated Gradients)
   ============================================ */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #8B5CF6 0%, transparent 70%);
    top: -250px;
    left: -250px;
    animation: float 10s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #06B6D4 0%, transparent 70%);
    bottom: -200px;
    right: -200px;
    animation: float 12s ease-in-out infinite reverse;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #EC4899 0%, transparent 70%);
    top: 50%;
    right: 10%;
    animation: float 15s ease-in-out infinite;
}

/* ============================================
   Hover Effects
   ============================================ */
.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hover-glow {
    transition: box-shadow var(--transition-base);
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

/* ============================================
   Loading Spinner
   ============================================ */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ============================================
   Text Animations
   ============================================ */
@keyframes textGlow {

    0%,
    100% {
        text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    }

    50% {
        text-shadow: 0 0 20px rgba(139, 92, 246, 0.8);
    }
}

.text-glow {
    animation: textGlow 2s ease-in-out infinite;
}

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

/* ============================================
   Smooth Page Transitions
   ============================================ */
.page-transition {
    animation: fadeInUp 0.6s ease-out;
}

/* ============================================
   Micro-interactions
   ============================================ */
.interactive {
    position: relative;
    overflow: hidden;
}

.interactive::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.interactive:hover::before {
    width: 300px;
    height: 300px;
}

/* ============================================
   Reduce Motion for Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}