/* Custom styles for The Nutrition Bar - Bellevue */

/* Smooth scroll offset for fixed navbar */
section[id] {
    scroll-margin-top: 80px;
}

/* Ensure all text meets WCAG AA contrast */
.text-emerald-900\/60 {
    color: rgba(20, 83, 45, 0.6);
}

.text-emerald-900\/70 {
    color: rgba(20, 83, 45, 0.7);
}

.text-emerald-900\/50 {
    color: rgba(20, 83, 45, 0.5);
}

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

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}

/* Mobile menu transitions */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease;
    opacity: 0;
}

#mobileMenu.open {
    max-height: 400px;
    opacity: 1;
}

/* Hamburger animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

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

#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.25rem;
}

/* Reduced 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;
    }

    .img-zoom img {
        transition: none;
    }

    .img-zoom:hover img {
        transform: none;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Print styles */
@media print {
    nav,
    #hero,
    .hover-lift,
    .img-zoom {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}
