/* Stats Section */
.stats {
    background: #0a0a0a;
    padding: 100px 50px;
    position: relative;
    overflow: hidden;
}

.stats h2 {
    font-size: 48px;
    font-weight: 400;
    margin-bottom: 80px;
    text-align: center;
    background: linear-gradient(
        180deg,
        #ffffff 0%,
        #e0e0e0 10%,
        #cccccc 20%,
        #b3b3b3 30%,
        #999999 40%,
        #808080 50%,
        #999999 60%,
        #b3b3b3 70%,
        #cccccc 80%,
        #e0e0e0 90%,
        #ffffff 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.stats h2.visible {
    opacity: 1;
    transform: translateY(0);
}

.stats h2 em {
    font-style: italic;
    background: linear-gradient(
        180deg,
        #FF7107 0%,
        #FF8C42 20%,
        #FF7107 40%,
        #FF5500 50%,
        #FF7107 60%,
        #FF8C42 80%,
        #FF7107 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.stat-item {
    text-align: center;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.stat-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.stat-item:nth-child(2) {
    transition-delay: 0.2s;
}

.stat-item:nth-child(3) {
    transition-delay: 0.4s;
}

.stat-number {
    font-size: 72px;
    font-weight: 300;
    color: #FF7107;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.stat-label {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
}

.stat-link {
    color: #FF7107;
    text-decoration: none;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s ease;
}

.stat-link:hover {
    gap: 10px;
}

/* Particle Canvas */
#particleCanvas_stats {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

/* Neural connections canvas */
#neuralCanvas_stats {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
}

/* Mobile Optimizations Only */
@media (max-width: 768px) {
    /* GPU acceleration for mobile */
    #particleCanvas_stats,
    #neuralCanvas_stats {
        transform: translateZ(0);
        will-change: transform;
        -webkit-transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    
    .stats {
        padding: 60px 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .stats h2 {
        font-size: 36px;
        margin-bottom: 50px;
        padding: 0 10px;
        line-height: 1.3;
    }
    
    .stat-number {
        font-size: 48px;
    }
    
    .stat-label {
        font-size: 16px;
        padding: 0 20px;
        line-height: 1.5;
    }
    
    .stat-link {
        font-size: 14px;
    }
    
    /* Simplified animations on mobile */
    .stat-item {
        transform: translateY(30px);
        transition: all 0.5s ease;
    }
    
    /* Disable hover effects on touch devices */
    @media (hover: none) and (pointer: coarse) {
        .stat-link:hover {
            gap: 5px;
        }
    }
}

/* Very small mobile */
@media (max-width: 480px) {
    .stats {
        padding: 40px 15px;
    }
    
    .stats h2 {
        font-size: 28px;
        margin-bottom: 40px;
    }
    
    .stat-number {
        font-size: 40px;
        margin-bottom: 15px;
    }
    
    .stat-label {
        font-size: 14px;
        margin-bottom: 15px;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .stats h2,
    .stat-item {
        transition: none !important;
        animation: none !important;
    }
    
    .stats h2.visible,
    .stat-item.visible {
        opacity: 1;
        transform: none;
    }
    
    #particleCanvas_stats,
    #neuralCanvas_stats {
        display: none;
    }
}