/* ============================================
   EDITH REAL ESTATE — DESIGN SYSTEM
   Premium Foundation — Tightened Spacing
   ============================================ */

:root {
  /* Colors — Backgrounds */
  --bg-primary: #0C0C0C;
  --bg-surface: #141414;
  --bg-elevated: #1C1C1C;
  --bg-deep: #080808;
  --bg-cream: #F5F0E8;
  --bg-warm: #1A1714;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.1);
  --border-gold: rgba(212, 175, 55, 0.2);

  /* Colors — Gold */
  --gold-primary: #D4AF37;
  --gold-light: #F1D78A;
  --gold-dark: #997A15;
  --gold-muted: rgba(212, 175, 55, 0.15);
  --gold-subtle: rgba(212, 175, 55, 0.06);
  --gold-gradient: linear-gradient(135deg, #D4AF37 0%, #F1D78A 50%, #D4AF37 100%);
  --gold-text-gradient: linear-gradient(135deg, #D4AF37 0%, #F1D78A 40%, #D4AF37 100%);

  /* Colors — Text */
  --text-primary: #F5F5F5;
  --text-secondary: #9A9A9A;
  --text-muted: #5A5A5A;
  --text-dark: #0C0C0C;
  --text-accent: #D4AF37;

  /* Colors — Status */
  --status-available: #2E7D32;
  --status-sold: #C62828;
  --status-featured: #D4AF37;

  /* Colors — Accent */
  --blue-electric: #3B82F6;
  --blue-subtle: rgba(59, 130, 246, 0.04);

  /* Typography */
  --font-display: 'Cinzel', serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  --text-hero: clamp(2.75rem, 5vw + 1rem, 4.5rem);
  --text-hero-line: 1.05;
  --text-hero-mobile: clamp(2rem, 5vw + 0.5rem, 3rem);
  --text-section: clamp(1.75rem, 3vw + 0.5rem, 2.75rem);
  --text-section-sub: clamp(0.95rem, 1.3vw, 1.15rem);
  --text-card-title: 1.25rem;
  --text-body: 1rem;
  --text-body-lg: 1.0625rem;
  --text-small: 0.9375rem;
  --text-meta: 0.8125rem;
  --text-label: 0.6875rem;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;
  --tracking-wider: 0.08em;
  --tracking-widest: 0.2em;

  /* Spacing — TIGHTER */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 2.5rem;
  --space-3xl: 3.5rem;
  --space-4xl: 5rem;
  --space-5xl: 7rem;

  /* Section padding — TIGHTER, no excessive gaps */
  --section-padding: clamp(3rem, 6vw, 5rem);
  --section-padding-lg: clamp(4rem, 8vw, 7rem);

  /* Container */
  --container-max: 1320px;
  --container-padding: clamp(1.25rem, 4vw, 3rem);
  --container-narrow: 800px;

  /* Borders */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;

  /* Shadows */
  --shadow-subtle: 0 2px 20px rgba(0, 0, 0, 0.2);
  --shadow-card: 0 8px 40px rgba(0, 0, 0, 0.4);
  --shadow-elevated: 0 16px 64px rgba(0, 0, 0, 0.5);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
  --duration-fast: 200ms;
  --duration-normal: 400ms;
  --duration-slow: 700ms;
  --duration-reveal: 900ms;
  --duration-dramatic: 1200ms;

  /* Z-index */
  --z-header: 100;
  --z-mobile-menu: 90;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: auto;
  overflow-x: hidden;
}

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

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--duration-fast) var(--ease-out); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold-primary); outline-offset: 3px;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.section {
  padding-top: var(--section-padding);
  padding-bottom: var(--section-padding);
  position: relative;
}

.section-label {
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: var(--space-md);
  display: block;
}

.section-title {
  font-size: var(--text-section);
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  line-height: 1.15;
  letter-spacing: var(--tracking-tight);
}

.section-subtitle {
  font-size: var(--text-section-sub);
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
}

.text-gold { color: var(--gold-primary); }

.divider {
  width: 60px;
  height: 1px;
  background: var(--gold-primary);
  margin: var(--space-lg) 0;
  opacity: 0.6;
}
.divider--center { margin-left: auto; margin-right: auto; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
}

.btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--gold-primary);
  transition: width var(--duration-slow) var(--ease-out), left var(--duration-slow) var(--ease-out);
}
.btn:hover::after { width: 80%; left: 10%; }

.btn--primary {
  background: var(--gold-primary);
  color: var(--text-dark);
  border: 1px solid var(--gold-primary);
  font-weight: var(--weight-bold);
}
.btn--primary::after { display: none; }
.btn--primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212, 175, 55, 0.25);
}

.btn--outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}
.btn--outline:hover {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--gold-primary);
  border: 1px solid transparent;
  padding: 0.5rem 0;
}
.btn--ghost:hover { color: var(--gold-light); }
.btn--ghost .btn-arrow { transition: transform var(--duration-normal) var(--ease-out); }
.btn--ghost:hover .btn-arrow { transform: translateX(6px); }

.btn--lg { padding: 1rem 2.5rem; font-size: var(--text-body); }

/* ---------- REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
}
.reveal.revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: opacity var(--duration-reveal) var(--ease-out),
              transform var(--duration-reveal) var(--ease-out);
}
.reveal--delay-1 { transition-delay: 100ms !important; }
.reveal--delay-2 { transition-delay: 200ms !important; }
.reveal--delay-3 { transition-delay: 300ms !important; }
.reveal--delay-4 { transition-delay: 400ms !important; }

/* ---------- SECTION CONNECTOR ---------- */
.section-connector {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--gold-primary), transparent);
  margin: 0 auto;
  opacity: 0.15;
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, 0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(212, 175, 55, 0.35); }

::selection { background: rgba(212, 175, 55, 0.25); color: var(--text-primary); }

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-out);
}
.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
}
.lightbox__figure {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox__img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  opacity: 0;
  transform: scale(0.95);
  transition: opacity var(--duration-normal) var(--ease-out), transform var(--duration-normal) var(--ease-out);
}
.lightbox.open .lightbox__img {
  opacity: 1;
  transform: scale(1);
}
.lightbox__caption {
  color: var(--text-secondary);
  font-size: var(--text-small);
  margin-top: var(--space-md);
  text-align: center;
}
.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 2rem;
  cursor: pointer;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  transition: background var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}
.lightbox__close:hover {
  background: rgba(255,255,255,0.15);
  transform: rotate(90deg);
}
.lightbox__prev, .lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  transition: background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.lightbox__prev { left: 1.5rem; }
.lightbox__next { right: 1.5rem; }
.lightbox__prev:hover, .lightbox__next:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--gold-primary);
}
.lightbox__prev svg, .lightbox__next svg {
  width: 20px;
  height: 20px;
}
@media (prefers-reduced-motion: reduce) {
  .lightbox__img { opacity: 1; transform: none; transition: none; }
  .lightbox { transition: none; }
}

/* ---------- FORM VALIDATION ---------- */
.form-field--error input,
.form-field--error select,
.form-field--error textarea {
  border-color: #C62828 !important;
  box-shadow: 0 0 0 1px rgba(198, 40, 40, 0.3);
}
.form-error {
  font-size: var(--text-meta);
  color: #EF5350;
  margin-top: 0.375rem;
  min-height: 0;
  overflow: hidden;
}
.form-field--error .form-error {
  max-height: 2rem;
  transition: max-height var(--duration-normal) var(--ease-out);
}

/* ---------- WHATSAPP FLOAT (REMOVED — replaced by FAQ chat) ---------- */
/* .whatsapp-float rules removed */
