*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --forest-600: #1B4332;
    --cream-50: #faf9f6;
    --cream-100: #f5f3ed;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
}

/* Navbar */
#navbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(250, 249, 246, 0.85);
    border-bottom: 1px solid rgba(27, 67, 50, 0.06);
}

#navbar.scrolled {
    background: rgba(250, 249, 246, 0.95);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.06);
}

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

#mobile-menu.open .mobile-link {
    animation: mobileLinkIn 0.4s ease forwards;
    opacity: 0;
    transform: translateY(12px);
}

#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; }

@keyframes mobileLinkIn {
    to { opacity: 1; transform: translateY(0); }
}

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

.animate-fade-up {
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Scroll reveal */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Service card */
.service-card {
    position: relative;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--forest-400);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(-50%);
}

.service-card:hover::after {
    width: 60%;
}

/* Form */
input:focus, textarea:focus {
    border-color: #519e87 !important;
}

input:focus + label, textarea:focus + label {
    color: #519e87;
}

/* Selection */
::selection {
    background: rgba(27, 67, 50, 0.15);
    color: #1B4332;
}

/* 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 { opacity: 1; transform: none; }
}

/* Utility */
@media (max-width: 767px) {
    .mobile-link { font-size: 2rem !important; }
}
