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

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

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #fefdf8;
}
::-webkit-scrollbar-thumb {
    background: #065f46;
    border-radius: 3px;
}

/* Animation for scroll line */
@keyframes scrollLine {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}
.animate-scroll-line {
    animation: scrollLine 1.5s ease-in-out infinite;
}

/* Service card */
.service-card {
    transition: background-color 0.5s ease;
}

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

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

/* Navbar scroll state */
nav.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(6, 95, 70, 0.08);
}

nav.scrolled .font-serif {
    color: #064e3b;
}

/* Mobile hamburger animation */
#menu-toggle.open #bar1 {
    transform: rotate(45deg) translate(4px, 4px);
}
#menu-toggle.open #bar2 {
    opacity: 0;
}
#menu-toggle.open #bar3 {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

/* Fade-in animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .fade-in {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    .fade-in.visible {
        opacity: 1;
        transform: translateY(0);
    }
    .fade-in-delay-1 { transition-delay: 0.1s; }
    .fade-in-delay-2 { transition-delay: 0.2s; }
    .fade-in-delay-3 { transition-delay: 0.3s; }
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: #065f46;
    color: #fefdf8;
}
