/* ============================================================
   Imarat Engenharia — "Editorial" design system
   Light default · dark via [data-theme="dark"] · PT/EN/AR + RTL
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --page: #FBF7F0;
  --warm: #F3EADD;
  --card: #FFFCF6;
  --ink-block: #1A1C17;
  --line: #E4DACA;
  --line-strong: #DCCFBA;
  --line-warm: #E0D2BC;
  --line-on-ink: #3A3D33;
  --ink: #1A1C17;
  --body: #3A3D33;
  --muted: #6E7268;
  --faint: #9A9C92;
  --green: #1F4D3A;
  --green-hover: #153A2B;
  --green-text: #1F4D3A;
  --rust: #B4472A;
  --rust-hover: #8E3620;
  --rust-text: #B4472A;
  --paper: #FBF7F0;         /* text on green/rust/ink fills — both themes */
  --on-ink: #F5F1E6;
  --on-green: #BFD2C6;
  --header-bg: rgba(251, 247, 240, 0.94);
  --launch-body: #5A5E54;

  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Archivo', Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', monospace;
  --arabic: 'Noto Kufi Arabic', sans-serif;
}

[data-theme="dark"] {
  --page: #121310;
  --warm: #1B1D17;
  --card: #191C15;
  --ink-block: #23261D;
  --line: #333828;
  --line-strong: #555D48;
  --line-warm: #333828;
  --ink: #F5F1E6;
  --body: #DCD7C9;
  --muted: #9EA394;
  --faint: #767B6C;
  --green: #2C6B4F;
  --green-hover: #2C6B4F;
  --green-text: #6FBF95;
  --rust: #C25334;
  --rust-hover: #C25334;
  --rust-text: #E08055;
  --on-green: #C6DCCF;
  --header-bg: rgba(18, 19, 16, 0.94);
  --launch-body: #9EA394;
}

[data-theme="dark"] .photo img {
  filter: brightness(0.8) saturate(0.9);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

html, body { max-width: 100%; overflow-x: clip; }

body {
  font-family: var(--sans);
  background: var(--page);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-top: 75px;
}

a { color: inherit; text-decoration: none; }

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

button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--ink); }
h1 { font-size: clamp(34px, 6vw, 76px); line-height: 0.98; letter-spacing: -0.025em; text-wrap: balance; }
h2 { font-size: clamp(28px, 4vw, 46px); line-height: 1.05; letter-spacing: -0.02em; }
h3 { font-size: clamp(24px, 3.4vw, 48px); line-height: 1.1; letter-spacing: -0.02em; }

.wrap { max-width: 1280px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }

.sec { padding-top: 96px; }
.sec--tight { padding-top: 48px; }

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

.iso { unicode-bidi: isolate; text-align: start; }

.rule-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px; margin-bottom: 40px;
}
.rule-head h2 { scroll-margin-top: 96px; }

.head-link {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--green-text); cursor: pointer; white-space: nowrap;
}
.head-link:hover { color: var(--rust-text); }

.head-note {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
  unicode-bidi: isolate; text-align: start;
}

.kicker {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--rust-text); margin-bottom: 24px;
  unicode-bidi: isolate; text-align: start;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; min-height: 44px;
  font-size: 14px; font-weight: 600; white-space: nowrap;
  border-radius: 0; border: none; cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn--green { background: var(--green); color: var(--paper); }
