/* ============================================
   Farmers Market — Custom Styles
   ============================================ */

/* Base & Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: #1a4d2e;
    color: #faf8f4;
}

/* ============================================
   Geometric Background Shapes (Hero)
   ============================================ */
.geo-shape {
    position: absolute;
    opacity: 0.15;
    pointer-events: none;
}

.geo-circle-1 {
    width: 600px;
    height: 600px;
    background: #f2cc8f;
    border-radius: 50%;
    top: -200px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.geo-circle-2 {
    width: 300px;
    height: 300px;
    background: #e07a5f;
    border-radius: 50%;
    bottom: 10%;
    left: -80px;
    animation: float 10s ease-in-out infinite reverse;
}

.geo-rect-1 {
    width: 200px;
    height: 200px;
    background: #f2cc8f;
    top: 30%;
    right: 5%;
    transform: rotate(45deg);
    animation: spin-slow 20s linear infinite;
}

.geo-triangle {
    width: 0;
    height: 0;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    border-bottom: 173px solid #e07a5f;
    top: 15%;
    left: 5%;
    opacity: 0.1;
    animation: float 12s ease-in-out infinite;
}

.geo-dots {
    width: 120px;
    height: 120px;
    background-image: radial-gradient(circle, #f2cc8f 2px, transparent 2px);
    background-size: 15px 15px;
    bottom: 20%;
    right: 15%;
    opacity: 0.2;
}

/* ============================================
   Animations
   ============================================ */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(3deg); }
}

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

@keyframes spin-slow {
    from { transform: rotate(45deg); }
    to { transform: rotate(405deg); }
}

@keyframes scroll-line {
    0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

.animate-scroll-line {
    animation: scroll-line 2s ease-in-out infinite;
}

/* ============================================
   Marquee
   ============================================ */
.marquee-track {
    animation: marquee 30s linear infinite;
}

.marquee-text {
    font-size: 1rem;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

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

#navbar.scrolled {
    background: rgba(250, 248, 244, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(26, 77, 46, 0.08);
}

.nav-logo-text {
    transition: color 0.4s ease;
}

#navbar:not(.scrolled) .nav-logo-text {
    color: #faf8f4;
}

#navbar.scrolled .nav-logo-text {
    color: #1a4d2e;
}

.nav-link {
    position: relative;
}

#navbar:not(.scrolled) .nav-link {
    color: #c8e6c9;
}

#navbar:not(.scrolled) .nav-link:hover {
    color: #f2cc8f;
}

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

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

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-menu-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

/* Staggered animation for mobile menu items */
.mobile-menu.open .mobile-menu-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.open .mobile-menu-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.open .mobile-menu-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.open .mobile-menu-link:nth-child(4) { transition-delay: 0.25s; }

/* ============================================
   Scroll Reveal (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal.revealed {
        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; }
}

/* ============================================
   Image Hover Effects
   ============================================ */
img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Form Focus States
   ============================================ */
input:focus,
textarea:focus {
    border-color: #1a4d2e !important;
    box-shadow: 0 0 0 4px rgba(26, 77, 46, 0.1);
}

/* ============================================
   Button Ripple / Press Effect
   ============================================ */
button, a {
    -webkit-tap-highlight-color: transparent;
}

button:active,
a:active {
    transform: scale(0.97);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .geo-circle-1 {
        width: 300px;
        height: 300px;
    }

    .geo-circle-2 {
        width: 150px;
        height: 150px;
    }

    .geo-rect-1 {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 640px) {
    html {
        scroll-padding-top: 70px;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar, .marquee-track, .animate-scroll-line {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }
}
