/* ==========================================================================
   Capital ERP — Design System
   Brand color derived from the "CS" logo mark: #4A69AA
   All color pairs used here are contrast-verified (WCAG AA, 4.5:1 body text).
   Bilingual: English (LTR) + Arabic (RTL) via CSS logical properties.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand scale — built from the logo blue (--brand-500) */
  --brand-50:  #F2F5FA;
  --brand-100: #E3EAF4;
  --brand-200: #C7D4E8;
  --brand-300: #A3B8D8;
  --brand-400: #7B96C4;
  --brand-500: #4A69AA; /* logo */
  --brand-600: #3E5892;
  --brand-700: #344878;
  --brand-800: #2A395E;
  --brand-900: #1E2942;
  --brand-950: #131A2B;

  /* Accent — amber. Always paired with dark ink text, never white. */
  --accent-400: #E9A23B;
  --accent-500: #D4841C;
  --accent-600: #B4650F;
  --accent-700: #8F4E0B;

  /* Ink */
  --ink:        #161D2E;
  --ink-soft:   #4A5568;
  --ink-muted:  #6B7689;

  /* Surfaces */
  --surface:        #FFFFFF;
  --surface-sunken: #F7F9FC;
  --surface-tint:   #F2F5FA;
  --border:         #E2E8F0;
  --border-strong:  #CBD5E1;

  /* Semantic */
  --success: #147A5C;
  --warning: #B4650F;
  --danger:  #C0392B;

  /* Type */
  --font-sans: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Spacing scale */
  --space-1: 0.25rem; --space-2: 0.5rem;  --space-3: 0.75rem;
  --space-4: 1rem;    --space-6: 1.5rem;  --space-8: 2rem;
  --space-12: 3rem;   --space-16: 4rem;   --space-24: 6rem;

  /* Radii */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Elevation — tuned to the brand hue, not neutral gray */
  --shadow-sm: 0 1px 2px rgba(19, 26, 43, 0.06), 0 1px 3px rgba(19, 26, 43, 0.05);
  --shadow:    0 4px 12px rgba(19, 26, 43, 0.07), 0 1px 3px rgba(19, 26, 43, 0.05);
  --shadow-lg: 0 12px 32px rgba(19, 26, 43, 0.10), 0 2px 8px rgba(19, 26, 43, 0.05);
  --shadow-xl: 0 24px 64px rgba(19, 26, 43, 0.14), 0 4px 12px rgba(19, 26, 43, 0.06);

  --nav-h: 72px;
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Arabic swaps the sans family; everything else is shared. */
html[lang="ar"] {
  --font-sans: 'IBM Plex Sans Arabic', 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* Arabic headings need looser leading and no negative tracking */
html[lang="ar"] h1, html[lang="ar"] h2,
html[lang="ar"] h3, html[lang="ar"] h4 {
  letter-spacing: 0;
  line-height: 1.35;
}
html[lang="ar"] body { line-height: 1.85; }

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }

/* Type scale — fluid, capped so it never runs away on ultrawide */
.t-display { font-size: clamp(2.5rem, 1.6rem + 3.8vw, 4.25rem); font-weight: 600; line-height: 1.05; letter-spacing: -0.035em; }
.t-h1      { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);   font-weight: 600; line-height: 1.1;  letter-spacing: -0.03em; }
.t-h2      { font-size: clamp(1.625rem, 1.2rem + 1.7vw, 2.5rem);font-weight: 600; line-height: 1.15; letter-spacing: -0.025em; }
.t-h3      { font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; }
.t-h4      { font-size: 1.125rem; font-weight: 600; line-height: 1.35; }
.t-lead    { font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); line-height: 1.6; color: var(--ink-soft); }
.t-body    { font-size: 1rem; line-height: 1.7; color: var(--ink-soft); }
.t-sm      { font-size: 0.9375rem; line-height: 1.6; color: var(--ink-soft); }
.t-xs      { font-size: 0.8125rem; line-height: 1.5; color: var(--ink-muted); }

html[lang="ar"] .t-display,
html[lang="ar"] .t-h1,
html[lang="ar"] .t-h2,
html[lang="ar"] .t-h3 { letter-spacing: 0; }

