/* Custom styles for Magnet's Mobile Mechanics */

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

/* Ensure all content is visible by default for progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Animation classes - only applied via JS when visible */
.reveal-animated {
    opacity: 0;
    transform: translateY(24px);
}

.reveal-animated.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for grid items */
.reveal-animated:nth-child(1) { transition-delay: 0ms; }
.reveal-animated:nth-child(2) { transition-delay: 80ms; }
.reveal-animated:nth-child(3) { transition-delay: 160ms; }
.reveal-animated:nth-child(4) { transition-delay: 240ms; }
.reveal-animated:nth-child(5) { transition-delay: 320ms; }
.reveal-animated:nth-child(6) { transition-delay: 400ms; }

/* Floating animation for decorative elements */
@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(-16px); }
}

.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 0.5s;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .animate-float,
    .animate-float-delay,
    .animate-float-slow {
        animation: none;
    }
    
    .reveal-animated.revealed {
        transition: none;
    }
}

/* Select dropdown styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23D97706' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

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

::-webkit-scrollbar-track {
    background: #0A1628;
}

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

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

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #D97706;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Mobile menu transition */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
