/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

/* Scroll reveal animations - progressive enhancement */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Navbar styles */
.nav-link {
    position: relative;
}

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

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

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(253, 252, 250, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(44, 64, 39, 0.08);
}

.nav-scrolled .nav-link {
    color: #364f2e;
}

.nav-scrolled .logo-text {
    color: #364f2e;
}

/* Mobile menu */
.mobile-link {
    opacity: 1;
}

/* Button hover effects */
button, a {
    -webkit-tap-highlight-color: transparent;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #7fa06e;
}

/* Selection color */
::selection {
    background: #c7dabb;
    color: #243420;
}

/* Focus styles */
:focus-visible {
    outline: 2px solid #5c804e;
    outline-offset: 2px;
}

/* Image lazy loading fade */
img[loading="lazy"] {
    transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Smooth transitions for all interactive elements */
a, button, input, select, textarea {
    transition: all 0.3s ease;
}

/* Prevent flash of unstyled content */
.no-js .scroll-reveal {
    opacity: 1;
    transform: translateY(0);
}
