/* =========================================================================
   MAQAM  مقام  : Damascus real estate house (demo)
   A Wojoodi portfolio demonstration. Fictional agency.
   Design system: cool marble + deep navy + champagne metal + a teal note.
   Signature motif: the inset champagne keyline frame (an architect's plate),
   the fine double-rule divider, and sharp-cornered property plates.
   One stylesheet drives both LTR and RTL via logical properties + [dir="rtl"].
   ========================================================================= */

:root {
  /* palette */
  --marble:    #ECEDE8;   /* cool stone, the page */
  --marble-2:  #E2E3DC;
  --paper:     #F7F7F3;   /* raised cards */
  --navy:      #151D28;   /* deep blue-charcoal, dark sections + hero */
  --navy-2:    #0E141C;
  --navy-soft: #1D2735;
  --stone:     #BEBCAF;   /* aged neutral stone */
  --champagne:     #AE9258;   /* metallic accent on light */
  --champagne-lit: #CBAE74;   /* metallic on dark */
  --teal:      #15564C;   /* the one cool note */
  --teal-lit:  #1E7264;
  --ink:       #18212D;   /* body text on light */
  --ink-soft:  #58626F;   /* muted text on light */
  --cream:     #ECEAE2;   /* text on dark */
  --cream-soft:#ADAFA6;   /* muted text on dark */
  --line:      rgba(174,146,88,0.30);
  --line-d:    rgba(203,174,116,0.26);

  /* type */
  --f-display:    "Fraunces", Georgia, "Times New Roman", serif;
  --f-body:       "Manrope", ui-sans-serif, system-ui, sans-serif;
  --f-label:      "Manrope", ui-sans-serif, system-ui, sans-serif;
  --f-ar-body:    "Tajawal", "Segoe UI", sans-serif;     /* Arabic UI + body */
  --f-ar-display: "El Messiri", "Tajawal", sans-serif;   /* Arabic display */

  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--marble);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* faint grain for atmosphere */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; }
picture { display: contents; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 400; }

/* ---- type primitives ---- */
/* editorial label in the house serif, no templated dash, used sparingly */
.eyebrow {
  font-family: var(--f-display); font-style: italic; font-optical-sizing: auto;
  font-size: 1.1rem; letter-spacing: 0.01em; text-transform: none; font-weight: 500;
  color: var(--champagne); display: inline-block;
}
.display {
  font-family: var(--f-display);
  font-optical-sizing: auto;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.07;
  font-size: clamp(2rem, 4.6vw, 3.45rem);
  color: var(--ink);
}
.lead {
  font-family: var(--f-display); font-optical-sizing: auto; font-weight: 400; font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 1.85rem); line-height: 1.42; color: var(--ink-soft);
}

