/* ============================================
   Queen Donuts of Fayetteville — Custom Styles
   ============================================ */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #4a7a38;
    color: #fafaf6;
}

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

/* Navbar Transition */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(250, 250, 246, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .font-display,
#navbar.scrolled span {
    color: #1f3519 !important;
}

#navbar.scrolled a:not(.bg-forest-700):not(.bg-amber-400) {
    color: #1f3519 !important;
}

/* Mobile Menu Animations */
#mobile-menu {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 1;
}

#mobile-menu.closed {
    max-height: 0 !important;
    opacity: 0;
    overflow: hidden;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    img, .group:hover img {
        transition: none;
    }
    
    .group:hover img {
        transform: none;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #6d9c58;
}

/* Image Loading */
img {
    background-color: #e3eddc;
}

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

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