/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    overflow-x: hidden;
}

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

/* ===== HERO GRADIENT ===== */
.hero-gradient {
    background: linear-gradient(
        135deg,
        #1a3a2a 0%,
        #2c5f3e 25%,
        #3d7a52 50%,
        #5f9670 75%,
        #1a3a2a 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ===== HERO ANIMATIONS ===== */
.hero-tagline {
    opacity: 0;
    animation: fadeUp 1s ease 0.3s forwards;
}

.hero-headline {
    opacity: 0;
    animation: fadeUp 1s ease 0.5s forwards;
}

.hero-subtext {
    opacity: 0;
    animation: fadeUp 1s ease 0.7s forwards;
}

.hero-ctas {
    opacity: 0;
    animation: fadeUp 1s ease 0.9s forwards;
}

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

/* ===== SCROLL INDICATOR ===== */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ===== NAVBAR ===== */
.nav {
    background: transparent;
    transition: background 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease;
}

.nav.scrolled {
    background: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(26, 58, 42, 0.08);
}

.nav-link {
    position: relative;
}

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

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

/* ===== MOBILE MENU ===== */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.4s; }

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

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

/* ===== SERVICE CARDS ===== */
.service-card {
    transition: background-color 0.5s ease;
}

.service-icon {
    transition: transform 0.5s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(-5deg);
}

/* ===== GALLERY ===== */
.gallery-item {
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(26, 58, 42, 0);
    transition: background 0.4s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    background: rgba(26, 58, 42, 0.1);
}

/* ===== TESTIMONIAL CARDS ===== */
.testimonial-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(26, 58, 42, 0.1);
}

/* ===== CTA SECTION ===== */
.cta-pattern {
    color: rgba(255, 255, 255, 0.3);
}

/* ===== SELECT STYLING ===== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%233d7a52' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ===== UTILITY ===== */
::selection {
    background: rgba(61, 122, 82, 0.2);
    color: #1a3a2a;
}

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
    outline: 2px solid #3d7a52;
    outline-offset: 2px;
}

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

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

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

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