/* ===== Custom Styles for Healthy Harvest Urban Farms ===== */

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

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

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

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

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

/* Selection color */
::selection {
    background: rgba(114, 47, 55, 0.6);
    color: #fff;
}

/* ===== Animations ===== */

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scrollLine {
    0% {
        top: -16px;
    }
    100% {
        top: 48px;
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Scroll-triggered animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.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; }

/* Scroll line animation */
.animate-scroll-line {
    animation: scrollLine 1.5s ease-in-out infinite;
}

/* ===== Navbar ===== */

#navbar {
    background: transparent;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(212, 168, 67, 0.1);
}

/* Nav link hover effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #D4A843;
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: #D4A843 !important;
}

/* ===== Mobile menu ===== */

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

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

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

/* Hamburger animation */
#menuBtn.active #bar1 {
    transform: rotate(45deg) translate(4px, 4px);
}

#menuBtn.active #bar2 {
    opacity: 0;
    transform: translateX(10px);
}

#menuBtn.active #bar3 {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ===== Hero ===== */

#hero {
    position: relative;
}

/* Gold shimmer on hover for buttons */
button:hover, a:hover {
    transition: all 0.3s ease;
}

/* ===== Menu section ===== */

.group:hover h4 {
    text-shadow: 0 0 40px rgba(212, 168, 67, 0.3);
}

/* ===== Cards ===== */

.group:hover .absolute {
    /* Subtle lift effect handled by img transform */
}

/* ===== Form styles ===== */

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(212, 168, 67, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

select option {
    background: #0a0a0a;
    color: #fff;
}

/* ===== Responsive ===== */

@media (max-width: 768px) {
    .font-display {
        line-height: 1.1;
    }
}

/* ===== 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;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ===== Gold text gradient utility ===== */

.text-gold-gradient {
    background: linear-gradient(135deg, #f0d68a 0%, #D4A843 50%, #b8922e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
