/* ==========================================================================
   Merit Consultation: site stylesheet
   Light "drafting paper" theme: off-white background, navy ink, gold detail.
   Type: IBM Plex Sans, IBM Plex Mono (labels), IBM Plex Sans Arabic.
   ========================================================================== */

:root {
  --bg: #f6f4ef;
  --paper: #ffffff;
  --ink: #0a1729;
  --text: #2f3a4b;
  --muted: #687385;
  --line: rgba(10, 23, 41, 0.12);
  --line-strong: rgba(10, 23, 41, 0.24);
  --grid: rgba(10, 23, 41, 0.05);
  --gold: #c8a35a;
  --gold-deep: #9a7738;
  --gold-ink: #8a6526;
  --navy: #0a1729;
  --navy-2: #0f2038;
  --ivory: #f2ede2;
  --on-navy: #b9c1cd;

  --sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --header-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

html[lang="ar"] { --sans: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body.nav-open { overflow: hidden; }
::selection { background: var(--gold); color: var(--ink); }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; }
[hidden] { display: none !important; }

.container { width: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; }

.skip-link {
  position: fixed; top: 10px; inset-inline-start: 10px; z-index: 300;
  padding: 10px 14px; background: var(--ink); color: #fff; font-weight: 500;
  transform: translateY(-160%); transition: transform 0.2s;
}
.skip-link:focus { transform: none; }

/* ---------- Type ---------- */
h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 4.4vw, 3.9rem); line-height: 1.08; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.65rem, 2.7vw, 2.4rem); line-height: 1.15; letter-spacing: -0.02em; }
h3 { font-size: 1.05rem; line-height: 1.35; letter-spacing: -0.005em; }
.lead { font-size: clamp(1.02rem, 1.2vw, 1.14rem); color: var(--text); max-width: 600px; }
.muted { color: var(--muted); }
html[lang="ar"] h1, html[lang="ar"] h2 { letter-spacing: 0; line-height: 1.3; }
html[lang="ar"] body { line-height: 1.8; }

