/* ============================================
   The Wagon Wheel Bakery — Custom Styles
   Classic & Elegant | Plum + Amber
   ============================================ */

/* 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-color: #fbbf24;
    color: #522f3d;
}

/* ============================================
   Scroll Reveal Animations
   Progressive enhancement — content is visible
   by default, JS adds animation classes.
   ============================================ */

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: translate(0, 0);
    }
}

/* Always visible regardless of JS */
@media (prefers-reduced-motion: reduce) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    will-change: transform;
}

#navbar.scrolled {
    box-shadow: 0 4px 30px rgba(45, 23, 32, 0.15);
}

/* ============================================
   Mobile Menu
   ============================================ */
#mobileMenu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.mobile-link {
    position: relative;
}

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

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

/* ============================================
   Image Hover Effects
   ============================================ */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

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

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

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

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

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

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

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

/* ============================================
   Typography Refinements
   ============================================ */
.font-serif {
    text-rendering: optimizeLegibility;
}

/* ============================================
   Card Hover Lift
   ============================================ */
.group {
    transition: transform 0.3s ease;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    nav, #mobileMenu, button {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    a {
        color: black !important;
        text-decoration: underline;
    }

    .bg-plum-950, .bg-plum-50 {
        background: white !important;
        color: black !important;
    }
}
