/* Custom styles for A.OK Coffee La Habra */

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

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

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(250, 247, 242, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(111, 31, 56, 0.08);
}

#navbar.scrolled .menu-line {
    background: #6f1f38;
}

/* Mobile menu animations */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Mobile menu button animation */
.menu-line:last-child {
    width: 1.5rem;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

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

#menuBtn.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: translateY(-6px) rotate(-45deg);
}

/* About section animations */
.about-image {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-content {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

.about-image.reveal {
    opacity: 0;
    transform: translateX(-40px);
}

.about-content.reveal {
    opacity: 0;
    transform: translateX(40px);
}

/* Menu section animations */
.menu-header, .gallery-header, .visit-header {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.7s ease;
}

.menu-column {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.7s ease;
}

.menu-column:nth-child(2) {
    transition-delay: 0.1s;
}

.menu-header.reveal, .gallery-header.reveal, .visit-header.reveal {
    opacity: 0;
    transform: translateY(30px);
}

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

/* Gallery animations */
.gallery-item {
    opacity: 1;
    transform: scale(1);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item.reveal {
    opacity: 0;
    transform: scale(0.95);
}

/* Menu item hover */
.menu-item {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(253, 165, 184, 0.1);
}

.menu-item:last-child {
    border-bottom: none;
}

/* Decorative line animation */
.menu-item::after {
    content: '';
    display: block;
    width: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #dc4470, transparent);
    transition: width 0.4s ease;
    margin-top: 0.25rem;
}

.menu-item:hover::after {
    width: 100%;
}

/* Scroll indicator pulse */
@keyframes pulse-down {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(8px); opacity: 1; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .about-image, .about-content,
    .menu-header, .menu-column,
    .gallery-header, .gallery-item,
    .visit-header {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .menu-item::after {
        display: none;
    }
}

/* Prefers reduced motion - keep content visible by default */
@media (prefers-reduced-motion: no-preference) {
    .about-image.reveal,
    .about-content.reveal,
    .menu-header.reveal,
    .menu-column.reveal,
    .gallery-header.reveal,
    .gallery-item.reveal,
    .visit-header.reveal {
        /* JS will handle animation for these */
    }
}
