/* ===== Base & Typography ===== */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: rgba(224, 122, 95, 0.2);
    color: #3d405b;
}

/* ===== Floating Card Animations ===== */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.card-fresh {
    animation-delay: 0s;
}

.card-breads {
    animation-delay: -1.5s;
}

.card-local {
    animation-delay: -3s;
}

.card-community {
    animation-delay: -4.5s;
}

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

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .reveal.visible {
        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; }
    .reveal-delay-5 { transition-delay: 0.5s; }
}

/* ===== Navbar Transition ===== */
.nav-scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(61, 64, 91, 0.08);
}

.nav-scrolled #navbar .font-serif {
    color: #3d405b !important;
}

/* ===== Smooth Image Loading ===== */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

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

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

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

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

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #e07a5f;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Mobile Menu Animation ===== */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

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

/* ===== Print Styles ===== */
@media print {
    nav, #mobile-menu-btn, #contact-form {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
