/* ========================================
   CINCO DE MAYO BAKERY — CUSTOM STYLES
   ======================================== */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: #ff6b3f;
    color: #ffffff;
}

/* ========================================
   NAVBAR
   ======================================== */
#navbar {
    background: transparent;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .font-serif {
    color: #25282e !important;
}

#navbar.scrolled .text-charcoal-500 {
    color: #5c616c !important;
}

/* ========================================
   MOBILE MENU
   ======================================== */
#mobile-menu.active {
    opacity: 1 !important;
    pointer-events: all !important;
}

#mobile-menu.active .mobile-link {
    animation: fadeDown 0.4s ease forwards;
    opacity: 0;
}

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

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

/* Menu Toggle Animation */
.menu-toggle-active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.menu-toggle-active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-toggle-active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 5 !important;
}

/* ========================================
   REVEAL ANIMATIONS
   (Progressive Enhancement — only apply with JS)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .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; }
}

/* ========================================
   HERO
   ======================================== */
#hero {
    position: relative;
}

/* ========================================
   BUTTONS
   ======================================== */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* ========================================
   FORM STYLES
   ======================================== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235c616c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

select:focus {
    outline: none;
}

/* ========================================
   IMAGE HOVER EFFECTS
   ======================================== */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.1);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9fa3ab;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 767px) {
    html {
        scroll-padding-top: 72px;
    }
}
