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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ===== SCROLL REVEAL (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== NAV ===== */
.nav {
  transition: background-color 0.3s ease;
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #FF6B5A;
  transition: width 0.3s ease;
}

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

.mobile-link {
  display: block;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-link:last-child {
  border-bottom: none;
}

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

.hero-img {
  will-change: transform;
}

.hero-overlay {
  background: linear-gradient(
    to bottom,
    rgba(26, 26, 46, 0.65) 0%,
    rgba(26, 26, 46, 0.75) 50%,
    rgba(26, 26, 46, 0.88) 100%
  );
}

.hero-subtitle {
  animation: fadeInDown 0.8s ease forwards;
}

.hero-title {
  animation: fadeInUp 0.8s ease 0.2s forwards;
  opacity: 0;
}

.hero-desc {
  animation: fadeInUp 0.8s ease 0.4s forwards;
  opacity: 0;
}

.hero-ctas {
  animation: fadeInUp 0.8s ease 0.6s forwards;
  opacity: 0;
}

.hero-shape {
  animation: float 6s ease-in-out infinite;
}

.shape-circle-1 { animation-delay: 0s; }
.shape-circle-2 { animation-delay: -2s; }
.shape-rect { animation-delay: -4s; }
.shape-diamond { animation-delay: -1s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--rotate, 0deg)); }
  50% { transform: translateY(-20px) rotate(var(--rotate, 0deg)); }
}

.shape-rect { --rotate: 12deg; }
.shape-diamond { --rotate: 45deg; }

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

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

.scroll-indicator {
  opacity: 0.7;
  animation: fadeInUp 1s ease 1s forwards;
  opacity: 0;
}

/* ===== BUTTONS ===== */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
  opacity: 1;
}

/* ===== STATS BAR ===== */
.stat-number {
  background: linear-gradient(135deg, #ffffff 0%, #FF7F6E 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== ABOUT ===== */
.about-img {
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.25);
}

.about-img-badge {
  box-shadow: 0 10px 30px -5px rgba(255, 107, 90, 0.4);
}

.badge-chip {
  transition: background-color 0.2s ease, color 0.2s ease;
}

.badge-chip:hover {
  background-color: #FF6B5A;
  color: white;
}

/* ===== SERVICES ===== */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #FF6B5A, #FF7F6E);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

/* ===== NEIGHBORHOODS ===== */
.neighborhood-card {
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.neighborhood-card:hover {
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.15);
}

/* ===== TESTIMONIALS ===== */
.testimonial-card {
  transition: border-color 0.3s ease, transform 0.3s ease;
}

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

/* ===== CTA BANNER ===== */
.cta-banner {
  position: relative;
}

/* ===== CONTACT ===== */
.contact-form {
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
}

.form-label {
  font-weight: 500;
}

.form-input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  border-color: #FF6B5A;
  box-shadow: 0 0 0 3px rgba(255, 107, 90, 0.15);
}

.form-submit {
  letter-spacing: 0.02em;
}

.form-submit:hover {
  transform: translateY(-1px);
}

.form-success {
  animation: fadeInUp 0.5s ease forwards;
}

/* ===== FOOTER ===== */
.footer-link {
  display: inline-block;
  transition: transform 0.2s ease;
}

.footer-link:hover {
  transform: translateX(4px);
}

.footer-social {
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.footer-social:hover {
  transform: translateY(-2px);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
}

.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-2px) !important;
}

/* ===== DECORATIVE SHAPES ===== */
.about-shape, .services-shape, .neighborhoods-shape,
.testimonials-shape, .cta-shape, .contact-shape {
  will-change: transform;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 640px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .about-img-badge {
    position: relative;
    bottom: auto;
    right: auto;
    display: inline-block;
    margin-top: 1rem;
  }

  .contact-form {
    padding: 1.5rem;
  }
}

@media (min-width: 641px) and (max-width: 1023px) {
  .hero-title {
    font-size: 3.5rem;
  }
}

/* ===== REDUCED MOTION ===== */
@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;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
