/* ============================================
   E.A.M. Asphalt — Custom Styles
   ============================================ */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
}

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

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

/* --- Navbar --- */
#navbar {
    background: transparent;
}

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

#navbar.scrolled .font-serif {
    color: #0f172a;
}

#navbar.scrolled .text-slate-600 {
    color: #475569;
}

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

.card-1 { animation-delay: 0.3s; }
.card-2 { animation-delay: 0.5s; }
.card-3 { animation-delay: 0.7s; }
.card-4 { animation-delay: 0.9s; }

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

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: ensure content is visible without JS */
@supports not (animation: floatIn 0.7s ease forwards) {
    .stat-card {
        opacity: 1;
        transform: none;
    }
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}

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

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

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

/* --- Button focus states --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* --- Image lazy loading shimmer --- */
img {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}
