:root {
  --crimson: #a6192e;
  --crimson-dark: #84131f;
  --maroon: #2b0e14;
  --maroon-2: #3d1420;
  --gold: #b08d57;
  --paper: #f7f3f2;
  --ink: #2a2a2a;
  --muted: #5a5a5a;
  --line: #e4dad8;
  --white: #fff;
  --wrap: 1180px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--white);
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { line-height: 1.3; text-wrap: balance; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.logo img { height: 42px; width: auto; }
.nav { display: flex; gap: 26px; }
.nav a {
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  padding-block: 6px;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--crimson); border-bottom-color: var(--crimson); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 7px 14px;
  border: 1px solid var(--crimson);
  color: var(--crimson);
}
.lang:hover { background: var(--crimson); color: var(--white); }
.menu-btn {
  display: none;
  width: 42px;
  height: 38px;
  padding: 9px;
  background: none;
  border: 1px solid var(--line);
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}
.menu-btn span { display: block; height: 2px; background: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.15s, color 0.15s;
}
.btn--light { background: var(--white); color: var(--maroon); }
.btn--light:hover { background: var(--gold); color: var(--maroon); }
.btn--ghost { border-color: rgba(255, 255, 255, 0.5); color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--maroon); }

/* ---------- Hero ---------- */
.hero { background: var(--maroon); color: var(--white); padding-block: 64px 0; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5vw, 58px); font-weight: 700; line-height: 1.2; margin-block: 14px 18px; }
.hero-sub { font-size: 19px; color: #ead9dc; max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 30px 28px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: #d9b7be; }
.badges li { padding-inline-start: 14px; position: relative; }
.badges li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  background: var(--gold);
}
.hero-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: 4px solid var(--crimson); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 56px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.stats > div { padding: 26px 20px 30px; border-inline-start: 1px solid rgba(255, 255, 255, 0.16); }
.stats > div:first-child { border-inline-start: 0; padding-inline-start: 0; }
.stats dt { font-size: 40px; font-weight: 700; line-height: 1.1; color: var(--white); }
[dir='rtl'] .stats dt, [dir='rtl'] .case-stats dt { text-align: right; }
.stats dd { font-size: 14.5px; color: #d9b7be; margin-top: 6px; }

/* ---------- Sections ---------- */
.section { padding-block: 84px; }
.section--tint { background: var(--paper); }
.section--dark { background: var(--maroon); color: var(--white); }
.section-head { max-width: 760px; margin-bottom: 44px; }
.eyebrow { font-size: 13.5px; font-weight: 600; letter-spacing: 0.04em; color: var(--crimson); margin-bottom: 10px; }
[lang='en'] .eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 12.5px; }
.eyebrow--gold, .section--dark .eyebrow { color: var(--gold); }
.section-title { font-size: clamp(27px, 3.4vw, 38px); font-weight: 700; }
.section-intro { margin-top: 14px; font-size: 18px; color: var(--muted); }
.section--dark .section-intro { color: #d9b7be; }
.sub-title { font-size: 22px; font-weight: 700; margin-block: 56px 22px; padding-top: 28px; border-top: 2px solid var(--ink); }

.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card { background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--crimson); padding: 26px 24px 28px; }
.card-num { display: block; font-size: 13px; font-weight: 700; color: var(--gold); letter-spacing: 0.1em; margin-bottom: 14px; }
[dir='rtl'] .card-num { text-align: right; }
.card h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.card p { font-size: 15.5px; color: var(--muted); }

