/* ==========================================
   Animations & Transitions
   ========================================== */

/* Fade In Animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Stagger children */
.fade-in:nth-child(1) { transition-delay: 0.05s; }
.fade-in:nth-child(2) { transition-delay: 0.1s; }
.fade-in:nth-child(3) { transition-delay: 0.15s; }
.fade-in:nth-child(4) { transition-delay: 0.2s; }
.fade-in:nth-child(5) { transition-delay: 0.25s; }
.fade-in:nth-child(6) { transition-delay: 0.3s; }

/* Hero section animations */
.hero-content .fade-in:nth-child(1) { transition-delay: 0.1s; }
.hero-content .fade-in:nth-child(2) { transition-delay: 0.25s; }
.hero-content .fade-in:nth-child(3) { transition-delay: 0.4s; }
.hero-content .fade-in:nth-child(4) { transition-delay: 0.55s; }
.hero-content .fade-in:nth-child(5) { transition-delay: 0.7s; }

/* Pulse Animation */
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.5); opacity: 0.1; }
}

/* Float Animation for particles */
@keyframes float {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}

.particle {
    animation: float linear infinite;
}

/* Glow pulse */
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(99, 102, 241, 0.2); }
    50% { box-shadow: 0 0 25px rgba(99, 102, 241, 0.4); }
}

/* Counter animation handled by JS */

/* Arch diagram hover animations */
.arch-box {
    transition: all 0.3s ease, box-shadow 0.3s ease;
}

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

/* Tool card entrance */
.tool-card {
    transition: all 0.3s ease, opacity 0.4s ease, transform 0.4s ease;
}

/* Smooth filter transition */
.tool-card.filtering-out {
    opacity: 0;
    transform: scale(0.95);
}

.tool-card.filtering-in {
    opacity: 1;
    transform: scale(1);
}

/* Feature block hover effect */
.feature-block {
    transition: all 0.3s ease;
}

.feature-block:hover .feature-icon {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Stat bar animation */
.stat-bar {
    transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Security card shine effect */
.security-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(99, 102, 241, 0.03) 50%,
        transparent 60%
    );
    transform: rotate(45deg);
    transition: all 0.5s ease;
    pointer-events: none;
}

.security-card:hover::after {
    transform: rotate(45deg) translate(50%, 50%);
}

/* Theme transition */
body,
.navbar,
.card,
.tool-card,
.feature-block,
.security-card,
.stat-card,
.data-table,
.file-tree,
.arch-box {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Loading skeleton */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}
