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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: #2d4628;
    color: #faf9f6;
}

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

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

/* Hero animations */
.hero-subtitle {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

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

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

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

.hero-image-wrapper {
    animation: fadeUp 1s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

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

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Navbar */
.navbar-scrolled {
    background-color: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(45, 70, 40, 0.08);
}

.navbar-scrolled .nav-link {
    color: #4a6b3e;
}

.navbar-scrolled .menu-line {
    background-color: #2d4628;
}

.navbar-scrolled .font-serif {
    color: #1e2e1b;
}

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

.mobile-menu-close {
    opacity: 0 !important;
    pointer-events: none !important;
}

.mobile-nav-link {
    animation: fadeUp 0.5s ease forwards;
    opacity: 0;
}

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

/* Menu lines animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.active .menu-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

.menu-toggle.active .menu-line:nth-child(2) {
    transform: translateY(-5px) rotate(-45deg);
    opacity: 0;
}

/* Menu items */
.menu-item {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.menu-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.menu-item:nth-child(1) { transition-delay: 0.05s; }
.menu-item:nth-child(2) { transition-delay: 0.1s; }
.menu-item:nth-child(3) { transition-delay: 0.15s; }
.menu-item:nth-child(4) { transition-delay: 0.2s; }
.menu-item:nth-child(5) { transition-delay: 0.25s; }

/* Image hover */
img {
    transition: transform 0.6s ease;
}

/* Focus styles */
input:focus,
textarea:focus {
    outline: none;
}

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* 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;
    }
}

/* Print */
@media print {
    nav,
    #contact-form,
    .animate-pulse {
        display: none;
    }
}
