/* ===========================================
   PREMIUM MICRO-INTERACTIONS & ANIMATIONS
   Evidence Platform v12.0
   =========================================== */

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

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

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

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

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px currentColor;
    }
    50% {
        box-shadow: 0 0 40px currentColor, 0 0 60px currentColor;
    }
}

/* Stagger animations for cards */
.metric-card {
    animation: slideInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.metric-card:nth-child(1) {
    animation-delay: 0.1s;
}

.metric-card:nth-child(2) {
    animation-delay: 0.2s;
}

.metric-card:nth-child(3) {
    animation-delay: 0.3s;
}

.metric-card:nth-child(4) {
    animation-delay: 0.4s;
}

.dora-card {
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.dora-card:nth-child(1) {
    animation-delay: 0.1s;
}

.dora-card:nth-child(2) {
    animation-delay: 0.2s;
}

.dora-card:nth-child(3) {
    animation-delay: 0.3s;
}

.dora-card:nth-child(4) {
    animation-delay: 0.4s;
}

.insight-card {
    animation: fadeIn 0.6s ease-out backwards;
}

.insight-card:nth-child(1) {
    animation-delay: 0.15s;
}

.insight-card:nth-child(2) {
    animation-delay: 0.3s;
}

.insight-card:nth-child(3) {
    animation-delay: 0.45s;
}

.page-header {
    animation: fadeIn 0.8s ease-out;
}

/* Enhanced hover with ripple effect */
.btn-primary,
.insight-action,
.dora-status {
    position: relative;
    overflow: hidden;
}

.btn-primary::after,
.insight-action::after,
.dora-status::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:active::after,
.insight-action:active::after,
.dora-status:active::after {
    width: 300px;
    height: 300px;
}

/* Smooth loading skeleton */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 0%,
        var(--bg-tertiary) 50%,
        var(--bg-secondary) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* Number counter animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.metric-value,
.dora-value,
.exec-status-value,
.insight-metric-value {
    animation: countUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
