/* Base & Typography */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Navbar */
#navbar.scrolled {
    background: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(20, 69, 42, 0.1);
}

#navbar.scrolled #nav-brand,
#navbar.scrolled .nav-link {
    color: #14452a !important;
}

#navbar.scrolled #nav-logo {
    stroke: #14452a !important;
}

.nav-link {
    position: relative;
}

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

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

/* Mobile Menu */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.4s ease forwards;
    opacity: 1;
}

.mobile-link {
    opacity: 0;
}

.mobile-link:nth-child(1) { animation-delay: 0.05s; }
.mobile-link:nth-child(2) { animation-delay: 0.1s; }
.mobile-link:nth-child(3) { animation-delay: 0.15s; }
.mobile-link:nth-child(4) { animation-delay: 0.2s; }

/* Mobile Toggle */
#mobile-toggle.active #bar1 {
    transform: rotate(45deg) translate(4px, 4px);
}

#mobile-toggle.active #bar2 {
    opacity: 0;
}

#mobile-toggle.active #bar3 {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Hero */
.hero-content {
    animation: heroFadeIn 1s ease forwards;
}

.hero-image-wrapper {
    animation: heroImageIn 1.2s ease forwards;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroImageIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scroll Reveal Animations */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(40px);
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
    }
    
    .reveal-up.visible,
    .reveal-left.visible,
    .reveal-right.visible {
        opacity: 1;
        transform: none;
    }
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #4d7d52;
}

/* Selection */
::selection {
    background: #c5dfc9;
    color: #14452a;
}

/* Form Focus States */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 2px rgba(156, 196, 160, 0.3);
}

/* Image Aspect Ratio Helpers */
img {
    vertical-align: middle;
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}
