/* Custom styles for Iron Nutrition */

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

/* Floating animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

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

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(250, 249, 246, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(27, 94, 32, 0.1);
}

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

#mobileMenu.open {
    max-height: 400px;
    padding-top: 0;
}

/* Mobile link transitions */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-link:hover {
    background-color: rgba(27, 94, 32, 0.08);
}

/* Scroll reveal base - content is visible by default */
/* JS adds animation class progressively */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button hover effects */
a[href="#products"],
a[href="#about"],
a[href="#community"],
a[href="#contact"] {
    position: relative;
}

/* Card hover effects */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #7cb37c;
}

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

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .animate-float {
        animation: none;
    }
}