/* Tabular figures for anything numeric — a real ERP habit */
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }

/* --------------------------------------------------------------------------
   3. Signature device: mono eyebrow + amber rule
   The mono label above each section is the page's recurring "system" motif.
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-700);
  margin-bottom: var(--space-4);
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--accent-400);
  flex: none;
}
html[lang="ar"] .eyebrow {
  font-family: var(--font-sans);
  letter-spacing: 0;
  font-weight: 600;
  font-size: 0.8125rem;
}
.eyebrow--light { color: var(--accent-400); }
.eyebrow--center { justify-content: center; }

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.container--narrow { max-width: 820px; }
.container--wide   { max-width: 1360px; }

.section      { padding-block: clamp(4rem, 2.5rem + 6vw, 7.5rem); }
.section--tight { padding-block: clamp(3rem, 2rem + 4vw, 5rem); }
.section--sunken { background: var(--surface-sunken); }
.section--tint   { background: var(--brand-50); }
.section--dark   { background: var(--brand-950); color: var(--brand-200); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
.section--dark .t-lead, .section--dark .t-body { color: var(--brand-200); }

.section-head { max-width: 680px; margin-bottom: var(--space-12); }
.section-head--center { margin-inline: auto; text-align: center; }

.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

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

/* --------------------------------------------------------------------------
   5. Buttons — 44px min target, visible focus, no hover-only affordance
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.6875rem 1.375rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 3px solid var(--accent-400);
  outline-offset: 2px;
}
.btn svg { flex: none; width: 1.05em; height: 1.05em; }

/* Primary: deep brand fill, white text — 8.96:1 */
.btn--primary { background: var(--brand-700); color: #fff; }
.btn--primary:hover { background: var(--brand-800); transform: translateY(-1px); box-shadow: var(--shadow); }

/* Accent: amber fill, dark ink text — 7.76:1. Never white on amber. */
.btn--accent { background: var(--accent-400); color: var(--brand-950); }
.btn--accent:hover { background: var(--accent-500); transform: translateY(-1px); box-shadow: var(--shadow); }

.btn--ghost { background: var(--surface); color: var(--brand-700); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--brand-500); background: var(--brand-50); }

.btn--onDark { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.28); }
.btn--onDark:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.5); }

.btn--lg { min-height: 52px; padding: 0.875rem 1.75rem; font-size: 1rem; }
.btn--block { width: 100%; }

/* Text link with animated underline that also survives reduced-motion */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--brand-700);
  border-bottom: 1px solid var(--brand-300);
  padding-bottom: 2px;
  transition: color var(--transition), border-color var(--transition), gap var(--transition);
}
.link-arrow:hover { color: var(--brand-900); border-color: var(--brand-600); gap: 0.65rem; }
.link-arrow:focus-visible { outline: 3px solid var(--accent-400); outline-offset: 3px; border-radius: 2px; }
/* Directional arrows mirror in RTL; non-directional icons (ticks) do not. */
.link-arrow svg { width: 1em; height: 1em; }
html[dir="rtl"] .i-arrow { transform: scaleX(-1); }