.ticks li { position: relative; padding-inline-start: 18px; font-size: 15.5px; margin-top: 8px; }
.ticks li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0.78em;
  width: 7px;
  height: 2px;
  background: var(--crimson);
}
.group h4 { font-size: 17px; font-weight: 700; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.group .ticks { color: var(--muted); }

/* ---------- About ---------- */
.split { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; }
.prose p + p { margin-top: 16px; }
.prose { color: var(--muted); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 52px; }
.panel { background: var(--paper); padding: 30px 28px; border-inline-start: 3px solid var(--crimson); }
.panel h3 { font-size: 20px; margin-bottom: 10px; color: var(--crimson); }
.panel p { font-size: 16px; }
.values { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; margin-top: 20px; border: 1px solid var(--line); }
.values > div { padding: 26px 24px; border-inline-start: 1px solid var(--line); }
.values > div:first-child { border-inline-start: 0; background: var(--maroon); color: var(--white); }
.values-head h3 { font-size: 20px; margin-bottom: 8px; }
.values-head p { font-size: 15px; color: #d9b7be; }
.value h4 { font-size: 18px; margin-bottom: 6px; }
.value p { font-size: 15px; color: var(--muted); }

/* ---------- Scope ---------- */
.phases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.phases > li { padding: 28px 22px 4px; border-inline-start: 1px solid rgba(255, 255, 255, 0.18); }
.phases > li:first-child { border-inline-start: 0; padding-inline-start: 0; }
.phase-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  font-weight: 700;
  background: var(--crimson);
  color: var(--white);
  margin-bottom: 16px;
}
.phases h3 { font-size: 18px; margin-bottom: 6px; }
.phases .ticks li { color: #ead9dc; font-size: 15px; }
.phases .ticks li::before { background: var(--gold); }

/* ---------- Projects ---------- */
.case { display: grid; grid-template-columns: 0.9fr 1.1fr; border: 1px solid var(--line); }
.case-head { background: var(--maroon); color: var(--white); padding: 34px 30px; }
.case-head .eyebrow { color: var(--gold); }
.case-head h3 { font-size: 24px; }
.case-client { color: #d9b7be; margin-top: 8px; font-size: 15.5px; }
.case-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 30px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.case-stats dt { font-size: 30px; font-weight: 700; line-height: 1.1; }
.case-stats dd { font-size: 13.5px; color: #d9b7be; margin-top: 4px; }
.case-body { padding: 34px 30px; display: grid; gap: 20px; align-content: start; }
.case-body h4 { font-size: 15px; color: var(--crimson); margin-bottom: 4px; }
.case-body p { font-size: 15.5px; color: var(--muted); }

.table-wrap { border: 1px solid var(--line); }
.projects { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.projects th, .projects td { text-align: start; padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.projects th { background: var(--paper); font-size: 13.5px; font-weight: 700; color: var(--muted); }
.projects tbody tr:last-child td { border-bottom: 0; }
.projects td:first-child { font-weight: 600; white-space: nowrap; }
.projects td:last-child { color: var(--muted); white-space: nowrap; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery figure { background: var(--white); border: 1px solid var(--line); }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.gallery figcaption { font-size: 14px; color: var(--muted); padding: 12px 14px; line-height: 1.55; }

/* ---------- Factory / facts ---------- */
.factory { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.factory > img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.fact { padding-top: 16px; border-top: 2px solid var(--crimson); }
.fact h4 { font-size: 17px; margin-bottom: 6px; }
.fact p { font-size: 15px; color: var(--muted); }
.fact--boxed { background: var(--white); border: 1px solid var(--line); border-top: 2px solid var(--crimson); padding: 22px; }

/* ---------- Coverage ---------- */
.coverage { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 40px; align-items: start; }
.coverage > img { width: 100%; border: 1px solid var(--line); }
.office { padding-block: 20px; border-top: 1px solid var(--line); }
.office:first-child { border-top: 2px solid var(--ink); }
.office-role { font-size: 13.5px; font-weight: 600; color: var(--crimson); }
.office h3 { font-size: 22px; }
.office-address { font-size: 15.5px; color: var(--muted); margin-top: 4px; }
.map-link { display: inline-block; margin-top: 6px; font-size: 15px; font-weight: 600; color: var(--crimson); text-underline-offset: 4px; }
.map-link:hover { color: var(--crimson-dark); }
.contact-list .office-address { font-size: 16.5px; color: inherit; margin-top: 0; }
.contact-list .map-link { margin-top: 0; font-size: 16.5px; font-weight: 400; color: inherit; text-decoration: underline; }
.also { font-size: 14px; font-weight: 700; margin-block: 22px 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 14px; padding: 5px 12px; background: var(--paper); border: 1px solid var(--line); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn--wa { display: inline-flex; align-items: center; gap: 10px; background: #1faa55; color: var(--white); }
.btn--wa:hover { background: #178a44; }

/* Floating WhatsApp button (sits on the left in Arabic, right in English) */
.wa-float {
  position: fixed;
  inset-block-end: 20px;
  inset-inline-end: 20px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #1faa55;
  color: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}
.wa-float:hover { background: #178a44; }
.wa-float svg { width: 28px; height: 28px; }
.contact-list > div { padding-block: 16px; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.contact-list > div:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.18); }
.contact-list dt { font-size: 13.5px; font-weight: 600; color: var(--gold); }
.contact-list dd { font-size: 16.5px; }
.contact-list a { text-decoration: none; display: inline-block; }
.contact-list a:hover { color: var(--gold); }

/* ---------- Footer ---------- */
/* Extra bottom padding keeps the floating WhatsApp button off the footer text. */
.site-footer { background: #1f0a0f; color: #c9aeb3; padding-block: 34px 88px; font-size: 14px; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer img { height: 44px; width: auto; }
.footer-tag { color: var(--white); font-weight: 600; font-size: 15px; }
.site-footer div { text-align: end; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    flex-direction: column;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 6px 20px 14px;
  }
  .nav--open { display: flex; }
  .nav a { padding-block: 12px; border-bottom: 1px solid var(--line); }
  .menu-btn { display: flex; }
  .grid--4, .phases { grid-template-columns: repeat(2, 1fr); }
  .phases > li:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; }
  .phases > li { padding-bottom: 24px; }
  .grid--3, .gallery { grid-template-columns: repeat(2, 1fr); }
  .hero-grid, .split, .case, .factory, .coverage, .contact-grid { grid-template-columns: 1fr; }
  .split { gap: 20px; }
  .values { grid-template-columns: 1fr 1fr; }
  .values > div:nth-child(3) { border-inline-start: 0; }
  .values > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding-block: 56px; }
  .hero { padding-top: 40px; }
  .logo img { height: 34px; }
  .stats { grid-template-columns: 1fr 1fr; margin-top: 40px; }
  .stats > div { padding: 20px 14px; }
  .stats > div:nth-child(odd) { border-inline-start: 0; padding-inline-start: 0; }
  .stats > div:nth-child(n + 3) { border-top: 1px solid rgba(255, 255, 255, 0.16); }
  .stats dt { font-size: 32px; }
  .grid--2, .grid--3, .grid--4, .gallery, .pair, .phases, .values { grid-template-columns: 1fr; }
  .phases > li, .values > div { border-inline-start: 0; padding-inline-start: 0; }
  .values > div { padding-inline: 20px; }
  .values > div + div { border-top: 1px solid var(--line); }
  .phases > li + li { border-top: 1px solid rgba(255, 255, 255, 0.18); }
  .case-head, .case-body { padding: 26px 20px; }
  .case-stats dt { font-size: 24px; }
  .site-footer div { text-align: start; }

  /* Project table becomes stacked rows */
  .projects thead { display: none; }
  .projects tr { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .projects tbody tr:last-child { border-bottom: 0; }
  .projects td { display: block; padding: 0; border: 0; white-space: normal !important; }
  .projects td:nth-child(2) { font-size: 14.5px; color: var(--muted); margin-block: 2px; }
  .projects td:last-child { font-size: 13.5px; color: var(--crimson); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
