/* Custom styles for The Downtown Creamery */

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

/* Scroll reveal animations - progressive enhancement */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* Navbar scroll state */
nav.scrolled {
    background: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(49, 77, 49, 0.08);
}

nav.scrolled .font-serif {
    color: #213421;
}

/* Hero floating cards animation */
@media (prefers-reduced-motion: no-preference) {
    .lg\\:grid-cols-2 > div:first-child > div:nth-child(1) {
        animation: float-slow 6s ease-in-out infinite;
    }
    .lg\\:grid-cols-2 > div:first-child > div:nth-child(2) {
        animation: float-slow 6s ease-in-out infinite 1.5s;
    }
    .lg\\:grid-cols-2 > div:last-child > div:nth-child(1) {
        animation: float-slow 6s ease-in-out infinite 0.75s;
    }
    .lg\\:grid-cols-2 > div:last-child > div:nth-child(2) {
        animation: float-slow 6s ease-in-out infinite 2.25s;
    }

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

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f3ed;
}
::-webkit-scrollbar-thumb {
    background: #9bbf9b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #729e72;
}

/* Mobile menu transition */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

#mobile-menu.open {
    max-height: 400px;
    padding-top: 0;
}

/* Ensure images don't cause layout shift */
img {
    max-width: 100%;
    height: auto;
}