/* ---- layout ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(72px, 10vw, 142px); position: relative; }
.section--dark { background: var(--navy); color: var(--cream); }
.section--dark .display { color: var(--cream); }
.section--dark .eyebrow { color: var(--champagne-lit); }

/* fine double-rule divider with a centered diamond */
.rule-div { display: flex; align-items: center; gap: 16px; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.rule-div::before, .rule-div::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.rule-div .dot { width: 7px; height: 7px; border: 1px solid var(--champagne); transform: rotate(45deg); flex: none; }

/* =========================================================================
   The architect's plate: inset champagne keyline framing marquee imagery
   ========================================================================= */
.plate { position: relative; overflow: hidden; background: var(--navy-2); }
.plate img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.plate::after {
  content: ""; position: absolute; inset: 14px; border: 1px solid rgba(236,234,226,0.55);
  pointer-events: none; z-index: 2;
}
.plate:hover img { transform: scale(1.04); }

/* marks (architectural glyph) */
.mark { display: inline-block; color: var(--champagne); }
.mark svg { display: block; width: 100%; height: 100%; }

/* =========================================================================
   Buttons / links
   ========================================================================= */
.btn {
  font-family: var(--f-label); font-size: 0.76rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600;
  padding: 1.05em 1.9em; display: inline-flex; align-items: center; gap: 0.7em;
  border: 1px solid var(--teal); background: var(--teal); color: #F2F4EF; cursor: pointer;
  transition: background 0.4s var(--ease), color 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.btn:hover { background: #0F4339; border-color: #0F4339; transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--champagne); }
.section--dark .btn--ghost, .hero .btn--ghost { color: var(--cream); }
.btn--ghost:hover { background: var(--champagne); color: var(--navy); border-color: var(--champagne); }

.ulink {
  font-family: var(--f-label); font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600;
  color: inherit; position: relative; padding-bottom: 4px; display: inline-flex; align-items: center; gap: 0.5em;
}
.ulink::after {
  content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 100%; height: 2px;
  background: var(--teal-lit); transform: scaleX(0.32); transform-origin: left; transition: transform 0.45s var(--ease);
}
.ulink:hover::after { transform: scaleX(1); }

/* =========================================================================
   Nav
   ========================================================================= */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background 0.5s var(--ease), padding 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.nav.scrolled {
  background: rgba(236,237,232,0.92); backdrop-filter: blur(10px);
  padding-block: 12px; box-shadow: 0 1px 0 var(--line), 0 12px 30px -22px rgba(21,29,40,0.6);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--cream); transition: color 0.5s var(--ease); }
.nav.scrolled .brand { color: var(--ink); }
.brand .mark { width: 34px; height: 34px; flex: none; color: var(--champagne-lit); }
.nav.scrolled .brand .mark { color: var(--champagne); }
.brand-txt { display: flex; flex-direction: column; line-height: 1; }
.brand-en { font-family: var(--f-display); font-weight: 600; font-size: 1.16rem; letter-spacing: 0.14em; }
.brand-sub { font-family: var(--f-label); font-size: 0.54rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--champagne-lit); margin-top: 3px; }
.nav.scrolled .brand-sub { color: var(--champagne); }
.brand-ar { font-family: var(--f-ar-display); font-size: 1.3rem; color: var(--champagne-lit); }
.nav.scrolled .brand-ar { color: var(--champagne); }

.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a:not(.btn):not(.lang) {
  font-family: var(--f-label); font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600;
  color: var(--cream); position: relative; padding: 4px 0; transition: color 0.4s var(--ease);
}
.nav.scrolled .nav-links a:not(.btn):not(.lang) { color: var(--ink); }
.nav-links a:not(.btn):not(.lang)::after {
  content: ""; position: absolute; inset-inline-start: 0; bottom: -2px; width: 100%; height: 1px;
  background: var(--champagne); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease);
}
.nav-links a:not(.btn):not(.lang):hover::after { transform: scaleX(1); }
.nav-links .btn { padding: 0.7em 1.35em; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 34px; height: 24px; position: relative; z-index: 1200; }
.nav-toggle span { position: absolute; inset-inline-start: 0; width: 100%; height: 1.5px; background: var(--cream); transition: 0.4s var(--ease); }
.nav.scrolled .nav-toggle span { background: var(--ink); }
.nav-toggle span:nth-child(1) { top: 3px; } .nav-toggle span:nth-child(2) { top: 11px; } .nav-toggle span:nth-child(3) { top: 19px; }
body.menu-open .nav-toggle span { background: var(--cream); }
body.menu-open .nav-toggle span:nth-child(1) { top: 11px; transform: rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle span:nth-child(3) { top: 11px; transform: rotate(-45deg); }

/* language toggle pill */
.nav-links a.lang {
  font-family: var(--f-label); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600;
  color: var(--champagne-lit); background: rgba(203,174,116,0.07); border: 1px solid rgba(203,174,116,0.4);
  border-radius: 999px; padding: 0.5em 0.9em; display: inline-flex; align-items: center; gap: 0.5em; line-height: 1;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.nav.scrolled .nav-links a.lang { color: var(--champagne); border-color: rgba(174,146,88,0.5); }
.nav-links a.lang:hover { color: var(--navy); background: var(--champagne); border-color: var(--champagne); }
.lang .globe { width: 13px; height: 13px; flex: none; }
.lang .globe svg { width: 100%; height: 100%; display: block; }
.lang::after { display: none !important; }

/* =========================================================================
   Hero (full-bleed image + navy wash + overlaid content)
   ========================================================================= */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; color: var(--cream); }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(14,20,28,0.62) 0%, rgba(14,20,28,0.18) 32%, rgba(14,20,28,0.55) 72%, rgba(14,20,28,0.88) 100%);
}
.hero-keyline { position: absolute; inset: 18px; border: 1px solid rgba(236,234,226,0.28); z-index: 1; pointer-events: none; }
.hero-inner { position: relative; z-index: 2; width: 100%; padding: 150px var(--gutter) 60px; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; }
.hero .eyebrow { color: var(--champagne-lit); }
.hero-name {
  font-family: var(--f-display); font-optical-sizing: auto; font-weight: 500;
  font-size: clamp(2.8rem, 7vw, 5.4rem); line-height: 1.0; letter-spacing: -0.015em;
  margin: 18px 0 0; max-width: 16ch;
}
.hero-tag { font-family: var(--f-display); font-style: italic; font-weight: 400; font-size: clamp(1.2rem, 2.4vw, 1.6rem); color: var(--cream); opacity: 0.92; max-width: 40ch; margin-top: 20px; line-height: 1.4; }
.hero-cta { margin-top: 34px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }

