/* ── An Chi — Vietnamese Fine Dining, San Francisco ── */

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #060d09;
}
::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 76, 0.2);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 168, 76, 0.4);
}

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

/* Selection color */
::selection {
    background: rgba(201, 168, 76, 0.25);
    color: #fdf9ec;
}

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

/* ── Navbar ── */
#navbar {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

#navbar.scrolled {
    background: rgba(6, 13, 9, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.08);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.3);
}

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

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.4s ease forwards;
}

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

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Menu toggle animation */
.menu-line {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}
#menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
    width: 1.5rem;
}

/* ── Scroll Reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
    #mobile-menu.open .mobile-link {
        animation: none;
    }
}

/* ── Image hover effects ── */
.overflow-hidden img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ── Form focus styles ── */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.15);
}

/* ── Date input styling ── */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.7) sepia(1) saturate(3) hue-rotate(10deg);
    cursor: pointer;
}

/* ── Button press effect ── */
button:active {
    transform: scale(0.98);
}

/* ── Menu list item hover ── */
.group:hover .group-hover\:text-cream-100 {
    color: #fdf9ec;
}

/* ── Card hover ── */
.rounded-xl {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.rounded-xl:hover {
    border-color: rgba(201, 168, 76, 0.15);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

/* ── Mobile responsive ── */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.15;
    }
}
