/* ===== Custom Styles for Foothills Farmers Market ===== */

/* Base & Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Navigation ===== */
.nav-logo-text {
    transition: color 0.4s ease;
}

.nav-link {
    position: relative;
}

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

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

/* Navbar scroll state */
nav.scrolled {
    background: rgba(10, 26, 46, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

nav.scrolled .nav-logo-text {
    color: #fcd34d !important;
}

/* Mobile menu */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s 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.2s; }
#mobile-link:nth-child(3) { transition-delay: 0.3s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.4s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.5s; }

/* ===== Hero ===== */
.hero-content {
    opacity: 0;
    transform: translateY(40px);
    animation: heroReveal 1s ease forwards;
}

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating decorations */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-5deg); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 5s ease-in-out infinite;
    animation-delay: 1s;
}

.animate-pulse-delayed {
    animation-delay: 1.5s;
}

/* Scroll line animation */
@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; opacity: 1; }
    50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
    51% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

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

/* Bounce slow for map pin */
@keyframes bounce-slow {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, -10px); }
}

.animate-bounce-slow {
    animation: bounce-slow 2s ease-in-out infinite;
}

/* ===== Reveal Animations ===== */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up {
    transform: translateY(40px);
}

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

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

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* ===== Utility ===== */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.2;
    }
}

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

/* ===== Selection ===== */
::selection {
    background: #fcd34d;
    color: #102a43;
}
