/* ===== Khatib Digital — fonts, served from the site =====
   Space Grotesk for headings, Inter for text, Readex Pro for everything Arabic. */
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("fonts/space-grotesk-latin.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: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/inter-latin.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: "Readex Pro"; font-style: normal; font-weight: 160 700; font-display: swap;
  src: url("fonts/readex-pro-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-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;
}

/* ===== Brand tokens ===== */
:root {
  --paper: #F8FAFC;          /* Blueprint Off-White: page background */
  --white: #FFFFFF;          /* cards */
  --slate: #1E293B;          /* Architectural Slate */
  --charcoal: #0F172A;       /* Charcoal: text and dark sections */
  --amber: #D97706;          /* Safety Amber: primary buttons and highlights */
  --amber-dark: #B45309;     /* Amber for small text on light backgrounds */
  --amber-light: #F59E0B;    /* Amber on dark backgrounds */
  --amber-tint: #FEF3C7;
  --emerald: #059669;        /* Emerald: success, metrics, product badges */
  --emerald-dark: #047857;   /* Emerald for small text on light backgrounds */
  --emerald-tint: #D1FAE5;
  --muted: #475569;
  --faint: #64748B;
  --line: #E2E8F0;
  --line-strong: #CBD5E1;
  --dark-line: #334155;
  --grid: rgba(30, 41, 59, .05);        /* CAD grid, fine lines */
  --grid-major: rgba(30, 41, 59, .07);  /* CAD grid, every fifth line */
  --whatsapp: #25D366;
  --danger: #B91C1C;
  --radius: 4px;
  --shadow: 0 24px 48px -24px rgba(15, 23, 42, .28), 0 2px 6px rgba(15, 23, 42, .05);
  --max: 1200px;
  --header-h: 72px;
  --font-head: "Space Grotesk", "Readex Pro", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --font-body: "Inter", "Readex Pro", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--charcoal);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  /* The drawing sheet: fine grid lines with a heavier line every fifth */
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px), linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 200px 200px, 200px 200px, 40px 40px, 40px 40px;
  background-position: center top;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.025em; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { line-height: 1.4; letter-spacing: normal; }
h2, h3 { text-wrap: balance; }
p { margin: 0 0 1em; }
ul, ol, figure, fieldset { margin: 0; padding: 0; list-style: none; border: 0; min-width: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ===== Accessibility helpers ===== */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100;
  background: var(--charcoal); color: var(--white); font-weight: 600;
  padding: 10px 18px; border-radius: var(--radius); transition: top .15s ease;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--charcoal); outline-offset: 3px; border-radius: 2px; }
.contact :focus-visible, .footer :focus-visible { outline-color: var(--amber-light); }
main:focus { outline: none; }

/* ===== Layout ===== */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: 104px; }
.section--white { background: var(--white); border-block: 1px solid var(--line); }

/* Section label: the amber square from the logo, then small capitals */
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-head); font-size: .8rem; font-weight: 600; color: var(--amber-dark);
  margin: 0 0 16px;
}
.eyebrow::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 2px; background: var(--amber); }
.eyebrow--dark { color: var(--amber-light); }
[dir="ltr"] .eyebrow { text-transform: uppercase; letter-spacing: .14em; }
[dir="rtl"] .eyebrow { font-size: .95rem; }

.section-head { max-width: 700px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(1.85rem, 3.4vw, 2.7rem); }
.section-head > p:last-child { color: var(--muted); font-size: 1.1rem; margin: 0; }

/* Corner marks, as on a drawing sheet */
.path, .why__item, .pillars li, .form { position: relative; }
.path::before, .path::after, .why__item::before, .why__item::after, .form::before, .form::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none; transition: border-color .2s ease;
}
.path::before, .why__item::before, .form::before {
  top: -1px; inset-inline-start: -1px; border-top: 2px solid var(--charcoal); border-inline-start: 2px solid var(--charcoal);
}
.path::after, .why__item::after, .form::after {
  bottom: -1px; inset-inline-end: -1px; border-bottom: 2px solid var(--charcoal); border-inline-end: 2px solid var(--charcoal);
}