.btn--green:hover { background: var(--green-hover); color: var(--paper); }
.btn--rust { background: var(--rust); color: var(--paper); }
.btn--rust:hover { background: var(--rust-hover); color: var(--paper); }
.btn--ink { background: var(--ink-block); color: var(--on-ink); }
.btn--ink:hover { background: var(--green); color: var(--paper); }
.btn--outline { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn--outline:hover { background: var(--ink-block); color: var(--on-ink); }
.btn--page { background: var(--paper); color: #1A1C17; }
.btn--page:hover { background: #F3EADD; color: #1A1C17; }

/* Media helpers */
.media { position: relative; overflow: hidden; }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.ph-slot {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(135deg, #EBDFCE 0 10px, #E2D3BE 10px 20px);
  color: #6E7268;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  text-align: center; padding: 16px;
}
[data-theme="dark"] .ph-slot {
  background: repeating-linear-gradient(135deg, #1B1D17 0 10px, #23261D 10px 20px);
  color: #767B6C;
}

.chip {
  position: absolute; top: 14px; inset-inline-start: 14px;
  display: inline-flex; align-items: center;
  background: var(--paper); color: #1A1C17;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  padding: 6px 9px; white-space: nowrap; pointer-events: none;
}
.chip--ref {
  inset-inline-start: auto; inset-inline-end: 14px;
  background: rgba(26, 28, 23, 0.82); color: #FBF7F0;
  letter-spacing: 0.04em;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1280px; margin: 0 auto; padding: 18px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  overflow: hidden;
}
.brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; white-space: nowrap; cursor: pointer; }
.brand .logo { height: 38px; width: auto; display: block; }
/* Dark-theme logo at first paint: the inline head script sets data-theme before
   any markup renders, so the mark never flashes the light version on reload.
   setTheme() still swaps src at runtime for the toggle and for browsers that
   do not honour `content` on <img>. */
[data-theme="dark"] img.logo { content: url('/images/logo-white.png'); }
.brand-kicker {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted);
  border-inline-start: 1px solid var(--line-strong); padding-inline-start: 14px;
}
.main-nav { display: flex; align-items: center; gap: 22px; flex-wrap: nowrap; min-width: 0; }
.nav-link { font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.nav-link:hover { color: var(--green-text); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex-shrink: 0;
  border: 1px solid var(--line-strong); color: var(--ink);
  font-size: 14px; line-height: 1;
}
.icon-btn:hover { border-color: var(--green-text); color: var(--green-text); }
.burger { display: none; width: 46px; height: 46px; font-size: 20px; }
.lang-switch {
  display: flex; align-items: center; flex-shrink: 0;
  border: 1px solid var(--line-strong);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  direction: ltr;
}
.lang-switch button { padding: 7px 11px; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; }
.lang-switch button.is-active { background: var(--ink-block); color: var(--on-ink); }
.btn-whats {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  background: var(--green); color: #FBF7F0;
  padding: 11px 20px; border-radius: 2px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.btn-whats:hover { background: var(--green-hover); color: #FBF7F0; }

/* Mobile panel */
.nav-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--page);
  padding: 8px 22px 20px;
}
.nav-panel.is-open { display: block; }
.panel-link {
  display: flex; align-items: center; min-height: 52px;
  font-size: 17px; font-weight: 500; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.panel-controls { display: flex; align-items: center; gap: 12px; padding-top: 18px; }
.panel-controls button {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 56px; min-height: 46px;
  border: 1px solid var(--line-strong);
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.panel-controls button.is-active { background: var(--ink-block); color: var(--on-ink); }
.panel-controls .panel-theme { font-family: var(--sans); font-size: 15px; color: var(--ink); margin-inline-start: auto; }

/* ---------- Hero ---------- */
.hero-sec { padding-top: 72px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: end; }
.hero-grid h1 { margin-bottom: 24px; }
.hero-grid h1 em { color: var(--green-text); }
.hero-lede { font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 44ch; text-wrap: pretty; }
.hero-stats { display: flex; gap: 40px; margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); }
.stat-num { font-family: var(--serif); font-size: 36px; line-height: 1; color: var(--ink); }
.stat-label { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.08em; margin-top: 4px; }
.hero-media { aspect-ratio: 4 / 5; }

/* ---------- Search panel ---------- */
.search-panel {
  background: var(--ink-block); color: var(--on-ink);
  padding: 28px 32px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr auto;
  gap: 28px; align-items: end;
}
.search-field label {
  display: block;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 10px;
}
.search-field input,
.search-field select {
  width: 100%;
  background: transparent; border: none; border-bottom: 1px solid var(--line-on-ink);
  border-radius: 0;
  color: var(--on-ink);
  font-family: var(--sans); font-size: 16px; font-weight: 500;
  padding: 0 0 10px;
  outline: none;
  appearance: none;
}
.search-field input::placeholder { color: var(--on-ink); opacity: 1; }
.search-field select option { background: #1A1C17; color: #F5F1E6; }
.search-field input:focus, .search-field select:focus { border-bottom-color: var(--faint); }

/* ---------- Property cards ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; align-items: stretch; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }

.prop-card { display: flex; flex-direction: column; cursor: pointer; color: inherit; }
.prop-media { aspect-ratio: 4 / 3; }
.prop-card--wide .prop-media { aspect-ratio: 3 / 2; }
.prop-card--wide { border-bottom: 1px solid var(--line); padding-bottom: 22px; }
.prop-body { padding-top: 16px; display: flex; flex-direction: column; flex: 1; }
.prop-hood {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
  unicode-bidi: isolate; text-align: start;
}
.prop-title { font-family: var(--serif); font-size: 24px; line-height: 1.2; letter-spacing: -0.01em; margin: 8px 0 12px; color: var(--ink); }
.prop-card--wide .prop-title { font-size: 26px; margin: 8px 0 10px; }
.prop-specs { font-size: 13px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.prop-card .prop-specs { padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-top: auto; }
.prop-card--wide .prop-specs { padding-bottom: 0; border-bottom: none; margin-top: 0; }
.prop-price { font-size: 17px; font-weight: 600; margin-top: 12px; color: var(--ink); unicode-bidi: isolate; text-align: start; }
.prop-card--wide .prop-price { font-size: 19px; margin-top: 14px; }
.prop-tax { font-size: 12px; color: var(--muted); margin-top: 4px; unicode-bidi: isolate; text-align: start; }

/* ---------- Launch block ---------- */
.launch {
  background: var(--warm);
  padding: 56px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
}
.launch h3 { font-size: clamp(32px, 4vw, 48px); line-height: 1.05; margin-bottom: 18px; unicode-bidi: isolate; text-align: start; }
.launch-lede { font-size: 16px; line-height: 1.65; color: var(--launch-body); margin-bottom: 28px; max-width: 46ch; text-wrap: pretty; }
.launch-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  padding: 24px 0; margin-bottom: 28px;
  border-top: 1px solid var(--line-warm); border-bottom: 1px solid var(--line-warm);
}
.launch-stat-val { font-size: 20px; font-weight: 600; color: var(--ink); unicode-bidi: isolate; text-align: start; }
.launch-stat-label { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.1em; margin-top: 4px; text-transform: uppercase; }
.launch-media { aspect-ratio: 1 / 1; }

/* ---------- Neighbourhoods ---------- */
.hood-card { cursor: pointer; color: inherit; display: block; }
.hood-media { aspect-ratio: 3 / 4; }
.hood-name { font-size: 15px; font-weight: 600; margin-top: 12px; color: var(--ink); unicode-bidi: isolate; text-align: start; }
.hood-count { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 3px; }

/* ---------- Process ---------- */
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.step {
  display: grid; grid-template-columns: auto 1fr; gap: 28px;
  padding: 26px 0; border-top: 1px solid var(--line);
}
.step-num { font-family: var(--mono); font-size: 12px; color: var(--rust-text); }
.step-title { font-size: 19px; font-weight: 600; margin-bottom: 8px; color: var(--ink); }
.step-text { font-size: 15px; line-height: 1.6; color: var(--muted); max-width: 56ch; text-wrap: pretty; }

/* ---------- Project rows ---------- */
.proj-row {
  display: grid;
  grid-template-columns: minmax(200px, 0.8fr) minmax(0, 1.7fr) minmax(190px, 0.75fr);
  gap: 36px; padding: 32px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.proj-media { aspect-ratio: 4 / 3; }
.proj-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tag {
  display: inline-flex; align-items: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 6px 10px; white-space: nowrap;
}
.tag--construction { background: var(--rust); color: #FBF7F0; }
.tag--delivered { background: var(--green); color: #FBF7F0; }
.tag--soon { background: var(--warm); color: var(--ink); }
[data-theme="dark"] .tag--soon { background: #1B1D17; color: #F5F1E6; border: 1px solid #333828; }
.proj-hood { font-family: var(--mono); font-size: 11px; color: var(--muted); unicode-bidi: isolate; text-align: start; }
.proj-name { font-family: var(--serif); font-size: 30px; line-height: 1.15; letter-spacing: -0.015em; margin-bottom: 10px; color: var(--ink); unicode-bidi: isolate; text-align: start; }
.proj-text { font-size: 15px; line-height: 1.65; color: var(--muted); max-width: 52ch; margin-bottom: 18px; text-wrap: pretty; }
.progress { height: 6px; background: var(--line); max-width: 340px; }
.progress-fill { height: 6px; background: var(--green); }
.progress-label { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 8px; unicode-bidi: isolate; text-align: start; }
.proj-table { display: grid; gap: 0; }
.proj-table-row {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 13px; padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.proj-table-row:last-of-type { border-bottom: none; }
.proj-table-row .lbl { color: var(--muted); }
.proj-table-row .val { font-weight: 600; unicode-bidi: isolate; }
.proj-table-row .val--green { color: var(--green-text); }
.proj-table .btn { display: flex; width: 100%; padding: 13px; font-size: 13px; margin-top: 14px; }

/* ---------- Services ---------- */
.svc { border-top: 2px solid var(--ink); padding-top: 20px; }
.svc-num {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  color: var(--rust-text); margin-bottom: 14px;
  unicode-bidi: isolate; text-align: start;
}
.svc-title { font-family: var(--serif); font-size: 26px; line-height: 1.2; letter-spacing: -0.015em; margin-bottom: 12px; color: var(--ink); }
.svc-text { font-size: 15px; line-height: 1.65; color: var(--muted); margin-bottom: 16px; text-wrap: pretty; }
.svc-items { display: grid; gap: 0; }
.svc-items span { font-size: 13px; color: var(--body); padding: 9px 0; border-bottom: 1px solid var(--line); }

/* ---------- Team ---------- */
.person-media { aspect-ratio: 3 / 4; }
.person-name { font-size: 17px; font-weight: 600; margin-top: 14px; color: var(--ink); }
.person-role { font-size: 14px; color: var(--muted); margin-top: 4px; text-wrap: pretty; }
.person-reg { font-family: var(--mono); font-size: 11px; color: var(--rust-text); margin-top: 8px; unicode-bidi: isolate; text-align: start; }

/* ---------- Financing ---------- */
.fin-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0; }
.fin-col { padding: 0 32px; border-inline-start: 1px solid var(--line); }
.fin-tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--rust-text); margin-bottom: 14px;
}
.fin-title { font-family: var(--serif); font-size: 28px; line-height: 1.15; letter-spacing: -0.015em; margin-bottom: 12px; color: var(--ink); }
.fin-text { font-size: 15px; line-height: 1.65; color: var(--muted); text-wrap: pretty; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--green); color: var(--paper);
  padding: 64px 56px;
  display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center;
}
.cta-band h2 { color: var(--paper); margin-bottom: 14px; }
.cta-band p { font-size: 16px; line-height: 1.6; color: var(--on-green); max-width: 52ch; text-wrap: pretty; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-rows { display: grid; gap: 0; }
.contact-row {
  display: grid; grid-template-columns: 180px 1fr; gap: 24px;
  padding: 22px 0; border-top: 1px solid var(--line);
  align-items: baseline;
}
.contact-row .lbl {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.contact-row .val { font-size: 17px; font-weight: 500; color: var(--ink); unicode-bidi: isolate; text-align: start; text-wrap: pretty; }
.contact-actions { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid var(--line); }
.contact-media { aspect-ratio: 4 / 3; }
.contact-note { font-size: 15px; line-height: 1.65; color: var(--muted); margin-top: 18px; text-wrap: pretty; }

/* ---------- Footer ---------- */
.site-footer {
  max-width: 1280px; margin: 96px auto 0;
  padding: 56px 40px 48px;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px;
}
.site-footer .logo { height: 42px; width: auto; display: block; margin-bottom: 18px; }
.foot-addr { font-size: 14px; line-height: 1.6; color: var(--muted); max-width: 34ch; }
.foot-head {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
.foot-list { display: grid; gap: 9px; font-size: 14px; color: var(--ink); }
.foot-list a:hover { color: var(--green-text); }
.footer-base {
  max-width: 1280px; margin: 0 auto;
  padding: 0 40px 48px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.copyright { font-family: var(--mono); font-size: 11px; color: var(--faint); unicode-bidi: isolate; }
.badges { display: flex; gap: 10px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); padding: 7px 13px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
  unicode-bidi: isolate;
}

/* ---------- Listing page ---------- */
.list-head h1 { font-size: clamp(34px, 5vw, 56px); margin-bottom: 10px; }
.breadcrumb {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 16px;
}
.list-sub { font-size: 15px; color: var(--muted); }
.filter-chips {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 32px; padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.chip-filter {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line-strong);
  padding: 9px 16px; font-size: 13px; font-weight: 500;
  background: var(--page); color: var(--ink);
  cursor: pointer; white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.chip-filter:hover { border-color: var(--green-text); color: var(--green-text); }
.chip-filter.is-active { background: var(--ink-block); color: var(--on-ink); border-color: var(--ink-block); }
/* Only rendered under ?projeto=; hidden attribute keeps it out of the flow. */
.list-clear { display: inline-block; margin-top: 16px; }
.load-more-row { display: flex; justify-content: center; padding: 56px 0 0; }
.no-results { grid-column: 1 / -1; font-size: 15px; color: var(--muted); padding: 40px 0; }

/* ---------- Property detail (PDP) ---------- */
.back-link {
  display: inline-block;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 24px; cursor: pointer;
}
.back-link:hover { color: var(--green-text); }
.gallery {
  display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr;
  gap: 12px; height: 520px;
}
.gallery > .media:first-child { grid-row: span 2; }
.gal-chip {
  position: absolute; inset-inline-end: 16px; bottom: 16px;
  background: rgba(26, 28, 23, 0.82); color: #FBF7F0;
  font-family: var(--mono); font-size: 11px; padding: 8px 12px;
  pointer-events: none;
}
.pdp { display: grid; grid-template-columns: 1.5fr 1fr; gap: 64px; align-items: start; }
.pdp h1 { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.05; margin: 14px 0 20px; }
.pdp-kicker {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--rust-text);
  unicode-bidi: isolate; text-align: start;
}
.spec-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.spec-val { font-size: 22px; font-weight: 600; color: var(--ink); unicode-bidi: isolate; text-align: start; }
.spec-label { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.1em; margin-top: 4px; text-transform: uppercase; }
.pdp-p { font-size: 17px; line-height: 1.7; color: var(--body); max-width: 62ch; margin: 18px 0 0; text-wrap: pretty; }
.pdp-p:first-of-type { margin-top: 32px; }
.pdp h3.sub { font-size: 30px; margin: 48px 0 20px; letter-spacing: -0.015em; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 32px; }
.features-grid div { font-size: 15px; color: var(--body); padding: 12px 0; border-bottom: 1px solid var(--line); }
.pdp-map { aspect-ratio: 16 / 7; }

.pdp-aside {
  position: sticky; top: 104px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 32px;
}
.aside-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.aside-price { font-family: var(--serif); font-size: 42px; letter-spacing: -0.02em; margin: 8px 0 4px; color: var(--ink); unicode-bidi: isolate; text-align: start; }
.aside-tax { font-size: 13px; color: var(--muted); padding-bottom: 22px; border-bottom: 1px solid var(--line); unicode-bidi: isolate; text-align: start; }
.engineer-row {
  display: flex; align-items: center; gap: 14px;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.engineer-photo {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: repeating-linear-gradient(135deg, #EBDFCE 0 6px, #E2D3BE 6px 12px);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 9px; color: #6E7268;
}
[data-theme="dark"] .engineer-photo { background: repeating-linear-gradient(135deg, #1B1D17 0 6px, #23261D 6px 12px); color: #767B6C; }
.engineer-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.engineer-reg { font-size: 13px; color: var(--muted); margin-top: 2px; unicode-bidi: isolate; text-align: start; }
.aside-actions { display: grid; gap: 10px; margin-top: 22px; }
.aside-actions .btn { display: flex; width: 100%; padding: 15px; }
.aside-financ { display: block; text-align: center; font-size: 13px; color: var(--muted); padding-top: 8px; cursor: pointer; }
.aside-financ:hover { color: var(--green-text); }

.not-found { text-align: center; padding: 80px 0; }
.not-found h1 { font-size: clamp(28px, 4vw, 46px); margin-bottom: 16px; }
.not-found p { color: var(--muted); margin-bottom: 28px; }

/* ---------- RTL ---------- */
[dir="rtl"] body,
[dir="rtl"] {
  font-family: var(--arabic);
}
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] em,
[dir="rtl"] .prop-title, [dir="rtl"] .proj-name, [dir="rtl"] .svc-title,
[dir="rtl"] .fin-title, [dir="rtl"] .stat-num, [dir="rtl"] .aside-price {
  font-family: var(--arabic);
  font-style: normal;
}
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { line-height: 1.35; letter-spacing: 0; }
[dir="rtl"] .mono, [dir="rtl"] .kicker, [dir="rtl"] .brand-kicker,
[dir="rtl"] .prop-hood, [dir="rtl"] .head-link, [dir="rtl"] .head-note,
[dir="rtl"] .breadcrumb, [dir="rtl"] .back-link, [dir="rtl"] .tag,
[dir="rtl"] .step-num, [dir="rtl"] .svc-num, [dir="rtl"] .fin-tag,
[dir="rtl"] .foot-head, [dir="rtl"] .badge, [dir="rtl"] .copyright,
[dir="rtl"] .aside-label, [dir="rtl"] .spec-label, [dir="rtl"] .stat-label,
[dir="rtl"] .search-field label, [dir="rtl"] .progress-label,
[dir="rtl"] .hood-count, [dir="rtl"] .contact-row .lbl, [dir="rtl"] .pdp-kicker,
[dir="rtl"] .gal-chip, [dir="rtl"] .chip, [dir="rtl"] .ph-slot {
  font-family: var(--arabic);
  letter-spacing: 0;
}
[dir="rtl"] .lang-switch { direction: ltr; }
[dir="rtl"] .hero-grid h1 em { font-style: normal; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .brand-kicker, .main-nav .nav-link, .lang-switch { display: none; }
  .burger { display: inline-flex; }
}
@media (min-width: 1181px) {
  .nav-panel { display: none !important; }
}

@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .pdp { grid-template-columns: 1fr; gap: 40px; }
  .pdp-aside { position: static; }
  .search-panel { grid-template-columns: 1fr 1fr; }
  .proj-row { grid-template-columns: minmax(0, 1fr) minmax(190px, 0.6fr); }
  .proj-row .proj-media { grid-column: 1 / -1; max-width: 420px; width: 100%; }
  .site-footer { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .wrap { padding-left: 22px; padding-right: 22px; }
  .header-inner { padding-left: 22px; padding-right: 22px; }
  .site-footer { padding-left: 22px; padding-right: 22px; }
  .footer-base { padding-left: 22px; padding-right: 22px; }
  .hero-grid, .launch, .grid-3, .split, .cta-band, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .launch, .cta-band { padding: 32px 24px; }
  .gallery { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; }
  .gallery > .media:first-child { grid-row: auto; aspect-ratio: 4 / 3; }
  .gallery > .media { aspect-ratio: 3 / 2; }
  .contact-row { grid-template-columns: 1fr; gap: 6px; }
  .spec-strip { grid-template-columns: repeat(2, 1fr); }
  .proj-row { grid-template-columns: 1fr; gap: 20px; }
  .fin-cols > .fin-col {
    padding-left: 0; padding-right: 0;
    border-inline-start: 0;
    border-top: 1px solid var(--line);
    padding-top: 22px; padding-bottom: 22px;
  }
  .features-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .grid-4, .grid-5, .search-panel, .site-footer { grid-template-columns: 1fr; }
  .launch-stats { grid-template-columns: repeat(2, 1fr); }
  .step { grid-template-columns: 1fr; gap: 8px; }
  .sec { padding-top: 56px; }
  .hero-sec { padding-top: 40px; }
}
