/* Custom styles for BR Food Truck */

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

/* Base font rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scroll reveal animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Navbar glass effect */
.nav-scrolled {
    background: rgba(254, 253, 248, 0.92) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(45, 80, 22, 0.08);
}

.nav-transparent {
    background: transparent !important;
    box-shadow: none !important;
}

/* Mobile menu transitions */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.mobile-menu-closed {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Button ripple effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Image lazy loading fade */
img[loading="lazy"] {
    transition: opacity 0.4s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

img[loading="lazy"][src] {
    opacity: 0;
}

/* Custom selection color */
::selection {
    background: #c5dab0;
    color: #213517;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal,
    .reveal-hidden {
        opacity: 1;
        transform: none;
        transition: none;
    }

    img[loading="lazy"] {
        transition: none;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9bbf82;
}
