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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Navigation */
.nav-text {
    transition: color 0.4s ease;
}

.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 */
.navbar-scrolled {
    background: rgba(253, 252, 248, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(45, 64, 28, 0.08);
}

.navbar-scrolled .nav-text {
    color: #28401c !important;
}

.navbar-scrolled .nav-link {
    color: #28401c !important;
}

/* Mobile menu */
.mobile-link {
    transition: opacity 0.3s ease;
}

/* Scroll reveal animations */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up {
    transform: translateY(0);
}

.reveal-left {
    transform: translateX(0);
}

.reveal-right {
    transform: translateX(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1 !important;
        transform: none !important;
    }
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #74a356;
}

/* Selection */
::selection {
    background: #c5dbb5;
    color: #111a0b;
}

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

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

/* Print styles */
@media print {
    nav, .reveal-up, .reveal-left, .reveal-right {
        display: block !important;
        opacity: 1 !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
