/* ========== BASE & RESET ========== */
*, *::before, *::after {
    box-sizing: border-box;
}

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

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

/* ========== NAVBAR ========== */
#navbar {
    background: rgba(254, 253, 248, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(5, 150, 105, 0.1);
    box-shadow: 0 1px 0 rgba(5, 150, 105, 0.05);
}

#navbar.scrolled {
    box-shadow: 0 4px 24px rgba(5, 150, 105, 0.1);
}

/* ========== HERO STAT CARDS ========== */
.stat-card {
    animation: float 6s ease-in-out infinite;
}

.stat-card:nth-child(1) { animation-delay: 0s; }
.stat-card:nth-child(2) { animation-delay: -1.5s; }
.stat-card:nth-child(3) { animation-delay: -3s; }
.stat-card:nth-child(4) { animation-delay: -4.5s; }

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

/* ========== SERVICE CARDS ========== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #059669, #34d399);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::after {
    transform: scaleX(1);
}

/* ========== SCROLL REVEAL ========== */
.reveal-section {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Default state: hidden for below-fold (progressive enhancement via JS) */
@media (prefers-reduced-motion: no-preference) {
    .reveal-section:not(.revealed) {
        opacity: 0;
        transform: translateY(24px);
    }
}

/* Fallback: if JS is disabled, all content is visible */
@media not all and (prefers-reduced-motion: no-preference) {
    .reveal-section {
        opacity: 1;
        transform: none;
    }
}

/* ========== MOBILE MENU ========== */
#mobile-menu {
    animation: slideDown 0.25s ease;
}

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

/* ========== CUSTOM SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf9f0;
}
::-webkit-scrollbar-thumb {
    background: #a7f3d0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #34d399;
}

/* ========== SELECTION ========== */
::selection {
    background: #d1fae5;
    color: #064e3b;
}

/* ========== FOCUS VISIBLE ========== */
:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* ========== RESPONSIVE TWEAKS ========== */
@media (max-width: 640px) {
    .stat-card {
        animation: none !important;
    }
}
