/* === Base Styles === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #2d4f24;
    color: #fefdf8;
}

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

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(45, 79, 36, 0.08);
}

.nav-logo-text {
    color: #2d4f24;
}

#navbar:not(.scrolled) .nav-logo-text {
    color: #ffffff;
}

/* === Mobile Menu === */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.open .mobile-nav-link {
    animation: fadeSlideIn 0.4s ease forwards;
    opacity: 0;
}

#mobileMenu.open .mobile-nav-link:nth-child(1) { animation-delay: 0.05s; }
#mobileMenu.open .mobile-nav-link:nth-child(2) { animation-delay: 0.1s; }
#mobileMenu.open .mobile-nav-link:nth-child(3) { animation-delay: 0.15s; }
#mobileMenu.open .mobile-nav-link:nth-child(4) { animation-delay: 0.2s; }
#mobileMenu.open .mobile-nav-link:nth-child(5) { animation-delay: 0.25s; }

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Hero Animations === */
.hero-badge {
    animation: heroFadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.2s;
}

.hero-badge,
h1,
.hero-section p,
.hero-section .flex {
    opacity: 0;
}

h1 {
    animation: heroFadeUp 0.8s ease forwards;
    animation-delay: 0.4s;
}

.hero-section p {
    animation: heroFadeUp 0.8s ease forwards;
    animation-delay: 0.6s;
}

.hero-section .flex {
    animation: heroFadeUp 0.8s ease forwards;
    animation-delay: 0.8s;
}

@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Scroll Reveal === */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Start hidden only for below-fold elements, with reduced-motion fallback */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
    }

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

/* Reveal stagger for service cards */
.reveal:nth-child(1) { transition-delay: 0s; }
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal:nth-child(5) { transition-delay: 0.4s; }
.reveal:nth-child(6) { transition-delay: 0.5s; }

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #52803d;
}

/* === Focus Styles === */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #52803d;
    outline-offset: 2px;
    border-radius: 4px;
}

/* === Print Styles === */
@media print {
    #navbar,
    #mobileMenu,
    .reveal {
        display: block !important;
        opacity: 1 !important;
    }

    body {
        color: #000;
        background: #fff;
    }
}