/* hero load orchestration */
.reveal-load { opacity: 1; transform: none; }                     /* default: visible (fail-open) */
html.js .reveal-load { opacity: 0; transform: translateY(20px); animation: rise 1.05s var(--ease) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.d1 { animation-delay: 0.12s; } .d2 { animation-delay: 0.28s; } .d3 { animation-delay: 0.44s; }
.d4 { animation-delay: 0.6s; } .d5 { animation-delay: 0.76s; }

/* =========================================================================
   Search bar (lifts over the hero/listings seam)
   ========================================================================= */
.search { position: relative; z-index: 5; }
.search-card {
  max-width: var(--maxw); margin: -52px auto 0; background: var(--paper);
  box-shadow: 0 40px 80px -50px rgba(21,29,40,0.6);   /* floating card: elevation is the one treatment */
  padding: 22px; display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 14px; align-items: end;
  position: relative;
}
.search-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.search-field label { font-family: var(--f-label); font-size: 0.58rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700; color: var(--ink-soft); }
.search-field select {
  font-family: var(--f-body); font-size: 0.95rem; color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--line); padding: 8px 2px; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23AE9258' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 2px center;
  transition: border-color 0.3s var(--ease);
}
[dir="rtl"] .search-field select { background-position: left 2px center; }
.search-field select:focus { outline: none; border-color: var(--champagne); }
.search-card .btn { height: max-content; white-space: nowrap; }

/* =========================================================================
   Listings
   ========================================================================= */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(34px, 5vw, 58px); }
.sec-head .display { margin-top: 14px; }

.listing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.4vw, 30px); }
.card {
  background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column;
  cursor: pointer; transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
}
.card:hover { transform: translateY(-5px); border-color: var(--champagne); }   /* one treatment: keyline edge, no soft shadow */
.card-photo { position: relative; aspect-ratio: 3 / 2.05; overflow: hidden; background: var(--navy-2); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.card:hover .card-photo img { transform: scale(1.05); }
.card-tag {
  position: absolute; inset-block-start: 14px; inset-inline-start: 14px; z-index: 2;
  font-family: var(--f-label); font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700;
  color: var(--cream); background: rgba(21,29,40,0.82); padding: 5px 11px; backdrop-filter: blur(3px);
}
.card-tag.rent { background: rgba(21,86,76,0.88); }
.card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-price { font-family: var(--f-display); font-weight: 600; font-size: 1.45rem; color: var(--ink); letter-spacing: 0; }
.card-title { font-family: var(--f-body); font-weight: 600; font-size: 1.02rem; color: var(--ink); }
.card-loc { font-family: var(--f-label); font-size: 0.82rem; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }
.card-loc svg { width: 13px; height: 13px; color: var(--champagne); flex: none; }
.card-meta {
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; gap: 18px; font-family: var(--f-label); font-size: 0.8rem; color: var(--ink-soft);
}
.card-meta .m { display: inline-flex; align-items: center; gap: 6px; }
.card-meta svg { width: 16px; height: 16px; color: var(--champagne); flex: none; }
.card-meta .num { color: var(--ink); font-weight: 600; }

/* =========================================================================
   About
   ========================================================================= */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 84px); align-items: center; }
