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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ========== NAVBAR ========== */
.nav-scrolled {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(250, 248, 244, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(58, 90, 64, 0.08);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav-scrolled .nav-link {
    color: #2d4733;
}

.nav-link {
    position: relative;
    padding: 0.25rem 0;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #3a5a40;
    transition: width 0.25s ease;
}

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

.nav-link:hover {
    color: #1a291f;
}

/* ========== MOBILE MENU ========== */
.mobile-menu {
    z-index: 40;
}

.mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    transition: color 0.2s ease, transform 0.2s ease;
}

.mobile-link:hover {
    color: #3a5a40;
    transform: scale(1.03);
}

/* ========== HERO ========== */
.hero {
    position: relative;
}

/* ========== SCROLL REVEAL ========== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Default state: visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal:not(.revealed) {
        opacity: 0;
        transform: translateY(24px);
    }
}

/* ========== FORM ========== */
input:focus,
textarea:focus {
    outline: none;
}

/* ========== ACCESSIBILITY ========== */
:focus-visible {
    outline: 2px solid #3a5a40;
    outline-offset: 2px;
}

/* ========== RESPONSIVE TWEAKS ========== */
@media (max-width: 640px) {
    .font-display.text-5xl {
        font-size: 2.5rem;
    }

    .font-display.text-4xl {
        font-size: 2rem;
    }
}

/* ========== SELECTION ========== */
::selection {
    background: #3a5a40;
    color: #faf8f4;
}
