/* ── Base & Typography ── */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: color-mix(in srgb, #33513d 80%, white);
    color: white;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #FAFAF7;
}
::-webkit-scrollbar-thumb {
    background: #c6dfd0;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9cc2a8;
}

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

#navbar.scrolled {
    background: rgba(250, 250, 247, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(51, 81, 61, 0.08);
}

#navbar.scrolled .nav-link,
#navbar.scrolled #nav-logo-text,
#navbar.scrolled #nav-logo-box,
#navbar.scrolled #menu-line-1,
#navbar.scrolled #menu-line-2 {
    color: #2a4132;
}

#navbar.scrolled #nav-logo-box {
    border-color: #2a4132;
}

#navbar.scrolled a[href^="tel"] {
    border-color: #2a4132;
    color: #2a4132;
}

#navbar.scrolled a[href^="tel"]:hover {
    background: #2a4132;
    color: white;
    border-color: #2a4132;
}

/* ── Hero Animations ── */
.hero-anim {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) 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; }
.hero-anim:nth-child(5) { animation-delay: 0.7s; }

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

/* ── Scroll Reveal ── */
.reveal {
    opacity: 1;
    transform: translateY(0);
    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);
}

/* ── Mobile Menu ── */
.mobile-menu-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
    color: #2a4132;
    text-decoration: none;
}

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

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

/* ── Input Focus States ── */
input:focus,
textarea:focus {
    border-color: #52805e !important;
    box-shadow: 0 0 0 1px #52805e;
}

/* ── 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 {
        opacity: 1;
        transform: none;
    }
}

/* ── Responsive ── */
@media (max-width: 767px) {
    .font-serif {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}