.label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.label::before { content: ""; width: 7px; height: 7px; background: var(--gold); flex: none; }
html[lang="ar"] .label { font-family: var(--sans); letter-spacing: 0; font-size: 0.86rem; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  border: 1px solid var(--navy);
  border-radius: 2px;
  background: var(--navy);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { background: #1c3050; border-color: #1c3050; }
.btn::after, .link::after {
  content: "";
  width: 14px;
  height: 10px;
  flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 10'%3E%3Cpath d='M0 5h13M9 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 10'%3E%3Cpath d='M0 5h13M9 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.25s var(--ease);
}
.btn:hover::after, .link:hover::after { transform: translateX(3px); }
[dir="rtl"] .btn::after, [dir="rtl"] .link::after { transform: scaleX(-1); }
[dir="rtl"] .btn:hover::after, [dir="rtl"] .link:hover::after { transform: scaleX(-1) translateX(3px); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-line:hover { background: var(--paper); border-color: var(--ink); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #d8b76f; border-color: #d8b76f; }
.btn-small { padding: 9px 14px; font-size: 0.86rem; }
.btn-small::after { display: none; }

.link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--gold);
  color: var(--ink);
  font-weight: 500;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 100;
  background: rgba(246, 244, 239, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  padding-top: env(safe-area-inset-top, 0px);
  transition: border-color 0.3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav-wrap { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); flex: none; }
.brand .mark { width: 34px; height: 34px; }
.brand-word { display: grid; gap: 5px; }
.brand-word .wordmark { height: 14px; width: auto; }
.brand-sub { font-size: 0.5rem; font-weight: 600; letter-spacing: 0.47em; text-transform: uppercase; color: var(--gold-ink); line-height: 1; white-space: nowrap; }
html[lang="ar"] .brand-sub { letter-spacing: 0; font-size: 0.7rem; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { position: relative; padding: 8px 12px; font-size: 0.93rem; font-weight: 500; color: var(--text); transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a.active::after { content: ""; position: absolute; inset-inline: 12px; bottom: 0; height: 2px; background: var(--gold); }
.nav-links .mobile-only { display: none; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.language-toggle {
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
}
.language-toggle:hover { border-color: var(--ink); }
.language-toggle[lang="ar"] { font-family: "IBM Plex Sans Arabic", sans-serif; }
.language-toggle[lang="en"] { font-family: "IBM Plex Sans", sans-serif; }

.menu-toggle { display: none; position: relative; width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: 2px; background: transparent; cursor: pointer; }
.menu-toggle span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink); transition: transform 0.3s var(--ease), opacity 0.2s; }
.menu-toggle span:nth-child(1) { top: 15px; }
.menu-toggle span:nth-child(2) { top: 20px; }
.menu-toggle span:nth-child(3) { top: 25px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 7vw, 96px); }
.section + .section { border-top: 1px solid var(--line); }

/* Report-style heading: label in a side column, title and intro beside it */
.sec-head { display: grid; grid-template-columns: minmax(150px, 210px) 1fr; gap: 10px 48px; margin-bottom: clamp(28px, 4vw, 44px); }
.sec-head .label { padding-top: 0.6em; align-self: start; }
.sec-head > div { display: grid; gap: 10px; max-width: 720px; }
.sec-head p { color: var(--muted); }
.sec-foot { margin-top: 26px; }

/* Faint drafting grid, used behind heroes */
.grid-paper::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: linear-gradient(90deg, transparent 15%, #000 65%);
  mask-image: linear-gradient(90deg, transparent 15%, #000 65%);
}
[dir="rtl"] .grid-paper::before {
  -webkit-mask-image: linear-gradient(270deg, transparent 15%, #000 65%);
  mask-image: linear-gradient(270deg, transparent 15%, #000 65%);
}

/* ---------- Home hero ---------- */
.hero {
  position: relative;
  min-height: min(100vh, 900px);
  min-height: min(100svh, 900px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: calc(var(--header-h) + 40px);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, var(--bg) 0%, rgba(246, 244, 239, 0.9) 34%, rgba(246, 244, 239, 0) 56%);
}
[dir="rtl"] .hero::after { background: linear-gradient(270deg, var(--bg) 0%, rgba(246, 244, 239, 0.9) 34%, rgba(246, 244, 239, 0) 56%); }
.hero > .container { position: relative; z-index: 2; }
.hero-content { max-width: 580px; display: grid; gap: 22px; padding-bottom: clamp(36px, 6vh, 64px); }
.hero-content > * { animation: rise 0.9s var(--ease) both; }
.hero-content > *:nth-child(2) { animation-delay: 0.08s; }
.hero-content > *:nth-child(3) { animation-delay: 0.16s; }
.hero-content > *:nth-child(4) { animation-delay: 0.24s; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }

.hero-rail { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-strong); animation: rise 0.9s var(--ease) 0.35s both; }
.hero-rail > div { display: grid; gap: 3px; padding: 16px 20px 24px 0; align-content: start; }
.hero-rail > div + div { padding-inline-start: 20px; border-inline-start: 1px solid var(--line); }
[dir="rtl"] .hero-rail > div { padding: 16px 0 24px 20px; }
[dir="rtl"] .hero-rail > div + div { padding-inline-start: 20px; }
.rail-num { font-family: var(--mono); font-size: 0.74rem; color: var(--gold-ink); }
.rail-title { color: var(--ink); font-weight: 600; }
.rail-text { font-size: 0.88rem; color: var(--muted); }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Blueprint drawing (kept from the dark design; recoloured for paper) */
.hero-blueprint { position: absolute; top: calc(var(--header-h) + 20px); bottom: 140px; left: 48%; right: var(--gutter); pointer-events: none; }
[dir="rtl"] .hero-blueprint { left: var(--gutter); right: 48%; }
.hero-blueprint svg { display: block; width: 100%; height: 100%; overflow: visible; }

.bp { color: var(--ink); direction: ltr; }
.bp .acc { color: var(--gold-deep); }
.bp .ln, .bp .ln2 { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.bp .ln { stroke-width: 1.3; stroke-opacity: 0.78; }
.bp .ln2 { stroke-width: 0.9; stroke-opacity: 0.45; }
.bp .acc .ln { stroke-opacity: 0.95; }
.bp .acc .ln2 { stroke-opacity: 0.75; }
.bp .dash { stroke-dasharray: 5 6; }
.bp .bp-grid { opacity: 0.07; }
.bp text { fill: currentColor; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.06em; }
.bp text.sm { font-size: 10.5px; fill-opacity: 0.85; }
.bp text.dim { font-size: 11.5px; }
.bp text.zone { font-size: 11px; letter-spacing: 0.04em; }
.bp text.tb { fill: var(--ink); font-size: 10px; letter-spacing: 0.04em; font-weight: 600; }
.bp text.tb.sm { fill: var(--gold-deep); font-size: 9px; font-weight: 500; }
html[lang="ar"] .bp text.zone { font-family: "IBM Plex Sans Arabic", sans-serif; letter-spacing: 0; font-size: 13px; }

html.js .bp .d { visibility: hidden; }
html.js .bp.bp-ready .d { visibility: visible; }
.bp .f { opacity: 0; transition: opacity 0.9s ease; }
.bp.bp-on .f { opacity: 1; }
.bp.bp-on .bp-grid.f { opacity: 0.07; }

.bp .bp-box { opacity: 0; }
.bp.bp-live .bp-box { animation: bp-convey 27s linear infinite; animation-delay: var(--delay, 0s); }
@keyframes bp-convey {
  0% { transform: translateX(0); opacity: 0; }
  6% { opacity: 1; }
  92% { opacity: 1; }
  100% { transform: translateX(418px); opacity: 0; }
}
.bp .bp-gear { transform-box: view-box; transform-origin: 905px 78px; }
.bp.bp-live .bp-gear { animation: bp-spin 48s linear infinite; }
@keyframes bp-spin { to { transform: rotate(360deg); } }
.bp .bp-arm { transform-box: view-box; transform-origin: 568px 498px; }
.bp.bp-live .bp-arm { animation: bp-arm 9s ease-in-out infinite alternate; }
@keyframes bp-arm { from { transform: rotate(-3deg); } to { transform: rotate(4deg); } }
.bp .bp-fore { transform-box: view-box; transform-origin: 600px 430px; }
.bp.bp-live .bp-fore { animation: bp-fore 6.5s ease-in-out infinite alternate; }
@keyframes bp-fore { from { transform: rotate(-9deg); } to { transform: rotate(7deg); } }
.bp .bp-flow { stroke-dasharray: 6 9; }
.bp.bp-live .bp-flow { animation: bp-flow 3.2s linear infinite; }
@keyframes bp-flow { to { stroke-dashoffset: -30; } }

/* ---------- Problem finder ---------- */
.finder { display: grid; grid-template-columns: minmax(250px, 0.85fr) 1.15fr; border: 1px solid var(--line-strong); background: var(--paper); }
.finder-list { display: grid; align-content: start; border-inline-end: 1px solid var(--line); }
.finder-list button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 0.97rem;
  font-weight: 500;
  text-align: start;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.finder-list button:last-child { border-bottom: 0; }
.finder-list button:hover { color: var(--ink); background: rgba(246, 244, 239, 0.6); }
.finder-list button[aria-selected="true"] { color: var(--ink); background: var(--bg); }
.finder-list button[aria-selected="true"]::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 3px; background: var(--gold); }
.finder-list .k { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); min-width: 20px; }

.finder-panel { position: relative; display: grid; gap: 18px; align-content: start; padding: clamp(24px, 3.5vw, 44px); }
.finder-panel:not([hidden]) { animation: panel-in 0.35s var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* drawing-frame corner marks */
.finder-panel::before, .finder-panel::after { content: ""; position: absolute; width: 14px; height: 14px; border-color: var(--gold); border-style: solid; }
.finder-panel::before { top: 14px; inset-inline-end: 14px; border-width: 1px 1px 0 0; }
.finder-panel::after { bottom: 14px; inset-inline-start: 14px; border-width: 0 0 1px 1px; }
[dir="rtl"] .finder-panel::before { border-width: 1px 0 0 1px; }
[dir="rtl"] .finder-panel::after { border-width: 0 1px 1px 0; }
.panel-ref { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
html[lang="ar"] .panel-ref { font-family: var(--sans); letter-spacing: 0; }
.panel-title { font-size: clamp(1.4rem, 2.2vw, 1.85rem); font-weight: 600; color: var(--ink); line-height: 1.2; }
.panel-list { display: grid; }
.panel-list li { display: flex; align-items: baseline; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--line-strong); color: var(--ink); }
.panel-list li::before { content: ""; width: 6px; height: 6px; flex: none; transform: translateY(-2px); background: var(--gold); }

/* ---------- Photo tiles (kept) ---------- */
.gallery { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; }
.tile { position: relative; height: clamp(300px, 32vw, 440px); overflow: hidden; border-radius: 2px; background: var(--navy); }
.tile img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.15) brightness(0.6); transform: scale(1.06); transition: transform 1.4s var(--ease), filter 1s var(--ease); }
.tile::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(10, 23, 41, 0.1) 0%, rgba(5, 12, 23, 0.92) 100%); }
.tile::after { content: ""; position: absolute; inset: 0; z-index: 1; background: #c8a35a; mix-blend-mode: color; opacity: 0.3; }
.tile:hover img { transform: scale(1.01); filter: grayscale(0.55) contrast(1.1) brightness(0.72); }
.tile-caption { position: absolute; inset-inline: clamp(20px, 2.6vw, 30px); bottom: clamp(20px, 2.6vw, 30px); z-index: 2; display: grid; gap: 6px; }
.tile-caption small { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); }
html[lang="ar"] .tile-caption small { font-family: var(--sans); letter-spacing: 0; font-size: 0.85rem; }
.tile-caption strong { font-size: clamp(1.3rem, 1.9vw, 1.7rem); font-weight: 600; line-height: 1.15; color: #fff; letter-spacing: -0.01em; }
.tile-caption span { font-size: 0.92rem; color: #c4cbd6; max-width: 320px; }
.tile-tall { height: clamp(360px, 40vw, 500px); }

/* ---------- Sector list (home) ---------- */
.sector-list { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line); }
.sector-list a { display: flex; justify-content: space-between; gap: 10px; padding: 16px 18px; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 500; font-size: 0.95rem; transition: background 0.2s; }
.sector-list a:hover { background: var(--paper); }
.sector-list a span { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.sector-list b { font-weight: 500; }

/* ---------- Inner page hero ---------- */
.page-hero { position: relative; overflow: hidden; padding: calc(var(--header-h) + clamp(44px, 6vw, 76px)) 0 clamp(32px, 4.5vw, 52px); border-bottom: 1px solid var(--line); }
.page-hero .container { position: relative; display: grid; gap: 14px; }
.page-hero h1 { font-size: clamp(2.1rem, 3.8vw, 3.3rem); max-width: 20ch; }
.page-hero .container > * { animation: rise 0.8s var(--ease) both; }
.page-hero .container > *:nth-child(2) { animation-delay: 0.08s; }
.page-hero .container > *:nth-child(3) { animation-delay: 0.16s; }

/* ---------- Services ---------- */
.group + .group { margin-top: clamp(44px, 6vw, 72px); }
.svc-list { border-top: 1px solid var(--line-strong); }
.svc { display: grid; grid-template-columns: 52px minmax(220px, 1fr) 1.15fr; gap: 6px 28px; align-items: baseline; padding: 20px 12px; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 24px); transition: background 0.3s; }
.svc .n { font-family: var(--mono); font-size: 0.78rem; color: var(--gold-ink); }
.svc .what { display: grid; gap: 4px; }
.svc .what p { color: var(--muted); font-size: 0.95rem; }
.svc .tags { font-family: var(--mono); font-size: 0.78rem; color: var(--text); letter-spacing: 0.01em; line-height: 1.7; }
html[lang="ar"] .svc .tags { font-family: var(--sans); font-size: 0.9rem; }
.svc:target, .svc.is-target { background: var(--paper); box-shadow: inset 3px 0 0 var(--gold); }
[dir="rtl"] .svc:target, [dir="rtl"] .svc.is-target { box-shadow: inset -3px 0 0 var(--gold); }

/* ---------- Industries ---------- */
.ind-grid { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line); }
.ind { display: grid; gap: 8px; align-content: start; min-height: 180px; padding: 22px 20px 26px; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background 0.2s; }
.ind:hover { background: var(--paper); }
.ind .code { font-family: var(--mono); font-size: 0.74rem; color: var(--gold-ink); margin-bottom: 14px; direction: ltr; text-align: start; }
.ind p { font-size: 0.9rem; color: var(--muted); }

/* ---------- About ---------- */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.prose { display: grid; gap: 16px; max-width: 560px; }
.prose p { font-size: 1.05rem; }
.prose .strong { color: var(--ink); font-weight: 500; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 28px; }
.step { display: grid; gap: 8px; align-content: start; padding-top: 18px; border-top: 1px solid var(--line-strong); position: relative; }
.step::before { content: ""; position: absolute; top: -1px; inset-inline-start: 0; width: 36px; height: 2px; background: var(--gold); }
.step .n { font-family: var(--mono); font-size: 0.74rem; color: var(--gold-ink); }
.step p { font-size: 0.93rem; color: var(--muted); }
.step .out { justify-self: start; margin-top: 6px; padding: 3px 8px; border: 1px solid var(--line-strong); font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
html[lang="ar"] .step .out { font-family: var(--sans); letter-spacing: 0; font-size: 0.8rem; }

.team { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line); }
.member { display: grid; grid-template-columns: 44px 1fr; gap: 4px 16px; align-items: start; padding: 22px 22px 24px; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.member .code { grid-row: span 2; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--gold); font-family: var(--mono); font-size: 0.78rem; font-weight: 500; color: var(--ink); direction: ltr; }
.member p { font-size: 0.9rem; color: var(--muted); }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: start; padding: calc(var(--header-h) + clamp(44px, 6vw, 72px)) 0 clamp(56px, 7vw, 88px); }
.contact-info { display: grid; gap: 18px; align-content: start; }
.contact-info h1 { font-size: clamp(2.1rem, 3.6vw, 3.1rem); }
.details { display: grid; margin-top: 10px; border-top: 1px solid var(--line-strong); }
.details div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.details dt { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
html[lang="ar"] .details dt { font-family: var(--sans); letter-spacing: 0; font-size: 0.85rem; }
.details dd { margin: 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.details a:hover { color: var(--gold-ink); }
.details a[href^="tel"] { direction: ltr; unicode-bidi: isolate; }

.form-card { display: grid; gap: 22px; padding: clamp(22px, 3.5vw, 40px); border: 1px solid var(--line-strong); background: var(--paper); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 7px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 0.84rem; font-weight: 500; color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: #fbfaf7;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-inline-end: 40px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230A1729' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 12px 8px;
  background-position: right 14px center;
}
[dir="rtl"] .field select { background-position: left 14px center; }
.field input::placeholder, .field textarea::placeholder { color: #9aa3b0; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ink); background: #fff; box-shadow: 0 0 0 3px rgba(200, 163, 90, 0.25); }
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: 0.84rem; color: var(--muted); margin-top: 10px; }
.form-status { margin-top: 14px; padding: 10px 12px; border-inline-start: 3px solid var(--gold); background: var(--bg); color: var(--ink); font-size: 0.9rem; overflow-wrap: anywhere; user-select: all; }

/* ---------- Policy pages ---------- */
.policy { display: grid; max-width: 980px; }
.policy-item { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 8px 48px; padding: 24px 0; border-top: 1px solid var(--line); }
.policy-item:last-child { border-bottom: 1px solid var(--line); }
.policy-item h2 { font-size: 1.05rem; letter-spacing: 0; }
.policy-text { display: grid; gap: 12px; max-width: 640px; }
.policy-text p { color: var(--text); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--on-navy); padding: clamp(52px, 7vw, 84px) 0 26px; }
.footer-cta { display: grid; grid-template-columns: 1fr auto; gap: 20px 40px; align-items: end; padding-bottom: clamp(36px, 5vw, 52px); border-bottom: 1px solid rgba(242, 237, 226, 0.12); }
.footer-cta h2 { color: #fff; }
.footer-cta p { margin-top: 10px; max-width: 560px; }
html[data-route="contact"] .footer-cta { display: none; }
html[data-route="contact"] .footer-cols { padding-top: 0; }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-top: 40px; }
.site-footer .brand { color: var(--ivory); }
.site-footer .brand-sub { color: var(--gold); }
.footer-about { display: grid; gap: 16px; align-content: start; }
.footer-about p { max-width: 300px; font-size: 0.92rem; }
.footer-title { margin-bottom: 14px; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); }
html[lang="ar"] .footer-title { font-family: var(--sans); letter-spacing: 0; font-size: 0.85rem; }
.footer-links { display: grid; gap: 9px; }
.footer-links a { width: fit-content; font-size: 0.93rem; transition: color 0.2s; overflow-wrap: anywhere; }
.footer-links a:hover { color: #fff; }
.footer-links a[href^="tel"] { direction: ltr; unicode-bidi: isolate; }
/* Opacity on the whole word (not the colour) so overlapping strokes don't look brighter */
.footer-giant { margin-top: clamp(40px, 6vw, 72px); color: var(--gold); opacity: 0.13; direction: ltr; }
.footer-giant .wordmark { width: 100%; height: auto; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(242, 237, 226, 0.12); font-size: 0.8rem; }
.footer-bottom a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(200, 163, 90, 0.6); }
.footer-bottom a:hover { color: #fff; }

/* ---------- Reveal on scroll ---------- */
html.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: var(--d, 0s); }
html.js .reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav-links {
    position: fixed;
    top: var(--header-h);
    inset-inline: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px var(--gutter) 32px;
    background: var(--bg);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  /* A backdrop-filter on the header would trap the fixed menu panel inside it */
  body.nav-open .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg); border-bottom-color: var(--line); }
  .nav-links a { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 1.35rem; color: var(--ink); }
  .nav-links a.active { color: var(--gold-ink); }
  .nav-links a.active::after { display: none; }
  .nav-links .mobile-only { display: inline-flex; margin-top: 24px; padding: 14px 20px; border-bottom: 0; font-size: 1rem; color: #fff; }
  .menu-toggle { display: block; }
  .desktop-cta { display: none; }

  .hero-blueprint { left: 36%; opacity: 0.55; }
  [dir="rtl"] .hero-blueprint { left: var(--gutter); right: 36%; }
  .hero-rail { grid-template-columns: repeat(2, 1fr); }
  .hero-rail > div:nth-child(3) { padding-inline-start: 0; border-inline-start: 0; }
  .hero-rail > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .sec-head { grid-template-columns: 1fr; }
  .sec-head .label { padding-top: 0; }
  .finder { grid-template-columns: 1fr; }
  .finder-list { grid-template-columns: 1fr 1fr; border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .finder-list button:nth-child(odd) { border-inline-end: 1px solid var(--line); }
  .finder-list button:nth-last-child(2) { border-bottom: 0; }
  .sector-list, .ind-grid { grid-template-columns: repeat(2, 1fr); }
  .svc { grid-template-columns: 44px 1fr; }
  .svc .tags { grid-column: 2; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .team { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .brand .mark { width: 30px; height: 30px; }
  .brand-word .wordmark { height: 12px; }
  .hero { min-height: auto; padding-top: calc(var(--header-h) + 56px); }
  .hero-blueprint, [dir="rtl"] .hero-blueprint { left: 0; right: 0; top: calc(var(--header-h) + 6px); bottom: auto; height: 46vh; opacity: 0.22; }
  .rail-text { display: none; }
  .split, .contact, .gallery { grid-template-columns: 1fr; }
  .tile, .tile-tall { height: 260px; }
  .finder-list button { padding: 12px 14px; font-size: 0.9rem; gap: 10px; }
  .sector-list, .ind-grid, .steps, .team { grid-template-columns: 1fr; }
  .ind { min-height: 0; }
  .ind .code { margin-bottom: 4px; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-cta { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
  .details div { grid-template-columns: 90px 1fr; }
  .policy-item { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html.js .reveal { opacity: 1; transform: none; }
}
