/* ===== Base & Reset ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        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);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Without JS, all content is visible by default */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

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

#navbar.scrolled {
    background: rgba(250, 249, 245, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(26, 92, 58, 0.08);
}

#navbar.scrolled .font-serif {
    color: #183715;
}

#navbar.scrolled a:not([class*="bg-"]) {
    color: #2d6a28;
}

#navbar.scrolled a:not([class*="bg-"]):hover {
    color: #3d8233;
}

/* ===== Hero ===== */
#hero {
    position: relative;
}

/* ===== Service Cards ===== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2d6a28, #5ba34e);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* ===== Steps ===== */
.step-card {
    position: relative;
}

/* ===== Button focus states ===== */
a:focus-visible, button:focus-visible {
    outline: 2px solid #3d8233;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Custom scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #faf9f5;
}

::-webkit-scrollbar-thumb {
    background: #b9dfaa;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8ac578;
}

/* ===== Selection ===== */
::selection {
    background: #dcefd4;
    color: #183715;
}

/* ===== Mobile menu animation ===== */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Floating card animation ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* ===== Smooth section transitions ===== */
section {
    position: relative;
}

/* ===== Map container ===== */
iframe {
    filter: saturate(0.8) contrast(1.05);
    transition: filter 0.4s ease;
}

iframe:hover {
    filter: saturate(1) contrast(1);
}
