/* ==========================================================================
   Systems Solutions — site styles
   Uses logical properties throughout so the Arabic (RTL) layout mirrors itself.
   ========================================================================== */

:root {
  /* Ink (dark surfaces) */
  --ink: #0a0f1d;
  --ink-2: #10172b;
  --ink-3: #18203a;
  --on-ink: #f3f4f8;
  --on-ink-2: #aeb4c6;
  --on-ink-3: #7f879e;
  --ink-line: rgba(255, 255, 255, 0.09);

  /* Paper (light surfaces) */
  --paper: #f5f3ee;
  --surface: #ffffff;
  --text: #0d1222;
  --text-2: #464c60;
  --text-3: #676c80;
  --line: #e4e1d9;
  --line-2: #d4d0c5;

  /* Brand */
  --red: #d62d2a;
  --red-600: #b92320;
  --red-700: #9c1c1a;
  --red-bright: #ff6b5e;
  --red-soft: #fbe9e7;
  --ok: #4ade80;
  --info: #7cc4ff;

  /* Chart series — validated for CVD separation against #fff */
  --s1: #2a4db3;
  --s2: #d62d2a;
  --s3: #e3a21a;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(13, 18, 34, 0.05);
  --shadow: 0 1px 2px rgba(13, 18, 34, 0.04), 0 12px 32px -12px rgba(13, 18, 34, 0.14);

  --font-display: "Readex Pro", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

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

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
  background: var(--ink);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

[dir="rtl"] body { line-height: 1.8; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
[dir="rtl"] :is(h1, h2, h3, h4) { letter-spacing: 0; line-height: 1.4; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }

.icon {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}
[dir="rtl"] .flip { transform: scaleX(-1); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 6px; }
:is(.site-header, .hero, .approach, .site-footer, .quote-card, .careers) :focus-visible { outline-color: var(--red-bright); }

.skip-link {
  position: fixed; inset-inline-start: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 10px; background: var(--surface); color: var(--text);
  font-weight: 600; text-decoration: none; transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

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

/* ---------- Type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2);
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--red); }
.eyebrow-dark { color: var(--on-ink-2); }
.eyebrow-light { color: rgba(255, 255, 255, 0.85); }
.eyebrow-light::before { background: #fff; }
[dir="rtl"] .eyebrow { font-family: var(--font-body); letter-spacing: 0; font-size: 15px; font-weight: 600; }

.h2 { font-size: clamp(2rem, 1.35rem + 2.4vw, 3.25rem); line-height: 1.06; letter-spacing: -0.032em; text-wrap: balance; }
[dir="rtl"] .h2 { line-height: 1.35; letter-spacing: 0; }
.h3 { font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.9rem); letter-spacing: -0.025em; }
.lead { font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); color: var(--text-2); text-wrap: pretty; }

.section { padding-block: clamp(80px, 10vw, 136px); }
.section-head { max-width: 780px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head .h2 + .lead { margin-top: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 24px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15.5px; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.btn .icon { width: 18px; height: 18px; transition: transform 0.2s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
[dir="rtl"] .btn:hover .icon.flip { transform: scaleX(-1) translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 42px; padding: 8px 18px; font-size: 14.5px; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-600); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.22); color: var(--on-ink); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.4); }
.btn-light { background: #fff; color: var(--red-700); }
.btn-light:hover { background: #fff3f1; }

.link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  font-weight: 600; font-size: 15px; color: var(--red-600); text-decoration: none;
}
.link .icon { width: 16px; height: 16px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 50;
  background: rgba(10, 15, 29, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  color: var(--on-ink);
  transition: border-color 0.3s, background-color 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--ink-line); background: rgba(10, 15, 29, 0.88); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand img { width: 42px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.brand-tag { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--on-ink-3); margin-top: 4px; }
[dir="rtl"] .brand-name { font-size: 18px; letter-spacing: 0; }
[dir="rtl"] .brand-tag { font-family: var(--font-body); font-size: 12px; letter-spacing: 0; text-transform: none; margin-top: 2px; }

.nav { margin-inline: auto; }
.nav ul { display: flex; gap: 4px; }
.nav a {
  display: block; padding: 8px 14px; border-radius: 999px;
  font-size: 15px; font-weight: 500; color: var(--on-ink-2); text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.nav a.is-active { color: #fff; }
.nav a.is-active::after {
  content: ""; display: block; height: 2px; width: 14px; margin: 3px auto -5px; border-radius: 2px; background: var(--red);
}

.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 14px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.16); background: transparent;
  color: var(--on-ink); font-size: 14.5px; font-weight: 500; cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.lang-btn:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.3); }
.lang-btn .icon { width: 17px; height: 17px; }
.lang-btn [lang="ar"], .lang-btn:lang(ar) span { font-family: "IBM Plex Sans Arabic", var(--font-body); }

.menu-btn {
  display: none; width: 44px; height: 44px; place-items: center; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16); background: transparent; color: #fff; cursor: pointer;
}
.menu-btn .icon-close { display: none; }
.menu-btn[aria-expanded="true"] .icon-open { display: none; }
.menu-btn[aria-expanded="true"] .icon-close { display: block; }

.site-header.menu-open { background: var(--ink); }
.mobile-menu {
  border-top: 1px solid var(--ink-line);
  padding: 12px var(--gutter) 32px;
  height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); overflow-y: auto;
  display: flex; flex-direction: column;
}
.mobile-menu ul { display: grid; }
.mobile-menu li a {
  display: block; padding: 14px 4px; border-bottom: 1px solid var(--ink-line);
  font-family: var(--font-display); font-size: 22px; font-weight: 500; text-decoration: none; color: var(--on-ink);
}
.mobile-menu-foot { display: flex; gap: 12px; flex-wrap: wrap; margin-top: auto; padding-top: 24px; }
.mobile-menu-foot .btn { flex: 1 1 auto; }

@media (max-width: 1100px) {
  .nav, .header-actions > .lang-btn, .header-cta { display: none; }
  .menu-btn { display: grid; }
  .header-actions { margin-inline-start: auto; }
}
@media (min-width: 1101px) { .mobile-menu { display: none !important; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--ink); color: var(--on-ink);
  padding-block: calc(var(--header-h) + clamp(48px, 7vw, 96px)) clamp(140px, 15vw, 190px);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(var(--ink-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 65% 35%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 75% 65% at 65% 35%, #000 20%, transparent 75%);
  opacity: 0.7;
}
.hero::after {
  content: ""; position: absolute; z-index: -1;
  width: min(900px, 90vw); aspect-ratio: 1; inset-inline-end: -18%; top: -12%;
  background: radial-gradient(closest-side, rgba(214, 45, 42, 0.26), rgba(214, 45, 42, 0.06) 55%, transparent);
}

.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(40px, 5vw, 80px); align-items: center;
}

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 12px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.04);
  font-size: 14px; font-weight: 500; color: var(--on-ink-2);
}
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--red-bright); }
.pulse::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1.5px solid var(--red-bright); opacity: 0; animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse { 0% { transform: scale(0.6); opacity: 0.8; } 100% { transform: scale(1.8); opacity: 0; } }

.hero h1 {
  margin-block: 26px 22px;
  font-size: clamp(2.7rem, 1.2rem + 5vw, 5.1rem);
  line-height: 1.0; letter-spacing: -0.042em; font-weight: 600;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--red-bright); white-space: nowrap; }
[dir="rtl"] .hero h1 { line-height: 1.3; letter-spacing: 0; font-size: clamp(2.5rem, 1.2rem + 4.4vw, 4.6rem); }

.hero-lead { max-width: 34em; font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.22rem); color: var(--on-ink-2); text-wrap: pretty; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* Terminal */
.hero-visual { position: relative; }
.term {
  position: relative;
  background: linear-gradient(180deg, #131b33 0%, #0c1224 100%);
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 18px;
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono); font-size: 13.5px; line-height: 1.85; color: #cdd3e4;
  text-align: left; overflow: hidden;
}
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); background: rgba(255, 255, 255, 0.02); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2a3350; }
.term-bar i:first-child { background: var(--red); }
.term-title { margin-inline: auto; padding-inline-end: 40px; font-size: 12px; color: #6f7894; }
.term-body { padding: 20px 22px 24px; }
.t-line { white-space: pre; min-height: 1.85em; }
.t-gap { min-height: 0.9em; }
.t-p { color: var(--red-bright); }
.t-dim { color: #6f7894; }
.t-c { color: #fff; }
.t-row { display: grid; grid-template-columns: 1.45fr 1fr 0.95fr; gap: 12px; white-space: nowrap; }
.t-row > span { overflow: hidden; text-overflow: ellipsis; }
.t-head { color: #6f7894; font-size: 11.5px; letter-spacing: 0.08em; }
.t-ok { color: var(--ok); }
.t-info { color: var(--info); }
.t-cursor { display: inline-block; width: 8px; height: 1.05em; vertical-align: -2px; background: var(--red-bright); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.js .term.is-typing .t-hide { visibility: hidden; }

/* Trust row */
.trust {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px 28px;
  margin-top: clamp(56px, 7vw, 88px); padding-top: 28px; border-top: 1px solid var(--ink-line);
}
.trust-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-ink-3); }
[dir="rtl"] .trust-label { font-family: var(--font-body); letter-spacing: 0; font-size: 14px; }
.trust-list { display: flex; flex-wrap: wrap; gap: 10px 32px; }
.trust-list li { font-family: var(--font-display); font-weight: 500; font-size: 17px; color: var(--on-ink-2); letter-spacing: -0.01em; }
[dir="rtl"] .trust-list li { letter-spacing: 0; }

/* ---------- Stats ---------- */
.stats-wrap { position: relative; z-index: 2; margin-top: clamp(-100px, -8vw, -80px); }
.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.stat { padding: clamp(24px, 3vw, 36px); display: flex; flex-direction: column; gap: 10px; }
.stat + .stat { border-inline-start: 1px solid var(--line); }
.stat-num {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(2.4rem, 1.8rem + 2vw, 3.4rem);
  line-height: 1; letter-spacing: -0.04em; color: var(--text); font-variant-numeric: tabular-nums;
}
[dir="rtl"] .stat-num { letter-spacing: 0; line-height: 1.2; }
.stat-suffix { color: var(--red); }
.stat:first-child .stat-num { color: var(--red); }
.stat-label { font-size: 15px; line-height: 1.5; color: var(--text-2); max-width: 22ch; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(40px, 7vw, 112px); align-items: start; }
.about-copy .h2 { margin-bottom: 24px; }
.about-copy .lead { margin-bottom: 18px; }
.about-copy p:not(.lead):not(.eyebrow) { color: var(--text-2); }
.values { border-top: 1px solid var(--line-2); margin-top: 8px; }
.value { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding-block: 26px; border-bottom: 1px solid var(--line-2); }
.value-num { font-family: var(--font-mono); font-size: 13px; color: var(--red); padding-top: 5px; }
.value h3 { font-size: 1.3rem; margin-bottom: 6px; }
.value p { color: var(--text-2); font-size: 16px; }

/* ---------- Services ---------- */
.services { background: var(--surface); }
.units { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.unit {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: clamp(26px, 3vw, 36px); border-radius: var(--radius-lg);
  background: var(--paper); border: 1px solid var(--line);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}
.unit:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.unit-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.unit-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--ink); color: #fff; }
.unit-icon .icon { width: 26px; height: 26px; }
.unit:nth-child(2) .unit-icon { background: var(--red); }
.unit-num { font-family: var(--font-mono); font-size: 13px; color: var(--text-3); }
.unit h3 { font-size: 1.6rem; }
.unit > p { color: var(--text-2); font-size: 16px; }
.ticks { display: grid; gap: 10px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line-2); }
.ticks li { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; }
.ticks .icon { width: 16px; height: 16px; color: var(--red); stroke-width: 2.4; }

.caps-head { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 24px; align-items: end; margin-top: clamp(72px, 8vw, 112px); margin-bottom: 32px; }
.caps-head p { color: var(--text-2); max-width: 52ch; justify-self: end; }
.caps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.cap { padding: 30px 28px 34px 0; border-bottom: 1px solid var(--line-2); }
.cap:not(:nth-child(3n + 1)) { padding-inline-start: 28px; border-inline-start: 1px solid var(--line-2); }
[dir="rtl"] .cap { padding: 30px 0 34px 28px; }
[dir="rtl"] .cap:not(:nth-child(3n + 1)) { padding-inline-start: 28px; }
.cap .icon { width: 24px; height: 24px; color: var(--red); margin-bottom: 18px; }
.cap h4 { font-size: 1.15rem; margin-bottom: 8px; }
.cap p { color: var(--text-2); font-size: 15.5px; }

/* ---------- Sectors ---------- */
.sectors-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 24px; align-items: stretch; }

.sector-tabs {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 32px); min-width: 0;
}
.tabs {
  display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none; max-width: 100%;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 1 0 auto; padding: 10px 18px; border: 0; border-radius: 999px; background: transparent;
  font-size: 15px; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--ink); color: #fff; }

.tab-panel { padding-top: clamp(28px, 3vw, 40px); }
.tab-panel:focus-visible { outline-offset: 6px; }
.tab-panel:not([hidden]) { animation: fadeUp 0.4s var(--ease); }
.panel-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--red-soft); color: var(--red); margin-bottom: 20px; }
.panel-icon .icon { width: 24px; height: 24px; }
.panel-text { font-family: var(--font-display); font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem); line-height: 1.3; letter-spacing: -0.02em; max-width: 30ch; margin-bottom: 26px; text-wrap: balance; }
[dir="rtl"] .panel-text { letter-spacing: 0; line-height: 1.6; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
  font-size: 14.5px; font-weight: 500; color: var(--text);
}

