/* Custom styles for Hutcheson Farm */

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

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

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

::-webkit-scrollbar-thumb {
    background: #059669;
    border-radius: 5px;
}

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

/* Selection color */
::selection {
    background: #10B981;
    color: #022C22;
}

/* Navbar styles */
.navbar-scrolled {
    background: rgba(253, 252, 248, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(6, 78, 59, 0.08);
}

.navbar-scrolled .nav-link {
    color: #065F46 !important;
}

.navbar-scrolled .font-serif {
    color: #064E3B !important;
}

/* Mobile menu */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #059669;
    transition: width 0.3s ease;
}

.mobile-link:hover::after {
    width: 100%;
}

/* Reveal animations */
.reveal {
    opacity: 1;
    transform: none;
    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.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* For browsers that support prefers-reduced-motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Image hover effects */
img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Button focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #10B981;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Card hover glow */
.group:hover .group-hover\:bg-emerald-600\/60 {
    background-color: rgba(5, 150, 105, 0.6);
}

/* Subtle pattern for sections */
.bg-pattern-dots {
    background-image: radial-gradient(circle, #10B981 1px, transparent 1px);
    background-size: 24px 24px;
    background-position: center;
}

/* Loading animation for images */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

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

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

/* Hero text animation */
#hero h1 {
    animation: fadeInUp 1s ease-out forwards;
}

#hero p {
    animation: fadeInUp 1s ease-out 0.2s forwards;
    opacity: 0;
}

#hero a {
    animation: fadeInUp 1s ease-out 0.4s forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 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;
    }
}