/* --------------------------------------------------------------------------
   6. Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.card--hover:hover { border-color: var(--brand-300); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.card--flat { box-shadow: none; }

/* Module card: mono code in the corner, icon tile, title, blurb */
.module-card { position: relative; display: flex; flex-direction: column; gap: var(--space-3); height: 100%; }
.module-card__code {
  position: absolute;
  inset-block-start: var(--space-6);
  inset-inline-end: var(--space-6);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--brand-300);
}
.module-card__icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--radius);
  background: var(--brand-50);
  color: var(--brand-600);
  border: 1px solid var(--brand-100);
  flex: none;
}
.module-card__icon svg { width: 22px; height: 22px; }
.module-card--accent .module-card__icon { background: #FDF3E3; color: var(--accent-700); border-color: #F5E0BC; }
.module-card h3 { font-size: 1.0625rem; }

/* Icon tile, generic */
.icon-tile {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: var(--radius);
  background: var(--brand-50);
  color: var(--brand-600);
  border: 1px solid var(--brand-100);
  flex: none;
}
.icon-tile svg { width: 24px; height: 24px; }

/* Related-module list (module detail pages) */
.mod-rel-list { display: flex; flex-direction: column; gap: 0.4rem; }
.mod-rel {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.mod-rel:hover { background: var(--brand-50); }
.mod-rel:focus-visible { outline: 3px solid var(--accent-400); outline-offset: 2px; }
.mod-rel__icon {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  color: var(--brand-600);
}
.mod-rel:hover .mod-rel__icon { background: #fff; }
.mod-rel__icon svg { width: 17px; height: 17px; }
.mod-rel__body { display: flex; flex: 1; align-items: baseline; justify-content: space-between; gap: 0.75rem; min-width: 0; }
.mod-rel__name { font-size: 0.9375rem; font-weight: 500; color: var(--ink); }
.mod-rel__price { font-size: 0.75rem; color: var(--ink-muted); white-space: nowrap; }

/* --------------------------------------------------------------------------
   7. Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.nav.is-stuck { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); background: rgba(255,255,255,0.94); }
.nav__inner { display: flex; align-items: center; gap: var(--space-8); width: 100%; }

.brand { display: inline-flex; align-items: center; gap: 0.625rem; flex: none; }
.brand__mark { width: 38px; height: auto; flex: none; }
.brand__text { display: flex; flex-direction: column; gap: 3px; line-height: 1.15; }
.brand__name { font-size: 1.0625rem; font-weight: 700; color: var(--brand-800); letter-spacing: -0.02em; }
.brand__sub {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
html[lang="ar"] .brand__sub { font-family: var(--font-sans); letter-spacing: 0; font-size: 0.6875rem; }

.nav__links { display: flex; align-items: center; gap: var(--space-1); margin-inline-start: auto; }
.nav__link {
  position: relative;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color var(--transition), background var(--transition);
}
.nav__link:hover { color: var(--brand-700); background: var(--brand-50); }
.nav__link:focus-visible { outline: 3px solid var(--accent-400); outline-offset: 2px; }
.nav__link[aria-current="page"] { color: var(--brand-800); font-weight: 600; }
.nav__link[aria-current="page"]::after {
  content: '';
  position: absolute;
  inset-block-end: -2px;
  inset-inline: 0.875rem;
  height: 2px;
  background: var(--accent-400);
  border-radius: 2px;
}
.nav__actions { display: flex; align-items: center; gap: var(--space-3); flex: none; }

/* Language switch */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 40px;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.lang-switch:hover { border-color: var(--brand-500); color: var(--brand-700); background: var(--brand-50); }
.lang-switch:focus-visible { outline: 3px solid var(--accent-400); outline-offset: 2px; }
.lang-switch svg { width: 15px; height: 15px; }

/* Nav actions are sized together so the demo button and the language switch
   read as a matched pair. 44px keeps both above the minimum touch target. */
.nav__actions .btn--demo,
.nav__actions .lang-switch {
  min-height: 44px;
  padding-block: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.2;
  border-radius: var(--radius);
}
.nav__actions .lang-switch { padding-inline: 0.95rem; }
.nav__actions .btn--demo   { padding-inline: 1.15rem; }

/* Mobile menu */
.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.nav__toggle:focus-visible { outline: 3px solid var(--accent-400); outline-offset: 2px; }
.nav__toggle svg { width: 20px; height: 20px; color: var(--ink); }

.mobile-menu {
  position: fixed;
  inset-block-start: var(--nav-h);
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 99;
  background: var(--surface);
  padding: var(--space-6);
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-menu a {
  display: block;
  padding: var(--space-4) 0;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:hover { color: var(--brand-700); }

@media (max-width: 1024px) {
  .nav__links { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav__actions .btn--demo { display: none; }
}

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: calc(var(--nav-h) + clamp(3rem, 2rem + 5vw, 6rem)) 0;
  background:
    radial-gradient(120% 80% at 50% -10%, var(--brand-100) 0%, transparent 62%),
    linear-gradient(180deg, var(--surface-sunken) 0%, var(--surface) 100%);
  overflow: hidden;
}
/* Faint grid — the "system" texture behind the hero */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(74,105,170,0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(74,105,170,0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(90% 60% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(90% 60% at 50% 0%, #000 20%, transparent 75%);
  pointer-events: none;
}
.hero__inner { position: relative; text-align: center; }
.hero__title { max-width: 17ch; margin-inline: auto; }
.hero__sub { max-width: 60ch; margin-inline: auto; margin-block-start: var(--space-6); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; margin-block-start: var(--space-8); }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem 0.375rem 0.5rem;
  border: 1px solid var(--brand-200);
  border-radius: 999px;
  background: rgba(255,255,255,0.75);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--brand-800);
  margin-bottom: var(--space-6);
}
html[dir="rtl"] .hero-badge { padding: 0.375rem 0.5rem 0.375rem 0.875rem; }
.hero-badge__pill {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--brand-700);
  color: #fff;
}
html[lang="ar"] .hero-badge__pill { font-family: var(--font-sans); letter-spacing: 0; }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3) var(--space-8);
  margin-block-start: var(--space-8);
}
.trust-row li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.trust-row svg { width: 17px; height: 17px; color: var(--success); flex: none; }

/* --------------------------------------------------------------------------
   9. Dashboard mockup — the hero's thesis, built in HTML not a screenshot
   -------------------------------------------------------------------------- */
.mockup {
  position: relative;
  margin-block-start: clamp(3rem, 2rem + 4vw, 4.5rem);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
/* Fades the bottom of the dashboard into the page, as in the reference */
.mockup::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  height: 130px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, var(--surface) 88%);
  pointer-events: none;
}
.mockup__bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.75rem var(--space-4);
  border-bottom: 1px solid var(--border);
  background: var(--surface-sunken);
}
.mockup__dots { display: flex; gap: 6px; flex: none; }
.mockup__dots span { width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); }
.mockup__url {
  flex: 1;
  max-width: 340px;
  margin-inline: auto;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  text-align: center;
}
.mockup__body { padding: var(--space-6); background: var(--surface-sunken); }

