/* Custom styles for Elenas Ice Cream */

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

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(255, 251, 245, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(6, 78, 59, 0.08);
}

#navbar.scrolled .font-serif {
    color: #064E3B !important;
}

/* Mobile menu */
#mobileMenu.active {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.active .mobile-link {
    animation: fadeUp 0.4s ease forwards;
    opacity: 0;
}

#mobileMenu.active .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobileMenu.active .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobileMenu.active .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobileMenu.active .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobileMenu.active .mobile-link:nth-child(5) { animation-delay: 0.25s; }

/* Hamburger animation */
#menuBtn.open .menu-line:nth-child(1) {
    transform: translateY(5.5px) rotate(45deg);
}
#menuBtn.open .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menuBtn.open .menu-line:nth-child(3) {
    transform: translateY(-5.5px) rotate(-45deg);
    width: 1.25rem;
}

/* Reveal animations */
.reveal-up, .reveal-left, .reveal-right {
    opacity: 0;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

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

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

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

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

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

/* Flavor card hover */
.group:hover .group-hover\\:scale-105 {
    transform: scale(1.05);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #6EE7B7;
}

/* Selection color */
::selection {
    background: #D1FAE5;
    color: #064E3B;
}

/* Form focus styles */
input:focus, textarea:focus, select:focus {
    border-color: #10B981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

/* Mobile link animation keyframes */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal-up, .reveal-left, .reveal-right {
        opacity: 1;
        transform: none;
    }
}

/* Print styles */
@media print {
    #navbar, #mobileMenu, #contactForm, #formSuccess {
        display: none !important;
    }
    body {
        background: white !important;
        color: black !important;
    }
}
