/* Custom styles for Don Beli Peruvian Food */

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

/* Base transitions */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Reveal animations - progressive enhancement */
.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);
}

.reveal.from-bottom {
    transform: translateY(40px);
}

.reveal.from-left {
    transform: translateX(-40px);
}

.reveal.from-right {
    transform: translateX(40px);
}

.reveal.zoom-in {
    transform: scale(0.95);
}

/* When JS is active, add animated state */
.js-active .reveal.from-bottom {
    transform: translateY(40px);
    opacity: 0;
}

.js-active .reveal.from-left {
    transform: translateX(-40px);
    opacity: 0;
}

.js-active .reveal.from-right {
    transform: translateX(40px);
    opacity: 0;
}

.js-active .reveal.zoom-in {
    transform: scale(0.95);
    opacity: 0;
}

.js-active .reveal.animated {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* Menu card hover effect */
.menu-card {
    transition: border-color 0.5s ease, box-shadow 0.5s ease, transform 0.5s ease;
}

.menu-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px -20px rgba(47, 184, 142, 0.15);
}

/* Navbar glass effect */
#navbar.scrolled {
    background: rgba(5, 10, 24, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile link hover */
.mobile-link {
    position: relative;
}

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

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

/* Subtle grain texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    z-index: 9999;
}

/* Selection color */
::selection {
    background: rgba(47, 184, 142, 0.3);
    color: #fff;
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid #2FB88E;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    html {
        scroll-behavior: auto;
    }
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #0A1628 0%, #152B45 100%);
}

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

::-webkit-scrollbar-track {
    background: #050A18;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #2FB88E;
}