.mock-app__top {
  display: flex; align-items: center; gap: var(--space-4);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--border);
}
.mock-tabs { display: flex; gap: var(--space-1); flex-wrap: wrap; }
.mock-tab {
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-muted);
}
.mock-tab.is-active { background: var(--brand-700); color: #fff; font-weight: 600; }

.mock-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: var(--space-4); text-align: start; }
@media (max-width: 860px) { .mock-grid { grid-template-columns: 1fr; } }

.mock-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.mock-card__label { font-size: 0.75rem; font-weight: 600; color: var(--ink-muted); letter-spacing: 0.02em; }
.mock-card__value { font-size: 1.75rem; font-weight: 600; color: var(--ink); letter-spacing: -0.03em; margin-block: 0.35rem 0.15rem; }
.mock-delta { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; font-weight: 600; color: var(--success); }
.mock-delta--down { color: var(--danger); }
.mock-delta svg { width: 13px; height: 13px; }
html[dir="rtl"] .mock-delta svg { transform: scaleX(-1); }

.mock-rows { display: flex; flex-direction: column; gap: 0.75rem; margin-top: var(--space-3); }
.mock-row__head { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.75rem; margin-bottom: 0.3rem; }
.mock-row__name { font-weight: 600; color: var(--ink); }
.mock-row__val { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.mock-bar { height: 7px; border-radius: 99px; background: var(--brand-100); overflow: hidden; }
.mock-bar span { display: block; height: 100%; border-radius: 99px; background: var(--brand-500); }
.mock-bar span.is-accent { background: var(--accent-400); }
.mock-bar span.is-deep { background: var(--brand-700); }

/* Column chart, pure CSS */
.mock-chart { display: flex; align-items: flex-end; gap: 5px; height: 108px; margin-top: var(--space-4); }
.mock-chart div { flex: 1; border-radius: 3px 3px 0 0; background: var(--brand-200); min-height: 6px; }
.mock-chart div.is-peak { background: var(--brand-600); }
.mock-chart div.is-accent { background: var(--accent-400); }

.mock-list { display: flex; flex-direction: column; gap: 0.6rem; margin-top: var(--space-3); }
.mock-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); font-size: 0.8125rem; }
.mock-list__doc { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--ink); font-weight: 500; }
.mock-list__doc code { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--ink-muted); }

