/* ============================================
   ZIMAPAN BAKERY — Custom Styles
   ============================================ */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FFFBF5;
}
::-webkit-scrollbar-thumb {
    background: #7B2D3B;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6b2430;
}

/* Selection color */
::selection {
    background: #7B2D3B;
    color: #FFFBF5;
}

/* Reveal animations — progressive enhancement via JS */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-30px);
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(30px);
    }

    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: none;
    }
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(44, 30, 20, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#navbar.scrolled .nav-link {
    color: #FFFBF5 !important;
}

#navbar.scrolled #nav-logo-text,
#navbar.scrolled #nav-logo-sub {
    color: #FFFBF5 !important;
}

/* Mobile menu active state */
#mobile-menu.open {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Hamburger animation */
#menu-toggle.active #bar1 {
    transform: translateY(5px) rotate(45deg);
}
#menu-toggle.active #bar2 {
    opacity: 0;
}
#menu-toggle.active #bar3 {
    transform: translateY(-5px) rotate(-45deg);
}

/* Mobile links */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: none;
}

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

/* Image hover zoom wrapper */
.group img {
    will-change: transform;
}

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

/* Map container */
iframe {
    filter: saturate(0.8) contrast(1.05);
    transition: filter 0.3s ease;
}
iframe:hover {
    filter: saturate(1) contrast(1);
}

/* Subtle pattern overlay on dark sections */
.bg-warm-900::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,251,245,0.03) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}
