/* ===== Custom Styles for Rooster's Bar & Grill Too ===== */

/* Base & Typography */
html {
    scroll-behavior: smooth;
}

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

/* Selection */
::selection {
    background: #325423;
    color: #fafaf5;
}

/* ===== Scroll Reveal Animations ===== */
.section-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Progressive enhancement: animations only apply when JS is enabled and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .section-reveal {
        opacity: 0;
        transform: translateY(30px);
    }

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

    .section-reveal:nth-child(2) { transition-delay: 0.1s; }
    .section-reveal:nth-child(3) { transition-delay: 0.2s; }
    .section-reveal:nth-child(4) { transition-delay: 0.3s; }
    .section-reveal:nth-child(5) { transition-delay: 0.4s; }
}

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

#navbar.scrolled {
    background-color: rgba(17, 29, 10, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(250, 250, 245, 0.08);
}

#navbar.scrolled .nav-link {
    color: rgba(250, 250, 245, 0.85);
}

#navbar.scrolled .nav-logo-text {
    opacity: 1;
}

/* ===== Mobile Menu ===== */
.mobile-bar {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

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

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

#mobile-menu-btn.active .mobile-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.25rem;
}

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

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

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

/* ===== Hero ===== */
#hero {
    scroll-snap-align: start;
}

/* ===== Image Hover Effects ===== */
img {
    transition: filter 0.3s ease;
}

/* ===== Button Focus States ===== */
a:focus-visible, button:focus-visible {
    outline: 2px solid #9cc17e;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1f18;
}

::-webkit-scrollbar-thumb {
    background: #325423;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3f6a2b;
}

/* ===== Card Tilt on Hover ===== */
.group:hover .group-hover\\:scale-105 {
    transform: scale(1.05);
}

/* ===== Subtle Pattern Overlay ===== */
.bg-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V2h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V2H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ===== Gradient Text Utility ===== */
.text-gradient {
    background: linear-gradient(135deg, #9cc17e, #548738);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Glass Effect ===== */
.glass {
    background: rgba(250, 250, 245, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(250, 250, 245, 0.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;
    }

    .section-reveal {
        opacity: 1;
        transform: none;
    }
}
