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

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

body {
    overflow-x: hidden;
}

::selection {
    background: #1b5e20;
    color: #fdfcfa;
}

/* ─── NAVBAR ─── */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(253, 252, 250, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(27, 94, 32, 0.08);
    box-shadow: 0 1px 20px rgba(5, 18, 8, 0.06);
}

.nav-link {
    position: relative;
}

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

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

/* ─── MOBILE MENU ─── */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.menu-line {
    display: block;
}

body.menu-open {
    overflow: hidden;
}

body.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

body.menu-open .menu-line:nth-child(2) {
    transform: rotate(-45deg) translate(4px, -4px);
}

.mobile-nav-link {
    position: relative;
}

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

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

/* ─── REVEAL ANIMATIONS ─── */
.reveal-up {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.reveal-up:nth-child(2) { transition-delay: 0.1s; }
.reveal-up:nth-child(3) { transition-delay: 0.2s; }
.reveal-up:nth-child(4) { transition-delay: 0.3s; }

/* ─── STAGGERED SERVICE CARDS ─── */
#services .reveal-up:nth-child(1) { transition-delay: 0.05s; }
#services .reveal-up:nth-child(2) { transition-delay: 0.12s; }
#services .reveal-up:nth-child(3) { transition-delay: 0.19s; }
#services .reveal-up:nth-child(4) { transition-delay: 0.26s; }
#services .reveal-up:nth-child(5) { transition-delay: 0.33s; }
#services .reveal-up:nth-child(6) { transition-delay: 0.40s; }

/* ─── IMAGE HOVER ─── */
.group img {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.group:hover img {
    transform: scale(1.03);
}

/* ─── CTA BUTTON ─── */
a[href="#contact"],
button[type="submit"] {
    position: relative;
    overflow: hidden;
}

a[href="#contact"]::before,
button[type="submit"]::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

a[href="#contact"]:hover::before,
button[type="submit"]:hover::before {
    opacity: 1;
}

/* ─── SELECT STYLING ─── */
select option {
    background: #faf5eb;
    color: #051208;
}

/* ─── FOCUS VISIBLE ─── */
:focus-visible {
    outline: 2px solid #1b5e20;
    outline-offset: 2px;
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal-up {
        opacity: 1;
        transform: none;
    }
}

/* ─── RESPONSIVE ─── -->
@media (max-width: 767px) {
    .font-serif {
        letter-spacing: -0.01em;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .reveal-up {
        transition-delay: 0.15s;
    }
}
