* {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

section {
    scroll-snap-align: start;
}

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

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

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

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.stat-card {
    animation: scaleIn 0.6s ease-out forwards;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

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

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

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

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

kbd {
    font-family: monospace;
    font-size: 0.9em;
}

.agent-phase {
    animation: slideUp 0.6s ease-out forwards;
    opacity: 0;
}

.agent-phase:nth-child(1) {
    animation-delay: 0.1s;
}

.agent-phase:nth-child(2) {
    animation-delay: 0.2s;
}

.agent-phase:nth-child(3) {
    animation-delay: 0.3s;
}

.agent-phase:nth-child(4) {
    animation-delay: 0.4s;
}

.agent-phase:nth-child(5) {
    animation-delay: 0.5s;
}

.phase-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: bold;
    font-size: 1.125rem;
}

.agent-card {
    position: relative;
    padding: 1.5rem;
    border-radius: 1rem;
    border-width: 2px;
    transition: all 0.3s ease;
}

.agent-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.agent-number {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid currentColor;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.875rem;
}

.agent-name {
    font-weight: bold;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.agent-model {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.agent-output {
    font-family: monospace;
    font-size: 0.875rem;
    color: #60a5fa;
}

.agent-card-compact {
    position: relative;
    padding: 0.5rem;
    border-radius: 0.375rem;
    border-width: 1px;
    transition: all 0.3s ease;
    text-align: center;
}

.agent-card-compact:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.agent-number-compact {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid currentColor;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.75rem;
}

.agent-name-compact {
    font-weight: bold;
    font-size: 0.75rem;
    margin-bottom: 0.125rem;
}

.agent-model-compact {
    font-size: 0.625rem;
    color: #9ca3af;
}

.tech-card {
    transition: all 0.3s ease;
}

.tech-card:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.evidence-card {
    animation: slideUp 0.6s ease-out forwards;
    opacity: 0;
    transition: all 0.3s ease;
}

.evidence-card:hover {
    transform: translateX(10px);
}

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

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

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

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

.evidence-card:nth-child(5) {
    animation-delay: 0.5s;
}

@media (max-width: 768px) {
    .agent-phase .grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1rem;
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    .tech-card:hover {
        transform: none;
    }
}

section {
    position: relative;
    min-height: 100vh;
}

section.active {
    z-index: 1;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.bg-gradient-animated {
    background-size: 200% 200%;
    animation: gradient-shift 10s ease infinite;
}

.cursor-pointer {
    cursor: pointer;
}

@media print {
    section {
        page-break-after: always;
    }

    .fade-in,
    .agent-phase,
    .evidence-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
}
