/* ===== Base & Typography ===== */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background: #f97066;
  color: white;
}

/* ===== Navigation ===== */
#nav {
  background: rgba(247, 247, 247, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(209, 209, 209, 0.3);
}

#nav.scrolled {
  background: rgba(247, 247, 247, 0.95);
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

/* ===== Mobile Menu ===== */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

#mobile-menu.open .mobile-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
#mobile-menu.open .mobile-line:nth-child(2) {
  opacity: 0;
}
#mobile-menu.open .mobile-line:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
  width: 24px;
}

.mobile-line {
  transition: all 0.3s ease;
}

.mobile-link {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s 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; }

/* ===== Hero ===== */
.hero-eyebrow {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.1s;
}

.hero-title {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.25s;
}

.hero-subtitle {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.4s;
}

.hero-cta {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.55s;
}

.hero-scroll {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.8s;
}

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

/* ===== Floating Stat Cards ===== */
.stat-card {
  opacity: 0;
  animation: floatIn 0.7s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.6s; }
.stat-card:nth-child(2) { animation-delay: 0.8s; }
.stat-card:nth-child(3) { animation-delay: 1s; }

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

.stat-card:hover {
  transform: translateY(-4px);
  transition: transform 0.3s ease;
}

/* ===== Section Animations ===== */
.section-eyebrow,
.section-title,
.section-desc {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-eyebrow.visible,
.section-title.visible,
.section-desc.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-title.visible { transition-delay: 0.1s; }
.section-desc.visible { transition-delay: 0.2s; }

/* ===== Service Cards ===== */
.service-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

/* ===== Neighborhood Cards ===== */
.neighborhood-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.neighborhood-card:nth-child(1) { transition-delay: 0.05s; }
.neighborhood-card:nth-child(2) { transition-delay: 0.1s; }
.neighborhood-card:nth-child(3) { transition-delay: 0.15s; }
.neighborhood-card:nth-child(4) { transition-delay: 0.2s; }
.neighborhood-card:nth-child(5) { transition-delay: 0.25s; }
.neighborhood-card:nth-child(6) { transition-delay: 0.3s; }

/* ===== Testimonial Cards ===== */
.testimonial-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.testimonial-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.testimonial-card:nth-child(1) { transition-delay: 0.05s; }
.testimonial-card:nth-child(2) { transition-delay: 0.15s; }
.testimonial-card:nth-child(3) { transition-delay: 0.25s; }

/* ===== Select Dropdown ===== */
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='%23a1a1a1' 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 0 center;
  padding-right: 2rem;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-eyebrow,
  .hero-title,
  .hero-subtitle,
  .hero-cta,
  .hero-scroll {
    animation: none;
    opacity: 1;
  }
  .stat-card {
    animation: none;
    opacity: 1;
  }
  .section-eyebrow,
  .section-title,
  .section-desc,
  .service-card,
  .neighborhood-card,
  .testimonial-card {
    opacity: 1;
    transform: none;
  }
}

/* ===== Responsive ===== */
@media (max-width: 1023px) {
  .hero-stats {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .hero-title {
    font-size: 2.75rem;
  }
  .section-title {
    font-size: 2.25rem;
  }
}
