/* ============================================
   Los Olivos Bakery — Custom Styles
   ============================================ */

/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf5ed;
}
::-webkit-scrollbar-thumb {
    background: #d4b476;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c67b5c;
}

/* Selection */
::selection {
    background: #f5e0d6;
    color: #7a4030;
}

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

#navbar.scrolled {
    background-color: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

/* ============================================
   Nav Links
   ============================================ */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #c67b5c;
    transition: width 0.3s ease;
}

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

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

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.4s ease forwards;
}

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

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

/* Hamburger */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.25rem;
}

/* ============================================
   Scroll Reveal
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .hover\:scale-105:hover {
        transform: none;
    }
    #mobile-menu .mobile-link {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Gallery hover (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .rounded-2xl.overflow-hidden img {
        transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
}

/* ============================================
   Menu items subtle hover
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    #menu .bg-white:hover {
        box-shadow: 0 8px 40px rgba(198, 123, 92, 0.08);
        transform: translateY(-2px);
        transition: box-shadow 0.3s ease, transform 0.3s ease;
    }
}

/* ============================================
   Custom focus styles
   ============================================ */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #c67b5c;
    outline-offset: 3px;
    border-radius: 4px;
}

/* ============================================
   Utility: decorative line
   ============================================ */
.deco-line {
    position: relative;
    display: inline-block;
}

.deco-line::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, #c67b5c, #e0a48c);
    border-radius: 2px;
}

/* ============================================
   Image aspect ratio fallbacks
   ============================================ */
.ratio-4\/5 {
    aspect-ratio: 4 / 5;
}
.ratio-4\/3 {
    aspect-ratio: 4 / 3;
}
.ratio-1\/1 {
    aspect-ratio: 1 / 1;
}
