/* Base & Reset */
*, *::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;
}

/* Scroll Reveal Animations */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(32px);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
    .scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
    .scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
    .scroll-reveal:nth-child(5) { transition-delay: 0.4s; }
    .scroll-reveal:nth-child(6) { transition-delay: 0.5s; }
}

/* Navbar Transition */
.navbar-scrolled {
    background: rgba(250, 248, 244, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(26, 92, 58, 0.08);
}

.navbar-scrolled .nav-link {
    color: #1a5c3a !important;
}

.navbar-scrolled .nav-link:hover {
    color: #2a6b28 !important;
}

/* Custom Selection */
::selection {
    background: #dcefd8;
    color: #1a5c3a;
}

/* Smooth Focus */
:focus-visible {
    outline: 2px solid #1a5c3a;
    outline-offset: 2px;
}

/* Image Loading */
img {
    max-width: 100%;
    height: auto;
}

/* Subtle Pattern Overlay for Hero */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(ellipse at 30% 50%, rgba(140, 194, 130, 0.08) 0%, transparent 60%),
                      radial-gradient(ellipse at 70% 20%, rgba(94, 163, 86, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

/* Service Card Hover */
.group:hover .service-icon {
    transform: scale(1.05) rotate(-3deg);
}

.service-icon {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Button Ripple Effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Form Focus States */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(26, 92, 58, 0.1);
}

/* Map Container */
iframe {
    filter: saturate(0.7) contrast(1.05);
    transition: filter 0.5s ease;
}

iframe:hover {
    filter: saturate(1) contrast(1);
}
