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

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

body {
    margin: 0;
    overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #FAFAF7;
}
::-webkit-scrollbar-thumb {
    background: #9ec5a1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6fa372;
}

/* Selection */
::selection {
    background: #285030;
    color: #FAFAF7;
}

/* Navbar transitions */
#navbar {
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(250, 250, 247, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(40, 80, 48, 0.08);
}

#navbar.scrolled .nav-link {
    color: #1a3320;
}

#navbar.scrolled .nav-link:hover {
    color: #285030;
}

#navbar.scrolled #nav-logo-text {
    color: #1a3320;
}

#navbar.scrolled #menu-btn svg {
    color: #1a3320;
}

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

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

/* Mobile menu icon animation */
#menu-btn.active #line1 {
    transform: rotate(45deg) translate(3px, 3px);
}
#menu-btn.active #line2 {
    opacity: 0;
}
#menu-btn.active #line3 {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

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

/* Gallery items */
.gallery-item {
    cursor: pointer;
}

/* Scroll reveal base state (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .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; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ec5a1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Smooth focus outlines */
input:focus,
textarea:focus,
select:focus,
button:focus {
    outline: none;
}

/* Remove tap highlight on mobile */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}
