/* ===== Base & Reset ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

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

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

img {
    max-width: 100%;
    height: auto;
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.motion-ok .reveal {
    opacity: 0;
    transform: translateY(24px);
}

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

/* Staggered delays */
.motion-ok .reveal:nth-child(2) { transition-delay: 0.1s; }
.motion-ok .reveal:nth-child(3) { transition-delay: 0.2s; }
.motion-ok .reveal:nth-child(4) { transition-delay: 0.3s; }
.motion-ok .reveal:nth-child(5) { transition-delay: 0.4s; }
.motion-ok .reveal:nth-child(6) { transition-delay: 0.5s; }

/* ===== Navbar ===== */
#navbar {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

#navbar.scrolled {
    background: rgba(250, 250, 245, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(46, 79, 46, 0.1);
}

#navbar.scrolled .font-serif,
#navbar.scrolled .text-forest-800 {
    color: #1d301d;
}

#navbar.scrolled .text-forest-600 {
    color: #3a6339;
}

/* ===== Mobile Menu ===== */
#mobileMenu {
    animation: slideDown 0.25s ease;
}

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

.mobile-link {
    display: block;
}

/* ===== Card hover effects ===== */
.group:hover .group-hover\:bg-forest-700 {
    background-color: #2e4f2e;
}

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

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

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

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

/* ===== Focus styles ===== */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #4f804e;
    outline-offset: 2px;
}

/* ===== Selection ===== */
::selection {
    background: #c6dfc4;
    color: #1d301d;
}
