/* ==========================================================================
   Al-Madarioun Engineering — site stylesheet
   Written as one file on purpose: no build step, no preprocessor. Everything
   below is plain CSS that any browser from ~2021 onward understands.

   Layout uses LOGICAL properties (margin-inline, inset-inline-start, text-align:
   start) rather than left/right, so switching <html dir="rtl"> for Arabic flips
   the whole site without a second stylesheet. If you add a rule, keep that up.
   ========================================================================== */

/* ---- 1. Tokens ---------------------------------------------------------- */
:root {
  /* Brand. The two chevrons in the logo are #e62d1f and #3057a4; the navy is a
     darkened relative of the blue so the palette reads as one family. */
  --navy-900: #071427;
  --navy-800: #0b1f3f;
  --navy-700: #122c55;
  --blue-600: #3057a4;
  --blue-500: #3f6dc4;
  --blue-100: #e7eefb;
  --red-600: #e62d1f;
  --red-500: #f24436;
  --red-100: #fdeceb;

  /* Neutrals, warmed very slightly so large white areas don't read as clinical */
  --white: #ffffff;
  --paper: #fbfbfa;
  --sand: #f4f4f2;
  --line: #e4e4e1;
  --line-soft: #eeeeec;
  --ink-900: #10131a;
  --ink-700: #3c4250;
  --ink-500: #6b7280;
  --ink-400: #9aa0ab;

  /* Type */
  --font-display: "Manrope", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;

  /* Rhythm */
  --container: 1220px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(4.5rem, 9vw, 8rem);
  --radius: 4px;
  --radius-lg: 8px;

  --shadow-sm: 0 1px 2px rgba(7, 20, 39, .06), 0 4px 12px rgba(7, 20, 39, .04);
  --shadow-md: 0 2px 4px rgba(7, 20, 39, .06), 0 12px 32px rgba(7, 20, 39, .08);
  --shadow-lg: 0 4px 8px rgba(7, 20, 39, .08), 0 24px 64px rgba(7, 20, 39, .14);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* Arabic gets its own face and a touch more line-height — Arabic ascenders and
   descenders need the room, and Manrope has no Arabic coverage at all. */
html[lang="ar"] {
  --font-display: var(--font-arabic);
  --font-body: var(--font-arabic);
}
html[lang="ar"] body { line-height: 1.85; }

/* ---- 2. Reset ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; padding: 0; }

:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--navy-800); color: #fff; }

/* ---- 3. Typography ------------------------------------------------------ */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--ink-900);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.022em;
  text-wrap: balance;
}
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3,
html[lang="ar"] h4, html[lang="ar"] h5 { letter-spacing: 0; line-height: 1.35; }

h1 { font-size: clamp(2.4rem, 5.6vw, 4.25rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.45rem); letter-spacing: -.014em; }
h4 { font-size: 1.05rem; letter-spacing: -.01em; }

p { text-wrap: pretty; }

.lead {
  font-size: clamp(1.06rem, 1.5vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-700);
}