.about-photo { aspect-ratio: 4 / 4.4; }
.about-copy p { color: var(--ink-soft); margin: 1.05em 0; }
.about-copy p:first-of-type { font-family: var(--f-display); font-style: italic; font-size: 1.28rem; line-height: 1.5; color: var(--ink); }
.about-copy .display { margin: 16px 0 6px; }
/* provenance: a quiet line of record, not a dashboard stat strip */
.provenance { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line);
  font-family: var(--f-display); font-optical-sizing: auto; font-style: italic; font-size: clamp(1.08rem, 1.7vw, 1.3rem);
  color: var(--ink-soft); line-height: 1.75; max-width: 52ch; }
.provenance .pf { font-style: normal; font-weight: 600; color: var(--teal); }

/* =========================================================================
   Services
   ========================================================================= */
.svc-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(16px, 2vw, 26px); }
.svc { border: 1px solid var(--line-d); padding: 28px 22px; display: flex; flex-direction: column; gap: 14px; transition: background 0.5s var(--ease), border-color 0.5s var(--ease); }
.svc:hover { background: var(--navy-soft); border-color: var(--champagne-lit); }
.svc-ico { width: 34px; height: 34px; color: var(--champagne-lit); }
.svc-ico svg { width: 100%; height: 100%; display: block; }
.svc h3 { font-family: var(--f-display); font-weight: 500; font-size: 1.18rem; color: var(--cream); }
.svc p { font-size: 0.9rem; color: var(--cream-soft); line-height: 1.6; margin: 0; }

/* =========================================================================
   Quote band
   ========================================================================= */
.quote-band { position: relative; overflow: hidden; }
.quote-band .bg { position: absolute; inset: 0; }
.quote-band .bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.22; filter: grayscale(0.4); }
.quote-band .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--navy) 6%, rgba(15,20,28,0.5) 60%, var(--navy) 100%); }
.quote-inner { position: relative; text-align: center; margin-inline: auto; }
/* the measure rides the quote's own type size, so the measure stays 4-5 lines at desktop */
.quote-text { font-family: var(--f-display); font-style: italic; font-weight: 400; font-size: clamp(1.7rem, 4vw, 2.95rem); line-height: 1.3; color: var(--cream); max-width: 17ch; margin-inline: auto; }
.quote-text .hl { color: var(--champagne-lit); font-style: italic; }
.quote-mark { width: 30px; height: 30px; color: var(--champagne-lit); margin: 0 auto 24px; }

/* =========================================================================
   Team
   ========================================================================= */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(18px, 2.2vw, 28px); }
.agent-photo { aspect-ratio: 4 / 5; overflow: hidden; background: var(--navy-2); margin-bottom: 16px; }
.agent-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); filter: grayscale(0.18); }
.agent:hover .agent-photo img { transform: scale(1.05); filter: none; }
.agent-name { font-family: var(--f-display); font-weight: 600; font-size: 1.18rem; color: var(--ink); }
.agent-role { font-family: var(--f-label); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--champagne); margin-top: 5px; }
.agent-contact { margin-top: 10px; font-family: var(--f-label); font-size: 0.86rem; color: var(--ink-soft); }
.agent-contact a { display: block; padding: 1px 0; transition: color 0.3s var(--ease); }
.agent-contact a:hover { color: var(--teal); }

