/* ========== BASE & RESET ========== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(56, 142, 79, 0.2);
    color: #1f5730;
}

/* ========== SCROLL REVEAL ========== */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

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

/* Stagger children */
.scroll-reveal:nth-child(2) { transition-delay: 0.08s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.16s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.24s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.32s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.40s; }

/* ========== NAVBAR ========== */
.nav-link {
    position: relative;
}

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

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

/* ========== MOBILE MENU ========== */
#mobileMenu {
    animation: slideDown 0.25s ease;
}

#mobileMenu.hidden {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-link {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid rgba(56, 142, 79, 0.1);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* ========== HERO DECORATIVE ========== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

/* ========== INPUT FOCUS ========== */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(56, 142, 79, 0.15);
}

/* ========== BUTTON RIPPLE ========== */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* ========== FOCUS VISIBLE ========== */
:focus-visible {
    outline: 2px solid #388e4f;
    outline-offset: 2px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #5aad6a;
}
