/* ───── Qaf · ق — Brand tokens ─────
   Per Brand Architecture v1.0 (Real Estate Cluster):
   "earth + navy" — LIGHT theme to differentiate from MKW Advisory's dark navy+gold.
   Voice: تشغيلي، خبير، مدروس — architectural, grounded, tactile.
   Tier-1 Strategic Endorsed (endorsement HIDDEN per Mohamed). */

:root {
  color-scheme: light;
  --bg-base: #F4ECDB;       /* warm parchment */
  --navy: #1A2740;          /* deep navy ink */
  --navy-soft: #2C3A55;
  --terracotta: #A0522D;    /* sienna terracotta */
  --terracotta-light: #C97A55;
  --ochre: #B8853A;
  --tan: #C4A77D;           /* warm tan border */
  --cream: #FBF6E9;         /* lighter cream for cards */
  --ink: #1A2740;
  --muted: rgba(26, 39, 64, 0.6);
}

html, body {
  background: var(--bg-base);
  color: var(--ink);
}

body {
  background-image:
    /* warm vignette top */
    radial-gradient(70% 55% at 50% 0%, rgba(196, 167, 125, 0.18) 0%, transparent 75%),
    /* soft architectural blueprint grid */
    linear-gradient(rgba(26, 39, 64, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 39, 64, 0.04) 1px, transparent 1px),
    /* subtle paper texture */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.15 0 0 0 0 0.18 0 0 0 0 0.25 0 0 0 0.04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: auto, 56px 56px, 56px 56px, 180px 180px;
  background-attachment: fixed;
  font-family: 'Readex Pro', 'Inter', system-ui, sans-serif;
}
html[lang="en"] body { font-family: 'Inter', system-ui, sans-serif; }

/* ───── Header brand wordmark ───── */
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}
.brand-logo-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--navy);
  border: 1px solid var(--terracotta);
  border-radius: 0.55rem;
  padding: 0.18rem;
  box-shadow: 0 2px 8px rgba(26, 39, 64, 0.18);
}
.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand-wordmark {
  font-family: 'Playfair Display', 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.005em;
  line-height: 1;
}
@media (min-width: 640px) {
  .brand-logo-tile { width: 2.75rem; height: 2.75rem; }
  .brand-wordmark { font-size: 1.5rem; }
}
html[lang="ar"] .brand-wordmark {
  font-family: 'Readex Pro', serif;
  font-weight: 700;
}

/* Header nav links color override for light mode */
header nav a { color: var(--navy-soft); }
header nav a:hover { color: var(--terracotta); }

#lang-toggle {
  border-color: var(--terracotta);
  color: var(--terracotta);
  background: transparent;
}
#lang-toggle:hover {
  background: var(--terracotta);
  color: var(--cream);
}

/* ───── Section titles ───── */
.section-title {
  font-family: 'Playfair Display', 'Readex Pro', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
@media (min-width: 640px) { .section-title { font-size: 2.75rem; } }
@media (min-width: 768px) { .section-title { font-size: 3.25rem; } }
html[lang="ar"] .section-title {
  font-family: 'Readex Pro', serif;
  font-weight: 700;
}

/* Eyebrow lines (terracotta accent) */
.eyebrow-line {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 600;
}
.eyebrow-line::before,
.eyebrow-line::after {
  content: "";
  display: inline-block;
  width: 1.75rem;
  height: 1px;
  background: var(--terracotta);
  opacity: 0.5;
}
html[lang="ar"] .eyebrow-line {
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.78rem;
}

/* ───── Hero (LIGHT mode, navy ink calligraphy on parchment) ───── */
.hero-headline {
  font-family: 'Amiri', 'Readex Pro', serif;
  font-size: 3.25rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--navy);
  display: inline-block;
  padding-bottom: 0.12em;
  position: relative;
}
.hero-headline::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--terracotta) 50%, transparent 100%);
}
@media (min-width: 640px) { .hero-headline { font-size: 4.5rem; } }
@media (min-width: 768px) { .hero-headline { font-size: 6rem; } }
html[lang="en"] .hero-headline {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(60% 40% at 50% 30%, rgba(160, 82, 45, 0.06) 0%, transparent 70%),
    radial-gradient(50% 50% at 50% 100%, rgba(26, 39, 64, 0.05) 0%, transparent 70%);
}

/* Architectural blueprint corners on hero */
.hero-ornament {
  position: absolute;
  width: 80px;
  height: 80px;
  border-color: var(--terracotta);
  opacity: 0.45;
  pointer-events: none;
}
.hero-ornament-start {
  top: 6rem;
  inset-inline-start: 1.5rem;
  border-top: 2px solid;
  border-inline-start: 2px solid;
}
.hero-ornament-end {
  bottom: 4rem;
  inset-inline-end: 1.5rem;
  border-bottom: 2px solid;
  border-inline-end: 2px solid;
}
@media (max-width: 640px) {
  .hero-ornament { width: 50px; height: 50px; }
  .hero-ornament-start { top: 5rem; inset-inline-start: 0.75rem; }
  .hero-ornament-end { bottom: 2.5rem; inset-inline-end: 0.75rem; }
}

