/* Base & Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(13, 148, 136, 0.2);
    color: #0f766e;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* Navbar */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .font-display,
#navbar.scrolled a:not(.bg-teal-600) {
    color: #1e293b !important;
}

#navbar.scrolled .text-slate-500 {
    color: #64748b !important;
}

#navbar.scrolled .text-slate-900 {
    color: #0f172a !important;
}

/* Hero stat cards stagger animation */
.stat-card {
    opacity: 0;
    transform: translateY(30px);
    animation: floatIn 0.7s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.8s; }
.stat-card:nth-child(2) { animation-delay: 1.0s; }
.stat-card:nth-child(3) { animation-delay: 1.2s; }

@keyframes floatIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Service cards */
.service-card {
    opacity: 0;
    transform: translateY(24px);
}

.service-card.revealed {
    animation: revealUp 0.6s ease forwards;
}

.service-card:nth-child(1).revealed { animation-delay: 0s; }
.service-card:nth-child(2).revealed { animation-delay: 0.08s; }
.service-card:nth-child(3).revealed { animation-delay: 0.16s; }
.service-card:nth-child(4).revealed { animation-delay: 0.24s; }
.service-card:nth-child(5).revealed { animation-delay: 0.32s; }
.service-card:nth-child(6).revealed { animation-delay: 0.4s; }

/* Coverage cards */
.coverage-card {
    opacity: 0;
    transform: translateY(20px);
}

.coverage-card.revealed {
    animation: revealUp 0.5s ease forwards;
}

.coverage-card:nth-child(1).revealed { animation-delay: 0s; }
.coverage-card:nth-child(2).revealed { animation-delay: 0.08s; }
.coverage-card:nth-child(3).revealed { animation-delay: 0.16s; }
.coverage-card:nth-child(4).revealed { animation-delay: 0.24s; }

@keyframes revealUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .stat-card,
    .service-card,
    .coverage-card {
        opacity: 1;
        transform: none;
    }
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}
