/* Custom styles for World Tree Games */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

@keyframes float-delay {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes bounce-slow {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delay {
    animation: float-delay 5s ease-in-out infinite 1s;
}

.animate-float-slow {
    animation: float-slow 6s ease-in-out infinite 2s;
}

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

.animate-slide-up {
    animation: slide-up 0.8s ease-out forwards;
    opacity: 0;
}

.animate-slide-up-delay {
    animation: slide-up 0.8s ease-out forwards;
    opacity: 0;
    animation-delay: 0.15s;
}

.animate-slide-up-delay-2 {
    animation: slide-up 0.8s ease-out forwards;
    opacity: 0;
    animation-delay: 0.3s;
}

.animate-bounce-slow {
    animation: bounce-slow 2s ease-in-out infinite;
}

/* Scroll-triggered animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Header scroll state */
.header-scrolled {
    background: rgba(250, 250, 245, 0.92) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(61, 95, 36, 0.08);
}

/* Mobile menu */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Nav link hover underline */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #3d5f24;
    border-radius: 1px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 60%;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f5ec;
}

::-webkit-scrollbar-thumb {
    background: #c5d9b0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ebe76;
}

/* Selection color */
::selection {
    background: #c5d9b0;
    color: #11190a;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem !important;
        line-height: 1.15 !important;
    }
    
    .font-serif {
        font-size: 1.75rem !important;
    }
    
    .font-serif.text-4xl {
        font-size: 2rem !important;
    }
}
