/* Base & Animations */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Stagger children */
.reveal.stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

.reveal.stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal.stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal.stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.reveal.stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.reveal.stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.reveal.stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(250, 250, 247, 0.92) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(49, 86, 35, 0.08);
}

.nav-scrolled #navbar a:not([class*="bg-"]) {
    color: rgb(49, 86, 35) !important;
}

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

.mobile-menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(2px, 2px);
}

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

.mobile-menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(2px, -2px);
    width: 1rem;
}

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

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

::-webkit-scrollbar-thumb {
    background: #c7dfb8;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9dc587;
}

/* Selection */
::selection {
    background: #c7dfb8;
    color: #21391a;
}

/* Smooth focus */
*:focus-visible {
    outline: 2px solid #528a39;
    outline-offset: 2px;
}

/* Select styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239dc587' stroke-width='1.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 2rem;
}

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