/* ============================================================================
   KASCOM — Design System
   Premium, restrained, bilingual (LTR/RTL). Layout uses CSS logical properties
   so Arabic mirrors automatically. No gold, no green.
   ========================================================================== */

/* ---------- Fonts: IBM Plex Sans + IBM Plex Sans Arabic (C3, approved 2026-11-13) ----------
   Self-hosted woff2 subsets from @fontsource/ibm-plex-sans@5.3.0 and @fontsource/ibm-plex-sans-arabic@5.3.0
   (SIL OFL 1.1, assets/fonts/OFL.txt). Latin subset of Plex Sans + Arabic subset of Plex Sans Arabic only;
   unicode-range from the packages, so a page downloads a file only for the script and weight it renders. */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1; }

/* ---------- Tokens ---------- */
:root {
  /* Brand (from the real logo) */
  --navy:        #03346F;
  --navy-deep:   #022A5C;
  --blue:        #0C76C8;
  --blue-mid:    #054B8F;
  --tint:        #EAF2FB;
  --tint-2:      #F4F8FD;
  --on-dark:     #8FC2EE;   /* eyebrows, numerals and focus rings on navy surfaces */

  /* Neutrals */
  --ink:         #0E1B2C;
  --body:        #41506A;
  --muted:       #5A6880;   /* darkened for WCAG AA: 5.25:1 on white, 4.93:1 on --tint-2 */
  --line:        #E3EAF3;
  --line-strong: #D2DEEC;
  --white:       #FFFFFF;
  --near-white:  #FBFCFE;

  /* Type — APPROVED system */
  /* One family per script; every stack lists the other script next, so no glyph falls back to a system font */
  --font-display: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif; /* EN headings */
  --font-latin:   "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif; /* EN body/UI */
  --font-ar:      "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif; /* Arabic everything */
  --font-mono:    "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif; /* numerals/eyebrows (tabular where numbers align) */
  --font: var(--font-latin);

  /* Approved fluid scale (min → max) */
  --step--1: clamp(0.75rem, 0.71rem + 0.18vw, 0.8125rem);  /* 12–13  small / eyebrow */
  --step-0:  clamp(1rem, 0.97rem + 0.12vw, 1.0625rem);     /* 16–17  body */
  --step-1:  clamp(1.125rem, 1.07rem + 0.27vw, 1.25rem);   /* 18–20  lead */
  --step-2:  clamp(1.375rem, 1.25rem + 0.6vw, 1.625rem);   /* 22–26  H4/card */
  --step-3:  clamp(2rem, 1.55rem + 2vw, 3.25rem);          /* 32–52  H2 */
  --step-4:  clamp(2.5rem, 1.9rem + 2.9vw, 4.5rem);        /* 40–72  H1 */
  --step-5:  clamp(3rem, 1.9rem + 5.2vw, 6rem);            /* 48–96  display */
  --step-h3: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem);       /* 24–36  H3 */

  /* Space */
  --gap: clamp(1rem, 0.8rem + 1vw, 1.6rem);
  --section-y: clamp(5rem, 3rem + 7vw, 10rem);   /* 80 → 160px */
  --container: 1440px;
  --container-narrow: 880px;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 26px;

  --shadow-sm: 0 1px 2px rgba(3, 52, 111, .05), 0 4px 14px rgba(3, 52, 111, .05);
  --shadow:    0 10px 40px -12px rgba(3, 52, 111, .18);
  --shadow-lg: 0 30px 70px -28px rgba(3, 52, 111, .32);

  --ease: cubic-bezier(.22, .61, .36, 1);
  --t: .45s var(--ease);

  /* Theme roles (S15). In light each equals the value it replaced, so the light theme is unchanged.
     --navy, --navy-deep and --blue-mid stay brand constants for the navy bands in both themes;
     text and rules that were navy or blue-mid read these roles instead. */
  --page:          #FFFFFF;                  /* page background */
  --accent:        var(--navy);              /* navy text, icons and rules on light surfaces */
  --link:          var(--blue-mid);          /* eyebrows, text links, client names */
  --btn-bg:        var(--navy);              /* primary button fill */
  --focus:         var(--blue);              /* focus rings and focused field borders */
  --control-line:  var(--line-strong);       /* field, ghost-button and toggle outlines */
  --header-bg:     rgba(255,255,255,.82);
  --logo-tile:     #FFFFFF;                  /* client-logo cells: always a light tile */
  --error:         #B23B3B;
  --error-bg:      #FCEEEE;
  --error-field:   #FFF8F8;
  --switch-bg:     var(--tint-2);            /* theme switch: pill and raised active segment */
  --switch-on:     #FFFFFF;
  color-scheme: light;
}

/* ---------- Dark theme (S15) ----------
   Set by the inline script in <head> as data-theme="dark" (system preference or the visitor's choice).
   Screen only: print always uses the light tokens and the colour logo. Contrast values are checked
   per page by `node verify-site.js --render`. */