.pill {
  display: inline-flex; align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
}
.pill--ok    { background: #E4F3EE; color: #0F5F48; }
.pill--warn  { background: #FDF3E3; color: var(--accent-700); }
.pill--info  { background: var(--brand-100); color: var(--brand-800); }
.pill--muted { background: var(--surface-sunken); color: var(--ink-muted); border: 1px solid var(--border); }

/* --------------------------------------------------------------------------
   10. Logo / stat strips
   -------------------------------------------------------------------------- */
.logo-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  gap: var(--space-5) var(--space-4);
  text-align: center;
}
@media (max-width: 900px) { .logo-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .logo-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.logo-strip__item {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-muted);
  opacity: 0.75;
  transition: opacity var(--transition), color var(--transition);
}
.logo-strip__item:hover { opacity: 1; color: var(--brand-700); }

.stat { text-align: center; }
.stat__value {
  font-size: clamp(2.25rem, 1.7rem + 2.2vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--brand-800);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.section--dark .stat__value { color: #fff; }
.stat__label {
  margin-top: var(--space-2);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
}
.section--dark .stat__label { color: var(--brand-300); }

/* --------------------------------------------------------------------------
   11. Feature rows (alternating)
   -------------------------------------------------------------------------- */
.feature-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: center;
}
.feature-row + .feature-row { margin-top: clamp(3.5rem, 2rem + 5vw, 6rem); }
.feature-row--flip .feature-row__media { order: -1; }
@media (max-width: 900px) {
  .feature-row { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
  .feature-row--flip .feature-row__media { order: 0; }
}

.check-list { display: flex; flex-direction: column; gap: var(--space-3); margin-block-start: var(--space-6); }
.check-list li { display: flex; gap: 0.75rem; align-items: flex-start; }
.check-list svg { width: 20px; height: 20px; color: var(--brand-600); flex: none; margin-top: 2px; }
.check-list strong { color: var(--ink); font-weight: 600; }

/* --------------------------------------------------------------------------
   12. Tables (module comparison, pricing matrix)
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; min-width: 640px; }
table.data th, table.data td { padding: 0.875rem var(--space-4); text-align: start; font-size: 0.9375rem; border-bottom: 1px solid var(--border); }
table.data thead th { background: var(--surface-sunken); font-weight: 600; color: var(--ink); font-size: 0.8125rem; letter-spacing: 0.02em; white-space: nowrap; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--brand-50); }
table.data td:first-child { font-weight: 600; color: var(--ink); }

/* --------------------------------------------------------------------------
   13. Pricing
   -------------------------------------------------------------------------- */
.price-card { display: flex; flex-direction: column; height: 100%; position: relative; }
.price-card--featured {
  border-color: var(--brand-500);
  box-shadow: var(--shadow-lg);
}
.price-card--featured::before {
  content: attr(data-badge);
  position: absolute;
  inset-block-start: -13px;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.875rem;
  border-radius: 999px;
  background: var(--accent-400);
  color: var(--brand-950);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
html[dir="rtl"] .price-card--featured::before { transform: translateX(50%); }
.price-card__name { font-size: 1.25rem; font-weight: 600; color: var(--ink); }
.price-card__for { font-size: 0.875rem; color: var(--ink-muted); margin-top: 0.35rem; min-height: 42px; }
.price-card__quote {
  margin-block: var(--space-6);
  padding-block: var(--space-4);
  border-block: 1px solid var(--border);
}
.price-card__amount { font-size: 1.5rem; font-weight: 600; color: var(--brand-800); letter-spacing: -0.02em; }
.price-card__note { font-size: 0.8125rem; color: var(--ink-muted); margin-top: 0.25rem; }
.price-card__list { display: flex; flex-direction: column; gap: 0.7rem; margin-bottom: var(--space-6); flex: 1; }
.price-card__list li { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.9375rem; }
.price-card__list svg { width: 18px; height: 18px; color: var(--brand-600); flex: none; margin-top: 3px; }
.price-card__list li.is-off { color: var(--ink-muted); }
.price-card__list .tnum { white-space: nowrap; margin-inline-start: auto; }
.price-card__list li.is-off svg { color: var(--border-strong); }

/* --------------------------------------------------------------------------
   14. Testimonials
   -------------------------------------------------------------------------- */
.quote-card { display: flex; flex-direction: column; height: 100%; }
.quote-card__mark { font-family: var(--font-mono); font-size: 2rem; line-height: 1; color: var(--accent-400); margin-bottom: var(--space-3); }
.quote-card blockquote { margin: 0; font-size: 1.0625rem; line-height: 1.65; color: var(--ink); flex: 1; }
.quote-card__by { display: flex; align-items: center; gap: 0.75rem; margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--border); }
.avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand-100);
  color: var(--brand-800);
  font-weight: 700;
  font-size: 0.875rem;
  flex: none;
}
.quote-card__name { font-weight: 600; color: var(--ink); font-size: 0.9375rem; }
.quote-card__role { font-size: 0.8125rem; color: var(--ink-muted); }

/* --------------------------------------------------------------------------
   15. Accordion (FAQ)
   -------------------------------------------------------------------------- */
.accordion { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.accordion__item + .accordion__item { border-top: 1px solid var(--border); }
.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
  min-height: 60px;
  padding: var(--space-4) var(--space-6);
  background: none;
  border: none;
  text-align: start;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  transition: background var(--transition), color var(--transition);
}
.accordion__trigger:hover { background: var(--brand-50); color: var(--brand-800); }
.accordion__trigger:focus-visible { outline: 3px solid var(--accent-400); outline-offset: -3px; }
.accordion__icon { width: 22px; height: 22px; flex: none; color: var(--brand-600); transition: transform var(--transition); }
.accordion__trigger[aria-expanded="true"] .accordion__icon { transform: rotate(45deg); }
.accordion__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 260ms cubic-bezier(0.4,0,0.2,1); }
.accordion__panel[data-open="true"] { grid-template-rows: 1fr; }
.accordion__panel > div { overflow: hidden; }
.accordion__panel p { padding: 0 var(--space-6) var(--space-6); color: var(--ink-soft); max-width: 72ch; }

