/* ===== CUSTOM STYLES ===== */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

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

/* Nav transition */
.nav {
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.nav.scrolled {
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.08);
}

/* Hero floating card animation */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.floating-card {
  animation: float 4s ease-in-out infinite;
}

/* Scroll reveal base — progressive enhancement via JS */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
  .reveal-delay-4 { transition-delay: 0.4s; }
  .reveal-delay-5 { transition-delay: 0.5s; }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #FAF6F0;
}
::-webkit-scrollbar-thumb {
  background: #D9C4AA;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #C0603A;
}

/* Selection color */
::selection {
  background: #ECCEBC;
  color: #32170D;
}

/* Mobile menu animation */
#mobileMenu {
  animation: slideDown 0.25s ease;
}

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

/* Back to top */
#backToTop.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Neighborhood card overlay transition */
.group .absolute {
  transition: background 0.3s ease;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(192, 96, 58, 0.15);
}

/* Smooth image loading */
img {
  image-rendering: -webkit-optimize-contrast;
}

/* Print styles */
@media print {
  .nav, #backToTop, #mobileMenu { display: none !important; }
  body { color: #000; background: #fff; }
}
