/* Custom styles for Keystone Nutrition & Energy */

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

/* Scroll reveal base - content is visible by default */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Animation classes applied by JS */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .scroll-reveal:not(.revealed) {
        opacity: 0;
        transform: translateY(24px);
    }
}

/* Navbar styles */
#navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.nav-logo-text {
    color: #0a1a2b;
}

/* Mobile menu */
#mobileMenu {
    animation: slideDown 0.3s ease;
}

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

/* Floating animations */
@media (prefers-reduced-motion: no-preference) {
    .animate-float {
        animation: float 6s ease-in-out infinite;
    }
    
    .animate-float-delayed {
        animation: float 6s ease-in-out infinite 3s;
    }
}

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

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

/* Button focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #5fbfa3;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background-color: #c5eadd;
    color: #0a1a2b;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #768fb2;
}

/* Ensure all images have consistent behavior */
img {
    max-width: 100%;
    height: auto;
}

/* Mobile menu link styles */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f4f8;
}

.mobile-link:last-child {
    border-bottom: none;
}

/* Form focus states */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(95, 191, 163, 0.2);
}

/* Print styles */
@media print {
    #navbar,
    .scroll-reveal,
    .animate-float,
    .animate-float-delayed {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