/* Portfolio mix chart */
.mix-card {
  position: relative; margin: 0; display: flex; flex-direction: column; gap: 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 32px);
}
.mix-card h3 { font-size: 1.2rem; }
.mix-card figcaption p { color: var(--text-2); font-size: 15px; margin-top: 4px; }
.mix-bar { display: flex; gap: 2px; height: 24px; }
.mix-seg {
  width: var(--w); background: var(--c); cursor: default;
  transition: opacity 0.2s, filter 0.2s;
}
.mix-seg:first-child { border-start-start-radius: 4px; border-end-start-radius: 4px; }
.mix-seg:last-child { border-start-end-radius: 4px; border-end-end-radius: 4px; }
.mix-bar:hover .mix-seg:not(:hover) { opacity: 0.35; }
.js .mix-seg { transform-origin: left; transform: scaleX(0); transition: transform 0.9s var(--ease), opacity 0.2s; }
[dir="rtl"] .js .mix-seg { transform-origin: right; }
.js .mix-card.in .mix-seg { transform: scaleX(1); }
.js .mix-card.in .mix-seg:nth-child(2) { transition-delay: 0.08s, 0s; }
.js .mix-card.in .mix-seg:nth-child(3) { transition-delay: 0.16s, 0s; }
.mix-legend { display: grid; gap: 0; margin-top: auto; }
.mix-legend li { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 12px; padding-block: 14px; border-top: 1px solid var(--line); font-size: 15px; color: var(--text-2); }
.mix-legend strong { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--text); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sw { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.mix-tip {
  position: absolute; z-index: 5; pointer-events: none; transform: translate(-50%, calc(-100% - 10px));
  padding: 8px 12px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 13.5px; white-space: nowrap;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.4);
}
.mix-tip strong { font-family: var(--font-display); margin-inline-start: 8px; }

