/* Custom styles and animations */

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

/* Fade-in-up animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* Fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

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

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

/* Navigation transitions */
#navbar.scrolled {
    background-color: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(22, 101, 52, 0.1);
}

#navbar.scrolled .nav-logo {
    color: #166534;
}

#navbar.scrolled .nav-link {
    color: rgba(22, 101, 52, 0.7);
}

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

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

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

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

#menu-toggle.active .menu-line:nth-child(3) {
    width: 100%;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Form focus styles */
input:focus,
textarea:focus {
    border-color: #16a34a !important;
}

/* Custom selection color */
::selection {
    background-color: #166534;
    color: white;
}

/* Reduce motion for accessibility */
@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;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
}
