/* Custom styles for Arlington Market */

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

/* Navbar scroll effect */
#navbar {
    transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

/* Nav link underline on hover */
.nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #0d9488;
    transition: width 0.2s ease;
    margin-top: 2px;
}

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

/* Mobile menu animations */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

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

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

/* Scroll line animation */
@keyframes scrollLine {
    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: scrollLine 1.5s ease-in-out infinite;
}

/* Intersection Observer fade-in animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* Focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Selection color */
::selection {
    background-color: rgba(13, 148, 136, 0.2);
    color: #1e293b;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

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

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.15;
    }

    #hero h1 {
        font-size: 2.75rem;
    }

    /* Hide nav underlines on mobile */
    .nav-link::after {
        display: none;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1023px) {
    #hero h1 {
        font-size: 4rem;
    }
}
