/* Custom Styles & Animations */
body {
    scroll-behavior: smooth;
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 3D Container styling */
#canvas-container {
    width: 100%;
    height: 600px;
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
}

/* Artifact Card Hover */
.artifact-card:hover .artifact-img {
    transform: scale(1.05);
}

/* Timeline CSS */
.timeline-item {
    position: relative;
    padding-left: 30px;
    border-left: 2px solid #D97706;
    padding-bottom: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #D4A017;
    border: 3px solid #fff;
}

/* Loading Spinner */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #D97706;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Hide sections by default */
.section-content {
    display: none;
}

.section-content.active {
    display: block;
}

/* Floating animation for hero elements */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Enhanced hover effects */
.artifact-card:hover .artifact-img {
    transform: scale(1.05);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #D97706;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #B45309;
}

/* Hall of Fame Styles */
.hall-category {
    display: none;
}

.hall-category.active {
    display: grid;
}

.hall-tab.active {
    background-color: #D97706 !important;
    color: white !important;
}

.garment-btn.active {
    background-color: #166534 !important;
    color: white !important;
}

/* Animated heading (per-letter wave) */
.animated-heading {
    display: inline-block;
    line-height: 1;
}

.animated-heading .animated-letter {
    display: inline-block;
    transform-origin: 50% 50%;
    animation: wave 1.2s ease-in-out infinite;
    will-change: transform, color;
    color: inherit;
}

.animated-heading .animated-letter.space {
    width: 0.4rem;
}

@keyframes wave {
    0% {
        transform: translateY(0) rotate(0deg);
        color: inherit;
    }

    30% {
        transform: translateY(-10px) rotate(-2deg);
        color: #D97706;
    }

    60% {
        transform: translateY(0) rotate(2deg);
        color: #166534;
    }

    100% {
        transform: translateY(0) rotate(0deg);
        color: inherit;
    }
}

/* Staggered delays via CSS variable --i (set by script) */
.animated-heading .animated-letter {
    animation-delay: calc(var(--i) * 0.06s);
}