/* The small uppercase label that opens most sections. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue-600);
}
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: .85rem; }
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--red-600);
  flex: none;
}
.eyebrow--light { color: rgba(255, 255, 255, .78); }

/* ---- 4. Layout ---------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: 1440px; }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }
.section--paper { background: var(--paper); }
.section--sand { background: var(--sand); }
.section--navy { background: var(--navy-900); color: rgba(255, 255, 255, .72); }
.section--navy h2, .section--navy h3, .section--navy h4 { color: #fff; }

.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 4vw, 3.75rem); }
.section-head > * + * { margin-top: 1rem; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow::before { display: none; }

.grid { display: grid; gap: clamp(1.25rem, 2.4vw, 2rem); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

.stack > * + * { margin-top: 1.1rem; }

/* ---- 5. Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .95rem 1.6rem;
  font-family: var(--font-body);
  font-size: .93rem;
  font-weight: 600;
  letter-spacing: .005em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), transform .25s var(--ease),
              box-shadow .25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--navy-800); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--navy-700); box-shadow: var(--shadow-md); }

.btn--accent { background: var(--red-600); color: #fff; box-shadow: var(--shadow-sm); }
.btn--accent:hover { background: var(--red-500); box-shadow: var(--shadow-md); }

.btn--ghost { border-color: var(--line); color: var(--ink-900); background: #fff; }
.btn--ghost:hover { border-color: var(--navy-800); }

.btn--onDark { border-color: rgba(255, 255, 255, .3); color: #fff; }
.btn--onDark:hover { background: #fff; color: var(--navy-900); border-color: #fff; }

.btn--sm { padding: .62rem 1.1rem; font-size: .85rem; }

/* The arrow leans forward on hover; it must lean the other way in Arabic. */
.btn .arw { transition: transform .25s var(--ease); }
.btn:hover .arw { transform: translateX(3px); }
html[dir="rtl"] .btn .arw { transform: scaleX(-1); }
html[dir="rtl"] .btn:hover .arw { transform: scaleX(-1) translateX(3px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  font-size: .92rem;
  color: var(--navy-800);
  border-bottom: 1px solid var(--line);
  padding-bottom: .3rem;
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.link-arrow:hover { color: var(--red-600); border-color: var(--red-600); }
.link-arrow .arw { transition: transform .25s var(--ease); }
.link-arrow:hover .arw { transform: translateX(4px); }
html[dir="rtl"] .link-arrow .arw { transform: scaleX(-1); }
html[dir="rtl"] .link-arrow:hover .arw { transform: scaleX(-1) translateX(4px); }

/* ---- 6. Header ---------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.header.is-stuck { border-bottom-color: var(--line); background: rgba(255, 255, 255, .96); }

.header__inner {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  min-height: 78px;
}

.brand { display: flex; align-items: center; gap: .8rem; flex: none; }
.brand__mark { height: 34px; width: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -.02em;
  color: var(--ink-900);
}
.brand__sub {
  font-size: .64rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-500);
  font-weight: 500;
}
html[lang="ar"] .brand__sub { letter-spacing: 0; font-size: .74rem; text-transform: none; }
@media (max-width: 400px) { .brand__text { display: none; } }

.nav { display: flex; align-items: center; gap: .25rem; margin-inline-start: auto; }
.nav__link {
  position: relative;
  padding: .55rem .85rem;
  font-size: .92rem;
  font-weight: 500;
  color: var(--ink-700);
  border-radius: var(--radius);
  transition: color .2s var(--ease);
}
.nav__link:hover { color: var(--ink-900); }
.nav__link::after {
  content: "";
  position: absolute;
  inset-inline: .85rem;
  bottom: .2rem;
  height: 2px;
  background: var(--red-600);
  transform: scaleX(0);
  transform-origin: var(--x-origin, left);
  transition: transform .3s var(--ease);
}
html[dir="rtl"] .nav__link::after { --x-origin: right; }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--ink-900); font-weight: 600; }

.header__actions { display: flex; align-items: center; gap: .6rem; flex: none; }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .8rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-700);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.lang-toggle:hover { border-color: var(--navy-800); color: var(--ink-900); }

.burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  place-items: center;
  align-content: center;   /* pack the three lines; don't spread them over 42 px */
}
.burger span {
  display: block;
  width: 17px;
  height: 1.5px;
  background: var(--ink-900);
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.burger span + span { margin-top: 4px; }
.burger.is-open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Above the burger breakpoint the quote button lives in .header__actions;
   the copy inside .nav is only for the opened mobile menu. The breakpoint is
   where the full row (logo, six links, language, quote) stops fitting —
   about 1110 px in English. */
@media (min-width: 1141px) { .nav .btn { display: none; } }
@media (max-width: 1140px) {
  .nav {
    position: fixed;
    inset: 78px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 1rem var(--gutter) 1.75rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    /* Same delayed-visibility trick as the lightbox: the panel must be
       focusable the instant it opens, but stay in the tab order's blind spot
       until the closing animation has finished. */
    transition: opacity .25s var(--ease), transform .25s var(--ease),
                visibility 0s linear .25s;
    max-height: calc(100vh - 78px);
    overflow-y: auto;
  }
  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: opacity .25s var(--ease), transform .25s var(--ease),
                visibility 0s linear 0s;
  }
  .nav__link { padding: .95rem .25rem; font-size: 1.05rem; border-bottom: 1px solid var(--line-soft); }
  .nav__link::after { display: none; }
  .nav .btn { margin-top: 1.25rem; }
  .burger { display: grid; }
  /* .nav is taken out of the row here, so it no longer pushes these over */
  .header__actions { margin-inline-start: auto; }
  .header__actions .btn--quote { display: none; }
}

/* ---- 7. Hero ------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: min(88vh, 820px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--navy-900);
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
/* The showreel, when there is one, fades in over the photo once it is
   actually playing — until then (or if it never loads) the photo stands. */
.hero__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s var(--ease);
}
.hero__media video.is-playing { opacity: 1; }
/* Two overlays: a directional wash that keeps the type side readable, and a
   flat scrim so the photo can vary without the text ever dropping contrast. */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(7, 20, 39, .94) 0%, rgba(7, 20, 39, .55) 45%, rgba(7, 20, 39, .28) 100%),
    linear-gradient(to var(--wash-dir, right), rgba(7, 20, 39, .8) 0%, rgba(7, 20, 39, .1) 65%);
}
html[dir="rtl"] .hero__media::after { --wash-dir: left; }

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-block: clamp(6rem, 14vw, 9rem) clamp(2rem, 4vw, 3rem);
}
.hero__content { max-width: 40rem; }
.hero h1 { color: #fff; }
.hero__title-accent { color: var(--red-500); }
.hero__sub {
  margin-top: 1.5rem;
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, .82);
  max-width: 34rem;
}
.hero__cta { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: .8rem; }