/* --------------------------------------------------------------------------
   16. Forms
   -------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label { font-size: 0.875rem; font-weight: 600; color: var(--ink); }
.field .req { color: var(--danger); }
.field__hint { font-size: 0.8125rem; color: var(--ink-muted); }
.input, .select, .textarea {
  width: 100%;
  min-height: 46px;
  padding: 0.6875rem 0.875rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-muted); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(74, 105, 170, 0.18);
}
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 2px solid transparent; }
.textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236B7689'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.17l3.71-3.94a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 20px;
  padding-inline-end: 2.5rem;
}
html[dir="rtl"] .select { background-position: left 0.75rem center; padding-inline-end: 0.875rem; padding-inline-start: 2.5rem; }

.checkbox-row { display: flex; gap: 0.65rem; align-items: flex-start; }
.checkbox-row input[type="checkbox"] { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand-600); flex: none; }
.checkbox-row label { font-size: 0.875rem; font-weight: 400; color: var(--ink-soft); }

.form-note {
  display: flex; gap: 0.65rem; align-items: flex-start;
  padding: var(--space-4);
  border-radius: var(--radius);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  font-size: 0.875rem;
  color: var(--brand-800);
}
.form-note svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--brand-600); }

/* Success / error message revealed on submit */
.form-status { display: none; }
.form-status.is-visible { display: flex; }

/* --------------------------------------------------------------------------
   17. Breadcrumb / page header
   -------------------------------------------------------------------------- */
