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

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

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

.animate-float-delayed {
    animation: float-delayed 3.5s ease-in-out infinite;
    animation-delay: 0.5s;
}

/* Scroll reveal animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: ensure content is always visible if JS is disabled */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

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

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

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff6b2e;
}

/* Selection color */
::selection {
    background: #ff6b2e;
    color: #0d0d0d;
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #ff6b2e;
    outline-offset: 2px;
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobile-menu.open {
    max-height: 400px;
}

/* Image loading optimization */
img {
    image-rendering: auto;
    will-change: transform;
}

/* Ensure contrast for accessibility */
@media (prefers-contrast: high) {
    .text-charcoal-400 {
        color: #9e9e9e;
    }
    
    .bg-charcoal-800 {
        background-color: #1a1a1a;
    }
}
