/* ========================================
   Makers' & Growers' Market — Custom Styles
   ======================================== */

/* Base */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: #0d9488;
    color: #fff;
}

/* Typography refinements */
font-serif {
    font-family: 'Cormorant Garamond', Georgia, serif;
}

/* ========================================
   Hero Animations (above fold — always visible)
   ======================================== */
.hero-eyebrow {
    animation: fadeSlideUp 0.8s ease forwards;
    animation-delay: 0.1s;
    opacity: 0;
}

.hero-title {
    animation: fadeSlideUp 0.9s ease forwards;
    animation-delay: 0.25s;
    opacity: 0;
}

.hero-desc {
    animation: fadeSlideUp 0.9s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.hero-cta {
    animation: fadeSlideUp 0.9s ease forwards;
    animation-delay: 0.55s;
    opacity: 0;
}

.hero-stats {
    animation: fadeSlideUp 0.9s ease forwards;
    animation-delay: 0.7s;
    opacity: 0;
}

.hero-image-wrap {
    animation: scaleIn 1.2s ease forwards;
    transform: scale(0.95);
    opacity: 0;
    animation-delay: 0.3s;
}

.hero-float {
    animation: floatIn 0.8s ease forwards;
    animation-delay: 1s;
    opacity: 0;
    transform: translateY(20px);
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* ========================================
   Scroll Reveal (below fold only)
   ======================================== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal.hidden-reveal {
        opacity: 0;
        transform: translateY(32px);
    }

    .reveal-left.hidden-reveal {
        opacity: 0;
        transform: translateX(-40px);
    }

    .reveal-right.hidden-reveal {
        opacity: 0;
        transform: translateX(40px);
    }
}

/* ========================================
   Navbar
   ======================================== */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .font-serif {
    color: #0f172a;
}

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

#mobile-menu.close {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 1;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.mobile-link:hover {
    color: #0d9488;
}

/* ========================================
   Hover line animation on cards
   ======================================== */
.reveal.group {
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.reveal.group:hover {
    transform: translateY(-4px);
}

/* ========================================
   Smooth focus outlines
   ======================================== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ========================================
   Map container
   ======================================== */
iframe {
    width: 100%;
    height: 100%;
}

/* ========================================
   Subtle image hover
   ======================================== */
.aspect-\[3\/4\] img,
.aspect-square img,
.aspect-\[4\/5\] img,
.aspect-\[4\/3\] img {
    transition: transform 0.6s ease;
}

.overflow-hidden img:hover {
    transform: scale(1.03);
}

/* ========================================
   Utility: thin decorative line
   ======================================== */
.deco-line {
    width: 48px;
    height: 1px;
    background: #0d9488;
}

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