/* ========================================
   Trackside Tavern and Grill — Custom Styles
   ======================================== */

/* Base & Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #FF6B6B;
    color: #121212;
}

/* ========================================
   Animations
   ======================================== */

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

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

/* ========================================
   Scroll Reveal (Progressive Enhancement)
   Only applied when JS is available and
   user prefers motion
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll {
        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);
    }
    
    .reveal-on-scroll.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Default visible state (no JS fallback) */
.reveal-on-scroll {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Navbar
   ======================================== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

#navbar.scrolled a,
#navbar.scrolled .text-current {
    color: white;
}

/* ========================================
   Mobile Menu
   ======================================== */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

/* ========================================
   Buttons & Links
   ======================================== */
a {
    text-decoration: none;
}

/* ========================================
   Image Optimization
   ======================================== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   Smooth Scroll Offset for Fixed Nav
   ======================================== */
section[id] {
    scroll-margin-top: 80px;
}

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

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

::-webkit-scrollbar-track {
    background: #121212;
}

::-webkit-scrollbar-thumb {
    background: #FF6B6B;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #FF8787;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.1;
    }
    
    section[id] {
        scroll-margin-top: 60px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    section[id] {
        scroll-margin-top: 70px;
    }
}
