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

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

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== NAVBAR ===== */
#navbar {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

#navbar.scrolled {
    background: rgba(253, 252, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(6, 78, 59, 0.08);
}

#navbar.scrolled .logo-text {
    color: #064e3b;
}

#navbar.scrolled .nav-link {
    color: rgba(6, 78, 59, 0.7);
}

#navbar.scrolled .nav-link:hover {
    color: #059669;
}

#navbar.scrolled .mobile-link {
    color: rgba(6, 78, 59, 0.8);
}

#navbar.scrolled .mobile-link:hover {
    color: #059669;
}

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

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, rgba(253, 252, 248, 1), transparent);
    pointer-events: none;
}

/* ===== 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, #059669, #34d399, #059669);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* ===== NEIGHBORHOOD CARDS ===== */
.neighborhood-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    cursor: pointer;
}

.neighborhood-card img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.neighborhood-card:hover img {
    transform: scale(1.08);
}

.neighborhood-card .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 44, 34, 0.9) 0%, rgba(2, 44, 34, 0.2) 50%, transparent 100%);
    transition: background 0.3s ease;
}

.neighborhood-card:hover .overlay {
    background: linear-gradient(to top, rgba(2, 44, 34, 0.95) 0%, rgba(2, 44, 34, 0.3) 50%, transparent 100%);
}

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

.testimonial-card:hover {
    transform: translateY(-4px);
}

/* ===== SCROLL REVEAL ANIMATIONS ===== */
/* Default state: visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* When JS is active and prefers-reduced-motion is off, add hidden state */
@media (prefers-reduced-motion: no-preference) {
    .reveal[data-reveal] {
        opacity: 0;
        transform: translateY(30px);
    }

    .reveal[data-reveal="left"] {
        transform: translateX(-30px);
    }

    .reveal[data-reveal="right"] {
        transform: translateX(30px);
    }

    .reveal.revealed[data-reveal] {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }
}

/* Stagger children */
.stagger-children .reveal[data-reveal] {
    transition-delay: calc(var(--index, 0) * 0.08s);
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: linear-gradient(135deg, #059669, #047857);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #047857, #065f46);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* ===== INPUTS ===== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

/* ===== MOBILE MENU ===== */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
    html {
        scroll-padding-top: 70px;
    }
}

/* ===== FOCUS VISIBLE ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== SELECTION ===== */
::selection {
    background: rgba(5, 150, 105, 0.2);
    color: #064e3b;
}
