*, *::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;
}

/* ─── Hero Gradient ─── */
.hero-gradient {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 30%, #14b8a6 55%, #0f766e 80%, #134e4a 100%);
}

/* ─── Hero Pattern ─── */
.hero-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.15) 1px, transparent 0);
    background-size: 40px 40px;
}

/* ─── CTA Gradient ─── */
.cta-gradient {
    background: linear-gradient(135deg, #134e4a 0%, #0f766e 40%, #115e59 70%, #0d9488 100%);
}

.cta-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.1) 1px, transparent 0);
    background-size: 48px 48px;
}

/* ─── Floating Elements ─── */
.hero-floating {
    animation: float 8s ease-in-out infinite;
}

.hero-float-1 { animation-delay: 0s; }
.hero-float-2 { animation-delay: -3s; }
.hero-float-3 { animation-delay: -5s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

/* ─── Hero Animations ─── */
.hero-elem {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.hero-elem:nth-child(1) { animation-delay: 0.2s; }
.hero-elem:nth-child(2) { animation-delay: 0.4s; }
.hero-elem:nth-child(3) { animation-delay: 0.6s; }
.hero-elem:nth-child(4) { animation-delay: 0.8s; }

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

/* ─── Scroll Indicator ─── */
.scroll-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(8px); opacity: 1; }
}

/* ─── Reveal on Scroll ─── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* ─── Nav Styles ─── */
#nav {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#nav.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

#nav.scrolled .nav-link {
    color: #64748b;
}

#nav.scrolled .font-serif {
    color: #1e293b;
}

/* ─── Service Cards ─── */
.service-card {
    border: 1px solid transparent;
    transition: border-color 0.5s ease, transform 0.5s ease, box-shadow 0.5s ease;
}

.service-card:hover {
    border-color: rgba(13, 148, 136, 0.1);
    transform: translateY(-4px);
}

/* ─── Neighborhood Cards ─── */
.neighborhood-card {
    cursor: pointer;
}

.neighborhood-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0);
    transition: border-color 0.4s ease;
    pointer-events: none;
}

.neighborhood-card:hover::after {
    border-color: rgba(255,255,255,0.2);
}

/* ─── Mobile Menu ─── */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    position: relative;
}

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

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

/* ─── Custom Select ─── */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
}

/* ─── Selection ─── */
::selection {
    background: rgba(13, 148, 136, 0.2);
    color: #0f766e;
}

/* ─── Focus Visible ─── */
:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}

/* ─── Reduced 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; }
}

/* ─── Wide Screens ─── */
@media (min-width: 1920px) {
    .max-w-6xl { max-width: 72rem; }
}