/* Stat strip that sits on the hero's lower edge */
.stat-strip {
  position: relative;
  z-index: 2;
  margin-top: -1px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.stat-strip__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stat {
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1rem, 2vw, 1.75rem);
  border-inline-start: 1px solid var(--line-soft);
}
.stat:first-child { border-inline-start: 0; padding-inline-start: 0; }
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--navy-800);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: .05em;
}
.stat__suffix { color: var(--red-600); }
.stat__label {
  margin-top: .6rem;
  font-size: .82rem;
  color: var(--ink-500);
  line-height: 1.4;
}
@media (max-width: 760px) {
  .stat-strip__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { border-inline-start: 0; padding-inline: 0; }
  .stat:nth-child(3), .stat:nth-child(4) { border-top: 1px solid var(--line-soft); }
}

/* Compact hero for interior pages */
.page-hero {
  position: relative;
  background: var(--navy-900);
  color: rgba(255, 255, 255, .75);
  overflow: hidden;
}
.page-hero__media { position: absolute; inset: 0; opacity: .34; }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--navy-900) 5%, rgba(7, 20, 39, .5) 100%);
}
.page-hero__inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(4.5rem, 11vw, 8rem) clamp(3rem, 7vw, 5rem);
  max-width: 48rem;
}
.page-hero h1 { color: #fff; font-size: clamp(2.1rem, 4.6vw, 3.5rem); }
.page-hero p { margin-top: 1.25rem; font-size: clamp(1rem, 1.4vw, 1.15rem); color: rgba(255, 255, 255, .78); }

.crumbs {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  color: rgba(255, 255, 255, .55);
  margin-bottom: 1.4rem;
}
.crumbs a:hover { color: #fff; }
.crumbs .sep { opacity: .5; }
html[dir="rtl"] .crumbs .sep { transform: scaleX(-1); display: inline-block; }

/* ---- 8. Cards ----------------------------------------------------------- */
.card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 2.4vw, 2.1rem);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.card:hover { border-color: var(--blue-500); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--blue-100);
  color: var(--blue-600);
  margin-bottom: 1.35rem;
  flex: none;
}
.card__icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: .7rem; }
.card p { font-size: .95rem; color: var(--ink-500); }
.card__list { margin-top: 1.15rem; padding-top: 1.15rem; border-top: 1px solid var(--line-soft); }
.card__list li {
  position: relative;
  padding-inline-start: 1.15rem;
  font-size: .88rem;
  color: var(--ink-700);
}
.card__list li + li { margin-top: .5rem; }
.card__list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: .62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red-600);
}
.card__foot { margin-top: auto; padding-top: 1.35rem; }