@media screen {
  [data-theme="dark"] {
    color-scheme: dark;
    --page:        #0B1220;
    --white:       #111B2E;                  /* cards and panels */
    --near-white:  #0E1728;                  /* field surfaces */
    --tint:        #16233A;
    --tint-2:      #132036;                  /* tinted sections, footer */
    --line:        #22324D;
    --line-strong: #2C3F5E;
    --ink:         #EEF3FA;
    --body:        #C3CEDD;
    --muted:       #93A1B5;
    --blue:        #5EA8EA;                  /* accents: numerals, rules, required marks */
    --accent:      #8FC2EE;
    --link:        #5EA8EA;
    --btn-bg:      #0C76C8;                  /* white label 4.77:1; navy would vanish on near-black */
    --focus:       var(--on-dark);
    --control-line: #60769A;                 /* >= 3:1 against every dark surface (SC 1.4.11) */
    --header-bg:   rgba(11,18,32,.84);
    --logo-tile:   #F4F8FD;
    --error:       #FF8F8F;
    --error-bg:    #3A1A22;
    --error-field: #24141C;
    --switch-bg:   var(--near-white);
    --switch-on:   #1C2C47;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.28), 0 4px 14px rgba(0,0,0,.18);
    --shadow:    0 10px 40px -12px rgba(0,0,0,.5);
    --shadow-lg: 0 30px 70px -28px rgba(0,0,0,.6);
  }
  [data-theme="dark"] .logo--light { display: none; }
  [data-theme="dark"] .logo--dark { display: block; }
  /* Navy bands keep their navy; a hairline keeps the full-width KPI band apart from the near-black page */
  [data-theme="dark"] .kpi-band { box-shadow: inset 0 1px 0 var(--line), inset 0 -1px 0 var(--line); }
  /* Client logos are never inverted or recoloured: each sits on its own light tile */
  [data-theme="dark"] .partners-wall { background: transparent; border: 0; border-radius: 0; gap: .75rem; overflow: visible; }
  [data-theme="dark"] .partner-cell { box-shadow: none; border-radius: var(--radius-sm); }
  [data-theme="dark"] .partner-cell:hover { background: #FFFFFF; }
}
/* Theme change: a short colour cross-fade, added by site.js for 300 ms, and only without reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after {
    transition: background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease !important;
  }
}

/* ---------- 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; } }

body {
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;                 /* English body 1.65 */
  font-weight: 400;
  color: var(--body);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
[lang="ar"] body, [dir="rtl"] body { font-family: var(--font-ar); line-height: 1.85; font-weight: 400; } /* Arabic body 1.85 */

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

/* Headings — IBM Plex Sans (EN), IBM Plex Sans Arabic (AR). Display weight 500, H3/H4 600. */
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.1; font-weight: 500; letter-spacing: -.02em; }
h3, h4 { font-weight: 600; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { font-family: var(--font-ar); letter-spacing: 0; line-height: 1.3; font-weight: 700; }
[dir="rtl"] h3, [dir="rtl"] h4 { font-weight: 600; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
/* Focus ring on navy surfaces: --blue is only 2.57:1 there, below the 3:1 floor of SC 1.4.11 */
.cta-band :focus-visible, .svc-cta-card :focus-visible, .kpi-band :focus-visible,
.svc-hero :focus-visible, .pstage.active:focus-visible, .pstage.active :focus-visible { outline-color: var(--on-dark); }

.noscript-banner {
  background: var(--navy); color: #fff; text-align: center;
  padding: .9rem 1rem; font-size: var(--step--1);
}

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.1rem, 0.6rem + 2vw, 2.2rem); }
.section { padding-block: var(--section-y); }
.section--tint { background: var(--tint-2); }
.section--flush-top { padding-block-start: clamp(2rem, 1rem + 3vw, 3.5rem); }
.measure { max-width: 62ch; }
.center { text-align: center; margin-inline: auto; }

.skip-link {
  position: absolute; inset-inline-start: 1rem; inset-block-start: -100px;
  background: var(--navy); color: #fff; padding: .7rem 1.1rem; border-radius: 8px; z-index: 200;
  transition: inset-block-start .2s var(--ease);
}
.skip-link:focus { inset-block-start: 1rem; }

/* ---------- Eyebrow + section heads ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-mono);
  font-size: var(--step--1); font-weight: 600; letter-spacing: .15em; text-transform: uppercase;
  color: var(--link);                /* AA at 12-13px on white AND on --tint-2 */
}
[dir="rtl"] .eyebrow { font-family: var(--font-ar); letter-spacing: 0; text-transform: none; font-weight: 600; }
.eyebrow::before { content: ""; inline-size: 26px; block-size: 2px; background: var(--blue); opacity: .65; } /* decorative rule keeps the brighter blue */

.section-head { max-width: 64ch; margin-block-end: clamp(2rem, 1.4rem + 2vw, 3.4rem); }
.section-head.center { margin-inline: auto; }
.section-head h2 { font-size: var(--step-3); margin-block: .7rem .4rem; }
.section-head p { color: var(--muted); font-size: var(--step-1); font-weight: 400; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--btn-bg); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  background: var(--bg); color: var(--fg);
  padding: .95rem 1.7rem; border-radius: 100px;
  font-weight: 600; font-size: var(--step-0); letter-spacing: -.01em;
  transition: transform var(--t), box-shadow var(--t), background var(--t), color var(--t);
  box-shadow: var(--shadow-sm); white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
