/* Base */
html {
    scroll-behavior: smooth;
}

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

/* Hero Background */
.hero-bg {
    will-change: transform;
}

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

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

/* Header */
#siteHeader {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#siteHeader.scrolled {
    background: rgba(255, 252, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

/* Nav Links */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #7B2D3B;
    border-radius: 1px;
    transition: width 0.25s ease;
}

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

/* Service Cards */
.service-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Neighborhood Cards */
.neighborhood-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.neighborhood-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

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

.mobile-link {
    display: block;
}

/* Hero Badge */
.hero-badge {
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

/* Hero Headline */
.hero-bg ~ .z-10 .max-w-2xl > * {
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-bg ~ .z-10 .max-w-2xl > *:nth-child(2) { animation-delay: 0.3s; }
.hero-bg ~ .z-10 .max-w-2xl > *:nth-child(3) { animation-delay: 0.45s; }
.hero-bg ~ .z-10 .max-w-2xl > *:nth-child(4) { animation-delay: 0.6s; }

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

/* Scroll Indicator */
.scroll-indicator {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-8px) translateX(-50%); }
    60% { transform: translateY(-4px) translateX(-50%); }
}

/* Custom Select Arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #7B2D3B;
    outline-offset: 2px;
}

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