/* ==========================================
   AVA Nutrition — Custom Styles
   Clean Minimalist · Forest Green + Off-White
   ========================================== */

/* Base Reset & Smooth Scrolling */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: rgba(26, 77, 46, 0.15);
    color: #1a4d2e;
}

/* ==========================================
   Navbar
   ========================================== */
#navbar {
    transition: background-color 0.5s ease, box-shadow 0.5s ease, backdrop-filter 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(250, 249, 247, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(26, 77, 46, 0.08);
}

/* ==========================================
   Floating Cards Animation
   ========================================== */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.floating-card:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 5s;
}

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

/* ==========================================
   Card Hover Effects
   ========================================== */
.card-hover {
    transform: translateY(0);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease, border-color 0.5s ease;
}

.card-hover:hover {
    transform: translateY(-6px);
}

/* ==========================================
   Mobile Menu
   ========================================== */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* Menu Icon Animation */
#menuBtn.active .menu-line:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
}

/* ==========================================
   Scroll Reveal Animations
   (Progressive Enhancement - only active when JS runs)
   ========================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* ==========================================
   Button Focus States
   ========================================== */
a:focus-visible, button:focus-visible {
    outline: 2px solid #1a4d2e;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ==========================================
   Subtle Gradient Line Animations
   ========================================== */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* ==========================================
   Image Loading Placeholder
   ========================================== */
img {
    background: linear-gradient(135deg, #d9ecd9 0%, #ebe8e1 100%);
}

/* ==========================================
   Mobile Responsiveness Tweaks
   ========================================== */
@media (max-width: 767px) {
    .floating-card {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        margin: 12px 0;
        animation: none !important;
    }
    
    .hero-card-stack {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
}

/* ==========================================
   Print Styles
   ========================================== */
@media print {
    #navbar, .floating-card, footer {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
}
