/* Custom styles for Pittsburgh Market and Deli */

/* Base */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0f18;
}
::-webkit-scrollbar-thumb {
    background: #ebaf14;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #f3cf74;
}

/* Selection */
::selection {
    background: #ebaf14;
    color: #0a0f18;
}

/* Navbar transition */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ebaf14;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu animation */
.menu-line {
    transition: all 0.3s ease;
}
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.25rem;
}

/* Mobile menu open */
#mobile-menu.open {
    max-height: 400px;
}

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

.reveal-hidden {
    opacity: 0;
    transform: translateY(30px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-hidden {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
}

/* Image hover zoom */
.group img {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Button focus */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #ebaf14;
    outline-offset: 2px;
}

/* Input focus */
input:focus,
textarea:focus {
    outline: none;
}

/* Smooth image loading */
img {
    image-rendering: auto;
}

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