/* Numbered "value" cards, borderless */
.value { padding-top: 1.5rem; border-top: 2px solid var(--navy-800); }
.value__n {
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--red-600);
  margin-bottom: .9rem;
}
.value h3 { margin-bottom: .6rem; }
.value p { font-size: .95rem; color: var(--ink-500); }
.section--navy .value { border-top-color: rgba(255, 255, 255, .28); }
.section--navy .value p { color: rgba(255, 255, 255, .62); }
.section--navy .value__n { color: var(--red-500); }

/* ---- 9. Project cards --------------------------------------------------- */
.project-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--navy-900);
  isolation: isolate;
}
.project-card__media { aspect-ratio: 4 / 3; }
.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.project-card:hover .project-card__media img { transform: scale(1.05); }
.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 20, 39, .92) 8%, rgba(7, 20, 39, .35) 55%, rgba(7, 20, 39, 0) 100%);
  z-index: 1;
}
.project-card__body {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 2;
  padding: clamp(1.35rem, 2.4vw, 2rem);
  color: #fff;
}
.project-card__tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(230, 45, 31, .92);
  padding: .32rem .6rem;
  border-radius: 2px;
  margin-bottom: .85rem;
}
html[lang="ar"] .project-card__tag { letter-spacing: 0; font-size: .78rem; }
.project-card__body h3 { color: #fff; font-size: clamp(1.15rem, 1.9vw, 1.5rem); }
.project-card__meta { margin-top: .45rem; font-size: .85rem; color: rgba(255, 255, 255, .68); }

/* The spec chips (9 lifts / 34 escalators / …) */
.spec-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.1rem; }
.spec {
  display: inline-flex;
  align-items: baseline;
  gap: .35rem;
  padding: .38rem .65rem;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 3px;
  font-size: .8rem;
  color: rgba(255, 255, 255, .9);
  backdrop-filter: blur(4px);
}
.spec b { font-weight: 700; color: #fff; }

/* ---- 10. Partners ------------------------------------------------------- */
.partner {
  display: flex;
  flex-direction: column;
  padding: clamp(1.6rem, 2.6vw, 2.35rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  height: 100%;
}
.partner__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 1.35rem;
}
.partner__name {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -.025em;
  color: var(--navy-800);
}
.partner__since {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-400);
  white-space: nowrap;
}
html[lang="ar"] .partner__since { letter-spacing: 0; text-transform: none; font-size: .82rem; }
.partner__origin {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  color: var(--ink-500);
  margin-bottom: .9rem;
}
.partner p { font-size: .94rem; color: var(--ink-500); }
.partner__foot { margin-top: auto; padding-top: 1.4rem; }

/* ---- 11. Split / feature blocks ---------------------------------------- */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split--top { align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }

.split__media { position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split__media--tall img { aspect-ratio: 3 / 4; }

/* Small red rule that anchors the media block to the grid */
.split__media::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 4px;
  height: 84px;
  background: var(--red-600);
  z-index: 1;
}

.figure-note {
  margin-top: .85rem;
  font-size: .8rem;
  color: var(--ink-400);
}

/* ---- 12. Facts / dl ----------------------------------------------------- */
.facts { display: grid; gap: 0; }
.fact {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 1.5rem;
  padding-block: 1.15rem;
  border-top: 1px solid var(--line);
  font-size: .95rem;
}
.fact:last-child { border-bottom: 1px solid var(--line); }
.fact dt { font-weight: 600; color: var(--ink-900); }
.fact dd { margin: 0; color: var(--ink-500); }
@media (max-width: 560px) { .fact { grid-template-columns: minmax(0, 1fr); gap: .3rem; } }

/* ---- 13. Certifications ------------------------------------------------- */
.cert-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.cert {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .9rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--ink-700);
  background: #fff;
}
.cert svg { width: 15px; height: 15px; color: var(--blue-600); flex: none; }
.section--navy .cert {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .84);
}
.section--navy .cert svg { color: var(--red-500); }

