/* ===================================
   SISTEPS AI - Advanced Animations
   Smooth, premium animations style
   =================================== */

/* === Scroll Animations === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

/* === Continuous Animations === */
@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    25% {
        transform: translateY(-15px) translateX(10px);
    }
    50% {
        transform: translateY(-30px) translateX(0px);
    }
    75% {
        transform: translateY(-15px) translateX(-10px);
    }
}

@keyframes rotateGlow {
    0% {
        transform: rotate(0deg);
        filter: blur(100px) brightness(1);
    }
    50% {
        transform: rotate(180deg);
        filter: blur(120px) brightness(1.2);
    }
    100% {
        transform: rotate(360deg);
        filter: blur(100px) brightness(1);
    }
}

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

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

@keyframes borderGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 212, 255, 0.6), 0 0 60px rgba(0, 255, 204, 0.4);
    }
}

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

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 212, 255, 0.2);
}

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

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

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

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

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

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* === Particle Effects === */
@keyframes particle-float-1 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translate(100px, -100px) rotate(180deg);
        opacity: 1;
    }
}

@keyframes particle-float-2 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translate(-80px, -120px) rotate(-180deg);
        opacity: 1;
    }
}

@keyframes particle-float-3 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.2;
    }
    50% {
        transform: translate(60px, 80px) scale(1.5);
        opacity: 0.8;
    }
}

/* === Text Effects === */
@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(0, 212, 255, 0.8), 0 0 30px rgba(0, 255, 204, 0.6);
    }
}

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* === Background Animations === */
@keyframes backgroundPulse {
    0%, 100% {
        background-size: 100% 100%;
    }
    50% {
        background-size: 110% 110%;
    }
}

@keyframes waveAnimation {
    0% {
        transform: translateX(0) translateY(0);
    }
    50% {
        transform: translateX(-25%) translateY(-5%);
    }
    100% {
        transform: translateX(0) translateY(0);
    }
}

/* === Button Click Animation === */
@keyframes buttonClick {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

.btn:active {
    animation: buttonClick 0.2s ease;
}

/* === Card Flip Animation === */
@keyframes cardFlip {
    0% {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(90deg);
    }
    100% {
        transform: rotateY(0deg);
    }
}

/* === Progress Animation === */
@keyframes progressBar {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

/* === Ripple Effect === */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* === Attention Seekers === */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(0.9);
    }
    20%, 40% {
        transform: scale(1.1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

@keyframes swing {
    20% {
        transform: rotate3d(0, 0, 1, 15deg);
    }
    40% {
        transform: rotate3d(0, 0, 1, -10deg);
    }
    60% {
        transform: rotate3d(0, 0, 1, 5deg);
    }
    80% {
        transform: rotate3d(0, 0, 1, -5deg);
    }
    100% {
        transform: rotate3d(0, 0, 1, 0deg);
    }
}

/* === Scroll-Based Animation Classes === */
.animate-on-scroll {
    opacity: 0;
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
}

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

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

.fade-left {
    animation: fadeInLeft 0.8s ease forwards;
}

.fade-right {
    animation: fadeInRight 0.8s ease forwards;
}

.scale-in {
    animation: scaleIn 0.8s ease forwards;
}

/* === Stagger Animation Delays === */
.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; }
.stagger-6 { animation-delay: 0.6s; }

/* === Performance Optimizations === */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* === 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;
    }
}

/* === Custom Cursor Effects (Optional Enhancement) === */
@keyframes cursorPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
}

/* === Neural Network Specific Animations === */
.neural-network .node {
    animation: pulse 2s ease-in-out infinite;
}

.neural-network .connection {
    animation: connectionPulse 3s ease-in-out infinite;
}

@keyframes connectionFlow {
    0% {
        stroke-dashoffset: 1000;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

/* === Gradient Animation for Hero === */
.gradient-orb {
    animation: rotateGlow 20s ease-in-out infinite;
}

/* === Card Hover Effects === */
.agent-card,
.feature-card,
.pricing-card,
.testimonial-card,
.use-case-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* === Skeleton Loading Animation === */
@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 0px,
        rgba(255, 255, 255, 0.15) 40px,
        rgba(255, 255, 255, 0.05) 80px
    );
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s infinite;
}

/* === Notification Animation === */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* === Modal Animations === */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.9) translateY(-50px);
    }
}

/* === Floating Action Button === */
.chatbot-toggle {
    animation: heartbeat 2s ease-in-out infinite;
}

.chatbot-toggle:hover {
    animation: none;
}

/* === Scroll Progress Bar === */
@keyframes progressGrow {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* === Typing Indicator === */
@keyframes typing {
    0%, 100% {
        opacity: 0.2;
    }
    50% {
        opacity: 1;
    }
}

.typing-indicator span {
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

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

/* === Blob Animation === */
@keyframes blobMorph {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

/* === Glitch Effect === */
@keyframes glitch-1 {
    0%, 100% {
        transform: translate(0);
    }
    33% {
        transform: translate(-2px, 2px);
    }
    66% {
        transform: translate(2px, -2px);
    }
}

@keyframes glitch-2 {
    0%, 100% {
        transform: translate(0);
    }
    33% {
        transform: translate(2px, -2px);
    }
    66% {
        transform: translate(-2px, 2px);
    }
}

/* === Magnetic Hover Effect (Advanced) === */
.magnetic-element {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* === Parallax Scroll Effect === */
.parallax-slow {
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.parallax-fast {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
