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

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

body {
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
  background: none;
  border: none;
  color: inherit;
}

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

ul {
  list-style: none;
}

/* ===== CUSTOM PROPERTIES ===== */
:root {
  --gold: #c8a44e;
  --gold-light: #e2a832;
  --plum-dark: #230e2b;
  --plum-mid: #552960;
  --dark: #0d0610;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== NAVBAR ===== */
.nav-fixed {
  background: transparent;
  transition: background 0.5s ease, box-shadow 0.5s ease, backdrop-filter 0.5s ease;
}

.nav-fixed.scrolled {
  background: rgba(13, 6, 16, 0.92);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(200, 164, 78, 0.1);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
}

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

.nav-link:hover {
  color: var(--gold-light) !important;
}

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

#mobileMenu.closed {
  opacity: 0;
  pointer-events: none;
}

.mobile-nav-link {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu:not(.open) .mobile-nav-link {
  opacity: 0;
  transform: translateY(10px);
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-img {
  transform: scale(1.05);
  transition: transform 8s ease-out;
}

.hero.loaded .hero-img {
  transform: scale(1);
}

.hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(13, 6, 16, 0.75) 0%,
    rgba(35, 14, 43, 0.55) 50%,
    rgba(13, 6, 16, 0.70) 100%
  );
}

.hero-gradient {
  background: linear-gradient(
    to bottom,
    rgba(13, 6, 16, 0.2) 0%,
    transparent 30%,
    transparent 70%,
    rgba(13, 6, 16, 0.9) 100%
  );
}

.hero-content {
  opacity: 1;
  transform: translateY(0);
}

.hero.loaded .hero-content {
  animation: heroFadeUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.3s;
  opacity: 0;
}

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

.hero-badge {
  opacity: 0;
  animation: badgeFade 0.8s ease forwards;
  animation-delay: 0.5s;
}

@keyframes badgeFade {
  to { opacity: 1; }
}

.hero-title {
  opacity: 0;
  animation: titleReveal 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.7s;
}

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

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

@keyframes subtitleFade {
  to { opacity: 1; }
}

.hero-ctas {
  opacity: 0;
  animation: ctaFade 0.8s ease forwards;
  animation-delay: 1.2s;
}

@keyframes ctaFade {
  to { opacity: 1; }
}

.hero-stats {
  opacity: 0;
  animation: statsFade 0.8s ease forwards;
  animation-delay: 1.5s;
}

@keyframes statsFade {
  to { opacity: 1; }
}

.scroll-indicator {
  opacity: 0;
  animation: scrollFade 0.8s ease forwards;
  animation-delay: 2s;
}

@keyframes scrollFade {
  to { opacity: 1; }
}

/* ===== BUTTONS ===== */
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--dark);
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(200, 164, 78, 0.25), inset 0 1px 0 rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
}

.btn-gold::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(200, 164, 78, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-gold:active {
  transform: translateY(0);
}

.btn-gold span,
.btn-gold svg {
  position: relative;
  z-index: 1;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid rgba(200, 164, 78, 0.4);
  color: var(--gold);
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  background: rgba(200, 164, 78, 0.05);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  background: rgba(200, 164, 78, 0.12);
  border-color: rgba(200, 164, 78, 0.7);
  transform: translateY(-2px);
}

/* ===== SECTIONS ===== */
.section {
  position: relative;
}

.section-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 640px) {
  .section-inner {
    padding: 0 2rem;
  }
}

@media (min-width: 1024px) {
  .section-inner {
    padding: 0 2.5rem;
  }
}

.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(200, 164, 78, 0.1);
  border: 1px solid rgba(200, 164, 78, 0.25);
  padding: 0.5rem 1rem;
  border-radius: 100px;
}

.section-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--plum-50);
}

.section-desc {
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(212, 205, 230, 0.6);
  max-width: 640px;
}

/* ===== SERVICE CARDS ===== */
.services-grid {
  position: relative;
}

.service-card {
  opacity: 1;
}

/* ===== NEIGHBORHOOD CARDS ===== */
.neighborhood-card {
  position: relative;
  cursor: pointer;
}

.neighborhood-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ===== TESTIMONIAL CARDS ===== */
.testimonial-card {
  opacity: 1;
  transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(200, 164, 78, 0.15);
}

/* ===== CONTACT ===== */
.contact-info-card {
  opacity: 1;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.contact-info-card:hover {
  border-color: rgba(200, 164, 78, 0.3);
  transform: translateX(4px);
}

/* ===== FORM ===== */
.input-field {
  background: rgba(35, 14, 43, 0.4);
  border: 1px solid rgba(100, 50, 120, 0.3);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  color: var(--plum-50);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  outline: none;
  width: 100%;
}

.input-field::placeholder {
  color: rgba(190, 157, 211, 0.4);
}

.input-field:focus {
  border-color: rgba(200, 164, 78, 0.5);
  background: rgba(35, 14, 43, 0.6);
  box-shadow: 0 0 0 3px rgba(200, 164, 78, 0.1);
}

.input-field:hover:not(:focus) {
  border-color: rgba(100, 50, 120, 0.5);
}

select.input-field {
  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='%23c8a44e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline x1='6' y1='9' x2='12' y2='15' x3='18' y2='9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* ===== FOOTER ===== */
.footer {
  position: relative;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 640px) {
  .footer-inner {
    padding: 0 2rem;
  }
}

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

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

.back-to-top:hover {
  transform: translateY(-3px);
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
  /* Default: visible — animations are progressive enhancement */
}

.reveal.revealed {
  animation: revealUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

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

/* Respect 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 !important;
    transform: none !important;
  }

  .hero.loaded .hero-content,
  .hero.loaded .hero-title,
  .hero.loaded .hero-subtitle,
  .hero.loaded .hero-ctas,
  .hero.loaded .hero-stats {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-img {
    transform: scale(1) !important;
  }
}

/* ===== FOCUS STYLES ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 0.5rem;
}

/* ===== SELECTION ===== */
::selection {
  background: rgba(200, 164, 78, 0.3);
  color: var(--plum-50);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--dark);
}

::-webkit-scrollbar-thumb {
  background: var(--plum-mid);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}
