/* ==========================================================================
   Mahsoob (محسوب) Design Tokens & Named Text Styles
   Obsidian Dark Fintech · Strict Part B Visual System
   ========================================================================== */

:root {
  /* Fonts (B1: Single primary typeface per locale + Geist Mono for numeric/code UI) */
  --font-en: 'Geist', sans-serif;
  --font-ar: 'IBM Plex Sans Arabic', sans-serif;
  --font-mono: 'Geist Mono', monospace;
  --font-sans: var(--font-ar);

  /* Approved Dark Mode Surfaces (B4: Flat surfaces only, zero background gradients) */
  --surface-base: #000000;
  --surface-obsidian-warm: #131209;
  --surface-card: #181818;
  --surface-elevated: #1f1f1f;
  --surface-control: #272727;
  --surface-hover: #313131;

  /* Translucent Surfaces (solid RGBA, no gradients) */
  --surface-nav: rgba(24, 24, 24, 0.78);
  --surface-drawer: #000000;
  --surface-backdrop: rgba(0, 0, 0, 0.84);

  /* Mahsoob Brand Accents */
  --lime: #79d837;
  --lime-deep: #5cb822;
  --lime-soft: rgba(121, 216, 55, 0.14);
  --gold: #e8b923;
  --gold-soft: rgba(232, 185, 35, 0.14);
  --wa-green: #25d366;
  --wa-soft: rgba(37, 211, 102, 0.14);
  --tg-blue: #38bdf8;
  --tg-soft: rgba(56, 189, 248, 0.14);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.14);

  /* Text Ink Colors */
  --ink-primary: #ffffff;
  --ink-secondary: #c4ccc1;
  --ink-muted: #8a9487;
  --ink-on-lime: #000000;

  /* Full 4-Sided Borders (B4: never single-sided) */
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.22);
  --border-lime: rgba(121, 216, 55, 0.36);
  --border-gold: rgba(232, 185, 35, 0.36);
  --border-danger: rgba(248, 113, 113, 0.36);

  /* B2 Spacing Scale — strictly exact values only */
  --space-0: 0;
  --space-25: 2px;
  --space-50: 4px;
  --space-75: 8px;
  --space-100: 12px;
  --space-200: 16px;
  --space-300: 24px;
  --space-400: 32px;
  --space-500: 40px;
  --space-600: 48px;
  --space-700: 64px;
  --space-800: 80px;
  --space-900: 96px;

  /* B3 Tailwind Radius Scale */
  --radius-none: 0;
  --radius-xs: 2px;
  --radius: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-3xl: 24px;
  --radius-full: 9999px;

  /* B7 Motion */
  --ease-base: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-color: 300ms;
  --duration-layout: 500ms;
  --duration-reveal: 700ms;

  /* Layout */
  --container-max: 1200px;
  --hero-copy-max: 680px;
}

html[dir='ltr'] {
  --font-sans: var(--font-en);
}

html[dir='rtl'] {
  --font-sans: var(--font-ar);
}

/* ==========================================================================
   B1 Named Text Styles (exact Tailwind scale steps, cap weight at 600)
   ========================================================================== */

.heading-1 {
  font-size: 3.75rem; /* 60px text-6xl */
  line-height: 1;     /* 60px */
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.heading-2 {
  font-size: 3rem;    /* 48px text-5xl */
  line-height: 1;     /* 48px */
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.heading-3 {
  font-size: 2.25rem; /* 36px text-4xl */
  line-height: 2.5rem;/* 40px */
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.heading-4 {
  font-size: 1.875rem;/* 30px text-3xl */
  line-height: 2.25rem;/* 36px */
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.heading-5 {
  font-size: 1.5rem;  /* 24px text-2xl */
  line-height: 2rem;  /* 32px */
  font-weight: 600;
  text-wrap: balance;
}

.heading-6 {
  font-size: 1.25rem; /* 20px text-xl */
  line-height: 1.75rem;/* 28px */
  font-weight: 600;
  text-wrap: balance;
}

.title-1 {
  font-size: 1.25rem; /* 20px text-xl */
  line-height: 1.75rem;/* 28px */
  font-weight: 500;
}

.title-2 {
  font-size: 1.125rem;/* 18px text-lg */
  line-height: 1.75rem;/* 28px */
  font-weight: 500;
}

.title-3 {
  font-size: 1rem;    /* 16px text-base */
  line-height: 1.5rem;/* 24px */
  font-weight: 500;
}

.title-4 {
  font-size: 0.875rem;/* 14px text-sm */
  line-height: 1.25rem;/* 20px */
  font-weight: 500;
}

.title-5 {
  font-size: 0.75rem; /* 12px text-xs */
  line-height: 1rem;  /* 16px */
  font-weight: 500;
}

.body-1 {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 600;
  text-wrap: pretty;
}

.body-2 {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 500;
  text-wrap: pretty;
}

.body-3 {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 400;
  text-wrap: pretty;
}

.body-4 {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  text-wrap: pretty;
}

.body-5 {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  text-wrap: pretty;
}

.body-6 {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 400;
  text-wrap: pretty;
}

.button-lg {
  font-size: 1.125rem;/* 18px */
  line-height: 1.75rem;/* 28px */
  font-weight: 600;
}

.button-md {
  font-size: 1rem;    /* 16px */
  line-height: 1.5rem;/* 24px */
  font-weight: 600;
}

.button-sm {
  font-size: 0.875rem;/* 14px */
  line-height: 1.25rem;/* 20px */
  font-weight: 600;
}

.button-xsm {
  font-size: 0.75rem; /* 12px */
  line-height: 1rem;  /* 16px */
  font-weight: 600;
}

.caption-1 {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
}

.caption-2 {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 400;
}

.caption-3 {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
}

.caption-4 {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
}

.caption-5 {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 400;
}

.mono-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

html[dir='rtl'] .heading-1 {
  letter-spacing: 0;
  line-height: 1.2;
}

html[dir='rtl'] .heading-2,
html[dir='rtl'] .heading-3,
html[dir='rtl'] .heading-4 {
  letter-spacing: 0;
  line-height: 1.25;
}

html[dir='rtl'] .body-2,
html[dir='rtl'] .body-3 {
  line-height: 1.7;
}

@media (max-width: 768px) {
  .heading-1 {
    font-size: 2.25rem; /* 36px text-4xl */
    line-height: 2.5rem;/* 40px */
  }

  .heading-2 {
    font-size: 1.875rem;/* 30px text-3xl */
    line-height: 2.25rem;/* 36px */
  }

  .heading-3 {
    font-size: 1.5rem;  /* 24px text-2xl */
    line-height: 2rem;  /* 32px */
  }
}
