/* ===== Custom Styles for The Farm ===== */

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

/* Prevent FOUC on load */
body {
    opacity: 1;
}

/* ===== Floating Card Animations ===== */
@keyframes floatSlow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

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

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

.card-float-slow {
    animation: floatSlow 6s ease-in-out infinite;
}

.card-float-medium {
    animation: floatMedium 4.5s ease-in-out infinite;
}

.card-float-fast {
    animation: floatFast 3.5s ease-in-out infinite;
}

/* Stagger animation delays */
.card-float-medium {
    animation-delay: 0.5s;
}

.card-float-fast {
    animation-delay: 1s;
}

/* ===== Scroll Reveal (Progressive Enhancement) ===== */
/* Default: all content visible */
.reveal {
    opacity: 1;
    transform: none;
}

/* When JS is enabled and motion is preferred, animate */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        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.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Stagger children */
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
}

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

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(6, 78, 59, 0.08);
}

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

/* ===== Selection Color ===== */
::selection {
    background: #065f46;
    color: #fef3c7;
}

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

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

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

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

/* ===== Mobile Menu Transition ===== */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                padding 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#mobileMenu.open {
    max-height: 400px;
    padding-top: 0;
    padding-bottom: 0;
}

/* ===== Image Loading ===== */
img {
    background-color: #d1fae5;
}

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

/* ===== Subtle Hover on Cards ===== */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 640px) {
    .card-float-slow,
    .card-float-medium,
    .card-float-fast {
        animation: none;
    }
}

/* ===== Print Styles ===== */
@media print {
    #navbar,
    #hero .absolute.bottom-8,
    .reveal {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
