/* ============================================
   Town Restaurant — Custom Styles
   ============================================ */

/* Base & Typography */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ============================================
   Navigation
   ============================================ */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

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

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #059669;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu */
#mobile-menu {
    transition: opacity 0.3s ease, pointer-events 0.3s ease;
}

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

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

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

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

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

/* Menu Toggle */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-toggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
    margin-right: 0;
}

/* ============================================
   Scroll Reveal Animations
   (Progressive Enhancement — content visible
    by default, JS adds animation)
   ============================================ */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
    }
    .reveal.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger children */
.reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal:nth-child(2) { transition-delay: 0.12s; }
.reveal:nth-child(3) { transition-delay: 0.19s; }
.reveal:nth-child(4) { transition-delay: 0.26s; }

/* ============================================
   Hero Card Float Animation
   ============================================ */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(var(--rotate, 0deg)); }
    50% { transform: translateY(-10px) rotate(var(--rotate, 0deg)); }
}

.bg-emerald-700.rounded-2xl {
    animation: float 4s ease-in-out infinite;
}

/* ============================================
   Hover Effects
   ============================================ */
a, button {
    transition: all 0.3s ease;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .font-serif.text-5xl {
        font-size: 2.5rem;
    }
}

@media (max-width: 360px) {
    html {
        font-size: 14px;
    }
}

/* ============================================
   Selection Color
   ============================================ */
::selection {
    background: #059669;
    color: #fefdf8;
}
::-moz-selection {
    background: #059669;
    color: #fefdf8;
}

/* ============================================
   Focus Styles
   ============================================ */
a:focus-visible, button:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 4px;
    border-radius: 4px;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar, .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
