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

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

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

::selection {
    background: rgba(46, 79, 54, 0.3);
    color: #1d3022;
}

/* ===== Hero Gradient ===== */
.hero-gradient {
    background: linear-gradient(
        135deg,
        #0f1a11 0%,
        #1d3022 20%,
        #2e4f36 40%,
        #3a6344 55%,
        #4a7e56 70%,
        #2e4f36 85%,
        #1d3022 100%
    );
}

/* ===== Hero Pattern Overlay ===== */
.hero-pattern {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(74, 126, 86, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(207, 159, 84, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 60% 80%, rgba(46, 79, 54, 0.2) 0%, transparent 40%);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== Reveal Animations ===== */
.reveal-up {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-left {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-right {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Prefers reduced motion - content stays visible */
@media (prefers-reduced-motion: reduce) {
    .reveal-up, .reveal-left, .reveal-right {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    .hero-badge, h1, p, #hero > div > div:last-child {
        opacity: 1 !important;
        animation: none !important;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== Navbar ===== */
.nav-logo {
    color: #1d3022;
}

.nav-link {
    position: relative;
}

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

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

/* Sticky navbar state */
.nav-scrolled .nav-logo {
    color: #1d3022;
}

.nav-scrolled {
    background: rgba(253, 252, 250, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(46, 79, 54, 0.1);
}

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

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

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

/* ===== Buttons & Links ===== */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid #4a7e56;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Smooth Scroll Offset ===== */
section[id] {
    scroll-margin-top: 80px;
}

/* ===== Image Loading ===== */
img {
    max-width: 100%;
    height: auto;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #8fb89a;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
    .nav-scrolled {
        background: rgba(253, 252, 250, 0.98);
    }
}
