/* Base styles and custom animations */

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hero animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.animate-slide-up-delay {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.animate-slide-up-delay-2 {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

/* Scroll reveal */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Navbar scroll state */
.nav-scrolled {
    background-color: rgba(253, 251, 247, 0.97) !important;
    box-shadow: 0 1px 20px rgba(30, 53, 30, 0.08);
    backdrop-filter: blur(10px);
}

.nav-scrolled #navbar a,
.nav-scrolled #navbar button {
    color: #1e351e !important;
}

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

/* Selection color */
::selection {
    background-color: #3a633a;
    color: #fdfbf7;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .animate-fade-in,
    .animate-slide-up,
    .animate-slide-up-delay,
    .animate-slide-up-delay-2 {
        animation: none;
        opacity: 1;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: none;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #4a7c4a;
}