.page-head {
  padding-block: calc(var(--nav-h) + clamp(2.5rem, 2rem + 3vw, 4.5rem)) clamp(2.5rem, 2rem + 3vw, 4rem);
  background:
    radial-gradient(100% 70% at 50% 0%, var(--brand-100) 0%, transparent 65%),
    var(--surface-sunken);
  border-bottom: 1px solid var(--border);
}
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: var(--ink-muted); margin-bottom: var(--space-4); }
.breadcrumb a:hover { color: var(--brand-700); text-decoration: underline; }
.breadcrumb__sep { color: var(--border-strong); }
html[dir="rtl"] .breadcrumb__sep { transform: scaleX(-1); display: inline-block; }

/* --------------------------------------------------------------------------
   18. CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  position: relative;
  border-radius: var(--radius-xl);
  padding: clamp(2.5rem, 2rem + 4vw, 4.5rem);
  background: linear-gradient(135deg, var(--brand-800) 0%, var(--brand-950) 100%);
  color: var(--brand-200);
  overflow: hidden;
  text-align: center;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(70% 90% at 50% 0%, #000, transparent 70%);
  -webkit-mask-image: radial-gradient(70% 90% at 50% 0%, #000, transparent 70%);
  pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; max-width: 22ch; margin-inline: auto; }
.cta-band p { color: var(--brand-200); max-width: 56ch; margin-inline: auto; margin-block-start: var(--space-4); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; margin-block-start: var(--space-8); }

/* --------------------------------------------------------------------------
   19. Footer
   -------------------------------------------------------------------------- */
.footer { background: var(--brand-950); color: var(--brand-300); padding-block: var(--space-16) var(--space-8); }
.footer__grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: var(--space-8); }
@media (max-width: 1024px) { .footer__grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--space-8); } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: minmax(0,1fr); } }
.footer__h { color: #fff; font-size: 0.875rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: var(--space-4); }
html[lang="ar"] .footer__h { text-transform: none; letter-spacing: 0; }
.footer__links { display: flex; flex-direction: column; gap: 0.7rem; }
.footer__links a { font-size: 0.9375rem; color: var(--brand-300); transition: color var(--transition); }
.footer__links a:hover { color: #fff; }
.footer__links a:focus-visible { outline: 2px solid var(--accent-400); outline-offset: 2px; border-radius: 2px; }
.footer__brand .brand__name { color: #fff; }
.footer__brand .brand__sub { color: var(--brand-400); }
.footer__blurb { font-size: 0.9375rem; color: var(--brand-300); margin-block-start: var(--space-4); max-width: 34ch; }
.footer__contact { display: flex; flex-direction: column; gap: 0.6rem; margin-block-start: var(--space-6); }
.footer__contact li { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.875rem; }
.footer__contact svg { width: 16px; height: 16px; color: var(--brand-400); flex: none; margin-top: 4px; }
.footer__bottom {
  display: flex; flex-wrap: wrap; gap: var(--space-4);
  align-items: center; justify-content: space-between;
  margin-block-start: var(--space-12);
  padding-block-start: var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8125rem;
  color: var(--brand-400);
}
.social-row { display: flex; gap: var(--space-2); }
.social-row a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--brand-300);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.social-row a:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.3); }
.social-row svg { width: 17px; height: 17px; }

/* --------------------------------------------------------------------------
   20. Utilities
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.mt-4 { margin-block-start: var(--space-4); }
.mt-6 { margin-block-start: var(--space-6); }
.mt-8 { margin-block-start: var(--space-8); }
.mt-12 { margin-block-start: var(--space-12); }
.flex-wrap-center { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; }
.max-w-prose { max-width: 68ch; }

.skip-link {
  position: absolute;
  inset-block-start: -100px;
  inset-inline-start: var(--space-4);
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--brand-800);
  color: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600;
  transition: inset-block-start var(--transition);
}
.skip-link:focus { inset-block-start: 0; }

.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;
}

/* --------------------------------------------------------------------------
   21. Scroll reveal — opt-in, and fully disabled under reduced motion
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 550ms ease, transform 550ms cubic-bezier(0.22,1,0.36,1); }
.reveal.is-in { opacity: 1; transform: none; }

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

/* --------------------------------------------------------------------------
   22. Floating contact dock — call + WhatsApp
   Sits bottom-inline-end, so it mirrors to the left in Arabic automatically.
   -------------------------------------------------------------------------- */