/* ===== Buttons, tags ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 11px 22px; border-radius: var(--radius);
  font-family: var(--font-head); font-weight: 600; font-size: .98rem; line-height: 1.2;
  border: 1.5px solid transparent; cursor: pointer; text-align: center;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn--lg { min-height: 54px; padding: 14px 26px; font-size: 1.03rem; }
/* Charcoal on Amber, like site signage: it reads clearly where white on Amber does not */
.btn--primary { background: var(--amber); color: var(--charcoal); box-shadow: 0 10px 22px -12px rgba(217, 119, 6, .9); }
.btn--primary:hover { background: var(--amber-light); }
.btn--outline { border-color: var(--slate); color: var(--charcoal); background: rgba(255, 255, 255, .6); }
.btn--outline:hover { background: var(--charcoal); border-color: var(--charcoal); color: var(--white); }
.btn--whatsapp { background: var(--whatsapp); color: var(--charcoal); }
.btn--whatsapp:hover { filter: brightness(.94); }
.btn svg { width: 19px; height: 19px; flex: none; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

.tag, .pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-head); font-size: .72rem; font-weight: 600; line-height: 1.2;
  padding: 5px 10px; border-radius: 3px; border: 1px solid; white-space: nowrap;
}
[dir="ltr"] .tag, [dir="ltr"] .pill { text-transform: uppercase; letter-spacing: .08em; }
[dir="rtl"] .tag, [dir="rtl"] .pill { font-size: .82rem; }
.tag--product { color: var(--emerald-dark); background: #ECFDF5; border-color: #A7F3D0; }
.tag--enterprise { color: var(--white); background: var(--slate); border-color: var(--slate); }
.pill { color: var(--muted); background: var(--white); border-color: var(--line-strong); }
.pill--ok { color: var(--emerald-dark); background: #ECFDF5; border-color: #A7F3D0; }
.pill--ok::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); }

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 250, 252, .88);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.header.is-scrolled { border-bottom-color: var(--line-strong); box-shadow: 0 10px 24px -18px rgba(15, 23, 42, .4); }
.header__inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-head); font-weight: 700; font-size: 1.16rem; white-space: nowrap; letter-spacing: -.02em; }
[dir="rtl"] .brand { letter-spacing: normal; }
.brand img { width: 38px; height: 38px; }
.brand__light { font-weight: 400; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.nav > a:not(.btn), .nav__toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .94rem; font-weight: 500; padding: 8px 12px; border-radius: var(--radius);
  color: var(--muted); background: none; border: 0; cursor: pointer;
  transition: color .15s, background-color .15s;
}
.nav > a:not(.btn):hover, .nav__toggle:hover, .nav__group:focus-within .nav__toggle { color: var(--charcoal); background: rgba(30, 41, 59, .06); }
.nav__toggle svg { width: 16px; height: 16px; transition: transform .2s ease; }
.nav__group { position: relative; }
.nav__menu {
  position: absolute; top: calc(100% + 10px); inset-inline-start: 0; z-index: 5; width: 290px; padding: 8px;
  background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow);
  visibility: hidden; opacity: 0; transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
/* A bridge so the pointer can travel from the button to the menu */
.nav__menu::before { content: ""; position: absolute; inset-inline: 0; top: -12px; height: 12px; }
.nav__group:hover .nav__menu, .nav__group:focus-within .nav__menu, .nav__group.is-open .nav__menu { visibility: visible; opacity: 1; transform: none; }
.nav__group:hover .nav__toggle svg, .nav__group.is-open .nav__toggle svg { transform: rotate(180deg); }
.nav__menu a { display: grid; padding: 10px 12px; border-radius: 3px; border-inline-start: 2px solid transparent; transition: background-color .15s, border-color .15s; }
.nav__menu a:hover, .nav__menu a:focus-visible { background: var(--paper); border-inline-start-color: var(--amber); }
.nav__menu b { font-family: var(--font-head); font-weight: 600; font-size: .96rem; }
.nav__menu small { color: var(--muted); font-size: .84rem; }
.nav__cta { display: none; }
.header__actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  display: inline-flex; align-items: center; min-height: 42px;
  font-size: .9rem; font-weight: 500; color: var(--charcoal);
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--white);
  padding: 7px 14px; transition: border-color .15s;
}
.lang-toggle:hover { border-color: var(--slate); }
.header .btn { min-height: 42px; padding: 9px 18px; font-size: .92rem; box-shadow: none; }
.menu-btn {
  display: none; place-items: center; width: 44px; height: 44px;
  background: none; border: 0; color: var(--charcoal); cursor: pointer; border-radius: var(--radius);
}
.menu-btn svg { width: 26px; height: 26px; }
.menu-btn__close { display: none; }
.menu-btn[aria-expanded="true"] .menu-btn__open { display: none; }
.menu-btn[aria-expanded="true"] .menu-btn__close { display: inline; }

