/* ============================================
   Scorched Earth Brewing — Custom Styles
   ============================================ */

/* Base & Reset */
*, *::before, *::after {
    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: #E07B59;
    color: #F5F2EB;
}

/* ============================================
   Scroll Reveal Animations
   (Progressive Enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

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

#navbar.scrolled {
    background-color: rgba(245, 242, 235, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(44, 44, 44, 0.08);
}

#navbar.scrolled .nav-link {
    color: #2C2C2C;
}

#navbar.scrolled .font-serif,
#navbar.scrolled .font-sans {
    color: #2C2C2C;
}

#navbar.transparent .text-current {
    color: #F5F2EB;
}

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

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

#mobileMenu.open .mobile-nav-link {
    animation: slideIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

#mobileMenu.open .mobile-nav-link:nth-child(1) { animation-delay: 0.05s; }
#mobileMenu.open .mobile-nav-link:nth-child(2) { animation-delay: 0.1s; }
#mobileMenu.open .mobile-nav-link:nth-child(3) { animation-delay: 0.15s; }
#mobileMenu.open .mobile-nav-link:nth-child(4) { animation-delay: 0.2s; }

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

/* ============================================
   Custom Select Styling
   ============================================ */
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='%238B8680' stroke-width='2' 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 1rem center;
    padding-right: 2.5rem;
}

/* ============================================
   Smooth Image Loading
   ============================================ */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* ============================================
   Focus Styles for Accessibility
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #E07B59;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   Subtle Hover Transitions
   ============================================ */
button, a {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar, #backToTop, .scroll-reveal {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
