/* Custom styles for Ray's Food Place */

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

/* Base font smoothing */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navbar scroll state */
nav.scrolled {
    background-color: rgba(3, 7, 14, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(92, 192, 142, 0.08);
}

/* Nav link hover underline */
.nav-link {
    position: relative;
}

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

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

/* Mobile menu animations */
.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; }

/* Menu button animation */
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

/* Scroll reveal animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: none;
    }
    
    .menu-line {
        transition: none;
    }
    
    #menu-btn.active .menu-line:nth-child(1) {
        transform: none;
    }
    
    #menu-btn.active .menu-line:nth-child(2) {
        opacity: 1;
    }
    
    .nav-link::after {
        transition: none;
    }
    
    #mobile-menu.open .mobile-link {
        opacity: 1;
        transform: none;
        transition-delay: 0s;
    }
    
    img {
        transition: none;
    }
}

/* Image loading placeholder */
img {
    background-color: rgba(13, 28, 43, 0.5);
}

/* Custom selection color */
::selection {
    background-color: rgba(92, 192, 142, 0.3);
    color: #f0f4f8;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 1px solid rgba(92, 192, 142, 0.5);
    outline-offset: 4px;
}

/* Subtle pattern overlay for sections */
section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(92, 192, 142, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

section > div.relative {
    position: relative;
}

/* Mobile menu overlay transition */
#mobile-menu {
    transition: opacity 0.3s ease;
}

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

#mobile-menu:not(.open) {
    opacity: 0;
    pointer-events: none;
}
