/* ============================================================
   LUXE VIEW MOROCCO — main.css
   Global styles, CSS variables, typography, utilities
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600&display=swap');

/* ─── CSS Custom Properties ─────────────────────────────── */
:root {
  --color-navy:        #2C3E50;
  --color-gold:        #D4AF37;
  --color-gold-dark:   #B8941E;
  --color-terracotta:  #C4622D;
  --color-charcoal:    #3D3D3D;
  --color-light-gray:  #F5F5F5;
  --color-white:       #FFFFFF;
  --color-whatsapp:    #25D366;

  --color-text-muted:    #5C6670;
  --color-gold-text:     #8A6D10;
  --color-terracotta-text:#B0541F;

  --font-display: 'Cormorant Garamond', serif;
  --font-heading: 'DM Sans', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --max-width: 1200px;
  --section-pad-desktop: 80px;
  --section-pad-mobile:  48px;

  --radius-card:   12px;
  --radius-btn:    6px;
  --shadow-card:   0 4px 24px rgba(44, 62, 80, 0.10);
  --shadow-hover:  0 8px 40px rgba(44, 62, 80, 0.18);
  --transition:    0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: var(--font-body);
  color: var(--color-charcoal);
  background: var(--color-white);
  line-height: 1.7;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

/* ─── Keyboard Focus ────────────────────────────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Focus ring stays visible on dark/navy surfaces */
.nav-drawer a:focus-visible,
.footer a:focus-visible,
.section--navy a:focus-visible,
.section--navy button:focus-visible {
  outline-color: var(--color-white);
}

/* ─── Reduced Motion ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

ul, ol { list-style: none; }

/* ─── Typography ────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-navy);
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }
h4 { font-size: 1.05rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.section-label {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--color-terracotta-text);
  display: block;
  margin-bottom: 0.75rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: #666;
  max-width: 600px;
}

/* ─── Layout Utilities ──────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-pad-desktop) 0;
}

.section--gray { background: var(--color-light-gray); }
.section--navy { background: var(--color-navy); }
.section--gold { background: var(--color-gold); }

.text-center { text-align: center; }
.text-navy   { color: var(--color-navy); }
.text-gold   { color: var(--color-gold); }
.text-white  { color: var(--color-white); }

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header .section-subtitle {
  margin: 0 auto;
}

/* ─── Grid Helpers ──────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* ─── Flex Helpers ──────────────────────────────────────── */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1  { gap: 0.5rem; }
.gap-2  { gap: 1rem; }
.gap-3  { gap: 1.5rem; }
.gap-4  { gap: 2rem; }

/* ─── Scroll Animation ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--transition), transform 0.6s var(--transition);
}
.reveal.visible {
  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; }

/* ─── Divider ───────────────────────────────────────────── */
.divider-gold {
  width: 60px;
  height: 3px;
  background: var(--color-gold);
  border-radius: 2px;
  margin: 1rem auto 1.5rem;
}
.divider-gold--left { margin-left: 0; }

/* ─── Badge ─────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-heading);
  letter-spacing: 0.5px;
}
.badge--gold   { background: var(--color-gold);  color: var(--color-navy); }
.badge--navy   { background: var(--color-navy);  color: var(--color-white); }
.badge--glass  { background: rgba(255,255,255,0.15); color: var(--color-white); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.25); }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .section { padding: var(--section-pad-mobile) 0; }
  .container { padding: 0 16px; }
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }
  .section-header { margin-bottom: 2rem; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
}

/* ─── Marketplace Tokens ────────────────────────────────── */
:root {
  --color-sale:     #27AE60;
  --color-rent:     #2980B9;
  --color-gray-mid: #E0E0E0;
}

/* ─── Property Grid ─────────────────────────────────────── */
.property-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .property-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .property-grid { grid-template-columns: 1fr; }
}

/* ─── Filter Layout (sidebar + content) ─────────────────── */
.filter-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .filter-layout { grid-template-columns: 1fr; }
}

/* ─── Spec Chips ────────────────────────────────────────── */
.spec-list {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: #666;
  white-space: nowrap;
}

.spec-item svg { color: var(--color-navy); flex-shrink: 0; }
