/* Custom styles for VIP Nutrition */

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

/* Navbar transitions */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #0d9488;
    transition: width 0.3s ease;
}

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

/* Navbar background on scroll */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.nav-scrolled .nav-text {
    color: #0f172a !important;
}

.nav-scrolled .nav-link {
    color: #334155 !important;
}

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

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

/* Scroll reveal animations - progressive enhancement only */
.reveal {
    /* Default: visible for users without JS */
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Only apply hidden state when JS is active via .revealed class */
.revealed .reveal {
    opacity: 0;
    transform: translateY(30px);
}

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

/* Staggered animation delays */
.revealed .reveal:nth-child(1) { transition-delay: 0.1s; }
.revealed .reveal:nth-child(2) { transition-delay: 0.2s; }
.revealed .reveal:nth-child(3) { transition-delay: 0.3s; }

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Image aspect ratio helpers */
.aspect-\[4\/3\] {
    aspect-ratio: 4 / 3;
}

.aspect-\[3\/4\] {
    aspect-ratio: 3 / 4;
}

.aspect-square {
    aspect-ratio: 1 / 1;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    .animate-bounce {
        animation: none;
    }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .font-serif {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
}