[dir="rtl"] .btn .arrow { transform: scaleX(-1); }
[dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translateX(4px); }
.btn--ghost { --bg: transparent; --fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--control-line); }
.btn--ghost:hover { --fg: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.btn--on-dark { --bg: #fff; --fg: var(--navy); }
.btn--lg { padding: 1.1rem 2.1rem; }

.textlink {
  display: inline-flex; align-items: center; gap: .45rem;
  color: var(--link); font-weight: 600;
  border-block-end: 1.5px solid transparent; transition: border-color var(--t), gap var(--t), color var(--t);
}
.textlink:hover { border-color: currentColor; gap: .7rem; color: var(--blue); }
[dir="rtl"] .textlink .arrow { transform: scaleX(-1); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; inset-block-start: 0; z-index: 100;
  background: var(--header-bg); backdrop-filter: saturate(1.4) blur(14px);
  border-block-end: 1px solid transparent; transition: border-color var(--t), background var(--t), box-shadow var(--t);
}
.site-header.scrolled { border-block-end-color: var(--line); box-shadow: 0 6px 24px -18px rgba(3,52,111,.4); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-block-size: 76px; }
.brand { display: inline-flex; align-items: center; }
.logo--dark { display: none; }   /* white logo: dark theme only, see the dark block */
.brand img { block-size: clamp(30px, 2.2vw + 22px, 40px); inline-size: auto; }
/* Header mark (S16): the full letterhead lockup (12:1) where it fits beside the nav, the logo-only
   elsewhere. It fits next to the full nav from 1400px, and again at 720-860px where the nav is the
   menu button; 861-1399px and phones get the logo-only. One mark is display:none at any width.
   Never mirrored: in Arabic it simply sits at the inline-start (right), like the logo. */
.brand-lockup, .brand-mark { display: inline-flex; align-items: center; }
.brand-lockup { display: none; }
.brand .brand-lockup img { block-size: clamp(40px, 40px + (100vw - 1400px) / 10, 44px); }
@media (min-width: 1400px), (min-width: 720px) and (max-width: 860px) {
  .brand-lockup { display: inline-flex; }
  .brand-mark { display: none; }
}
@media print {
  .brand-lockup { display: inline-flex; }
  .brand-mark { display: none; }
}

.nav { display: flex; align-items: center; gap: clamp(.4rem, 1.5vw, 1.6rem); }
.nav-list { display: flex; align-items: center; gap: clamp(.2rem, 1vw, 1rem); }
.nav-link {
  position: relative; padding: .55rem .65rem; font-weight: 500; font-size: var(--step-0); color: var(--ink);
  border-radius: 8px; transition: color var(--t);
}
.nav-link::after {
  content: ""; position: absolute; inset-block-end: .15rem; inset-inline: .65rem;
  block-size: 2px; background: var(--blue); transform: scaleX(0); transform-origin: inline-start;
  transition: transform .3s var(--ease);
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--accent); }
.nav-link[aria-current="page"]::after, .nav-link:hover::after { transform: scaleX(1); }

/* Services dropdown */
.has-dropdown { position: relative; }
.dropdown-toggle { display: inline-flex; align-items: center; gap: .35rem; font: inherit; }
.has-dropdown::after { content: ""; position: absolute; inset-inline: 0; inset-block-start: 100%; block-size: .6rem; }
.dropdown-toggle .chev { transition: transform .3s var(--ease); inline-size: 12px; }
.has-dropdown:hover .dropdown-toggle .chev, .has-dropdown.is-open .dropdown-toggle .chev { transform: rotate(180deg); }
.dropdown {
  position: absolute; inset-block-start: calc(100% + .4rem); inset-inline-start: 0;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: .5rem; min-inline-size: 280px;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .28s var(--ease); z-index: 50;
}
.has-dropdown:hover .dropdown, .has-dropdown.is-open .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { display: block; padding: .7rem .85rem; border-radius: 8px; color: var(--ink); font-weight: 500; transition: background var(--t), color var(--t); }
.dropdown a small { display: block; color: var(--muted); font-weight: 400; font-size: var(--step--1); margin-block-start: .1rem; }
.dropdown a:hover { background: var(--tint); color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: .7rem; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .9rem;
  border-radius: 100px; box-shadow: inset 0 0 0 1.5px var(--control-line);
  font-weight: 600; font-size: var(--step--1); color: var(--ink); transition: box-shadow var(--t), color var(--t);
}
.lang-toggle:hover { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
.header-cta { display: inline-flex; }

/* Theme switch (S15): segmented pill — System / Light / Dark. The active segment follows
   html[data-theme-pref], which the head script sets before first paint. Hidden without JS. */
.theme-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--switch-bg); }
.theme-switch button {
  display: grid; place-items: center; inline-size: 32px; block-size: 32px; border-radius: 7px;
  border: 1px solid transparent; color: var(--muted); transition: background-color var(--t), color var(--t), border-color var(--t);
}
.theme-switch button svg { inline-size: 16px; block-size: 16px; }
.theme-switch button:hover { color: var(--ink); }
.theme-switch button:focus-visible { outline-offset: 1px; }
[data-theme-pref="system"] .theme-switch [data-theme-value="system"],
[data-theme-pref="light"] .theme-switch [data-theme-value="light"],
[data-theme-pref="dark"] .theme-switch [data-theme-value="dark"] {
  background: var(--switch-on); color: var(--ink); border-color: var(--control-line); box-shadow: var(--shadow-sm);
}
html:not([data-theme]) .theme-switch, html:not([data-theme]) .m-theme { display: none; }
.m-theme { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .9rem; border-block-end: 1px solid var(--line); }
.mobile-nav .m-theme .m-label { margin: 0; }

