/* ========== BASE & RESET ========== */
*, *::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: #E8645A;
    color: white;
}

/* ========== NAVIGATION ========== */
.nav-logo-text {
    transition: color 0.3s ease;
}

.nav-link {
    position: relative;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.navbar-scrolled .nav-logo-text {
    color: #18181B;
}

.navbar-scrolled .nav-link {
    color: #3F3F46;
}

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

.navbar-transparent .nav-logo-text {
    color: #18181B;
}

/* Mobile menu */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.menu-icon-open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-icon-open span:nth-child(2) {
    opacity: 0;
}

.menu-icon-open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.25rem;
}

/* ========== HERO ANIMATIONS ========== */
.hero-anim {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeUp 0.8s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.25s; }
.hero-anim:nth-child(3) { animation-delay: 0.4s; }
.hero-anim:nth-child(4) { animation-delay: 0.55s; }

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

/* ========== SECTION ANIMATIONS ========== */
.about-anim,
.services-anim,
.neighborhoods-anim,
.testimonials-anim,
.cta-anim,
.contact-anim {
    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);
}

.about-anim.visible,
.services-anim.visible,
.neighborhoods-anim.visible,
.testimonials-anim.visible,
.cta-anim.visible,
.contact-anim.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== SERVICE CARDS ========== */
.service-card {
    will-change: transform;
}

/* ========== NEIGHBORHOOD CARDS ========== */
.neighborhoods-anim .group {
    will-change: transform;
}

/* ========== TESTIMONIAL CARDS ========== */
.testimonials-anim > div {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonials-anim.visible > div:nth-child(1) { transition-delay: 0.1s; }
.testimonials-anim.visible > div:nth-child(2) { transition-delay: 0.2s; }
.testimonials-anim.visible > div:nth-child(3) { transition-delay: 0.3s; }

.testimonials-anim.visible > div {
    opacity: 1;
    transform: translateY(0);
}

/* ========== BUTTON HOVER EFFECTS ========== */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* ========== FORM STYLES ========== */
select option {
    color: #3F3F46;
}

select:focus {
    box-shadow: 0 0 0 3px rgba(232, 100, 90, 0.15);
}

/* ========== MOBILE MENU LINKS ========== */
.mobile-link {
    opacity: 0;
    transform: translateY(15px);
    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.05s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .hero-anim {
        transform: translateY(20px);
    }

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

    /* Floating card on mobile */
    .about-anim > div:last-child {
        position: relative !important;
        bottom: auto !important;
        right: auto !important;
        margin-top: 1rem;
        max-width: 100% !important;
    }
}

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}

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