/* ========================================
   Southern Brew — Custom Styles
   Classic & Elegant | Plum + Amber
   ======================================== */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #a3556e;
    color: #faf5f7;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        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);
    }

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

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

/* Fallback: content visible without JS */
.no-js .reveal,
.js-enabled .reveal {
    /* If JS fails, content is still visible */
}

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

#navbar.scrolled {
    background: rgba(250, 245, 247, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(79, 33, 47, 0.08);
}

#navbar.scrolled .nav-link {
    color: #5e2838;
}

#navbar.scrolled .font-serif.text-xl {
    color: #4f212f;
}

/* --- Mobile Menu --- */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #fbbf24;
    transition: width 0.3s ease;
}

.mobile-link:hover::after {
    width: 100%;
}

/* --- Button Hover Effects --- */
a {
    text-decoration: none;
}

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

img[data-src] {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}

/* --- Card Hover --- */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.1);
}

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

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

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

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

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

/* --- Responsive adjustments --- */
@media (max-width: 768px) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* --- Print Styles --- */
@media print {
    #navbar,
    #mobile-menu,
    .reveal {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
