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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #fdfcf8;
}
::-webkit-scrollbar-thumb {
    background: #c6d9a6;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9dbe6e;
}

/* Selection */
::selection {
    background: #e3eccf;
    color: #1f311d;
}

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

.hero-subtitle {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

.hero-title {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.4s;
}

.hero-desc {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.6s;
}

.hero-cta {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.8s;
}

/* Reveal on Scroll */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Stagger children */
.reveal-up:nth-child(2) { transition-delay: 0.1s; }
.reveal-up:nth-child(3) { transition-delay: 0.2s; }
.reveal-up:nth-child(4) { transition-delay: 0.3s; }

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(253, 252, 248, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(44, 73, 29, 0.08);
}

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

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

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

/* Hamburger animation */
body.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
body.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}
body.menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

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

/* Form focus styles */
input:focus,
textarea:focus {
    border-color: #2c491d !important;
}

input:focus + label,
textarea:focus + label {
    color: #2c491d;
}

/* Menu item hover line animation */
li::after {
    content: '';
    display: block;
    width: 0;
    height: 1px;
    background: #c6d9a6;
    transition: width 0.3s ease;
}

li:last-child::after {
    display: none;
}

/* Prevent layout shift on images */
img {
    display: block;
}

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