/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }

/* ── Custom Properties ── */
:root {
    --forest-950: #071f16;
    --forest-900: #0f3d2e;
    --forest-800: #1a3a28;
    --forest-700: #234d34;
    --forest-600: #2d5f41;
    --forest-500: #427a58;
    --forest-400: #649978;
    --forest-300: #8fb89f;
    --forest-200: #b9d1c4;
    --forest-100: #dce8e1;
    --forest-50: #f0f5f2;
    --cream-50: #faf8f4;
    --cream-100: #f5f0e8;
    --cream-200: #ece4d4;
    --cream-50: #faf8f4;
}

/* ── Navbar ── */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(250, 248, 244, 0);
    transition: background 0.4s ease, box-shadow 0.4s ease;
}
#navbar.nav-scrolled {
    background: rgba(250, 248, 244, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(15, 61, 46, 0.08);
}

.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--forest-700);
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* ── Hero Gradient ── */
.hero-gradient {
    background: linear-gradient(135deg, #0f3d2e 0%, #1a5c42 25%, #2d7a58 50%, #429068 75%, #5aa078 100%);
    position: relative;
}
.hero-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 80%, rgba(7, 31, 22, 0.5) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 20%, rgba(90, 160, 120, 0.3) 0%, transparent 60%);
    pointer-events: none;
}

/* ── Hero Animated Lines ── */
.hero-line {
    position: absolute;
    background: rgba(255, 255, 255, 0.04);
}
.hero-line-1 {
    width: 1px;
    height: 100%;
    top: 0;
    left: 15%;
}
.hero-line-2 {
    width: 1px;
    height: 100%;
    top: 0;
    right: 20%;
}
.hero-line-3 {
    width: 100%;
    height: 1px;
    left: 0;
    top: 35%;
}
.hero-line-4 {
    width: 100%;
    height: 1px;
    left: 0;
    bottom: 30%;
}

/* ── Hero Animations ── */
.hero-eyebrow {
    animation: heroFadeUp 0.8s ease forwards;
}
.hero-headline {
    animation: heroFadeUp 0.8s ease forwards;
}
.hero-subtitle {
    animation: heroFadeUp 0.8s ease forwards;
}
.hero-cta {
    animation: heroFadeUp 0.8s ease forwards;
}
.scroll-indicator {
    animation: heroFadeUp 0.8s ease forwards;
}

@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Scroll Indicator Pulse ── */
.scroll-indicator span {
    animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.2); }
}

/* ── Section Eyebrow ── */
.section-eyebrow {
    letter-spacing: 0.2em;
}

/* ── Section Title ── */
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
}

/* ── Reveal Animations (below-the-fold only, progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* ── Buttons ── */
.btn-primary,
.btn-secondary {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn-primary:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}
.btn-secondary:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* ── Mobile Menu ── */
#mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
}

/* ── Service Card ── */
.service-card {
    opacity: 1;
}

/* ── Form ── */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ── Selection ── */
::selection {
    background: var(--forest-200);
    color: var(--forest-900);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--cream-100); }
::-webkit-scrollbar-thumb { background: var(--forest-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--forest-500); }