/* ---- 14. Gallery -------------------------------------------------------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 2.25rem;
}
.filter {
  padding: .55rem 1rem;
  font-size: .87rem;
  font-weight: 500;
  color: var(--ink-700);
  border: 1px solid var(--line);
  border-radius: 100px;
  background: #fff;
  transition: all .2s var(--ease);
}
.filter:hover { border-color: var(--navy-800); color: var(--ink-900); }
.filter.is-active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.filter__count { opacity: .55; font-size: .8em; margin-inline-start: .3rem; }

/* Project list: the cards reuse .project-card; the counts reuse .spec. */
#album-grid .spec { align-items: center; }
#album-grid .spec svg { opacity: .8; }

/* One project: back link, the photo viewer, then its reels */
.link-back { margin-bottom: 2rem; }
.link-back:hover .arw { transform: translateX(-4px); }
html[dir="rtl"] .link-back:hover .arw { transform: scaleX(-1) translateX(-4px); }

/* Photo viewer. The stage is a fixed height and the photo is fitted inside
   it, so portrait and landscape shots share one frame. --bg (set by main.js)
   is the current photo's thumbnail, blurred, filling the empty sides. */
.viewer__stage {
  position: relative;
  height: clamp(300px, 70vh, 760px);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--navy-900);
  isolation: isolate;
}
.viewer__stage::before {
  content: "";
  position: absolute;
  inset: -40px;
  z-index: -1;
  background: var(--bg) center / cover no-repeat;
  filter: blur(28px) brightness(.45) saturate(1.1);
  transition: background-image .3s var(--ease);
}
.viewer__open {
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}
.viewer__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity .25s var(--ease);
}
.viewer__img.is-loading { opacity: .4; }
.viewer__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(7, 20, 39, .45);
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  backdrop-filter: blur(6px);
  transition: background-color .2s var(--ease);
}
.viewer__btn:hover { background: var(--red-600); border-color: var(--red-600); }
.viewer__btn--prev { inset-inline-start: clamp(.6rem, 2vw, 1.5rem); }
.viewer__btn--next { inset-inline-end: clamp(.6rem, 2vw, 1.5rem); }
html[dir="rtl"] .viewer__btn svg { transform: scaleX(-1); }
.viewer__count {
  position: absolute;
  bottom: 1rem;
  inset-inline-end: 1rem;
  padding: .3rem .7rem;
  border-radius: 100px;
  background: rgba(7, 20, 39, .6);
  color: #fff;
  font-size: .8rem;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

/* Every photo of the project, small and square, under the stage */
.viewer__strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.viewer__thumb {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--sand);
  opacity: .55;
  outline: 3px solid transparent;
  outline-offset: -3px;
  transition: opacity .2s var(--ease), outline-color .2s var(--ease);
}
.viewer__thumb img { width: 100%; height: 100%; object-fit: cover; }
.viewer__thumb:hover { opacity: .9; }
.viewer__thumb.is-active { opacity: 1; outline-color: var(--red-600); }
/* The outline sits inside the image, so it needs its own contrast ring */
.viewer__thumb.is-active img { box-shadow: inset 0 0 0 5px #fff; }

@media (max-width: 620px) {
  .viewer__stage { height: clamp(260px, 62vh, 560px); }
  .viewer__btn { width: 42px; height: 42px; }
  .viewer__strip { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; }
}

.album-videos-wrap { margin-top: clamp(3rem, 6vw, 4.5rem); }
.album-section-title { font-size: clamp(1.35rem, 2.2vw, 1.8rem); margin-bottom: 1.25rem; }

/* The reels are portrait phone video, so they sit side by side at a fixed
   width rather than stretching across the page. */
.album-videos {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.album-video {
  width: clamp(200px, 24vw, 320px);
  height: auto;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  background: var(--navy-900);
  object-fit: cover;
}
@media (max-width: 620px) {
  .album-videos { gap: 10px; margin-bottom: 10px; }
  .album-video { width: calc(50% - 5px); }
  .album-videos .album-video:only-child { width: 100%; max-width: 360px; }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(7, 20, 39, .96);
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  opacity: 0;
  visibility: hidden;
  /* visibility is switched with a DELAY rather than a duration: closing waits
     for the fade to finish, opening flips it instantly. If it were part of the
     timed transition the dialog would still be `hidden` at the moment JS calls
     .focus() on the close button, and the focus call would silently do nothing
     — leaving a keyboard user tabbing around behind an open lightbox. */
  transition: opacity .3s var(--ease), visibility 0s linear .3s;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .3s var(--ease), visibility 0s linear 0s;
}
.lightbox__img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.lightbox__cap {
  margin-top: 1.1rem;
  text-align: center;
  color: #fff;
  font-size: .95rem;
  font-weight: 600;
}
.lightbox__cap-desc {
  display: block;
  margin-top: .3rem;
  font-size: .84rem;
  font-weight: 400;
  color: rgba(255, 255, 255, .62);
}
.lightbox__count { display: block; margin-top: .45rem; font-size: .78rem; color: rgba(255, 255, 255, .4); }
.lightbox__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
  transition: background-color .2s var(--ease);
}
.lightbox__btn:hover { background: rgba(255, 255, 255, .22); }
.lightbox__btn--prev { inset-inline-start: clamp(.5rem, 2vw, 2rem); }
.lightbox__btn--next { inset-inline-end: clamp(.5rem, 2vw, 2rem); }
html[dir="rtl"] .lightbox__btn svg { transform: scaleX(-1); }
.lightbox__close {
  position: absolute;
  top: clamp(.75rem, 2vw, 1.75rem);
  inset-inline-end: clamp(.75rem, 2vw, 1.75rem);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
}
.lightbox__close:hover { background: rgba(255, 255, 255, .22); }
@media (max-width: 620px) {
  .lightbox__btn { width: 42px; height: 42px; top: auto; bottom: 1rem; transform: none; }
}

/* ---- 15. Project register (table) --------------------------------------- */
.table-tools {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  margin-bottom: 1.5rem;
}
.search {
  position: relative;
  flex: 1 1 260px;
  max-width: 380px;
}
.search input {
  width: 100%;
  padding: .78rem 1rem .78rem 2.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-size: .92rem;
  transition: border-color .2s var(--ease);
}
html[dir="rtl"] .search input { padding: .78rem 2.6rem .78rem 1rem; }
.search input:focus { outline: none; border-color: var(--blue-600); }
.search svg {
  position: absolute;
  inset-inline-start: .9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--ink-400);
  pointer-events: none;
}
.table-count { font-size: .87rem; color: var(--ink-500); margin-inline-start: auto; }