/* ===== 1. Hero ===== */
.hero { padding-block: 80px 96px; }
.hero__inner { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr); gap: 60px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 4.1vw, 3.3rem); margin-block: 0 22px; letter-spacing: -.035em; }
[dir="rtl"] .hero h1 { letter-spacing: normal; font-size: clamp(2.1rem, 4vw, 3.2rem); }
/* A marker stroke under the key words, in the accent colour */
.nowrap { white-space: nowrap; }
.hl { background: linear-gradient(transparent 64%, rgba(217, 119, 6, .32) 64%, rgba(217, 119, 6, .32) 94%, transparent 94%); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero__sub { font-size: clamp(1.05rem, 1.5vw, 1.18rem); color: var(--muted); max-width: 560px; margin-bottom: 34px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }

/* Hero picture: drawing on the left, dashboard on the right, a handle between them */
.split figcaption { margin-top: 12px; font-size: .8rem; color: var(--faint); }
.split__stage {
  --split: .46;
  position: relative; overflow: hidden; border: 1px solid var(--slate); border-radius: 8px;
  background: var(--charcoal); box-shadow: var(--shadow);
}
.split__layer { display: grid; grid-template-rows: 46px auto 62px; }
.split__layer--plan {
  color: #CBD5E1;
  background-color: var(--charcoal);
  background-image: linear-gradient(rgba(148, 163, 184, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, .1) 1px, transparent 1px);
  background-size: 20px 20px;
}
.split__layer--ui {
  position: absolute; inset: 0; background: var(--white); color: var(--charcoal);
  clip-path: inset(0 0 0 calc(var(--split) * 100%));
}
.split__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-inline: 16px; min-width: 0; }
.split__layer--plan .split__bar { border-bottom: 1px solid rgba(148, 163, 184, .28); }
.split__layer--ui .split__bar { border-bottom: 1px solid var(--line); }
.split__bar--end { justify-content: flex-end; }
.split__bar b { font-family: var(--font-head); font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.split__tag { font-family: var(--font-head); font-size: .7rem; font-weight: 600; color: var(--amber-light); white-space: nowrap; }
[dir="ltr"] .split__tag { text-transform: uppercase; letter-spacing: .12em; }
.split__mono { font-family: var(--font-head); font-size: .68rem; letter-spacing: .1em; color: #94A3B8; white-space: nowrap; }
.split__plan { position: relative; aspect-ratio: 520 / 300; }
.split__plan svg { width: 100%; height: 100%; }
.split__plan .dim { color: var(--amber-light); }
.split__plan .dim-text { font-family: var(--font-head); color: #94A3B8; letter-spacing: .04em; }
.split__plan .faint { color: rgba(148, 163, 184, .5); }
.zone { stroke-width: 1.5; }
.zone--done { fill: var(--emerald-tint); stroke: var(--emerald); }
.zone--doing { fill: var(--amber-tint); stroke: var(--amber); }
.zone--planned { fill: #F1F5F9; stroke: #94A3B8; stroke-dasharray: 5 4; }
.zone-frame { stroke: var(--charcoal); stroke-width: 2.5; }
.chip {
  position: absolute; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .7rem; font-weight: 600; line-height: 1.2; white-space: nowrap;
  padding: 4px 8px; border-radius: 3px; background: var(--white); border: 1px solid var(--line-strong);
  box-shadow: 0 2px 6px rgba(15, 23, 42, .08);
}
.chip::before, .dot { content: ""; display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; }
.chip--done::before, .dot--done { background: var(--emerald); }
.chip--doing::before, .dot--doing { background: var(--amber); }
.chip--planned::before, .dot--planned { background: #94A3B8; }
.split__foot { display: flex; align-items: center; min-width: 0; }
.split__block { border-top: 1px solid rgba(148, 163, 184, .28); font-family: var(--font-head); font-size: .74rem; letter-spacing: .06em; }
.split__block span { flex: 1; display: grid; align-content: center; height: 100%; padding-inline: 14px; }
.split__block span + span { border-inline-start: 1px solid rgba(148, 163, 184, .28); }
.split__block small { font-size: .58rem; letter-spacing: .14em; color: #94A3B8; }
.split__kpis { gap: 22px; padding-inline: 16px; border-top: 1px solid var(--line); justify-content: flex-end; }
.kpi { display: grid; grid-template-columns: auto auto; column-gap: 8px; align-items: baseline; }
.kpi small { grid-column: 1 / -1; font-size: .64rem; color: var(--faint); line-height: 1.3; }
.kpi b { font-family: var(--font-head); font-size: 1.02rem; line-height: 1.2; }
.kpi__bar { align-self: center; width: 62px; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.kpi__bar i { display: block; width: 62%; height: 100%; background: var(--emerald); }
.legend { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-right: auto; font-size: .66rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.split__handle {
  position: absolute; top: 0; bottom: 0; left: calc(var(--split) * 100%); width: 2px; margin-left: -1px;
  background: var(--amber); pointer-events: none;
}
.split__handle span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--amber); color: var(--charcoal); border: 2px solid var(--white); box-shadow: 0 6px 16px rgba(15, 23, 42, .35);
}
.split__handle svg { width: 18px; height: 18px; }
.split__range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y;
}
.split__stage:has(.split__range:focus-visible) .split__handle span { outline: 2px solid var(--charcoal); outline-offset: 3px; }

/* ===== 2. Choose your path ===== */
.paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.path {
  display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 32px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.path:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--slate); }
.path:hover::before, .path:hover::after { border-color: var(--amber); }
.path__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.path__icon {
  flex: none; width: 52px; height: 52px; border-radius: var(--radius); display: grid; place-items: center;
  background: var(--paper); border: 1px solid var(--line-strong); color: var(--slate);
}
.path__icon svg { width: 26px; height: 26px; }
.path__kicker { margin: 0 0 6px; font-family: var(--font-head); font-size: .78rem; font-weight: 600; color: var(--faint); }
[dir="ltr"] .path__kicker { text-transform: uppercase; letter-spacing: .1em; }
[dir="rtl"] .path__kicker { font-size: .9rem; }
.path--services .path__kicker { color: #94A3B8; }
.path h3 { font-size: 1.6rem; }
.path > p { color: var(--muted); margin: 0 0 28px; }
.path__cta {
  display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line);
  font-family: var(--font-head); font-weight: 600; color: var(--amber-dark);
}
.path__cta svg { width: 18px; height: 18px; transition: transform .2s ease; }
.path__cta:hover svg { transform: translateX(4px); }
[dir="rtl"] .path__cta:hover svg { transform: scaleX(-1) translateX(4px); }
/* The whole card is the link target */
.path__cta::after { content: ""; position: absolute; inset: 0; }
.path--services { background: var(--charcoal); border-color: var(--charcoal); color: var(--white); }
.path--services::before, .path--services::after { border-color: var(--amber); }
.path--services .path__icon { background: var(--slate); border-color: var(--dark-line); color: var(--amber-light); }
.path--services > p { color: #CBD5E1; }
.path--services .path__cta { color: var(--amber-light); border-top-color: var(--dark-line); }
.path--services .tag--enterprise { background: transparent; border-color: #64748B; color: #E2E8F0; }

/* ===== 3. Feature spotlight ===== */
.tabs__list { display: flex; gap: 4px; border-bottom: 1px solid var(--line-strong); }
.tab {
  position: relative; display: inline-flex; align-items: baseline; gap: 10px;
  padding: 15px 22px; background: none; border: 0; cursor: pointer;
  font-family: var(--font-head); font-weight: 600; font-size: 1.02rem; color: var(--faint);
  transition: color .15s ease, background-color .15s ease;
}
.tab span { font-size: .74rem; letter-spacing: .08em; color: var(--line-strong); transition: color .15s ease; }
.tab::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 3px; background: var(--amber);
  transform: scaleX(0); transition: transform .25s ease;
}
.tab:hover { color: var(--charcoal); background: var(--paper); }
.tab[aria-selected="true"] { color: var(--charcoal); }
.tab[aria-selected="true"] span { color: var(--amber-dark); }
.tab[aria-selected="true"]::after { transform: none; }
.panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; padding-top: 52px; }
.panel--stack { grid-template-columns: 1fr; gap: 36px; justify-items: start; }
/* Until the script runs, the three panels simply follow one another */
.panel + .panel { margin-top: 56px; border-top: 1px solid var(--line); }
.tabs.is-ready .panel + .panel { margin-top: 0; border-top: 0; }
.tabs.is-ready .panel[hidden] { display: none; }
.tabs.is-ready .panel { animation: panel-in .35s ease both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } }
.panel__copy h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-top: 18px; }
.panel__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.panel__copy .panel__ctas .btn { margin-top: 0; }
/* A product's own mark and name, wherever the product is introduced */
.product-line { display: flex; align-items: center; gap: 12px; margin: 0; }
.product-line img { width: 28px; height: 28px; border-radius: 6px; }
.product-line b { font-family: var(--font-head); font-size: 1.1rem; letter-spacing: -.01em; }
[dir="rtl"] .product-line b { letter-spacing: normal; }
.product-line--lg { margin-bottom: 22px; }
.product-line--lg img { width: 44px; height: 44px; border-radius: 9px; }
.product-line--lg b { font-size: 1.5rem; }
.panel__copy > p { color: var(--muted); font-size: 1.06rem; }
.panel__copy--wide { max-width: 720px; }
.panel__copy .btn { margin-top: 28px; }
.features { display: grid; gap: 16px; margin-top: 26px; }
.features li { position: relative; display: grid; gap: 2px; padding-inline-start: 34px; }
.features li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 2px; width: 22px; height: 22px; border-radius: 3px;
  background: #ECFDF5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23047857' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 13px no-repeat;
  border: 1px solid #A7F3D0;
}
.features b { font-family: var(--font-head); font-weight: 600; }
.features span { color: var(--muted); font-size: .96rem; }


/* Broker Connect: who it is for, and a phone notification */
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-top: 8px; background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.segmented button {
  min-height: 40px; padding: 8px 16px; border: 0; border-radius: 3px; background: none; cursor: pointer;
  font-family: var(--font-head); font-weight: 600; font-size: .92rem; color: var(--muted);
  transition: background-color .15s ease, color .15s ease;
}
.segmented button:hover { color: var(--charcoal); }
.segmented button[aria-pressed="true"] { background: var(--charcoal); color: var(--white); }
.audience__title { font-size: 1rem; margin: 28px 0 -8px; color: var(--muted); }
/* With the script running only one audience shows at a time, and its title is the pressed button */
.tabs.is-ready .audience__title { display: none; }
.tabs.is-ready [data-audience="a"] .audience--b, .tabs.is-ready [data-audience="b"] .audience--a { display: none; }
.tabs:not(.is-ready) .segmented, .tabs:not(.is-ready) .note.audience--b { display: none; }
.tabs.is-ready .audience { animation: panel-in .3s ease both; }
.phone-wrap { justify-self: center; text-align: center; }
.phone {
  position: relative; width: 284px; height: 440px; padding: 64px 14px 20px; border-radius: 40px;
  border: 9px solid var(--charcoal); box-shadow: var(--shadow);
  background: linear-gradient(165deg, #334155 0%, var(--slate) 45%, var(--charcoal) 100%);
  text-align: start;
}
.phone__notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 84px; height: 22px; border-radius: 12px; background: var(--charcoal); }
.phone__time { display: block; text-align: center; font-family: var(--font-head); font-size: 3.1rem; font-weight: 500; line-height: 1; color: var(--white); margin-bottom: 30px; letter-spacing: -.03em; }
.phone__bar { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 96px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .5); }
.note { background: rgba(255, 255, 255, .96); border-radius: 16px; padding: 12px 14px; box-shadow: 0 10px 24px rgba(0, 0, 0, .28); color: var(--charcoal); }
.note__top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: .74rem; color: var(--muted); }
.note__top img { border-radius: 5px; }
.note__top small { margin-inline-start: auto; font-size: .72rem; }
.note b { display: block; font-size: .92rem; line-height: 1.3; }
.note p { margin: 2px 0 0; font-size: .84rem; line-height: 1.45; color: var(--slate); }

