/* Animations and Enhanced Styles for index.html */
/* Extracted from inline styles for better performance and caching */

/* Enhanced "Jak to Działa" Section Animations */
@keyframes blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.animate-blob {
    animation: blob 7s ease-in-out infinite;
}

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

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

@keyframes bounce-slow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce-slow {
    animation: bounce-slow 3s ease-in-out infinite;
}

@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

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

/* Tech Card Animations */
.tech-card {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-card.fade-on-scroll.visible,
.tech-card.fade-on-scroll {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.tech-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.tech-card:hover::before {
    opacity: 1;
}

.tech-card > * {
    position: relative;
    z-index: 1;
}

/* Enhanced Process Section Animations */
.process-step-card {
    will-change: transform;
}

.process-step-card:hover {
    z-index: 10;
}

/* Smooth scroll animations for process steps */
.process-step-card[data-step] {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced arrow animations */
@keyframes arrowFlow {
    0% {
        opacity: 0.3;
        transform: translateX(-10px);
    }
    50% {
        opacity: 0.8;
        transform: translateX(0);
    }
    100% {
        opacity: 0.3;
        transform: translateX(10px);
    }
}

.process-arrow {
    animation: arrowFlow 2s ease-in-out infinite;
}

/* Glassmorphism effect for process cards */
.process-step-card {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* Enhanced gradient text animation */
.gradient-text {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

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

/* Improved section visibility animations */
.fade-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stat Card Animations */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-count-up {
    animation: countUp 1s ease-out forwards;
}

.stat-card {
    will-change: transform;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.stat-card:active {
    transform: translateY(-3px) scale(0.98);
}

.stat-card > * {
    position: relative;
    z-index: 2;
}

/* Enhanced Expandable Cards */
.expandable-card {
    will-change: transform;
}

.expandable-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
    pointer-events: none;
}

.expandable-card:hover::before {
    opacity: 1;
}

.expandable-card > * {
    position: relative;
    z-index: 1;
}

/* Enhanced number counter animation */
.number-counter {
    display: inline-block;
    /* Remove text gradient for better visibility - use text-shadow instead */
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.3), 0 4px 20px rgba(255, 255, 255, 0.2);
}

/* Staggered animation delays - Best Practice: CSS classes instead of inline styles */
.animation-delay-1 { animation-delay: 0.1s; transition-delay: 0.1s; }
.animation-delay-2 { animation-delay: 0.2s; transition-delay: 0.2s; }
.animation-delay-3 { animation-delay: 0.3s; transition-delay: 0.3s; }
.animation-delay-4 { animation-delay: 0.4s; transition-delay: 0.4s; }
.animation-delay-5 { animation-delay: 0.5s; transition-delay: 0.5s; }
.animation-delay-6 { animation-delay: 0.6s; transition-delay: 0.6s; }
.animation-delay-7 { animation-delay: 0.7s; transition-delay: 0.7s; }
.animation-delay-8 { animation-delay: 0.8s; transition-delay: 0.8s; }
.animation-delay-9 { animation-delay: 0.9s; transition-delay: 0.9s; }
.animation-delay-10 { animation-delay: 1.0s; transition-delay: 1.0s; }
.animation-delay-11 { animation-delay: 1.1s; transition-delay: 1.1s; }

/* Performance optimizations */
.fade-on-scroll {
    content-visibility: auto;
    contain-intrinsic-size: auto 200px;
}

.stat-card,
.expandable-card {
    content-visibility: auto;
}

/* Optimize animations for performance */
@media (prefers-reduced-motion: no-preference) {
    .fade-on-scroll,
    .stat-card,
    .expandable-card,
    .tech-card {
        will-change: transform, opacity;
    }
}

/* Remove will-change after animation to save resources */
.fade-on-scroll.visible {
    will-change: auto;
}

/* Accessibility improvements */
.expandable-card:focus-visible,
.stat-card:focus-visible {
    outline: 3px solid rgba(99, 102, 241, 0.5);
    outline-offset: 2px;
}

/* Background pattern classes - Best Practice: CSS instead of inline styles */
.bg-pattern-dots-large {
    background-image: radial-gradient(circle at 2px 2px, rgba(99, 102, 241, 0.3) 1px, transparent 0);
    background-size: 40px 40px;
}

.bg-pattern-dots-small {
    background-image: radial-gradient(circle at 2px 2px, rgba(99, 102, 241, 0.3) 1px, transparent 0);
    background-size: 30px 30px;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .tech-card {
        transform: translateY(20px) scale(0.98);
    }
    
    .process-step-card {
        margin-bottom: 1.5rem;
    }
    
    .stat-card {
        transform: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .animate-blob,
    .animate-bounce-slow,
    .animate-pulse-slow,
    .process-arrow,
    .gradient-text,
    .animate-count-up {
        animation: none;
    }
    
    .tech-card,
    .fade-on-scroll,
    .stat-card,
    .expandable-card {
        transition: opacity 0.3s ease;
    }
    
    .stat-card:hover,
    .expandable-card:hover {
        transform: none;
    }
}

