/* ===== Custom Styles for Abel's Ice Cream Co. ===== */

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

/* Hero gradient */
.hero-gradient {
    background: linear-gradient(135deg, 
        #2e733c 0%, 
        #459252 25%, 
        #6aad76 50%, 
        #93c99e 75%, 
        #dceee0 100%
    );
    animation: gradientShift 12s ease-in-out infinite;
    background-size: 300% 300%;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Floating elements animation */
.floating-element {
    position: absolute;
    opacity: 0.6;
}

.float-1 {
    top: 15%;
    left: 8%;
    animation: float 6s ease-in-out infinite;
}

.float-2 {
    top: 25%;
    right: 10%;
    animation: float 8s ease-in-out infinite reverse;
}

.float-3 {
    bottom: 20%;
    left: 15%;
    animation: float 7s ease-in-out infinite;
}

.float-4 {
    bottom: 30%;
    right: 8%;
    animation: float 5s ease-in-out infinite reverse;
}

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

/* Hero animations */
.hero-anim {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.2s; }
.hero-anim:nth-child(2) { animation-delay: 0.4s; }
.hero-anim:nth-child(3) { animation-delay: 0.6s; }
.hero-anim:nth-child(4) { animation-delay: 0.8s; }

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

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar styles */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-logo-text {
    color: #1c4726;
    transition: color 0.3s ease;
}

#navbar.scrolled .nav-logo-text {
    color: #1c4726;
}

.nav-link {
    position: relative;
}

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

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

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

#mobile-menu.open .mobile-link {
    animation: slideIn 0.4s ease forwards;
    opacity: 0;
}

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

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

/* Menu lines animation */
.menu-line {
    transition: all 0.3s ease;
}

#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

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

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

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

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

/* Selection color */
::selection {
    background: #dceee0;
    color: #1c4726;
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid #459252;
    outline-offset: 2px;
}

/* 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;
    }
    
    .floating-element {
        animation: none;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}
