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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(6, 78, 59, 0.2);
    color: #064E3B;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAF6EE;
}
::-webkit-scrollbar-thumb {
    background: #8fbfad;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5fa08a;
}

/* ── Scroll Indicator Animation ── */
@keyframes scrollIndicator {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.animate-scroll-indicator {
    animation: scrollIndicator 1.5s ease-in-out infinite;
}

/* ── Service Card Hover ── */
.service-card {
    transform: translateY(0);
}

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

/* ── Gallery Item ── */
.gallery-item {
    cursor: pointer;
}

.gallery-item img {
    will-change: transform;
}

/* ── Navbar Transition ── */
.navbar-scrolled .nav-text-color {
    color: #064E3B !important;
}

.navbar-light .nav-text-color {
    color: #064E3B !important;
}

/* ── Mobile Menu Animations ── */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .gallery-item img {
        transition: none;
    }

    .gallery-item img:hover {
        transform: none;
    }

    .animate-scroll-indicator {
        animation: none;
    }
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

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

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

/* ── Hamburger Animation ── */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

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

/* ── Form Styles ── */
input:focus, textarea:focus {
    outline: none;
    border-color: #064E3B;
    box-shadow: 0 0 0 3px rgba(6, 78, 59, 0.1);
}

/* ── Testimonial Card Hover ── */
.testimonial-card {
    transition: transform 0.3s ease, background-color 0.4s ease;
}

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

/* ── Smooth anchor offset ── */
section[id] {
    scroll-margin-top: 80px;
}
