/* ===== Base & Utilities ===== */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(77, 127, 66, 0.2);
    color: #1f341b;
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        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);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* ===== Navbar transition states ===== */
.navbar-scrolled {
    background-color: rgba(253, 252, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(31, 52, 27, 0.08);
}

.navbar-scrolled .logo-text {
    color: #1f341b !important;
}

.navbar-scrolled .nav-link {
    color: #2e4f28 !important;
}

.navbar-scrolled .nav-link:hover {
    color: #4d7f42 !important;
}

/* ===== Mobile Menu ===== */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.mobile-menu-closed {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ===== Menu Button Animation ===== */
.menu-btn-active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-btn-active .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-btn-active .menu-line:nth-child(3) {
    width: 20px;
    margin-left: 0;
}

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

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

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

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

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #4d7f42;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Smooth image loading ===== */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ===== Print Styles ===== */
@media print {
    header, footer, .reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