.fab-dock {
  position: fixed;
  inset-block-end: 1rem;
  inset-inline-end: 1rem;
  z-index: 95;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: flex-end;
}
html[dir="rtl"] .fab-dock { align-items: flex-start; }

.fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 6px 20px rgba(19, 26, 43, 0.22), 0 2px 6px rgba(19, 26, 43, 0.12);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
  white-space: nowrap;
}
.fab svg { width: 25px; height: 25px; flex: none; }
.fab:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(19, 26, 43, 0.28); }
.fab:focus-visible { outline: 3px solid var(--accent-400); outline-offset: 3px; }

.fab--wa   { background: #25D366; }          /* WhatsApp brand green */
.fab--wa:hover   { filter: brightness(1.06); }
.fab--call { background: var(--brand-700); } /* white on #344878 = 8.96:1 */
.fab--call:hover { background: var(--brand-800); }

/* Keep the dock clear of the footer's last row on short pages */
.footer { padding-block-end: calc(var(--space-8) + 4.5rem); }

/* The sticky estimator shares the bottom band, so lift the dock clear of it */
body.has-estimator .fab-dock { inset-block-end: 8.5rem; }
@media (max-width: 620px) { body.has-estimator .fab-dock { inset-block-end: 11rem; } }

@media print { .fab-dock { display: none !important; } }

/* Phone and email in body copy read as links, not decoration */
.contact-link {
  color: var(--brand-700);
  font-weight: 600;
  border-bottom: 1px solid var(--brand-300);
  padding-bottom: 1px;
  transition: color var(--transition), border-color var(--transition);
}
.contact-link:hover { color: var(--brand-900); border-color: var(--brand-600); }
.contact-link:focus-visible { outline: 3px solid var(--accent-400); outline-offset: 2px; border-radius: 2px; }

/* --------------------------------------------------------------------------
   23. Pricing estimator — pick modules, see the contract value
   -------------------------------------------------------------------------- */
.pick-cell { width: 46px; text-align: center; }
.mod-pick {
  width: 20px; height: 20px;
  accent-color: var(--brand-600);
  cursor: pointer;
}
table.data td label { cursor: pointer; display: block; }
table.data tr:has(.mod-pick:checked) { background: var(--brand-50); }
table.data tr:has(.mod-pick:checked) td:first-child { box-shadow: inset 3px 0 0 var(--accent-400); }
html[dir="rtl"] table.data tr:has(.mod-pick:checked) td:first-child { box-shadow: inset -3px 0 0 var(--accent-400); }

.estimator {
  position: sticky;
  inset-block-end: 1rem;
  z-index: 40;
  border-color: var(--brand-300);
  box-shadow: var(--shadow-lg);
  background: var(--surface);
}
.estimator[hidden] { display: none; }
.estimator__body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-6);
}
.estimator__figure { display: flex; flex-direction: column; gap: 0.15rem; }
.estimator__label { font-size: 0.8125rem; color: var(--ink-muted); font-weight: 500; }
.estimator__count { font-size: 1.5rem; color: var(--brand-800); line-height: 1.1; }
.estimator__total { font-size: 1.5rem; color: var(--brand-800); line-height: 1.1; }
.estimator__actions {
  display: flex; flex-wrap: wrap; gap: var(--space-3);
  margin-inline-start: auto;
}
.estimator__note { margin-block-start: var(--space-4); }

@media (max-width: 620px) {
  .estimator__body { gap: var(--space-4); }
  .estimator__actions { margin-inline-start: 0; width: 100%; }
  .estimator__actions .btn { flex: 1; }
  /* the dock would sit on top of the sticky estimator on small screens */
  .fab-dock { inset-block-end: 0.75rem; }
}

/* Print */
@media print {
  .nav, .mobile-menu, .cta-band, .footer, .skip-link { display: none !important; }
  body { color: #000; }
  .section { padding-block: 1.5rem; }
}
