/* Base styles & custom overrides */
html {
    scroll-behavior: smooth;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF8F0;
}
::-webkit-scrollbar-thumb {
    background: #059669;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* Navbar transition */
.nav-scrolled {
    background: rgba(253, 248, 240, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.nav-scrolled .nav-logo-text {
    color: #064E3B !important;
}

.nav-scrolled .nav-link {
    color: #4B5563 !important;
}

/* Mobile menu animations */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll animation base state */
.scroll-animate {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Only animate on prefers-reduced-motion: no-preference */
@media (prefers-reduced-motion: no-preference) {
    .scroll-animate {
        opacity: 0;
        transform: translateY(24px);
    }

    .scroll-animate.is-visible {
        opacity: 1;
        transform: translateY(0);
    }

    .scroll-animate:nth-child(2) { transition-delay: 0.1s; }
    .scroll-animate:nth-child(3) { transition-delay: 0.2s; }
    .scroll-animate:nth-child(4) { transition-delay: 0.3s; }
    .scroll-animate:nth-child(5) { transition-delay: 0.4s; }
}

/* Hero text glow */
h1 {
    text-shadow: 0 2px 40px rgba(0, 0, 0, 0.3);
}

/* Service card hover image effect */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.1);
}

/* 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='%236B7280' 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;
    appearance: none;
    -webkit-appearance: none;
}

/* Selection color */
::selection {
    background: #059669;
    color: white;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
}

/* Mobile menu active link */
.mobile-nav-link.active {
    color: #059669 !important;
}

/* Smooth image loading */
img {
    loading: lazy;
}

/* Prevent layout shift on images */
img {
    content-visibility: auto;
}