.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
}
.table-scroll { overflow-x: auto; }
table.register { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 720px; }
table.register th {
  text-align: start;
  font-family: var(--font-body);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-500);
  background: var(--paper);
  padding: .9rem 1.1rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
html[lang="ar"] table.register th { letter-spacing: 0; text-transform: none; font-size: .84rem; }
table.register td {
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-700);
  vertical-align: top;
}
table.register tr:last-child td { border-bottom: 0; }
table.register tbody tr { transition: background-color .15s var(--ease); }
table.register tbody tr:hover { background: var(--paper); }
table.register .t-name { font-weight: 600; color: var(--ink-900); }
table.register .t-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill {
  display: inline-block;
  padding: .2rem .5rem;
  border-radius: 3px;
  font-size: .75rem;
  font-weight: 600;
  background: var(--blue-100);
  color: var(--blue-600);
  white-space: nowrap;
}
.pill--local { background: var(--red-100); color: var(--red-600); }
.table-empty { padding: 3rem 1.5rem; text-align: center; color: var(--ink-500); font-size: .95rem; }
.table-more { padding: 1.15rem; text-align: center; border-top: 1px solid var(--line); background: var(--paper); }

/* ---- 16. Contact -------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }

.contact-item {
  display: flex;
  gap: 1.1rem;
  padding-block: 1.4rem;
  border-top: 1px solid var(--line);
}
.contact-item:last-of-type { border-bottom: 1px solid var(--line); }
.contact-item__icon {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--blue-100);
  color: var(--blue-600);
}
.contact-item__icon svg { width: 19px; height: 19px; }
.contact-item h4 { margin-bottom: .25rem; }
.contact-item a, .contact-item p { font-size: .95rem; color: var(--ink-500); }
.contact-item a:hover { color: var(--red-600); }
/* Phone numbers and emails stay LTR even on the Arabic page. */
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.5rem, 3vw, 2.4rem); }
.field { margin-bottom: 1.15rem; }
.field label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: .45rem;
}
.field .req { color: var(--red-600); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: .8rem .95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: .95rem;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue-600);
  background: #fff;
}
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: minmax(0, 1fr); } }
.form-note { margin-top: 1rem; font-size: .82rem; color: var(--ink-400); }

