/* ═══════════════════════════════════════════════════════════
   VISTA MATAPALO ESTATES — Design System v1.0
   Premium Real Estate Investment Platform
   ═══════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ── */
:root {
  /* Colors — Nature + Premium */
  --bg-primary: #FAFAF8;
  --bg-secondary: #F2F0EB;
  --bg-dark: #1A2332;
  --bg-darker: #111820;
  --bg-card: #FFFFFF;
  --bg-card-dark: #1E2A3A;

  --green-deep: #1B4332;
  --green-mid: #2D6A4F;
  --green-light: #52B788;
  --green-pale: #D8F3DC;
  --green-muted: rgba(82,183,136,0.12);

  --gold: #C9A84C;
  --gold-light: #E8D5A3;
  --gold-muted: rgba(201,168,76,0.15);

  --text-dark: #1A1A1A;
  --text-body: #4A4A4A;
  --text-muted: #8A8A8A;
  --text-light: #C5C5C5;
  --text-white: #F5F5F5;

  --border-light: #E8E6E1;
  --border-card: rgba(0,0,0,0.06);
  --border-dark: rgba(255,255,255,0.08);

  --success: #52B788;
  --warning: #E9C46A;
  --error: #E63946;
  --info: #457B9D;

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 80px;
  --space-5xl: 120px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.16);
  --shadow-glow: 0 0 40px rgba(201,168,76,0.15);

  /* Transitions */
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--bg-primary);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-dark);
  line-height: 1.15;
  font-weight: 400;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p { line-height: 1.75; }

.font-display { font-family: var(--font-display); }

/* ── Container ── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container--narrow { max-width: 960px; }

/* ── Utility ── */
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-green { color: var(--green-mid); }
.text-muted { color: var(--text-muted); }
.text-white { color: var(--text-white); }
.bg-dark { background: var(--bg-dark); color: var(--text-white); }
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4 { color: var(--text-white); }

/* ── Section ── */
.section { padding: var(--space-5xl) 0; }

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header h2 { margin-bottom: var(--space-md); }

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-lg);
}

.section-label::before,
.section-label::after {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--gold);
  opacity: 0.4;
}

.accent-line {
  display: block;
  width: 48px;
  height: 2px;
  background: var(--gold);
  margin: var(--space-lg) auto 0;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  white-space: nowrap;
}

.btn-primary {
  background: var(--green-deep);
  color: white;
}
.btn-primary:hover {
  background: var(--green-mid);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-gold {
  background: var(--gold);
  color: var(--bg-dark);
}
.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-white);
  border: 1.5px solid rgba(255,255,255,0.3);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.5);
}

.btn-whatsapp {
  background: #25D366;
  color: white;
}
.btn-whatsapp:hover {
  background: #20BA5A;
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-body);
  border: 1.5px solid var(--border-light);
}
.btn-ghost:hover { background: var(--bg-secondary); }

.btn-lg { padding: 16px 40px; font-size: 0.875rem; }
.btn-sm { padding: 10px 20px; font-size: 0.75rem; }

/* ── Forms ── */
.form-group { margin-bottom: var(--space-lg); }

.form-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-dark);
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-fast);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px var(--green-muted);
}

.form-textarea { resize: vertical; min-height: 100px; }

/* Dark variant */
.bg-dark .form-input,
.bg-dark .form-select,
.bg-dark .form-textarea {
  background: var(--bg-card-dark);
  border-color: var(--border-dark);
  color: var(--text-white);
}
.bg-dark .form-label { color: var(--text-light); }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--radius-sm);
}

.badge-green { background: var(--green-deep); color: white; }
.badge-gold { background: var(--gold); color: var(--bg-dark); }
.badge-featured { background: var(--gold); color: var(--bg-dark); }
.badge-new { background: var(--green-light); color: white; }
.badge-last { background: var(--error); color: white; }
.badge-demand { background: var(--warning); color: var(--bg-dark); }
.badge-sold { background: var(--text-muted); color: white; }

/* ── Spinner ── */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-light);
  border-top-color: var(--green-mid);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.animate-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.animate-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.animate-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

.animate-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.animate-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.animate-stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.animate-stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.animate-stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.animate-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }

/* ── Icon SVG base ── */
.icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--sm svg { width: 16px; height: 16px; }
.icon--lg svg { width: 28px; height: 28px; }
