/* ============================================================
   MUHIMMA DIGITAL PLATFORM — COLORS & TYPOGRAPHY
   Single source of truth for design tokens.
   Brand tokens and self-hosted fonts for the URL Inventory page.
   ============================================================ */

/* -------- FONT FACES (self-hosted) -------- */
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-Medium.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-SemiBold.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Bebas Neue';
  src: url('../fonts/BebasNeue-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Almarai';
  src: url('../fonts/Almarai-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}

/* -------- DESIGN TOKENS -------- */
:root, [data-theme="light"] {
  /* Brand core */
  --color-orange: #f36b1f;
  --color-orange-hover: #e05e15;
  --color-amber: #fdb55b;
  --color-cream: #fdf6ef;
  --color-dark: #2e2e2e;

  /* Surfaces & borders */
  --color-background: #fdf6ef;
  --color-surface: #ffffff;
  --color-surface-hover: #fafafa;
  --color-border: #e8e0d8;
  --color-border-strong: #d0c7bd;
  --color-border-orange: #fde8d0;

  /* Text (per DESIGN-INSTRUCTIONS §2) */
  --color-text-primary: #3b3b3b;
  --color-text-secondary: #707070;
  --color-text-muted: #909090;
  --color-text-inverse: #ffffff;

  /* Tints (subtle warm backgrounds, per DESIGN-INSTRUCTIONS §2) */
  --color-orange-tint: #fff3eb;       /* accent-tag bg, eyebrow bg */
  --color-warm-tint: #fff8f2;
  --color-neutral-tint: #f0f0f0;      /* neutral tag bg */
  --color-credibility: #f0ebe3;       /* credibility strip bg */
  --color-blue-tint: #e8f0fc;
  --color-green-tint: #e8f5e9;
  --color-pink-tint: #fce8ee;

  /* Semantic accents */
  --color-accent-green: #2d8659;
  --color-accent-red: #c0392b;
  --color-accent-blue: #3b82f6;
  --color-accent-purple: #8b5cf6;
  --color-accent-cyan: #06b6d4;
  --color-accent-teal: #14b8a6;

  /* Data-viz scale (ordered for Recharts, brand-led per screenshot) */
  --chart-1: #f36b1f;  /* primary brand orange */
  --chart-2: #fbb447;  /* primary amber */
  --chart-3: #707070;  /* primary grey */
  --chart-4: #8E9775;  /* secondary sage */
  --chart-5: #6d92a6;  /* secondary steel blue */
  --chart-6: #2d8659;  /* forest green (above-mean) */
  --chart-7: #3b82f6;  /* extended blue */
  --chart-8: #8b5cf6;  /* extended purple */
  --chart-9: #e84393;  /* extended pink */
  --chart-10: #14b8a6; /* extended teal */
  --chart-11: #06b6d4; /* extended cyan */
  --chart-12: #c0392b; /* extended red (below-mean) */

  /* Bars & chart chrome */
  --bar-above: #2d8659;
  --bar-below: #c0392b;
  --bar-track: #e8e0d8;
  --chart-grid: #e8e0d8;
  --tooltip-bg: #ffffff;
  --header-bg: rgba(253, 246, 239, 0.92);
  --color-card-shadow: rgba(0, 0, 0, 0.07);
  --color-glow: rgba(243, 107, 31, 0.08);

  /* Typography family tokens */
  --font-family-body: 'Poppins', Arial, sans-serif;
  --font-family-display: 'Bebas Neue', sans-serif;
  --font-family-arabic: 'Almarai', 'Poppins', sans-serif;

  /* Type scale (semantic) */
  --text-page-heading-size: 40px;
  --text-page-heading-weight: 400;
  --text-kpi-size: 44px;
  --text-kpi-weight: 700;
  --text-card-title-size: 18px;
  --text-card-title-weight: 600;
  --text-section-label-size: 12px;
  --text-section-label-weight: 700;
  --text-section-label-tracking: 1px;
  --text-body-size: 14px;
  --text-body-weight: 400;
  --text-table-size: 13px;
  --text-small-size: 12px;

  /* Layout (per DESIGN-INSTRUCTIONS §4) */
  --max-site-width: 1440px;
  --section-py-desktop: 88px;
  --section-py-tablet: 64px;
  --section-py-mobile: 48px;

  /* Spacing (8pt grid) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-card: 14px;
  --radius-pill: 20px;
  --radius-full: 999px;

  /* Shadows (never pure black) */
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.10);
  --shadow-popover: 0 12px 40px rgba(0, 0, 0, 0.10);
  --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 4px 20px rgba(59, 59, 59, 0.18);
  --shadow-brand: 0 4px 20px rgba(59, 59, 59, 0.18);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-base: 200ms;
  --duration-slow: 400ms;
}

/* -------- SEMANTIC ELEMENT DEFAULTS -------- */
html, body {
  font-family: var(--font-family-body);
  color: var(--color-text-primary);
  background: var(--color-background);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, .h1 {
  font-family: var(--font-family-display);
  font-size: var(--text-page-heading-size);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--color-text-primary);
  margin: 0;
}
h2, .h2 {
  font-family: var(--font-family-display);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--color-text-primary);
  margin: 0;
}
h3, .h3 {
  font-family: var(--font-family-body);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text-primary);
  margin: 0;
}
h4, .h4 {
  font-family: var(--font-family-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}
p, .body {
  font-size: var(--text-body-size);
  font-weight: 400;
  color: var(--color-text-primary);
  line-height: 1.55;
  margin: 0;
}
.label, .section-label {
  font-size: var(--text-section-label-size);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--text-section-label-tracking);
  color: var(--color-text-secondary);
}
.kpi {
  font-family: var(--font-family-display);
  font-size: var(--text-kpi-size);
  font-weight: 400;
  line-height: 1;
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.small, small {
  font-size: var(--text-small-size);
  color: var(--color-text-secondary);
}
.mono-num {
  font-variant-numeric: tabular-nums;
}
.rtl, [dir="rtl"] {
  font-family: var(--font-family-arabic);
}
