/* ============================================
   La Tiendita Colombian Restaurant
   Classic & Elegant — Burgundy + Blush
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: #6c2525;
    color: #fdf8f6;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    transition: background-color 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(51, 14, 14, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(253, 248, 251, 0.05);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: rgba(253, 248, 251, 0.6);
    transition: width 0.3s ease;
}

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

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-menu-link {
    position: relative;
    z-index: 50;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-menu-link {
    animation: menuLinkFadeIn 0.4s ease forwards;
    opacity: 0;
}

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

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

/* Menu Button */
.menu-line {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.25s ease,
                width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body.menu-open .menu-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

body.menu-open .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

body.menu-open .menu-line:nth-child(3) {
    width: 24px;
    transform: translateY(-5px) rotate(-45deg);
}

/* ============================================
   Hero Animations
   ============================================ */
.hero-reveal {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-reveal:nth-child(1) { animation-delay: 0.2s; }
.hero-reveal:nth-child(2) { animation-delay: 0.35s; }
.hero-reveal:nth-child(3) { animation-delay: 0.5s; }
.hero-reveal:nth-child(4) { animation-delay: 0.65s; }

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

/* ============================================
   Scroll Reveal Animations
   (Progressive Enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .about-reveal,
    .menu-reveal,
    .experience-reveal,
    .testimonial-reveal,
    .visit-reveal,
    .cta-reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .about-reveal.delay-100,
    .menu-reveal.delay-100,
    .experience-reveal.delay-100,
    .visit-reveal.delay-100 {
        transition-delay: 0.1s;
    }
    
    .about-reveal.delay-200,
    .menu-reveal.delay-200,
    .experience-reveal.delay-200,
    .visit-reveal.delay-200 {
        transition-delay: 0.2s;
    }
}

/* ============================================
   Typography Refinements
   ============================================ */
.font-serif {
    text-rendering: optimizeLegibility;
}

/* ============================================
   Smooth Image Loading
   ============================================ */
img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Focus Styles
   ============================================ */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #df9575;
    outline-offset: 4px;
    border-radius: 2px;
}

/* ============================================
   Subtle Hover Transitions
   ============================================ */
a, button {
    transition: color 0.3s ease, background-color 0.3s ease, 
                border-color 0.3s ease, box-shadow 0.3s ease,
                transform 0.3s ease;
}

/* ============================================
   Card Shadow Refinement
   ============================================ */
.group:hover .font-serif {
    text-decoration-thickness: 0;
}

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

::-webkit-scrollbar-track {
    background: #330e0e;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #822c2c;
}

/* ============================================
   Reduced Motion
   ============================================ */
@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;
    }
    
    .hero-reveal {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Utility: Image Aspect Ratios
   ============================================ */
.h-64 { height: 16rem; }
.h-40 { height: 10rem; }
.h-\[520px\] { height: 520px; }
.min-h-\[500px\] { min-height: 500px; }

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar, #mobile-menu-btn, .hero-reveal { display: none; }
    body { background: white; color: black; }
    section { page-break-inside: avoid; }
}
