/* ─── Custom Styles for Main St Tin Roof Bistro ─── */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf9f0;
}
::-webkit-scrollbar-thumb {
    background: #166534;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #15803d;
}

/* Selection */
::selection {
    background: #166534;
    color: #fefdf8;
}

/* ─── Animations ─── */

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scrollLine {
    0% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: top;
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
        transform-origin: top;
    }
    51% {
        transform-origin: bottom;
    }
    100% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.animate-fade-in {
    animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* ─── Scroll Reveal ─── */
.reveal-on-scroll {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
}

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

/* Staggered reveal delays */
.reveal-on-scroll[data-reveal] { transition-delay: 0ms; }
.reveal-on-scroll[data-reveal="1"] { transition-delay: 100ms; }
.reveal-on-scroll[data-reveal="2"] { transition-delay: 200ms; }
.reveal-on-scroll[data-reveal="3"] { transition-delay: 300ms; }
.reveal-on-scroll[data-reveal="4"] { transition-delay: 400ms; }

/* ─── Navbar ─── */
#navbar {
    background: transparent;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(22, 101, 52, 0.1);
}

#navbar.scrolled .font-display,
#navbar.scrolled a:not(.bg-emerald-800):not(.bg-gold-400) {
    color: #2a2119;
}

#navbar.scrolled .mobile-link {
    color: #2a2119;
}

/* Mobile menu transition */
#mobile-menu {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-menu.open {
    transform: translateX(0);
}

/* Mobile menu bar animation */
#menu-toggle.active #bar1 {
    transform: rotate(45deg) translate(3px, 3px);
}
#menu-toggle.active #bar2 {
    opacity: 0;
}
#menu-toggle.active #bar3 {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 100%;
}

/* ─── Hero ─── */
#hero {
    background: linear-gradient(135deg, #052e16 0%, #14532d 40%, #166534 100%);
}

/* ─── Menu Section ─── */
#menu h4 {
    transition: color 0.3s ease;
}

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

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

input::-webkit-calendar-picker-indicator {
    filter: invert(0.4) sepia(1) saturate(5) hue-rotate(120deg);
}

/* ─── Image hover effects ─── */
img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal-on-scroll[data-reveal] {
        opacity: 1;
        transform: none;
    }
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
    }
}

/* ─── Responsive adjustments ─── */
@media (max-width: 767px) {
    #hero h1 {
        font-size: 2.75rem;
        line-height: 1.0;
    }

    .floating-card {
        position: relative;
        margin-top: 1rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    #hero h1 {
        font-size: 4rem;
    }
}

/* ─── Print styles ─── */
@media print {
    #navbar, #mobile-menu, .reveal-on-scroll {
        display: none;
    }
    body {
        background: white;
        color: black;
    }
}
