/* Custom styles for Benji's Bakery Shop */

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

/* Base font rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(254, 252, 248, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .font-display {
    color: #6e3627 !important;
}

/* Mobile menu transitions */
#mobile-menu {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

#mobile-menu.closed {
    max-height: 0;
    opacity: 0;
}

/* Reveal-up animation (progressive enhancement) */
.reveal-up {
    opacity: 1;
    transform: translateY(0);
}

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

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

/* Geometric shape hover effects */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Button micro-interactions */
a[href^="tel:"] {
    text-decoration: none;
}

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

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

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

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

/* Selection color */
::selection {
    background: #f9d5c8;
    color: #572c20;
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid #C1694F;
    outline-offset: 2px;
}

/* Image loading placeholder */
img {
    background-color: #f5d89a;
}

/* Geometric decorative animations */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(12deg); }
    50% { transform: translateY(-15px) rotate(12deg); }
}

@keyframes float-medium {
    0%, 100% { transform: translateY(0px) rotate(45deg); }
    50% { transform: translateY(-10px) rotate(45deg); }
}

@keyframes float-fast {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.fixed.inset-0 > div:nth-child(2) {
    animation: float-slow 8s ease-in-out infinite;
}

.fixed.inset-0 > div:nth-child(3) {
    animation: float-medium 6s ease-in-out infinite;
}

.fixed.inset-0 > div:nth-child(4) {
    animation: float-fast 5s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .fixed.inset-0 > div {
        animation: none;
    }
}