/* =========================================================================
   Neighborhoods + map
   ========================================================================= */
.neigh-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(34px, 5vw, 66px); align-items: stretch; }
.neigh-info .display { margin: 14px 0 22px; }
.neigh-info p { color: var(--cream-soft); max-width: 42ch; }
.neigh-list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line-d); border: 1px solid var(--line-d); }
.neigh-list li { background: var(--navy); padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.neigh-list .nm { font-family: var(--f-body); font-weight: 600; font-size: 0.96rem; color: var(--cream); }
.neigh-list .pr { font-family: var(--f-label); font-size: 0.74rem; color: var(--champagne-lit); }
.neigh-map { min-height: 380px; border: 1px solid var(--champagne); }
.neigh-map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; filter: grayscale(0.45) contrast(0.95) brightness(0.96); }

/* =========================================================================
   Contact / book a viewing
   ========================================================================= */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(36px, 6vw, 80px); align-items: start; }
.contact-intro .display { margin: 14px 0 18px; }
.contact-intro p { color: var(--ink-soft); max-width: 38ch; }
.contact-lines { margin-top: 28px; display: flex; flex-direction: column; gap: 16px; }
.cline { display: flex; gap: 12px; align-items: flex-start; }
.cline svg { width: 18px; height: 18px; color: var(--champagne); flex: none; margin-top: 3px; }
.cline .k { font-family: var(--f-label); font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }
.cline .v { font-size: 0.98rem; color: var(--ink); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-family: var(--f-label); font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font-family: var(--f-body); font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 0; padding: 13px 14px;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--champagne); box-shadow: 0 0 0 3px rgba(174,146,88,0.16); }
.field textarea { resize: vertical; min-height: 96px; }
.form-grid .btn { grid-column: 1 / -1; justify-content: center; }

/* grid children can shrink (prevents track blowout / overflow in both dirs) */
.search-card > *, .listing-grid > *, .about-grid > *, .svc-grid > *, .team-grid > *,
.neigh-grid > *, .contact-grid > *, .form-grid > *, .card, .card-body, .footer-top > * { min-width: 0; }

/* =========================================================================
   Footer
   ========================================================================= */
.footer { background: var(--navy-2); color: var(--cream-soft); padding: clamp(56px, 8vw, 90px) 0 30px; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.footer .brand { color: var(--cream); margin-bottom: 18px; }
.footer-blurb { max-width: 36ch; font-size: 0.96rem; line-height: 1.7; }
.footer h5 { font-family: var(--f-label); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--champagne-lit); margin: 0 0 16px; }
.footer-col a { display: block; padding: 5px 0; font-size: 0.95rem; transition: color 0.3s var(--ease); }
.footer-col a:hover { color: var(--cream); }
.socials { display: flex; gap: 12px; margin-top: 8px; }
.socials a { width: 38px; height: 38px; border: 1px solid var(--line-d); display: grid; place-items: center; color: var(--champagne-lit); transition: 0.4s var(--ease); }
.socials a:hover { background: var(--champagne); color: var(--navy); border-color: var(--champagne); }
.socials svg { width: 17px; height: 17px; }
.footer-base {
  margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line-d);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--f-label); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--cream-soft);
}
.credit { display: inline-flex; align-items: center; gap: 11px; }
.credit-label { font-family: var(--f-label); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cream-soft); }
.wlogo { display: inline-flex; align-items: center; gap: 11px; opacity: 0.9; transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); }
.wlogo-mark { height: 38px; width: auto; display: block; }
.wlogo-word { height: 26px; width: auto; display: block; }
.wlogo:hover { opacity: 1; transform: translateY(-1px); }   /* restrained, no glow */

/* =========================================================================
   Modal (demo notice)
   ========================================================================= */