/* ---------- Approach ---------- */
.approach { background: var(--ink); color: var(--on-ink); position: relative; overflow: hidden; isolation: isolate; }
.approach::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
.approach .lead { color: var(--on-ink-2); }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: step; }
.step { position: relative; padding-top: 36px; padding-inline-end: 28px; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.step::before {
  content: ""; position: absolute; top: -6px; inset-inline-start: 0;
  width: 11px; height: 11px; border-radius: 50%; background: var(--ink); border: 2px solid var(--red-bright);
}
.step:first-child::before { background: var(--red-bright); }
.step-num { display: block; font-family: var(--font-mono); font-size: 13px; color: var(--red-bright); margin-bottom: 16px; }
.step h3 { font-size: 1.3rem; margin-bottom: 12px; }
.step p { color: var(--on-ink-2); font-size: 15.5px; }

/* ---------- Clients ---------- */
.clients { background: var(--surface); }
.clients-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.clients-copy .h2 { margin-bottom: 20px; }
.q-tabs { display: grid; margin-top: 36px; border-top: 1px solid var(--line); }
.q-tab {
  position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  width: 100%; padding: 18px 4px; border: 0; border-bottom: 1px solid var(--line); background: none;
  text-align: start; cursor: pointer; color: var(--text-3); transition: color 0.2s;
}
.q-tab:hover { color: var(--text); }
.q-tab-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; letter-spacing: -0.01em; }
[dir="rtl"] .q-tab-name { letter-spacing: 0; }
.q-tab-sector { font-size: 13.5px; }
.q-tab[aria-selected="true"] { color: var(--text); }
.q-tab[aria-selected="true"] .q-tab-sector { color: var(--text-2); }
.q-progress { position: absolute; inset-inline-start: 0; bottom: -1px; height: 2px; width: 0; background: var(--red); }
.q-tab[aria-selected="true"] .q-progress { width: 100%; }
.q-tabs.is-auto .q-tab[aria-selected="true"] .q-progress { animation: progress var(--q-dur, 7s) linear forwards; }
.q-tabs.is-paused .q-tab[aria-selected="true"] .q-progress { animation-play-state: paused; }
@keyframes progress { from { width: 0; } to { width: 100%; } }

