/* Custom styles for Kneeland Glen Farm Stand */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #FDFCF8;
}
::-webkit-scrollbar-thumb {
    background: #059669;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* Blob animation */
@keyframes blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(20px, -30px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    75% {
        transform: translate(10px, 10px) scale(1.05);
    }
}

.animate-blob {
    animation: blob 7s infinite ease-in-out;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Hero animations */
.hero-badge {
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-image {
    animation: fadeInRight 1s ease-out forwards;
}

/* About animations */
.about-images {
    animation: fadeInLeft 1s ease-out forwards;
}

.about-content {
    animation: fadeInRight 1s ease-out 0.2s forwards;
    opacity: 0;
}

/* Produce animations */
.produce-header {
    animation: fadeInUp 0.8s ease-out forwards;
}

.produce-grid > * {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.produce-grid > *:nth-child(1) { animation-delay: 0.1s; }
.produce-grid > *:nth-child(2) { animation-delay: 0.2s; }
.produce-grid > *:nth-child(3) { animation-delay: 0.3s; }
.produce-grid > *:nth-child(4) { animation-delay: 0.4s; }
.produce-grid > *:nth-child(5) { animation-delay: 0.5s; }
.produce-grid > *:nth-child(6) { animation-delay: 0.6s; }

.produce-cta {
    animation: fadeInUp 0.8s ease-out 0.7s forwards;
    opacity: 0;
}

/* Café animations */
.cafe-content {
    animation: fadeInLeft 1s ease-out forwards;
    opacity: 0;
}

.cafe-images {
    animation: fadeInRight 1s ease-out 0.2s forwards;
    opacity: 0;
}

/* Visit animations */
.visit-header {
    animation: fadeInUp 0.8s ease-out forwards;
}

.visit-card {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.visit-card:nth-child(1) { animation-delay: 0.2s; }
.visit-card:nth-child(2) { animation-delay: 0.4s; }

/* Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

#navbar.scrolled {
    background: rgba(253, 252, 248, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(5, 150, 105, 0.1);
}

/* Mobile menu */
#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

/* Mobile link animation */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

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

/* Intersection Observer animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