.modal { position: fixed; inset: 0; z-index: 5000; display: none; place-items: center; padding: 24px; }
.modal.open { display: grid; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10,14,20,0.76); backdrop-filter: blur(4px); animation: fade 0.4s var(--ease); }
.modal-card {
  position: relative; background: var(--marble); max-width: 470px; width: 100%; padding: 46px 40px 38px;
  text-align: center; border: 1px solid var(--champagne); animation: pop 0.5s var(--ease);   /* champagne frame is the one treatment */
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.97); } }
.modal-card .mark { width: 40px; height: 40px; margin: 0 auto 20px; color: var(--champagne); }
.modal-card h3 { font-family: var(--f-display); font-weight: 600; font-size: 1.5rem; color: var(--ink); margin-bottom: 14px; }
.modal-card p { color: var(--ink-soft); font-size: 1.02rem; margin: 0 auto 24px; max-width: 38ch; }
.modal-close { font-family: var(--f-label); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; color: var(--teal); background: none; border: 0; cursor: pointer; padding: 8px; }

/* =========================================================================
   Scroll reveal
   ========================================================================= */
.reveal { opacity: 1; transform: none; }                          /* default: visible (fail-open if JS/observer never fires) */
html.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }
html.js .reveal.d2 { transition-delay: 0.1s; } html.js .reveal.d3 { transition-delay: 0.2s; } html.js .reveal.d4 { transition-delay: 0.3s; }
@media (prefers-reduced-motion: reduce) { html.js .reveal, html.js .reveal-load { opacity: 1 !important; transform: none !important; animation: none !important; } }

/* =========================================================================
   Latin islands inside RTL
   ========================================================================= */
