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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(45, 138, 78, 0.4);
    color: #FAF8F0;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #060E08;
}
::-webkit-scrollbar-thumb {
    background: #1A2E1A;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2D8A4E;
}

/* Navbar */
#navbar.scrolled {
    background: rgba(6, 14, 8, 0.92);
    backdrop-blur-xl;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}

/* Stat Cards */
.stat-card {
    animation: floatCard 6s ease-in-out infinite;
}

.stat-card:nth-child(1) { animation-delay: 0s; }
.stat-card:nth-child(2) { animation-delay: -1.5s; }
.stat-card:nth-child(3) { animation-delay: -3s; }
.stat-card:nth-child(4) { animation-delay: -4.5s; }

@keyframes floatCard {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

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

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

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

/* Testimonial Cards */
.testimonial-card {
    position: relative;
}

.testimonial-card::after {
    content: '"';
    position: absolute;
    top: 16px;
    right: 24px;
    font-family: 'Playfair Display', serif;
    font-size: 6rem;
    color: rgba(45, 138, 78, 0.08);
    line-height: 1;
    pointer-events: none;
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    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; }

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

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

.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #C9A84C;
    transition: width 0.3s ease;
}

.mobile-link:hover::after {
    width: 100%;
}

/* Hero stat cards responsive */
@media (max-width: 1023px) {
    .stat-card {
        display: none;
    }
}

/* Gradient text utility */
.text-gradient-emerald {
    background: linear-gradient(135deg, #34D399, #6EE7B7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Button focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #34D399;
    outline-offset: 2px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}
