/* ============================================
   El Jarochito Truck — Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1A120C;
}
::-webkit-scrollbar-thumb {
    background: #C8956C33;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #C8956C55;
}

/* Selection */
::selection {
    background: #B85C38;
    color: #F5EDE0;
}

/* ============================================
   Reveal Animations (progressive enhancement)
   Only applied when JS is active and user
   prefers reduced motion is not set
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal-image {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
        transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal-image.revealed {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ============================================
   Header
   ============================================ */
#header {
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease;
}

#header.scrolled {
    background-color: rgba(26, 18, 12, 0.95);
    backdrop-filter: blur(20px);
}

/* ============================================
   Navigation Links
   ============================================ */
.nav-link {
    position: relative;
}

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

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

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

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

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

/* ============================================
   Menu Tabs
   ============================================ */
.menu-tab {
    background: transparent;
    color: #C8956C80;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s ease;
}

.menu-tab:hover {
    color: #E0C068;
    border-color: #C9A84C40;
}

.menu-tab.active {
    background: linear-gradient(135deg, #B85C38, #C9A84C);
    color: #F5EDE0;
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(184, 92, 56, 0.3);
}

/* ============================================
   Menu Panels
   ============================================ */
.menu-panel {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Menu Items
   ============================================ */
.menu-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.menu-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

.menu-item:hover {
    border-color: rgba(184, 92, 56, 0.3);
    box-shadow: 0 8px 40px rgba(184, 92, 56, 0.08);
}

/* ============================================
   Form Styles
   ============================================ */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(184, 92, 56, 0.15);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23C8956C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* ============================================
   Hover Effects
   ============================================ */
a, button {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   Focus Visible
   ============================================ */
:focus-visible {
    outline: 2px solid #C9A84C;
    outline-offset: 2px;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.1;
    }

    #hero h1 {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    #hero h1 {
        font-size: clamp(3rem, 7vw, 5rem);
    }
}
