/* ===== 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;
}

/* ===== Hero Gradient ===== */
.hero-gradient {
    background: linear-gradient(135deg, #050A18 0%, #0A1628 25%, #0F2140 50%, #142C58 75%, #1A3A70 100%);
}

/* ===== Hero Blobs ===== */
.hero-blob {
    background: radial-gradient(circle, rgba(74, 222, 128, 0.4) 0%, transparent 70%);
}

.hero-blob-1 {
    animation: float-blob 8s ease-in-out infinite;
}

.hero-blob-2 {
    animation: float-blob 10s ease-in-out infinite reverse;
}

.hero-blob-3 {
    animation: pulse-blob 12s ease-in-out infinite;
}

@keyframes float-blob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

@keyframes pulse-blob {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.1; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.15; }
}

/* ===== Hero Pattern ===== */
.hero-pattern {
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* ===== Hero Badge Animation ===== */
.hero-badge {
    animation: fade-in-up 0.8s ease-out both;
}

/* ===== Hero Headline Animation ===== */
#hero h1 {
    animation: fade-in-up 0.8s ease-out 0.2s both;
}

#hero p {
    animation: fade-in-up 0.8s ease-out 0.4s both;
}

#hero > div > div:last-child {
    animation: fade-in-up 0.8s ease-out 0.5s both;
}

#hero > div > div:last-child ~ div {
    animation: fade-in-up 0.8s ease-out 0.6s both;
}

/* Fix: the stats div is a child of the main container, animate it */
#hero .grid {
    animation: fade-in-up 0.8s ease-out 0.6s both;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #4ADE80;
    border-radius: 1px;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 60%;
}

/* ===== Service Cards ===== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4ADE80, #22C55E);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* ===== Area Cards ===== */
.area-card {
    box-shadow: 0 4px 24px rgba(10, 22, 40, 0.1);
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.area-card:hover {
    box-shadow: 0 8px 40px rgba(10, 22, 40, 0.2);
    transform: translateY(-4px);
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 24px;
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 6rem;
    color: rgba(74, 222, 128, 0.12);
    line-height: 1;
    pointer-events: none;
}

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

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #4ADE80;
    outline-offset: 2px;
}

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

@keyframes slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Custom Select Arrow ===== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' 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 12px center;
    padding-right: 40px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
