/* Custom styles for Mezcal 87 Cantina Bar */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #2a1119;
}
::-webkit-scrollbar-thumb {
    background: #74304a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a85574;
}

/* Selection color */
::selection {
    background: #fbbf24;
    color: #2a1119;
}

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

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

/* Mobile link transitions */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(116, 48, 74, 0.3);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* Scroll reveal base - content always visible */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Scroll reveal active state (applied by JS) */
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* For users who prefer reduced motion, disable transitions */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .group:hover img {
        transform: none;
    }
}

/* Navbar scroll state */
nav.scrolled {
    background: rgba(42, 17, 25, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Card hover effects */
.group:hover .group-hover\:rotate-0 {
    transform: rotate(0deg);
}

/* Ensure images have no layout shift */
img {
    max-width: 100%;
    height: auto;
}

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

/* Button ripple effect */
button, a {
    position: relative;
    overflow: visible;
}

/* Hero floating animation */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(2deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

@keyframes floatReverse {
    0%, 100% { transform: translateY(0px) rotate(-3deg); }
    50% { transform: translateY(-8px) rotate(-3deg); }
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(0deg); }
}

/* Apply animations only when not reduced motion */
@media (prefers-reduced-motion: no-preference) {
    #hero .lg\:block > div:first-child {
        animation: float 6s ease-in-out infinite;
    }
    #hero .lg\:block > div:nth-child(2) {
        animation: floatReverse 5s ease-in-out infinite;
    }
    #hero .lg\:block > div:nth-child(3) {
        animation: floatSlow 7s ease-in-out infinite;
    }
}

/* Loading state for images */
img {
    background: linear-gradient(135deg, #502535 0%, #2a1119 100%);
}

/* Print styles */
@media print {
    nav, #menuBtn, #mobileMenu {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-plum-950, .bg-plum-900 {
        background: white !important;
        color: black !important;
    }
}
