/* ============================================
   SEOSyed - Animations & Transitions
   ============================================ */

/* --- Scroll Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

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

/* Stagger delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* --- Hero Animations --- */
@keyframes heroFadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.hero-badge { animation: heroBadgeFade 0.8s ease 0.2s both; }
.hero-title { animation: heroFadeInUp 0.8s ease 0.4s both; }
.hero-subtitle { animation: heroFadeInUp 0.8s ease 0.6s both; }
.hero-ctas { animation: heroFadeInUp 0.8s ease 0.8s both; }
.hero-stats { animation: heroFadeInUp 0.8s ease 1s both; }

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

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

/* --- Pulse Animation --- */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 134, 193, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(46, 134, 193, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 134, 193, 0); }
}

.animate-pulse { animation: pulse 2s ease-in-out infinite; }

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

.animate-gradient {
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
}

/* --- Counter Animation --- */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.counter-animated {
    animation: countUp 0.5s ease both;
}

/* --- Shimmer Effect --- */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.shimmer {
    background: linear-gradient(90deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

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

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
    opacity: 0;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
    opacity: 1;
    transition: width 0s, height 0s, opacity 0s;
}

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

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

/* --- Image Zoom on Hover --- */
.hover-zoom {
    overflow: hidden;
}

.hover-zoom img {
    transition: transform 0.6s ease;
}

.hover-zoom:hover img {
    transform: scale(1.08);
}

/* --- Underline Grow --- */
.underline-grow {
    position: relative;
    display: inline-block;
}

.underline-grow::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-base);
}

.underline-grow:hover::after {
    width: 100%;
}

/* --- Icon Spin on Hover --- */
.hover-rotate:hover .icon,
.hover-rotate:hover svg {
    transform: rotate(360deg);
    transition: transform 0.6s ease;
}

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

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

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

@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-60px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

/* --- Typewriter Effect --- */
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blinkCursor {
    0%, 100% { border-right-color: transparent; }
    50% { border-right-color: var(--color-primary); }
}

.typewriter {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--color-primary);
    animation: typewriter 3s steps(40) 1s both, blinkCursor 0.7s step-end infinite;
}

/* --- Marquee --- */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.marquee-track {
    display: flex;
    animation: marquee 30s linear infinite;
    width: max-content;
}

.marquee-track:hover {
    animation-play-state: paused;
}

/* --- Particle Background --- */
.hero-particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 7s; }
.hero-particle:nth-child(2) { left: 25%; animation-delay: 1.5s; animation-duration: 9s; }
.hero-particle:nth-child(3) { left: 40%; animation-delay: 0.5s; animation-duration: 6s; }
.hero-particle:nth-child(4) { left: 55%; animation-delay: 2s; animation-duration: 8s; }
.hero-particle:nth-child(5) { left: 70%; animation-delay: 1s; animation-duration: 10s; }
.hero-particle:nth-child(6) { left: 85%; animation-delay: 2.5s; animation-duration: 7.5s; }
.hero-particle:nth-child(7) { left: 15%; animation-delay: 3s; animation-duration: 8.5s; }
.hero-particle:nth-child(8) { left: 50%; animation-delay: 0.8s; animation-duration: 9.5s; }
.hero-particle:nth-child(9) { left: 35%; animation-delay: 1.8s; animation-duration: 6.5s; }
.hero-particle:nth-child(10) { left: 80%; animation-delay: 3.5s; animation-duration: 7s; }

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

    .reveal, .reveal-left, .reveal-right, .reveal-scale {
        opacity: 1;
        transform: none;
    }

    .marquee-track {
        animation: none;
    }

    .hero-particle {
        display: none;
    }
}
