/* Custom styles for Nick's Diner */

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

/* Custom selection color */
::selection {
    background-color: rgba(164, 95, 140, 0.2);
    color: #512642;
}

/* Navbar transition */
#navbar {
    transition: background-color 0.4s ease, padding 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(142, 69, 115, 0.1);
}

#navbar.scrolled .menu-line {
    background-color: #512642;
}

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

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

/* Menu item hover effect */
.menu-item {
    position: relative;
}

.menu-item::after {
    content: '';
    position: absolute;
    bottom: -2.5rem;
    left: 0;
    width: 4rem;
    height: 1px;
    background: linear-gradient(to right, rgba(250, 168, 11, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease, width 0.3s ease;
}

.menu-item:hover::after {
    opacity: 1;
    width: 6rem;
}

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

/* Only apply animation on devices that support it and prefer motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile menu button animations */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

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

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

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

/* Gradient text effect for hero */
.gradient-text {
    background: linear-gradient(135deg, #ffc324 0%, #f5eef3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtle image hover */
.rounded-2xl.overflow-hidden img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rounded-2xl.overflow-hidden:hover img {
    transform: scale(1.03);
}

/* Button focus styles */
a:focus-visible, button:focus-visible {
    outline: 2px solid #ffc324;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .rounded-2xl.overflow-hidden img {
        transition: none;
    }
}

/* Print styles */
@media print {
    #navbar, #menu-btn, .reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
