/* Custom styles for Landis Dairy Bar */

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

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

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

/* Navbar scroll effect */
nav.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Stagger children */
.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; }
.fade-in-delay-5 { transition-delay: 0.5s; }
.fade-in-delay-6 { transition-delay: 0.6s; }

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

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

/* Hero floating cards animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(var(--rotate, 0deg));
    }
    50% {
        transform: translateY(-12px) rotate(var(--rotate, 0deg));
    }
}

/* Apply float to hero cards */
#hero .absolute > div {
    animation: float 4s ease-in-out infinite;
}

#hero .absolute > div:nth-child(2) {
    animation-delay: 0.5s;
    --rotate: -3deg;
}

#hero .absolute > div:nth-child(3) {
    animation-delay: 1s;
    --rotate: 1deg;
}

#hero .absolute > div:nth-child(4) {
    animation-delay: 1.5s;
    --rotate: -2deg;
}

/* Custom selection color */
::selection {
    background: #14b8a6;
    color: white;
}

/* Subtle image zoom on hover for menu cards */
.group img {
    will-change: transform;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .marquee-track {
        animation: none;
    }
    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
    #hero .absolute > div {
        animation: none;
    }
    .group img {
        transition: none;
    }
    .group:hover img {
        transform: none;
    }
}

/* Mobile menu link hover */
.mobile-nav-link {
    position: relative;
}

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

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

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

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

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

/* Image aspect ratio fallback */
img {
    max-width: 100%;
    height: auto;
}
