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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(45, 68, 45, 0.15);
    color: #1d2c1d;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f3ed;
}
::-webkit-scrollbar-thumb {
    background: #9bb89b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #729672;
}

/* ── Navbar ── */
#navbar {
    backdrop-filter: blur(0px);
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(45, 68, 45, 0.08);
}

/* ── Card Float Animations ── */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes float-medium {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

@keyframes float-reverse {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(6px); }
}

.z-20 {
    animation-duration: 4s;
}

/* ── Section Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .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; }
}

/* Ensure content is visible even without JS */
.no-js .reveal,
.js .reveal {
    opacity: 1;
    transform: none;
}

/* ── Service Cards ── */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* ── Image Hover ── */
.rounded-sm img {
    transition: transform 0.6s ease;
}

.rounded-sm:hover img {
    transform: scale(1.02);
}

/* ── Form Focus States ── */
input:focus,
textarea:focus {
    outline: none;
    border-color: #4f754f !important;
    box-shadow: 0 0 0 3px rgba(79, 117, 79, 0.1);
}

/* ── Button Hover ── */
button,
a {
    transition: all 0.3s ease;
}

/* ── Link Underline Animation ── */
a:not(.bg-forest-700):not(.text-forest-400):not(.text-cream-200):not(.text-forest-300) {
    position: relative;
}

/* ── Decorative Divider ── */
.h-px {
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0.3;
}

/* ── Print Styles ── */
@media print {
    #navbar, #mobileMenu, .reveal { display: none; }
    body { color: #000; background: #fff; }
}