/* Subhead on hero — quiet ink */
section .text-cream\/75,
section .text-cream\/65,
section .text-cream\/55,
section .text-cream\/70,
section .text-cream\/60 { color: var(--muted); }

/* Override the cream text classes for body content */
body.text-cream { color: var(--ink); }

/* ───── Buttons (solid navy filled — mature, architectural) ───── */
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;  /* sharper than mkw.coach's pill — architectural */
  padding: 0.85rem 1.7rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all 0.3s ease;
  white-space: nowrap;
  background: var(--navy);
  color: var(--cream);
  box-shadow: 0 4px 16px rgba(26, 39, 64, 0.18);
  border: 1px solid var(--navy);
}
@media (min-width: 640px) {
  .btn-gold { padding: 1rem 2rem; font-size: 0.9rem; }
}
.btn-gold:hover {
  background: var(--terracotta);
  border-color: var(--terracotta);
  box-shadow: 0 8px 28px rgba(160, 82, 45, 0.32);
  transform: translateY(-2px);
}

/* ───── Service cards (cream tiles with terracotta border accent) ───── */
.service-card {
  position: relative;
  border-radius: 0.5rem;  /* architectural, not pill-rounded */
  border: 1px solid rgba(196, 167, 125, 0.5);
  background: var(--cream);
  padding: 1.75rem 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(26, 39, 64, 0.04);
  /* terracotta accent line on the start edge — like a blueprint */
  border-inline-start: 3px solid var(--terracotta);
}
.service-card:hover {
  transform: translateY(-3px);
  border-color: var(--terracotta);
  box-shadow: 0 14px 32px rgba(26, 39, 64, 0.1);
}
.service-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}
.service-mark {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.4rem;
  border: 1px solid var(--terracotta);
  background: rgba(160, 82, 45, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--terracotta);
}
.service-mark svg { display: block; }
.service-title {
  color: var(--navy);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.2;
}
.service-body {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.75;
}

/* ───── Cluster cards ───── */
.cluster-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(196, 167, 125, 0.5);
  background: var(--cream);
  padding: 1.4rem;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}
.cluster-card:hover:not(.cluster-card-self) {
  border-color: var(--terracotta);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(26, 39, 64, 0.08);
}
.cluster-card-self {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--cream);
}
.cluster-card-self .cluster-card-title { color: var(--cream); }
.cluster-card-self .cluster-card-desc { color: rgba(251, 246, 233, 0.75); }
.cluster-mark {
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Amiri', serif;
  font-weight: 700;
  font-size: 2rem;
  background: var(--terracotta);
  color: var(--cream);
}
.cluster-card-self .cluster-mark { background: var(--cream); color: var(--navy); }
.cluster-mark-jommar { background: var(--ochre); }
.cluster-mark-hissa  { background: #2F8F76; color: var(--cream); }
.cluster-card-body { flex: 1; min-width: 0; }
.cluster-card-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 0.3rem;
}
.cluster-card-desc {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}
.cluster-card-link {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 0.78rem;
  color: var(--terracotta);
  font-weight: 600;
  letter-spacing: 0.03em;
}
.cluster-card:hover .cluster-card-link { color: var(--navy); }
.cluster-card-badge {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream);
  border: 1px solid var(--cream);
  padding: 0.18rem 0.55rem;
  border-radius: 0.25rem;
  opacity: 0.8;
}
html[lang="ar"] .cluster-card-badge {
  letter-spacing: 0;
  text-transform: none;
}

/* ───── CTA section title (override hero's display) ───── */
section#contact h2 {
  color: var(--navy) !important;
}

/* ───── Contact icons row ───── */
.contact-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 0.4rem;  /* sharper, architectural */
  background: transparent;
  border: 1px solid var(--navy);
  color: var(--navy);
  cursor: pointer;
  transition: all 0.25s ease;
}
.contact-icon-btn:hover {
  background: var(--navy);
  color: var(--cream);
  transform: translateY(-2px);
}

/* City toast */
.city-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(0.6rem);
  padding: 0.6rem 1.2rem;
  border-radius: 0.4rem;
  background: var(--navy);
  border: 1px solid var(--terracotta);
  color: var(--cream);
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 8px 28px rgba(26, 39, 64, 0.25);
}
.city-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Footer */
footer {
  border-top: 1px solid rgba(196, 167, 125, 0.5);
  background: rgba(251, 246, 233, 0.4);
}
footer .text-cream\/45 { color: var(--muted) !important; }

/* ───── Reduced motion ───── */
@media (prefers-reduced-motion: reduce) {
  .btn-gold:hover, .service-card:hover, .cluster-card:hover, .contact-icon-btn:hover {
    transform: none;
  }
}