.quote-card {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--ink); color: var(--on-ink); border-radius: 28px;
  padding: clamp(32px, 5vw, 64px); min-height: 440px; display: flex; flex-direction: column;
}
.quote-card::after {
  content: ""; position: absolute; z-index: -1; width: 480px; aspect-ratio: 1; inset-inline-end: -160px; bottom: -220px;
  background: radial-gradient(closest-side, rgba(214, 45, 42, 0.35), transparent);
}
.quote-mark { width: 44px; height: 44px; color: var(--red-bright); margin-bottom: 28px; }
.q-panel { margin: 0; display: flex; flex-direction: column; gap: 32px; flex: 1; }
.q-panel:not([hidden]) { animation: fadeUp 0.5s var(--ease); }
.q-panel blockquote {
  margin: 0; font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 2rem); line-height: 1.32; letter-spacing: -0.02em; text-wrap: pretty;
}
[dir="rtl"] .q-panel blockquote { letter-spacing: 0; line-height: 1.7; }
.q-panel figcaption { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 24px; border-top: 1px solid var(--ink-line); }
.q-panel figcaption strong { font-weight: 600; }
.q-panel figcaption span { color: var(--on-ink-3); font-size: 14.5px; }

/* ---------- Careers ---------- */
.careers-section { padding-bottom: 0; }
.careers {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 40px; align-items: end;
  padding: clamp(32px, 5vw, 64px); border-radius: 28px; background: var(--red-600); color: #fff;
}
.careers::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 100% 0%, #000, transparent 70%);
          mask-image: radial-gradient(ellipse 70% 90% at 100% 0%, #000, transparent 70%);
}
[dir="rtl"] .careers::before {
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 0% 0%, #000, transparent 70%);
          mask-image: radial-gradient(ellipse 70% 90% at 0% 0%, #000, transparent 70%);
}
.careers .h2 { margin-bottom: 18px; }
.careers-copy p:not(.eyebrow) { font-size: 1.1rem; color: rgba(255, 255, 255, 0.9); max-width: 46ch; }
.careers-side { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.chips-light li { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.28); color: #fff; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact-copy .h2 { margin-bottom: 20px; }
.contact-list { display: grid; gap: 4px; margin-top: 40px; }
.contact-list li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding-block: 20px; border-top: 1px solid var(--line-2); }
.c-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--red); }
.contact-list h3 { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
[dir="rtl"] .contact-list h3 { font-family: var(--font-body); font-size: 14px; letter-spacing: 0; }
.contact-list address { font-size: 16px; line-height: 1.6; }
.c-value { font-family: var(--font-display); font-size: 1.2rem; font-weight: 500; text-decoration: none; unicode-bidi: isolate; }
[dir="rtl"] .c-value { display: inline-block; }
.c-value:hover { color: var(--red-600); }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 44px); box-shadow: var(--shadow); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 18px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 14.5px; font-weight: 600; }
.field .opt { color: var(--text-3); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--surface); font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.55; }
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23464c60' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-inline-end: 44px;
}
[dir="rtl"] .field select { background-position: left 14px center; }
.field input::placeholder, .field textarea::placeholder { color: #9a9eae; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #b9b4a6; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 4px rgba(214, 45, 42, 0.14); }
.field.has-error input, .field.has-error textarea { border-color: var(--red); }
.field-error { font-size: 13.5px; color: var(--red-600); min-height: 0; }
.field-error:empty { display: none; }
.form-foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 4px; }
.form-note { flex: 1 1 220px; font-size: 13.5px; color: var(--text-3); }
.form-status:empty { display: none; }
.form-status { padding: 14px 16px; border-radius: 12px; background: #ecf8ef; color: #14532d; font-size: 15px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-ink-2); padding-top: clamp(64px, 8vw, 96px); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 0.7fr)) minmax(0, 1fr); gap: 40px; padding-bottom: 56px; }
.footer-brand .brand { color: var(--on-ink); margin-bottom: 20px; }
.footer-brand p { font-size: 15px; max-width: 42ch; }
.social { display: flex; gap: 8px; margin-top: 24px; }
.social a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--ink-line); color: var(--on-ink-2); transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}
.social a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.2); }
.social .icon { width: 18px; height: 18px; }
.footer-col h2 { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-ink-3); margin-bottom: 18px; }
[dir="rtl"] .footer-col h2 { font-family: var(--font-body); font-size: 14px; letter-spacing: 0; }
.footer-col ul { display: grid; gap: 10px; font-size: 15px; }
.footer-col a { text-decoration: none; }
.footer-col a:hover { color: #fff; }
.footer-col [dir="ltr"] { unicode-bidi: isolate; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 24px 32px; border-top: 1px solid var(--ink-line); font-size: 14px; color: var(--on-ink-3); }
.footer-bottom-actions { display: flex; align-items: center; gap: 16px; }
.lang-btn-quiet { min-height: 36px; padding: 6px 12px; font-size: 13.5px; color: var(--on-ink-2); }
.to-top { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--on-ink-2); }
.to-top:hover { color: #fff; }
.to-top .icon { width: 16px; height: 16px; }

/* ---------- Motion ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .mix-seg { transform: none; }
  .pulse::after, .t-cursor { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 640px; }
  .units { grid-template-columns: 1fr; }
  .unit { display: grid; grid-template-columns: auto 1fr; column-gap: 24px; }
  .unit-top { grid-row: span 3; flex-direction: column; gap: 12px; margin-bottom: 0; }
  .unit > * { grid-column: 2; }
  .unit > .unit-top { grid-column: 1; }
  .unit-num { display: none; }
  .ticks { grid-template-columns: repeat(3, auto); justify-content: start; gap: 10px 24px; }
  .caps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cap, [dir="rtl"] .cap { padding: 28px 24px 30px 0; }
  [dir="rtl"] .cap { padding: 28px 0 30px 24px; }
  .cap:not(:nth-child(3n + 1)) { padding-inline-start: 0; border-inline-start: 0; }
  .cap:nth-child(2n) { padding-inline-start: 24px; border-inline-start: 1px solid var(--line-2); }
  [dir="rtl"] .cap:not(:nth-child(3n + 1)) { padding-inline-start: 0; }
  [dir="rtl"] .cap:nth-child(2n) { padding-inline-start: 24px; }
  .sectors-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .clients-grid, .contact-grid, .about-grid { grid-template-columns: 1fr; }
  .careers { grid-template-columns: 1fr; align-items: start; }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-inline-start: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .caps-head { grid-template-columns: 1fr; }
  .caps-head p { justify-self: start; }
  .unit { display: flex; }
  .unit-top { flex-direction: row; margin-bottom: 8px; }
  .ticks { grid-template-columns: 1fr; }
  .term { font-size: 12px; }
  .term-body { padding: 16px; }
  .term-title { display: none; }
  .t-row { gap: 8px; }
  .quote-card { min-height: 0; }
  .q-tab { flex-direction: column; gap: 2px; }
  .form { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .caps { grid-template-columns: 1fr; }
  .cap, .cap:nth-child(2n), [dir="rtl"] .cap, [dir="rtl"] .cap:nth-child(2n) { padding-inline: 0; border-inline-start: 0; }
  .steps { grid-template-columns: 1fr; row-gap: 40px; }
  .stat { padding: 20px; }
  .stat-label { font-size: 14px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .trust { gap: 12px; }
  .trust-list { gap: 6px 20px; }
  .trust-list li { font-size: 15px; }
  .t-row { grid-template-columns: 1.35fr 1fr 0.95fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .tabs { flex-wrap: wrap; border-radius: 20px; }
  .tab { flex: 1 1 auto; }
}
