/* Custom styles for Short Rise Bakery */

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

/* Custom color tokens */
:root {
    --cream-50: #fdfaf3;
    --cream-100: #f9f3e8;
    --wheat-50: #fef9f0;
}

/* Base body background */
body {
    background-color: var(--cream-50);
}

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

#navbar.scrolled {
    background: rgba(253, 250, 243, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(16, 42, 67, 0.06);
}

#navbar.scrolled .menu-line {
    background-color: #102a43;
}

#navbar.scrolled a:not(.bg-navy-900):not(.bg-white\/60) {
    color: #102a43;
}

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

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

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

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

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

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

/* Scroll reveal animations (below the fold only) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .menu-line,
    .mobile-link,
    .group img {
        transition: none;
    }
    .group:hover img {
        transform: none;
    }
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #e8991a;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Selection color */
::selection {
    background-color: #f7dd80;
    color: #102a43;
}

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

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

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

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