/* ============================================
   Doña Juanita — Custom Styles
   Classic & Elegant Mexican Restaurant
   ============================================ */

/* 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 color */
::selection {
    background-color: rgba(212, 160, 23, 0.3);
    color: #260e22;
}

/* ============================================
   Scroll Reveal Animations
   Progressive enhancement: content visible by default
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        /* These are set via JS for the animation */
    }
}

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

#navbar.scrolled {
    background-color: rgba(38, 14, 34, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 30px rgba(0, 0, 0, 0.3);
}

.nav-logo-text {
    transition: color 0.5s ease;
}

#navbar:not(.scrolled) .nav-logo-text {
    color: rgba(255, 255, 255, 0.95);
}

#navbar.scrolled .nav-logo-text {
    color: #fdfbf7;
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s 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; }

/* Hamburger animation */
#bar1.open {
    transform: rotate(45deg) translate(5px, 5px);
}

#bar2.open {
    opacity: 0;
}

#bar3.open {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Smooth image loading
   ============================================ */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ============================================
   Subtle hover effects on cards
   ============================================ */
.group:hover .group-hover\\:scale-105 {
    transform: scale(1.05);
}

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

::-webkit-scrollbar-track {
    background: #260e22;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #8e4d8e;
}

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

/* ============================================
   Responsive typography refinements
   ============================================ */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.15;
    }
}

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