/* ---- 17. CTA band ------------------------------------------------------- */
.cta-band {
  position: relative;
  background: var(--navy-900);
  color: rgba(255, 255, 255, .72);
  overflow: hidden;
}
.cta-band__inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(3.5rem, 8vw, 6rem);
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}
.cta-band h2 { color: #fff; max-width: 22ch; }
.cta-band p { margin-top: .9rem; max-width: 44ch; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: .8rem; }
/* Oversized watermark chevron, clipped by the band */
.cta-band__mark {
  position: absolute;
  inset-inline-end: -4%;
  top: 50%;
  transform: translateY(-50%);
  width: 420px;
  opacity: .07;
  pointer-events: none;
}
html[dir="rtl"] .cta-band__mark { transform: translateY(-50%) scaleX(-1); }

/* ---- 18. Footer --------------------------------------------------------- */
.footer { background: var(--navy-900); color: rgba(255, 255, 255, .58); font-size: .92rem; }
.footer__main {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
@media (max-width: 900px) { .footer__main { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .footer__main { grid-template-columns: minmax(0, 1fr); } }

.footer .brand__name { color: #fff; }
.footer .brand__sub { color: rgba(255, 255, 255, .45); }
.footer__blurb { margin-top: 1.35rem; max-width: 30ch; line-height: 1.65; }
.footer__title {
  font-family: var(--font-body);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1.15rem;
}
html[lang="ar"] .footer__title { letter-spacing: 0; text-transform: none; font-size: .88rem; }
.footer__links li + li { margin-top: .65rem; }
.footer__links a { transition: color .2s var(--ease); }
.footer__links a:hover { color: #fff; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .84rem;
  color: rgba(255, 255, 255, .42);
}
.social { display: flex; gap: .5rem; }
.social a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.social a:hover { background: #fff; color: var(--navy-900); border-color: #fff; }
.social svg { width: 17px; height: 17px; }

/* Floating call button. Named .wa-float because it began life as a WhatsApp
   button; if it is switched back to WhatsApp, change the background to
   #25d366 and the shadow to match. */
.wa-float {
  position: fixed;
  inset-inline-end: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 90;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red-600);
  color: #fff;
  box-shadow: 0 8px 24px rgba(230, 45, 31, .34);
  transition: transform .25s var(--ease), background-color .25s var(--ease);
}
.wa-float:hover { transform: scale(1.08); background: var(--red-500); }
.wa-float svg { width: 25px; height: 25px; }

/* ---- 19. Scroll reveal -------------------------------------------------- */
/* Applied by main.js via IntersectionObserver. Elements are visible by default
   and only hidden once JS confirms it can reveal them — so with JS off, or if
   the observer never fires, the page still reads normally. */
.js-reveal.reveal-armed {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js-reveal.reveal-armed.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js-reveal.reveal-armed { opacity: 1; transform: none; }
}

/* ---- 20. Utilities ------------------------------------------------------ */
.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;
}
.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -100px;
  z-index: 300;
  background: var(--navy-800);
  color: #fff;
  padding: .75rem 1.15rem;
  border-radius: var(--radius);
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; }

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.muted { color: var(--ink-500); }
.nowrap { white-space: nowrap; }
.no-scroll { overflow: hidden; }

hr.rule { border: 0; border-top: 1px solid var(--line); margin-block: clamp(2.5rem, 5vw, 4rem); }
