/* ── Base & Typography ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(44, 95, 45, 0.15);
    color: #1a381a;
}

/* ── Scroll Reveal Animation ───────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.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; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ── Navbar Scroll State ───────────────────────────────────────── */
#navbar {
    background: transparent;
    backdrop-filter: none;
}

#navbar.scrolled {
    background: rgba(253, 252, 250, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(222, 213, 190, 0.5);
    box-shadow: 0 1px 20px rgba(44, 95, 45, 0.06);
}

.nav-link {
    position: relative;
}

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

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

/* ── Hero Stat Cards ───────────────────────────────────────────── */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(var(--rotate, 0deg)); }
    50% { transform: translateY(-10px) rotate(var(--rotate, 0deg)); }
}

.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(2) { animation-delay: -1.5s; animation-duration: 7s; }
.floating-card:nth-child(3) { animation-delay: -3s; animation-duration: 5.5s; }
.floating-card:nth-child(4) { animation-delay: -4.5s; animation-duration: 6.5s; }

/* ── Service Cards Hover ───────────────────────────────────────── */
.group:hover .service-icon {
    transform: scale(1.1) rotate(-3deg);
}

.service-icon {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* ── Process Step Connector (Mobile) ───────────────────────────── */
@media (max-width: 1023px) {
    .process-step {
        position: relative;
    }

    .process-step:not(:last-child)::after {
        content: '';
        position: absolute;
        bottom: -2rem;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 1.5rem;
        background: linear-gradient(to bottom, rgba(143, 192, 143, 0.4), transparent);
    }
}

/* ── Form Focus States ─────────────────────────────────────────── */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(44, 95, 45, 0.1);
}

/* ── Smooth Image Loading ──────────────────────────────────────── */
img {
    opacity: 0;
    transition: opacity 0.6s ease;
}

img.loaded {
    opacity: 1;
}

/* ── Mobile Menu Animation ─────────────────────────────────────── */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.mobile-link {
    position: relative;
}

/* ── Counter Animation ─────────────────────────────────────────── */
.counter {
    display: inline-block;
}

/* ── Print Styles ──────────────────────────────────────────────── */
@media print {
    nav, #contact, footer, .floating-card { display: none; }
    body { background: white; color: black; }
}
