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

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

body {
    overflow-x: hidden;
}

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

/* ─── Navigation ─── */
#nav {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

#nav.scrolled {
    background: rgba(250, 249, 246, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.06);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #059669;
    transition: width 0.3s ease;
}

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

/* ─── Mobile Menu ─── */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(6) { transition-delay: 0.3s; }

.menu-line {
    display: block;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.25rem;
}

/* ─── Hero Animations ─── */
.hero-anim {
    opacity: 0;
    transform: translateY(24px);
    animation: fadeUp 0.8s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.25s; }
.hero-anim:nth-child(3) { animation-delay: 0.4s; }
.hero-anim:nth-child(4) { animation-delay: 0.55s; }

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

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

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

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

/* ─── Section Reveals ─── */
.section-reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ─── Service Cards ─── */
.service-card {
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

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

/* ─── Process Steps ─── */
.process-step {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.process-step.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Testimonial Cards ─── */
.testimonial-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.testimonial-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.testimonial-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(6, 78, 59, 0.08);
}

/* ─── Form Styles ─── */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5l3 3 3-3' stroke='%23064E3B' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

/* ─── Subtle line dividers ─── */
.section-reveal::before {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: linear-gradient(to right, #059669, transparent);
    margin-bottom: 1.5rem;
    opacity: 0.4;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 72px;
    }
}