.lat { direction: ltr; unicode-bidi: isolate; font-family: var(--f-label); letter-spacing: 0; }
.num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1040px) {
  .svc-grid { grid-template-columns: repeat(3, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 920px) {
  .nav-links {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 28px;
    background: var(--navy); opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity 0.4s var(--ease), transform 0.5s var(--ease), visibility 0.4s var(--ease);
  }
  body.menu-open .nav-links { opacity: 1; visibility: visible; transform: none; }
  .nav-links a:not(.btn):not(.lang) { color: var(--cream); font-size: 0.92rem; }
  .nav.scrolled .nav-links a:not(.btn):not(.lang) { color: var(--cream); }
  .nav-links a.lang { color: var(--champagne-lit); border-color: rgba(203,174,116,0.5); margin-top: 6px; font-size: 0.8rem; }
  .nav.scrolled .nav-links a.lang { color: var(--champagne-lit); }
  .nav-toggle { display: block; }
  .listing-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .neigh-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-photo { order: -1; aspect-ratio: 4 / 3; max-width: 520px; margin-inline: auto; }
  .search-card { grid-template-columns: 1fr 1fr; }
  .search-card .btn { grid-column: 1 / -1; justify-content: center; }
}
@media (max-width: 680px) {
  .svc-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  body { font-size: 16px; }
  .listing-grid, .team-grid, .svc-grid, .form-grid, .search-card { grid-template-columns: 1fr; }
  .neigh-list { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 30px; }
  .footer-base { justify-content: center; text-align: center; }
  .hero-inner { padding-top: 130px; }
}

/* =========================================================================
   RTL + Arabic typography (one stylesheet, driven by dir)
   ========================================================================= */
[dir="rtl"] { font-family: var(--f-ar-body); }
[dir="rtl"] body { font-family: var(--f-ar-body); font-size: 18.5px; line-height: 1.9; }
[dir="rtl"] p { line-height: 1.9; }
[dir="rtl"] .field input, [dir="rtl"] .field select, [dir="rtl"] .field textarea,
[dir="rtl"] .search-field select { font-family: var(--f-ar-body); font-size: 1.02rem; }
[dir="rtl"] .lat, [dir="rtl"] .num { font-family: var(--f-label); }
[dir="rtl"] .brand-en, [dir="rtl"] .brand-sub { font-family: var(--f-display); }
[dir="rtl"] .credit, [dir="rtl"] .credit a { font-family: var(--f-label); }

/* Arabic display in El Messiri */
[dir="rtl"] .display, [dir="rtl"] .hero-name, [dir="rtl"] .quote-text,
[dir="rtl"] .card-price, [dir="rtl"] .agent-name, [dir="rtl"] .svc h3,
[dir="rtl"] .provenance .pf, [dir="rtl"] .modal-card h3, [dir="rtl"] .brand-ar {
  font-family: var(--f-ar-display); letter-spacing: 0; font-style: normal;
}
[dir="rtl"] .display { line-height: 1.32; font-weight: 600; }
[dir="rtl"] .hero-name { line-height: 1.18; }
[dir="rtl"] .quote-text { line-height: 1.5; font-style: normal; font-weight: 600; }
[dir="rtl"] .quote-text .hl { font-style: normal; }

/* Arabic editorial / running text in Tajawal (no italic, no letterspacing) */
[dir="rtl"] .lead, [dir="rtl"] .hero-tag, [dir="rtl"] .about-copy p, [dir="rtl"] .about-copy p:first-of-type,
[dir="rtl"] .contact-intro p, [dir="rtl"] .neigh-info p, [dir="rtl"] .footer-blurb,
[dir="rtl"] .card-title, [dir="rtl"] .modal-card p, [dir="rtl"] .svc p {
  font-family: var(--f-ar-body); font-style: normal; letter-spacing: 0;
}
[dir="rtl"] .hero-tag { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

/* small labels: readable Arabic, no uppercase / no letterspacing, sized up */
[dir="rtl"] .eyebrow, [dir="rtl"] .ulink, [dir="rtl"] .btn, [dir="rtl"] .nav-links a:not(.btn):not(.lang),
[dir="rtl"] .field label, [dir="rtl"] .search-field label, [dir="rtl"] .card-tag, [dir="rtl"] .card-loc,
[dir="rtl"] .card-meta, [dir="rtl"] .agent-role, [dir="rtl"] .footer h5, [dir="rtl"] .footer-col a,
[dir="rtl"] .cline .k, [dir="rtl"] .neigh-list .pr, [dir="rtl"] .modal-close,
[dir="rtl"] .brand-sub {
  font-family: var(--f-ar-body); letter-spacing: 0; text-transform: none; font-weight: 600;
}
[dir="rtl"] .eyebrow { font-size: 1rem; font-style: normal; }
[dir="rtl"] .provenance { font-family: var(--f-ar-body); font-style: normal; }
[dir="rtl"] .field label, [dir="rtl"] .search-field label { font-size: 0.92rem; }
[dir="rtl"] .nav-links a:not(.btn):not(.lang) { font-size: 1.02rem; }
[dir="rtl"] .btn { font-size: 0.96rem; }
[dir="rtl"] .ulink { font-size: 0.96rem; }
[dir="rtl"] .card-tag { font-size: 0.74rem; }
[dir="rtl"] .card-loc { font-size: 0.92rem; }
[dir="rtl"] .card-meta { font-size: 0.9rem; }
[dir="rtl"] .agent-role { font-size: 0.84rem; }
[dir="rtl"] .footer h5 { font-size: 0.96rem; }
[dir="rtl"] .footer-col a { font-size: 1rem; }
[dir="rtl"] .nav-links a.lang { font-size: 0.66rem; }
[dir="rtl"] .brand-sub { font-size: 0.62rem; }

/* directional flourishes flip to the inline-start */
[dir="rtl"] .ulink::after, [dir="rtl"] .nav-links a:not(.btn):not(.lang)::after { transform-origin: right; }

/* =========================================================================
   Heading balance (template standard): distribute heading lines evenly and
   keep a lone trailing word or period from orphaning onto its own line.
   Pairs with the nowrap on the AR hero headline as belt-and-suspenders.
   ========================================================================= */
.display, .hero-name, .hero-tag, .lead, .quote-text { text-wrap: balance; }