.menu-toggle { display: none; inline-size: 44px; block-size: 44px; align-items: center; justify-content: center; border-radius: 10px; box-shadow: inset 0 0 0 1.5px var(--control-line); }
.menu-toggle span { position: relative; inline-size: 18px; block-size: 2px; background: var(--ink); transition: background .2s; }
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; inset-inline: 0; block-size: 2px; background: var(--ink); transition: transform .3s var(--ease), top .3s var(--ease); }
.menu-toggle span::before { inset-block-start: -6px; }
.menu-toggle span::after { inset-block-start: 6px; }
body.menu-open .menu-toggle span { background: transparent; }
body.menu-open .menu-toggle span::before { transform: rotate(45deg); inset-block-start: 0; }
body.menu-open .menu-toggle span::after { transform: rotate(-45deg); inset-block-start: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(3.5rem, 2rem + 8vw, 8rem); overflow: clip; }
.hero--home { background:
    radial-gradient(120% 100% at 85% 0%, var(--tint) 0%, rgba(234,242,251,0) 55%),
    linear-gradient(180deg, var(--near-white), var(--page) 60%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: center; }
.hero-eyebrow { margin-block-end: 1.4rem; }
.hero h1 { font-size: var(--step-5); font-weight: 500; letter-spacing: -.02em; }
[dir="rtl"] .hero h1 { letter-spacing: 0; }
.hero .lede { font-size: var(--step-1); color: var(--body); margin-block: 1.6rem 2.3rem; max-width: 54ch; font-weight: 400; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }

.hero-visual { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.hero-visual .media-placeholder { position: absolute; inset: 0; }

/* Full-bleed home hero — used when content.js sets home.hero.image; the split layout above is the no-photo fallback.
   min-block-size is fixed before the photo loads, and the navy ground keeps the white copy readable meanwhile. */
.hero--bleed { min-block-size: clamp(560px, 82vh, 860px); display: grid; align-items: end; padding-block: 0; color: #fff; background: var(--navy); isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; object-position: center 55%; }
.hero--bleed::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(3,52,111,.82), rgba(3,52,111,.55) 45%, rgba(3,52,111,.25)); } /* brand navy, never black */
.hero--bleed .hero-copy { position: relative; z-index: 0; max-inline-size: 44rem; padding-block: clamp(4rem, 10vh, 7rem); }
/* The photo has pure-white light strips: under the gradient alone they leave white text at 2.2:1. This soft navy
   panel travels with the copy (any width, LTR or RTL) and holds the worst pixel above 4.5:1. */
.hero--bleed .hero-copy::before { content: ""; position: absolute; inset: 0 -5rem; z-index: -1; background: rgba(3,52,111,.75); filter: blur(44px); }
.hero--bleed .hero-eyebrow { color: rgba(255,255,255,.85); } /* .7 measured below 4.5:1 over the light strips */
.hero--bleed .hero-eyebrow::before { background: #fff; opacity: .7; }
.hero--bleed h1 { color: #fff; }
.hero--bleed .lede { color: rgba(255,255,255,.85); }
.btn--ghost-on-dark { --fg: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.8); }
.btn--ghost-on-dark:hover { --bg: rgba(255,255,255,.14); --fg: #fff; box-shadow: inset 0 0 0 1.5px #fff; }
@media (max-width: 720px) {
  .hero--bleed { min-block-size: 78vh; }
  .hero--bleed::after { background: linear-gradient(to top, rgba(3,52,111,.9), rgba(3,52,111,.55) 45%, rgba(3,52,111,.25)); }
  .hero--bleed .hero-actions { flex-direction: column; }
}

/* Inner-page hero */
.page-hero { background: linear-gradient(180deg, var(--tint-2), var(--page)); padding-block: clamp(3rem, 2rem + 5vw, 6rem) clamp(2rem, 1.4rem + 2vw, 3.2rem); border-block-end: 1px solid var(--line); }
.page-hero h1 { font-size: var(--step-4); margin-block: 1rem .6rem; max-width: 18ch; }
.page-hero .lede { font-size: var(--step-1); color: var(--muted); max-width: 60ch; font-weight: 400; }
.page-hero-media { position: relative; margin-block-start: clamp(1.8rem, 1.2rem + 2vw, 3rem); aspect-ratio: 21 / 9; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
@media (max-width: 560px) { .page-hero-media { aspect-ratio: 16 / 10; } }

/* ---------- Media placeholder (swappable) ---------- */
.media-placeholder {
  position: relative; display: grid; place-items: center; inline-size: 100%; block-size: 100%;
  min-block-size: 200px; background:
    radial-gradient(140% 120% at 80% 0%, var(--blue-mid) 0%, rgba(5,75,143,0) 50%),
    linear-gradient(150deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: rgba(255,255,255,.92); overflow: hidden; isolation: isolate;
}
.media-placeholder::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .12;
  background-image: url("../logo/kascom-k-mark-white.png");   /* 5 KB white silhouette, was a 3 MB PNG */
  background-repeat: no-repeat; background-position: center; background-size: 46%;
}
.media-placeholder .ph-label {
  font-size: var(--step--1); letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.7); font-weight: 600;
}
[dir="rtl"] .media-placeholder .ph-label { letter-spacing: .04em; }

/* ---------- Intro / split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
.split--reverse .split-media { order: -1; }
.split-media { position: relative; aspect-ratio: 5 / 4; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.split-media--portrait { aspect-ratio: 4 / 5; inline-size: min(100%, 460px); justify-self: center; }
/* photos (tools/make-photo.js) fill their slot — the slot's aspect-ratio does the cropping */
.split-media img, .svc-hero-media img, .page-hero-media img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
.prose p + p { margin-block-start: 1.1rem; }
.prose p { color: var(--body); }
.intro-actions { margin-block-start: 2rem; display: flex; flex-wrap: wrap; gap: .8rem 2rem; }

/* ---------- Services grid ---------- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: clamp(1rem, .6rem + 1.4vw, 1.6rem); }
.service-card {
  position: relative; display: flex; flex-direction: column; gap: .9rem;
  padding: clamp(1.6rem, 1.2rem + 1vw, 2.2rem); background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.service-card::before {
  content: ""; position: absolute; inset-block-start: 0; inset-inline-start: 0; inline-size: 100%; block-size: 3px;
  background: linear-gradient(90deg, var(--blue), var(--navy)); transform: scaleX(0); transform-origin: inline-start; transition: transform .4s var(--ease);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.service-card:hover::before { transform: scaleX(1); }
.service-num { font-family: var(--font-mono); font-size: var(--step--1); font-weight: 600; color: var(--blue); letter-spacing: .1em; }
.service-card h3 { font-size: var(--step-2); }
.service-card p { color: var(--muted); flex: 1; }
.service-card .textlink { margin-block-start: .4rem; }
.service-icon { inline-size: 46px; block-size: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--tint); color: var(--accent); }
.service-icon svg { inline-size: 24px; block-size: 24px; }

/* ---------- KPI band ---------- */
.kpi-band { background: linear-gradient(135deg, var(--navy), var(--navy-deep)); color: #fff; position: relative; overflow: hidden; }
.kpi-band::before { content: ""; position: absolute; inset-block-start: -40%; inset-inline-end: -10%; inline-size: 60%; block-size: 180%; background: radial-gradient(circle, rgba(12,118,200,.35), transparent 60%); }
/* Blueprint grid (C1, approved 2026-11-13): navy bands only — KPI band and the dark CTA bands, never
   the footer. Decorative layer behind content: z-index -1 inside an isolated band, no pointer events.
   24px minor / 120px major lines, white at 5% / 9%, fading out from top to bottom. Same in EN and AR. */
.kpi-band, .cta-band, .svc-cta-card { isolation: isolate; }
.kpi-band::after, .cta-band::after, .svc-cta-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  -webkit-mask-image: linear-gradient(#000, transparent);
          mask-image: linear-gradient(#000, transparent);
}
/* Outline numerals (C2, approved 2026-11-13): service pages only, behind each section head at the far
   inline end; centred above the head in the centred "Why it matters" block. aria-hidden in the markup. */
.has-numeral { position: relative; isolation: isolate; }
.section-head.has-numeral { max-width: none; } /* head spans the container so the numeral clears the heading */
.section-head.has-numeral > h2, .section-head.has-numeral > p { max-width: 64ch; }
.numeral-outline {
  position: absolute; z-index: -1; inset-block-start: -.5em; inset-inline-end: 0;
  font-family: var(--font-mono); font-weight: 600; font-size: clamp(6rem, 4rem + 10vw, 13rem); line-height: .8;
  color: transparent; -webkit-text-stroke: 1.5px rgba(12,118,200,.26);
  pointer-events: none; user-select: none;
}
.why-block .numeral-outline { inset-inline: 0; inset-block-start: -.78em; text-align: center; }
/* intro column of a split: half width, so the wider Plex h2 reaches the numeral — sit it higher (S9) */
.split > .has-numeral > .numeral-outline { inset-block-start: -.75em; }
.kpi-head { position: relative; }
.kpi-head .eyebrow { color: var(--on-dark); }
.kpi-head .eyebrow::before { background: var(--on-dark); opacity: 1; }
.kpi-head h2 { color: #fff; font-size: var(--step-3); margin-block-start: .6rem; }
.kpi-grid { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 1.5rem; margin-block-start: clamp(2rem, 1.4rem + 2vw, 3.2rem); }
.kpi { padding-block: 1rem; border-inline-start: 2px solid rgba(255,255,255,.18); padding-inline-start: 1.4rem; }
.kpi .num { font-family: var(--font-mono); font-size: clamp(2.4rem, 1.7rem + 2.6vw, 3.4rem); font-weight: 600; line-height: 1; letter-spacing: -.03em; color: #fff; font-variant-numeric: tabular-nums; }
.kpi .lbl { margin-block-start: .7rem; color: rgba(255,255,255,.78); font-size: var(--step-0); }

/* ---------- Partners wall ---------- */
.partners-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--logo-tile); }
.partner-cell {
  display: grid; place-items: center; text-align: center; gap: .5rem;
  background: var(--logo-tile); padding: clamp(1.5rem, 1rem + 1.5vw, 2.3rem) 1.2rem; min-block-size: 120px;
  transition: background var(--t), color var(--t);
}
.partner-cell { box-shadow: inset -1px -1px 0 var(--line); }
.partner-cell:hover { background: var(--tint-2); }
.partner-cell .pn { font-weight: 600; color: var(--navy); font-size: var(--step-0); line-height: 1.3; letter-spacing: -.01em; }
[dir="rtl"] .partner-cell .pn { letter-spacing: 0; }
.partner-cell img { max-block-size: 42px; inline-size: auto; opacity: .85; }

/* ---------- Fact rows: key-value pairs on hairlines — no box, no shadow ---------- */
.facts { --facts-label: 11rem; margin: 0; border-block: 2px solid var(--accent); }
.facts > div { display: grid; grid-template-columns: var(--facts-label) 1fr; gap: 1rem; padding-block: .6rem; border-block-start: 1px solid var(--line-strong); }
.facts > div:first-child { border-block-start: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (max-width: 560px) { .facts { --facts-label: 7.5rem; } }

/* ---------- Documented projects: client, title, fact rows ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(2rem, 1.4rem + 2vw, 3rem) clamp(1.6rem, 1rem + 2vw, 2.8rem); }
.project-fact { display: flex; flex-direction: column; gap: .5rem; }
.project-client { color: var(--link); font-weight: 600; font-size: var(--step-0); line-height: 1.4; }
.project-fact h3 { font-size: var(--step-1); line-height: 1.3; margin-block-end: .7rem; }
[dir="rtl"] .project-fact h3 { line-height: 1.6; }
.project-fact .facts { --facts-label: 7rem; margin-block-start: auto; font-size: var(--step-0); } /* auto: rows line up across a grid row */

/* ---------- Credentials: issuer + certificate name on a navy top rule — no box, no scan ---------- */
.split--top { align-items: start; }
.cred-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem) clamp(1.4rem, 1rem + 1.6vw, 2.4rem); }
.cred { display: flex; flex-direction: column; gap: .35rem; padding-block-start: .9rem; border-block-start: 2px solid var(--accent); }
.cred-issuer { color: var(--muted); font-size: var(--step--1); font-weight: 600; line-height: 1.5; }
.cred-name { color: var(--ink); font-weight: 600; font-size: var(--step-0); line-height: 1.45; }
#credentials { scroll-margin-block-start: 76px; } /* sticky header height */
.note-strip { display: flex; gap: .7rem; align-items: flex-start; padding: 1rem 1.2rem; background: var(--tint); border-radius: var(--radius-sm); color: var(--link); font-size: var(--step-0); margin-block-end: 2.2rem; }
.note-strip svg { flex-shrink: 0; inline-size: 20px; block-size: 20px; margin-block-start: .15rem; }

/* ---------- Service detail page ---------- */
.svc-note { display: inline-flex; align-items: center; gap: .6rem; margin-block-start: 1.5rem; padding: .6rem 1rem; border-radius: 100px; background: var(--tint); color: var(--link); font-weight: 600; font-size: var(--step--1); }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: clamp(1rem, .6rem + 1.4vw, 1.6rem); }
.feature {
  padding: clamp(1.4rem, 1rem + 1vw, 1.9rem); border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); transition: border-color var(--t), box-shadow var(--t);
}
.feature:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.feature .fnum { font-family: var(--font-mono); font-size: var(--step--1); font-weight: 600; color: var(--blue); }
.feature h3 { font-size: var(--step-1); margin-block: .6rem .5rem; }
.feature p { color: var(--muted); font-size: var(--step-0); }


/* ============================================================================
   SERVICE PAGE v2 — mandatory 8-section pattern
   ========================================================================== */
.eyebrow--on-dark { color: var(--on-dark); }
.eyebrow--on-dark::before { background: var(--on-dark); opacity: 1; }
.svc-h2 { font-size: var(--step-3); margin-block: .8rem 1.3rem; max-width: 20ch; }

/* 01 — full-bleed hero with title overlay */
.svc-hero { position: relative; min-block-size: clamp(420px, 66vh, 680px); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.svc-hero-media { position: absolute; inset: 0; z-index: -2; }
.svc-hero-media .media-placeholder { position: absolute; inset: 0; }
.svc-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(2,42,92,.15) 0%, rgba(2,42,92,.35) 45%, rgba(2,30,70,.85) 100%); }
.svc-hero .container { padding-block: clamp(2.5rem, 2rem + 4vw, 5rem); }
.svc-hero-eyebrow { color: var(--on-dark); }
.svc-hero-eyebrow::before { background: var(--on-dark); opacity: 1; }
.svc-hero h1 { color: #fff; font-size: var(--step-4); margin-block: 1rem .6rem; max-width: 16ch; }
.svc-hero-tagline { color: rgba(255,255,255,.82); font-size: var(--step-1); max-width: 46ch; }

/* 03 — navy CTA card */
.svc-cta-card {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem 2.5rem; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--blue-mid), var(--navy)); color: #fff;
  border-radius: var(--radius-lg); padding: clamp(2rem, 1.4rem + 3vw, 3.4rem); position: relative; overflow: hidden;
}
.svc-cta-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 130% at 100% 0%, rgba(12,118,200,.5), transparent 60%); }
.svc-cta-card > * { position: relative; }
.svc-cta-card h2 { color: #fff; font-size: var(--step-2); margin-block: .5rem .4rem; max-width: 20ch; }
.svc-cta-card p { color: rgba(255,255,255,.82); max-width: 42ch; }


/* 06 — horizontal process accordion, built as a DISCLOSURE set
   (button + sibling panel), not a tablist with no tabpanel. */
.process-accordion { display: flex; gap: .7rem; }
.pstage-item {
  position: relative; flex: 0 0 clamp(96px, 12vw, 150px); min-block-size: 340px; overflow: hidden;
  border-radius: var(--radius); background: var(--tint); color: var(--ink); isolation: isolate;
  display: flex; flex-direction: column;
  transition: flex-basis .55s var(--ease), flex-grow .55s var(--ease), background .45s var(--ease), color .45s var(--ease);
}
.pstage-item.active { flex: 1 1 auto; background: linear-gradient(160deg, var(--navy), var(--navy-deep)); color: #fff; }
.pstage-item.active::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .1;
  background: url("../logo/kascom-k-mark-white.png") no-repeat center / 42%; }
.pstage {
  flex: 1; display: flex; flex-direction: column; gap: .8rem; align-items: flex-start;
  inline-size: 100%; text-align: start; color: inherit; cursor: pointer;
  padding: clamp(1.2rem, 1rem + 1vw, 1.8rem);
}
.pstage .pnum { font-family: var(--font-mono); font-size: var(--step-1); font-weight: 600; color: var(--blue); transition: color .45s; }
.pstage-item.active .pnum { color: var(--on-dark); }
.pstage .ptitle { font-family: var(--font-display); font-weight: 600; font-size: var(--step-2); line-height: 1.15; color: inherit; }
[dir="rtl"] .pstage .ptitle { font-family: var(--font-ar); }
.pstage-panel {
  padding: 0 clamp(1.2rem, 1rem + 1vw, 1.8rem) clamp(1.2rem, 1rem + 1vw, 1.8rem);
  color: rgba(255,255,255,.85); font-size: var(--step-0); max-width: 46ch;
  opacity: 0; transition: opacity .4s var(--ease) .12s;
}
.pstage-item.active .pstage-panel { opacity: 1; }
.pstage-item:not(.active) .pstage-panel { display: none; }
.pstage:focus-visible { outline: 2px solid var(--focus); outline-offset: -4px; }
.pstage-item.active .pstage:focus-visible { outline-color: var(--on-dark); }

/* 08 footer CTA reuses .cta-band; add eyebrow spacing */
.cta-band .eyebrow { margin-block-end: 1rem; }

@media (max-width: 860px) {
  .process-accordion { flex-direction: column; }
  .pstage-item { flex: none; min-block-size: 0; }
}

/* ---------- CTA band ---------- */
.cta-band { position: relative; background: linear-gradient(135deg, var(--blue-mid), var(--navy)); color: #fff; border-radius: var(--radius-lg); padding: clamp(2.6rem, 1.6rem + 4vw, 5rem); overflow: hidden; text-align: center; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 140% at 50% -20%, rgba(12,118,200,.55), transparent 60%); }
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; font-size: var(--step-3); max-width: 20ch; margin-inline: auto; }
.cta-band p { color: rgba(255,255,255,.85); max-width: 52ch; margin: 1rem auto 2rem; font-size: var(--step-1); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 1rem + 4vw, 4rem); align-items: start; }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.6rem, 1.1rem + 2vw, 2.6rem); box-shadow: var(--shadow-sm); }
.form-row { display: grid; gap: 1.2rem; }
@media (min-width: 600px) { .form-row.two { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: .45rem; margin-block-end: 1.2rem; }
.field label { font-weight: 600; font-size: var(--step--1); color: var(--ink); }
.field .req { color: var(--blue); }
.field input, .field select, .field textarea {
  inline-size: 100%; padding: .85rem 1rem; border: 1px solid var(--control-line); border-radius: 10px;
  background: var(--near-white); transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.field textarea { resize: vertical; min-block-size: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--focus); background: var(--white); box-shadow: 0 0 0 4px rgba(12,118,200,.12); }
.hp { position: absolute; inset-inline-start: -9999px; opacity: 0; }
.form-status { margin-block-start: 1rem; padding: .9rem 1.1rem; border-radius: 10px; font-size: var(--step-0); display: none; }
.form-status.show { display: block; }
.form-status.ok { background: var(--tint); color: var(--link); }
.form-status.err { background: var(--error-bg); color: var(--error); }

.contact-info { display: flex; flex-direction: column; gap: 1.6rem; }
.info-item { display: flex; gap: 1rem; align-items: flex-start; }
.info-item .ic { flex-shrink: 0; inline-size: 44px; block-size: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--tint); color: var(--accent); }
.info-item .ic svg { inline-size: 20px; block-size: 20px; }
.info-item .k { font-size: var(--step--1); color: var(--muted); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
[dir="rtl"] .info-item .k { letter-spacing: 0; }
.info-item .v { color: var(--ink); font-weight: 500; margin-block-start: .2rem; }
.info-item a.v:hover { color: var(--blue); }
/* phone numbers read left to right in Arabic too ("+966 11 …", not "… 11 966+") */
[dir="rtl"] a[href^="https://wa.me/"] { direction: ltr; unicode-bidi: isolate; }
.map-frame { margin-block-start: 1.6rem; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; }
.map-frame iframe { inline-size: 100%; block-size: 100%; border: 0; filter: grayscale(.2); }

/* ---------- Footer ---------- */
.site-footer { background: var(--tint-2); border-block-start: 1px solid var(--line); padding-block: clamp(3rem, 2rem + 3vw, 4.5rem) 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: clamp(1.6rem, 1rem + 2vw, 3rem); }
.footer-brand img { block-size: 38px; inline-size: auto; margin-block-end: 1.2rem; }
.footer-brand p { color: var(--muted); font-size: var(--step-0); max-width: 38ch; }
/* legal-name lines carry their own dir; fit-content keeps each box at the page's start edge */
.footer-brand p[dir] { inline-size: fit-content; }
.footer-col h4 { font-size: var(--step--1); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-block-end: 1.1rem; }
[dir="rtl"] .footer-col h4 { letter-spacing: 0; }
.footer-col ul { display: grid; gap: .7rem; }
.footer-col a, .footer-col .fitem { color: var(--body); transition: color var(--t); font-size: var(--step-0); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { margin-block-start: clamp(2.4rem, 1.6rem + 2vw, 3.4rem); border-block-start: 1px solid var(--line); padding-block: 1.6rem; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; align-items: center; justify-content: space-between; }
.footer-bottom p { font-size: var(--step--1); color: var(--muted); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .btn, .service-card { transition: none !important; }
}

/* ---------- Mobile menu + responsive ---------- */
.mobile-nav { display: none; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .split, .contact-grid { grid-template-columns: 1fr; }
  .split--reverse .split-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .header-cta, .header-actions .theme-switch { display: none; }
  .nav-list, .has-dropdown > .dropdown { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav { gap: .5rem; }

  .mobile-nav {
    display: block; position: fixed; inset-block-start: 0; inset-inline-end: 0; inset-block-end: 0;
    inline-size: min(86vw, 400px); background: var(--white); z-index: 150;
    box-shadow: var(--shadow-lg); padding: 5.5rem clamp(1.4rem, 1rem + 2vw, 2.2rem) 2rem;
    transform: translateX(100%); transition: transform .4s var(--ease); overflow-y: auto;
  }
  [dir="rtl"] .mobile-nav { transform: translateX(-100%); }
  body.menu-open .mobile-nav { transform: translateX(0); }
  .mobile-nav a { display: block; padding: .9rem 0; font-size: var(--step-1); font-weight: 600; color: var(--ink); border-block-end: 1px solid var(--line); }
  .mobile-nav .sub { padding-inline-start: 1rem; }
  .mobile-nav .sub a { font-size: var(--step-0); font-weight: 500; color: var(--body); }
  .mobile-nav .m-label { font-size: var(--step--1); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-block: 1.4rem .4rem; }
  /* the button is also an "a": undo the menu-link rules (ink text, block, no padding) that made it unreadable */
  .mobile-nav .btn { display: flex; color: var(--fg); padding: .95rem 1.7rem; font-size: var(--step-0); border-block-end: 0; margin-block-start: 1.5rem; inline-size: 100%; }
  .scrim { position: fixed; inset: 0; background: rgba(7,18,33,.45); z-index: 140; opacity: 0; visibility: hidden; transition: opacity .3s; }
  body.menu-open .scrim { opacity: 1; visibility: visible; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .kpi { border-inline-start: 0; border-block-start: 2px solid rgba(255,255,255,.18); padding-inline-start: 0; padding-block-start: 1rem; }
  .hero-actions .btn { flex: 1; }
}

/* ============================================================================
   PHASE 5 — components added for the four-service restructure
   ========================================================================== */

/* Sticky header offset so the skip link does not land under it (WCAG 2.4.1) */
#main { scroll-margin-block-start: 90px; }

/* ---------- Persistent "Book a Consultation" ---------- */
/* Desktop: it is the header CTA. Below 860px the header CTA is hidden, so the
   same action becomes a fixed pill that stays reachable at any scroll depth. */
.book-cta-fixed { display: none; }
@media (max-width: 860px) {
  .book-cta-fixed {
    display: inline-flex; position: fixed; z-index: 120;
    inset-block-end: 1rem; inset-inline: 1rem;
    justify-content: center; box-shadow: var(--shadow-lg);
  }
  body.menu-open .book-cta-fixed { display: none; }
  .site-footer { padding-block-end: 5rem; }
}

/* ---------- Split section head (h2 inline-start, link inline-end) ---------- */
.head-split {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem 2rem; flex-wrap: wrap;
  margin-block-end: clamp(1.6rem, 1.2rem + 1.5vw, 2.6rem);
}
.head-split h2 { font-size: var(--step-3); margin-block-start: .5rem; }

/* ---------- Services hub — full-width clickable panels ---------- */
.service-panels { display: grid; gap: clamp(1rem, .6rem + 1.4vw, 1.8rem); }
.service-panel {
  position: relative; display: grid; gap: clamp(1.2rem, .8rem + 2vw, 3rem);
  padding: clamp(1.4rem, 1rem + 1.5vw, 2.2rem);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; align-items: center; color: inherit;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.service-panel::before {
  content: ""; position: absolute; inset-block-start: 0; inset-inline-start: 0;
  inline-size: 100%; block-size: 3px; background: linear-gradient(90deg, var(--blue), var(--navy));
  transform: scaleX(0); transform-origin: inline-start; transition: transform .4s var(--ease);
}
.service-panel:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.service-panel:hover::before { transform: scaleX(1); }
.service-panel .sp-num { font-family: var(--font-mono); font-size: var(--step-1); font-weight: 600; color: var(--blue); letter-spacing: .1em; }
.service-panel h2 { font-size: var(--step-3); margin-block: .5rem .6rem; }
.service-panel .sp-headline { color: var(--ink); font-size: var(--step-1); font-weight: 500; margin-block-end: .5rem; }
.service-panel .sp-lede { color: var(--muted); }
.service-panel .sp-more { display: inline-flex; align-items: center; gap: .45rem; margin-block-start: 1.1rem; color: var(--link); font-weight: 600; }
.service-panel:hover .sp-more { gap: .7rem; }
[dir="rtl"] .service-panel .sp-more .arrow { transform: scaleX(-1); }
.sp-media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; position: relative; }
.sp-media .media-placeholder, .sp-media img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
@media (min-width: 981px) {
  .service-panel { grid-template-columns: .9fr 1.1fr; }
  .service-panel:nth-child(even) { grid-template-columns: 1.1fr .9fr; }
  .service-panel:nth-child(even) .sp-media { order: -1; }
}
@media (max-width: 980px) { .sp-media { aspect-ratio: 21 / 9; } }
@media (max-width: 560px) { .sp-media { aspect-ratio: 16 / 9; } }

/* ---------- "What we deliver" — a definition list, not a carousel ---------- */
.deliver-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: clamp(1.2rem, .8rem + 1.4vw, 2rem); margin: 0; }
.deliver-item { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; align-items: start; }
.deliver-item::before {
  content: ""; grid-row: 1 / span 2; inline-size: 8px; block-size: 8px; border-radius: 2px;
  background: var(--blue); margin-block-start: .55rem;
}
.deliver-item dt { font-size: var(--step-1); font-weight: 600; color: var(--ink); line-height: 1.35; }
.deliver-item dd { margin: 0; color: var(--muted); font-size: var(--step-0); }
@media (min-width: 1100px) { .deliver-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Why it matters ---------- */
.why-block { max-width: var(--container-narrow); margin-inline: auto; text-align: center; }
.why-block p { font-size: var(--step-1); color: var(--body); }
.why-block .eyebrow { justify-content: center; }

/* ---------- Other capabilities ---------- */
.capabilities-teaser { max-width: var(--container-narrow); margin-inline: auto; text-align: center; }
.capabilities-teaser h2 { font-size: var(--step-2); margin-block: .6rem .6rem; }
.capabilities-teaser p { color: var(--muted); }
.capabilities-teaser .eyebrow { justify-content: center; }
.capabilities-teaser .textlink { margin-block-start: 1.2rem; }
.capability-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: clamp(1rem, .6rem + 1.4vw, 1.6rem); }
@media (min-width: 900px) { .capability-grid { grid-template-columns: 1fr 1fr; } }
.capability-media { aspect-ratio: 16 / 11; position: relative; border-radius: var(--radius); overflow: hidden; margin-block-end: 1.1rem; }
.capability-media .media-placeholder, .capability-media img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }

/* ---------- Note pill on a dark surface ---------- */
.svc-note--on-dark { background: rgba(255,255,255,.14); color: #fff; }

/* ---------- Partner wall image sizing ---------- */
.partner-cell img { max-block-size: 42px; max-inline-size: 100%; inline-size: auto; block-size: auto; object-fit: contain; opacity: .85; }
.partner-cell:hover img { opacity: 1; }

/* ---------- Form validation ---------- */
.field-error { color: var(--error); font-size: var(--step--1); font-weight: 600; min-block-size: 0; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: var(--error); background: var(--error-field);
}
.field input[aria-invalid="true"]:focus, .field textarea[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(178,59,59,.12); }

/* ---------- Utilities replacing the old inline style attributes ---------- */
.mb-tight  { margin-block-end: 1.2rem; }
.mb-normal { margin-block-end: 1.4rem; }
.h-card    { font-size: var(--step-2); margin-block-end: 1.5rem; }
.h-section { font-size: var(--step-3); margin-block: .7rem 1.1rem; }
.statement { font-size: var(--step-1); color: var(--ink); margin-block-start: .9rem; }
.promise   { font-size: var(--step-3); color: var(--ink); font-weight: 700; letter-spacing: -.02em; margin-block-start: 1rem; }
[dir="rtl"] .promise { letter-spacing: 0; }
.narrow    { max-width: 780px; }
.center-flex { display: flex; justify-content: center; }
.btn-block { inline-size: 100%; }
.hse-mark {
  inline-size: min(100%, 300px); aspect-ratio: 1; border-radius: var(--radius-lg);
  display: grid; place-items: center; background: linear-gradient(150deg, var(--tint), var(--white));
  box-shadow: var(--shadow-sm); color: var(--accent);
}
.grid-center { display: grid; place-items: center; }

/* ---------- 404 ---------- */
.nf-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-block-start: 2rem; }

/* ---------- Closed mobile panel must not hold focus ---------- */
.mobile-nav[inert], .scrim[inert] { visibility: hidden; }

/* The full-bleed service hero is obviously an image slot; its placeholder label
   would collide with the H1 sitting over it. */
.svc-hero-media .ph-label { display: none; }

/* Logo wall: a fixed optical box so a square mark and a wide wordmark read at
   the same size. Overrides the earlier max-block-size-only rule. */
.partner-cell img {
  inline-size: 100%; max-inline-size: 150px;
  block-size: 52px; max-block-size: 52px;
  object-fit: contain; object-position: center;
  opacity: .9;
}
.partner-cell:hover img { opacity: 1; }