/* Consulting: three pillars and the four steps */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; width: 100%; }
.pillars li { display: grid; gap: 6px; align-content: start; padding: 26px; background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.pillars .path__icon { background: var(--white); margin-bottom: 12px; }
.pillars b { font-family: var(--font-head); font-size: 1.12rem; line-height: 1.25; }
.pillars li > span:last-child { color: var(--muted); font-size: .96rem; }
.flow { width: 100%; }
.flow__label { font-family: var(--font-head); font-weight: 600; font-size: .8rem; color: var(--muted); margin-bottom: 14px; }
[dir="ltr"] .flow__label { text-transform: uppercase; letter-spacing: .12em; }
.flow__steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.flow__steps li {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--white);
  font-family: var(--font-head); font-weight: 600; font-size: .98rem; line-height: 1.25;
}
.flow__steps span {
  flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 3px;
  background: var(--charcoal); color: var(--white); font-size: .86rem;
}
.flow__steps li:last-child span { background: var(--emerald); }
/* The arrow between two steps */
.flow__steps li + li::before {
  content: ""; position: absolute; top: 50%; inset-inline-end: calc(100% + 6px); width: 16px; height: 10px; transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10' fill='none' stroke='%2394A3B8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 5h13M10 1l4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat;
}
[dir="rtl"] .flow__steps li + li::before { transform: translateY(-50%) scaleX(-1); }

