/* Base styles and custom animations */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Floating animation for stat cards */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

@keyframes float-delayed {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 3.5s ease-in-out infinite 0.5s;
}

/* Service card hover effects */
.service-card {
    transform: translateY(0);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.5s ease;
}

.service-card:hover {
    transform: translateY(-8px);
}

/* Neighborhood card hover effects */
.neighborhood-card {
    transform: translateY(0);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.5s ease;
}

.neighborhood-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Testimonial card hover effects */
.testimonial-card {
    transform: translateY(0);
    transition: transform 0.5s ease, border-color 0.5s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
}

/* Scroll reveal animations (below fold only) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* Reduced motion preference */
@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;
    }
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(250, 249, 246, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.nav-scrolled .text-forest-900 {
    color: #113314 !important;
}

.nav-scrolled .text-forest-600 {
    color: #256b27 !important;
}

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

/* Geometric shape animations */
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse-soft {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.25; }
}

.geo-shape {
    will-change: transform;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f3ed;
}

::-webkit-scrollbar-thumb {
    background: #82c07e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #54a352;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #82c07e;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Selection color */
::selection {
    background: #82c07e;
    color: #113314;
}
