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

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

body {
    margin: 0;
    min-height: 100vh;
}

::selection {
    background-color: rgba(5, 150, 105, 0.2);
    color: #064E3B;
}

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

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

#menu-btn[aria-expanded="true"] #bar1 {
    transform: translateY(5px) rotate(45deg);
}

#menu-btn[aria-expanded="true"] #bar2 {
    opacity: 0;
    transform: scaleX(0);
}

#menu-btn[aria-expanded="true"] #bar3 {
    transform: translateY(-5px) rotate(-45deg);
}

/* Header scroll state */
header.scrolled {
    background: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(4, 120, 87, 0.08);
}

/* Stat cards */
.stat-card {
    animation: floatCard 6s ease-in-out infinite;
}

.stat-card:nth-child(2) {
    animation-delay: -2s;
}

.stat-card:nth-child(3) {
    animation-delay: -4s;
}

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

/* Service cards */
.service-card {
    opacity: 1;
}

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

/* Scroll reveal — progressive enhancement via JS */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
    opacity: 1;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .stat-card { animation: none; }
    .reveal { transition: none; }
    .service-card:hover { transform: none; }
    .group img { transition: none; }
}

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

/* Select styling */
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='%23047857' 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;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #6EE7B7;
}
