/* ============================================
   Asian Eats — Custom Styles
   Classic & Elegant · Emerald + Cream Palette
   ============================================ */

/* ── Base Reset & Typography ── */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background-color: rgba(6, 78, 59, 0.2);
    color: #064e3b;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf9ef;
}
::-webkit-scrollbar-thumb {
    background: #065f46;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* ── Navbar Transition ── */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08), 0 4px 24px rgba(6, 78, 59, 0.06);
}

#navbar.scrolled .nav-link {
    color: #065f46;
}

#navbar.scrolled .nav-link:hover {
    color: #059669;
}

/* ── Mobile Menu ── */
.menu-line {
    display: block;
    position: absolute;
    width: 18px;
    height: 2px;
    background-color: #064e3b;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-line.top { top: 10px; }
.menu-line.middle { top: 15px; }
.menu-line.bottom { top: 20px; }

body.menu-open .menu-line.top {
    top: 15px;
    transform: translateX(-50%) rotate(45deg);
}

body.menu-open .menu-line.middle {
    opacity: 0;
    transform: translateX(-50%) scaleX(0);
}

body.menu-open .menu-line.bottom {
    top: 15px;
    transform: translateX(-50%) rotate(-45deg);
}

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

.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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

/* ── Scroll Reveal (Progressive Enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(28px);
        transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    }

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

/* Fallback: always visible if JS is disabled */
.no-js .scroll-reveal,
.scroll-reveal {
    opacity: 1;
    transform: none;
}

/* ── Form Styles ── */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23065f46' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

/* ── Button Hover Effects ── */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* ── Image Loading ── */
img {
    max-width: 100%;
    height: auto;
}

/* ── Focus Visible ── */
:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
}

/* ── Print Styles ── */
@media print {
    #navbar, #mobileMenu, .scroll-reveal { display: none; }
    body { background: white; color: black; }
    a { color: black; text-decoration: underline; }
}