/* ===== 4. Why Khatib Digital ===== */
.why { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: start; }
.why__head { position: sticky; top: calc(var(--header-h) + 32px); }
.why__head h2 { font-size: clamp(1.85rem, 3.2vw, 2.6rem); }
.why__head > p:last-child { color: var(--muted); font-size: 1.1rem; margin: 0; }
.why__items { display: grid; gap: 28px; }
.why__item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 26px; align-items: start;
  padding: 36px; background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.why__item--offset { margin-inline-start: 56px; }
.why__num { font-family: var(--font-head); font-size: 2.4rem; font-weight: 700; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--amber); }
.why__item h3 { font-size: 1.4rem; margin-bottom: 8px; }
.why__item p { color: var(--muted); margin: 0; font-size: 1.04rem; }
.why__art { width: 64px; height: 64px; color: var(--line-strong); }

/* ===== Product pages ===== */
.phero .hero__inner { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); }
.phero h1, [dir="rtl"] .phero h1 { font-size: clamp(1.9rem, 3.3vw, 2.7rem); }
.phero__note { margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--line-strong); color: var(--muted); font-size: .95rem; max-width: 520px; }
/* A screenshot, framed like a sheet pinned to the drawing board */
.shot {
  position: relative; background: var(--white); border: 1px solid var(--slate); border-radius: 8px;
  box-shadow: var(--shadow); overflow: hidden;
}
.shot img { width: 100%; height: auto; }
.shot::before {
  content: ""; display: block; height: 30px; border-bottom: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 18px 50%, var(--line-strong) 4px, transparent 4.5px),
    radial-gradient(circle at 34px 50%, var(--line-strong) 4px, transparent 4.5px),
    radial-gradient(circle at 50px 50%, var(--line-strong) 4px, transparent 4.5px),
    var(--paper);
}
/* The six cells share hairlines: the grid's own background shows through a 1px gap */
.does { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: var(--line-strong); }
.does li { background: var(--white); padding: 30px; }
.does span { display: block; margin-bottom: 14px; font-family: var(--font-head); font-size: .8rem; font-weight: 600; letter-spacing: .1em; color: var(--amber-dark); }
.does h3 { font-size: 1.22rem; margin-bottom: 8px; }
.does p { margin: 0; color: var(--muted); }
.screens { display: grid; gap: 88px; }
.screen { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px; align-items: center; }
.screen:nth-child(even) { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
.screen:nth-child(even) .screen__copy { order: 2; }
.screen__copy h3 { font-size: clamp(1.4rem, 2.3vw, 1.85rem); }
.screen__copy h3::before { content: ""; display: block; width: 36px; height: 3px; margin-bottom: 18px; background: var(--amber); }
.screen__copy p { color: var(--muted); font-size: 1.08rem; margin: 0; }
.who .section-head { margin-bottom: 32px; }
.roles { display: flex; flex-wrap: wrap; gap: 10px; }
.roles li {
  padding: 9px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper);
  font-family: var(--font-head); font-weight: 600; font-size: .98rem;
}
.contact--band { padding-block: 72px; }
.band { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.band > div { max-width: 640px; }
.band h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 8px; }
.band p { margin: 0; color: #CBD5E1; font-size: 1.08rem; }

/* ===== 5. Lead capture ===== */
.contact {
  color: var(--white); padding-block: 104px;
  background-color: var(--charcoal);
  background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 40px 40px; background-position: center top;
}
.contact__inner { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 72px; align-items: start; }
.contact__info h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
.contact__info > p { color: #CBD5E1; font-size: 1.1rem; max-width: 440px; }
.contact__list { margin: 32px 0 24px; display: grid; gap: 12px; max-width: 400px; }
.contact__list a {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px;
  background: var(--slate); border: 1px solid var(--dark-line); border-radius: var(--radius);
  transition: border-color .15s;
}
.contact__list a:hover { border-color: var(--amber-light); }
.contact__list a > span:last-child { display: grid; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.contact__list small { font-size: .8rem; font-weight: 400; color: #94A3B8; }
.contact__icon { flex: none; width: 42px; height: 42px; border-radius: 3px; display: grid; place-items: center; background: var(--charcoal); color: var(--amber-light); }
.contact__icon svg { width: 21px; height: 21px; }

.form { background: var(--slate); border: 1px solid var(--dark-line); border-radius: var(--radius); padding: 36px; display: grid; gap: 20px; }
.form::before, .form::after { border-color: var(--amber); }
.interest legend { padding: 0; margin-bottom: 12px; font-family: var(--font-head); font-weight: 600; font-size: 1.12rem; }
.interest__options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.interest label { position: relative; display: block; cursor: pointer; }
.interest input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.interest span {
  display: grid; place-items: center; height: 100%; min-height: 52px; padding: 10px 12px; text-align: center;
  font-family: var(--font-head); font-weight: 600; font-size: .92rem; line-height: 1.25; color: #CBD5E1;
  background: var(--charcoal); border: 1px solid var(--dark-line); border-radius: var(--radius);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.interest label:hover span { border-color: #64748B; }
.interest input:checked + span { background: var(--amber); border-color: var(--amber); color: var(--charcoal); }
.interest input:focus-visible + span { outline: 2px solid var(--amber-light); outline-offset: 3px; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; gap: 7px; font-size: .92rem; font-weight: 500; color: #E2E8F0; }
.field:has(:required) > span::after { content: " *"; color: var(--amber-light); }
.field input, .field textarea {
  font-size: 1rem; font-weight: 400; color: var(--white); width: 100%;
  border: 1px solid var(--dark-line); border-radius: var(--radius); padding: 12px 14px; background: var(--charcoal);
  transition: border-color .15s, box-shadow .15s;
}
[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
.field input:hover, .field textarea:hover { border-color: #64748B; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--amber-light); box-shadow: 0 0 0 3px rgba(245, 158, 11, .25); }
.field [aria-invalid="true"] { border-color: #F87171; }
.field textarea { min-height: 130px; resize: vertical; }
.form__error { margin: 0; padding: 10px 14px; border-radius: var(--radius); background: #450A0A; border: 1px solid #7F1D1D; color: #FECACA; font-size: .92rem; }
.form__send { justify-self: start; }
.form__fine { margin: 0; color: #94A3B8; font-size: .85rem; }

/* ===== Footer ===== */
.footer { background: var(--charcoal); color: #94A3B8; padding-block: 48px 28px; font-size: .93rem; border-top: 1px solid var(--slate); }
.footer__inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; flex-wrap: wrap; padding-bottom: 32px; }
.footer .brand { color: var(--white); }
.footer .brand img { width: 34px; height: 34px; }
.footer .brand__light { color: #94A3B8; }
.footer__brand p { margin: 12px 0 0; }
.footer__contact { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer__contact a { color: #E2E8F0; font-weight: 500; transition: color .15s; }
.footer__contact a:hover { color: var(--amber-light); }
.footer__nav { display: flex; flex-wrap: wrap; gap: 8px 26px; padding-top: 6px; }
.footer__nav a, .footer__top { transition: color .15s; }
.footer__nav a:hover, .footer__top:hover { color: var(--white); }
.footer__bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px;
  /* a hairline as wide as the text, not the padded container */
  background: linear-gradient(var(--slate), var(--slate)) top / 100% 1px no-repeat content-box;
}
.footer__top { display: inline-flex; align-items: center; gap: 8px; }
.footer__top svg { width: 18px; height: 18px; }

/* ===== Reveal on scroll =====
   The script adds .reveal-on only once it is watching the page, so without the
   script, or with reduced motion, nothing is ever hidden. */
@media (prefers-reduced-motion: no-preference) {
  .reveal-on [data-reveal] {
    opacity: 0; transform: translateY(16px);
    transition: opacity .55s ease, transform .55s ease, box-shadow .2s ease, border-color .2s ease;
  }
  .reveal-on [data-reveal].is-in { opacity: 1; transform: none; }
  .reveal-on .path.is-in:hover { transform: translateY(-5px); }
}

/* ===== Small pages: page not found ===== */
.lost { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 48px 24px; }
.lost img { width: 72px; height: 72px; margin: 0 auto 28px; }
.lost h1 { font-size: clamp(2rem, 5vw, 3rem); }
.lost p { color: var(--muted); margin-bottom: 8px; }
.lost [lang="ar"] { letter-spacing: normal; }
.lost .hero__ctas { justify-content: center; margin-top: 28px; }

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .nav, .header__cta { display: none; }
  .menu-btn { display: grid; }
  .header__actions { margin-inline-start: auto; }
  .nav.is-open {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; top: var(--header-h); inset-inline: 0; max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    background: var(--white); padding: 10px 16px 20px;
    border-bottom: 1px solid var(--line-strong); box-shadow: 0 24px 40px -16px rgba(15, 23, 42, .35);
  }
  .nav.is-open > a:not(.btn), .nav.is-open .nav__toggle { padding: 13px 12px; font-size: 1rem; }
  /* In the menu the two products are always listed under their heading */
  .nav.is-open .nav__toggle { pointer-events: none; color: var(--faint); font-size: .8rem; padding-bottom: 4px; }
  [dir="ltr"] .nav.is-open .nav__toggle { text-transform: uppercase; letter-spacing: .12em; }
  .nav.is-open .nav__toggle svg { display: none; }
  .nav.is-open .nav__menu {
    position: static; width: auto; padding: 0 0 6px; border: 0; box-shadow: none; visibility: visible; opacity: 1; transform: none;
  }
  .nav.is-open .nav__cta { display: flex; margin-top: 10px; min-height: 50px; font-size: 1rem; }
}
@media (max-width: 980px) {
  .hero { padding-block: 56px 72px; }
  .hero__inner, .phero .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .hero__copy { max-width: 720px; }
  .split { max-width: 640px; }
  .paths { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .paths .path:last-child { grid-column: 1 / -1; }
  .panel { grid-template-columns: 1fr; gap: 40px; padding-top: 40px; }
  .why { grid-template-columns: 1fr; gap: 40px; }
  .why__head { position: static; }
  .contact__inner { grid-template-columns: 1fr; gap: 48px; }
  .does { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screens { gap: 64px; }
  .screen, .screen:nth-child(even) { grid-template-columns: 1fr; gap: 28px; }
  .screen:nth-child(even) .screen__copy { order: 0; }
}
@media (max-width: 767px) {
  .container { padding-inline: 16px; }
  .section, .contact { padding-block: 72px; }
  .section-head { margin-bottom: 36px; }
  .hero { padding-block: 40px 64px; }
  .hero__ctas .btn { flex: 1 1 100%; }
  .split__layer { grid-template-rows: 40px auto 56px; }
  .split__bar, .split__kpis { padding-inline: 10px; }
  .split__mono, .split__bar b { display: none; }
  .split__block span { padding-inline: 8px; font-size: .66rem; }
  .chip { font-size: .58rem; padding: 3px 5px; gap: 4px; }
  .chip::before { width: 5px; height: 5px; }
  .legend { display: none; }
  .split__handle span { width: 34px; height: 34px; }
  .paths { grid-template-columns: 1fr; }
  .paths .path:last-child { grid-column: auto; }
  .path { padding: 24px; }
  /* Tabs stack, with the marker on the side */
  .tabs__list { flex-direction: column; gap: 0; border-bottom: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
  .tab { padding: 14px 16px; text-align: start; }
  .tab + .tab { border-top: 1px solid var(--line); }
  .tab::after { inset-inline: 0 auto; inset-block: 0; width: 4px; height: auto; transform: scaleY(0); }
  .tab[aria-selected="true"] { background: var(--paper); }
  .panel { padding-top: 32px; }
  .segmented { display: grid; width: 100%; }
  .pillars { grid-template-columns: 1fr; gap: 14px; }
  .flow__steps { grid-template-columns: 1fr; gap: 22px; }
  .flow__steps li + li::before { top: auto; bottom: calc(100% + 6px); inset-inline-end: auto; inset-inline-start: 24px; transform: rotate(90deg); }
  [dir="rtl"] .flow__steps li + li::before { transform: rotate(90deg); }
  .why__item { grid-template-columns: auto minmax(0, 1fr); padding: 24px; gap: 18px; }
  .why__item--offset { margin-inline-start: 0; }
  .why__art { display: none; }
  .why__num { font-size: 1.9rem; }
  .does { grid-template-columns: 1fr; }
  .does li { padding: 22px; }
  .panel__ctas .btn, .band .btn { flex: 1 1 100%; }
  .contact--band { padding-block: 56px; }
  .form { padding: 22px; }
  .interest__options { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .form__send { justify-self: stretch; }
  .brand { font-size: 1.04rem; gap: 10px; }
  .brand img { width: 34px; height: 34px; }
  .lang-toggle { padding: 6px 12px; }
  .header__inner { gap: 12px; }
}
@media (max-width: 380px) {
  .brand__text { font-size: .95rem; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .btn:hover, .path:hover { transform: none; }
}

/* ===== Print ===== */
@media print {
  body { background: none; }
  .header, .split, .form, .footer__top { display: none; }
  .panel[hidden] { display: grid !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
