/* ============================================================
   Samawy Design System — Core tokens
   Brand: Arab publishing-tech company (ebooks + audio + print)
   Primary: Samawy Blue #0B80FF; Dark: Midnight Ink #010B26
   ============================================================ */

/* ---------- Fonts (self-hosted) ----------
   Brand Arabic face is Lama Sans; drop licensed LamaSans-*.woff2 into ../fonts/ and add
   @font-face here for full brand fidelity. Until then the design system's documented
   Arabic fallback, IBM Plex Sans Arabic, is self-hosted. Latin/numerals: Hanken Grotesk. */
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../fonts/plexar-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../fonts/plexar-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../fonts/plexar-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../fonts/plexar-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("../fonts/hanken-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("../fonts/hanken-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("../fonts/hanken-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("../fonts/hanken-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  /* ---------- Brand palette (from Visual Identity V1.0) ---------- */
  --samawy-blue:        #0B80FF;  /* primary */
  --samawy-cyan:        #0BC0F1;  /* secondary accent */
  --samawy-sky:         #A9DDF7;  /* soft accent */
  --samawy-lime:        #B5D77A;  /* success / positive */
  --samawy-sun:         #F9E866;  /* highlight / sale */
  --samawy-ink:         #010B26;  /* deep navy — headings, dark surfaces */
  --samawy-ink-2:       #141B34;  /* slightly lifted ink (icons, chips) */

  /* Extended scale derived from the primary */
  --blue-50:   #EAF3FF;
  --blue-100:  #CEE6FF;
  --blue-200:  #9DCFFF;
  --blue-300:  #5FAFFF;
  --blue-400:  #2F93FF;
  --blue-500:  #0B80FF; /* === --samawy-blue */
  --blue-600:  #0066D6;
  --blue-700:  #0052AE;
  --blue-800:  #003D83;
  --blue-900:  #002355;

  /* ---------- Neutrals (grey-ink scale, cool bias) ---------- */
  --neutral-0:   #FFFFFF;
  --neutral-50:  #F7F8FA;
  --neutral-100: #EEEEEE;
  --neutral-200: #E0E0E0;
  --neutral-300: #C6C6C6;
  --neutral-400: #9C9C9C;
  --neutral-500: #757575;
  --neutral-600: #424242;
  --neutral-700: #212121;
  --neutral-800: #0F1220;
  --neutral-900: #010B26;

  /* ---------- Semantic ---------- */
  --success:       #4CAF50;
  --success-soft:  #E7F6E8;
  --warning:       #F9B233;
  --warning-soft:  #FFF4DE;
  --danger:        #E31F1F;
  --danger-soft:   #FDE5E5;
  --info:          #0BC0F1;
  --info-soft:     #E6F8FD;

  /* ---------- Foreground / surface tokens ---------- */
  --fg-1: var(--neutral-700);         /* primary text */
  --fg-2: #6B6B6B;                    /* secondary text */
  --fg-3: #9C9C9C;                    /* tertiary / captions */
  --fg-inverse: #FFFFFF;
  --fg-brand: var(--samawy-blue);
  --fg-accent: var(--samawy-ink);

  --bg-1: #FFFFFF;                    /* primary surface */
  --bg-2: var(--neutral-50);          /* subtle section bg */
  --bg-3: var(--neutral-100);         /* elevated chip */
  --bg-inverse: var(--samawy-ink);
  --bg-brand: var(--samawy-blue);
  --bg-brand-soft: var(--blue-50);

  --border-1: var(--neutral-200);
  --border-2: var(--neutral-300);
  --border-brand: var(--samawy-blue);
  --divider: #D0D0D0;

  /* ---------- Typography families ---------- */
  --font-arabic:  "Lama Sans", "IBM Plex Sans Arabic", "Noto Naskh Arabic", system-ui, sans-serif;
  --font-latin:   "Hanken Grotesk", "Effra", "Inter", system-ui, -apple-system, sans-serif;
  --font-reader:  "Amiri", "Noto Naskh Arabic", Georgia, serif;  /* long-form reading */
  --font-mono:    ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* ---------- Type scale ---------- */
  --fs-10: 10px;
  --fs-12: 12px;
  --fs-13: 13px;
  --fs-14: 14px;
  --fs-16: 16px;
  --fs-18: 18px;
  --fs-20: 20px;
  --fs-24: 24px;
  --fs-30: 30px;
  --fs-32: 32px;
  --fs-40: 40px;
  --fs-48: 48px;
  --fs-64: 64px;

  --lh-tight:  1.2;   /* @kind font */
  --lh-snug:   1.4;   /* @kind font */
  --lh-normal: 1.5;   /* @kind font */
  --lh-loose:  1.6;   /* @kind font */

  --fw-light: 300;    /* @kind font */
  --fw-regular: 400;  /* @kind font */
  --fw-medium: 500;   /* @kind font */
  --fw-semibold: 600; /* @kind font */
  --fw-bold: 700;     /* @kind font */
  --fw-black: 900;    /* @kind font */

  /* ---------- Spacing (4px base) ---------- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;

  /* ---------- Radius ---------- */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 24px;
  --r-pill: 999px;

  /* ---------- Shadows ---------- */
  --shadow-xs: 0 1px 2px rgba(1, 11, 38, 0.06);
  --shadow-sm: 0 2px 4px rgba(1, 11, 38, 0.08);
  --shadow-md: 0 6px 14px rgba(1, 11, 38, 0.08);
  --shadow-lg: 0 14px 32px rgba(1, 11, 38, 0.10);
  --shadow-nav: 0 -2px 4px rgba(0, 0, 0, 0.09);
  --shadow-ring-brand: 0 0 0 4px rgba(11, 128, 255, 0.18);

  /* ---------- Motion ---------- */
  --ease-standard: cubic-bezier(.2,.7,.3,1);    /* @kind other */
  --ease-emphasized: cubic-bezier(.25,.8,.25,1); /* @kind other */
  --dur-fast: 120ms;  /* @kind other */
  --dur-base: 200ms;  /* @kind other */
  --dur-slow: 320ms;  /* @kind other */
}

/* ---------- Semantic element styles ---------- */
body {
  font-family: var(--font-latin);
  color: var(--fg-1);
  background: var(--bg-1);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}

body[dir="rtl"], [dir="rtl"] {
  font-family: var(--font-arabic);
}

/* Display / Heading scale — used in both mobile app hero copy and web banners */
.h-display { font-family: var(--font-arabic); font-weight: 700; font-size: var(--fs-64); line-height: var(--lh-tight); letter-spacing: -0.01em; color: var(--fg-accent); }
.h1 { font-weight: 700; font-size: var(--fs-48); line-height: var(--lh-tight); color: var(--fg-accent); }
.h2 { font-weight: 700; font-size: var(--fs-32); line-height: 1.3; color: var(--fg-accent); }
.h3 { font-weight: 700; font-size: var(--fs-24); line-height: var(--lh-snug); color: var(--fg-1); }
.h4 { font-weight: 700; font-size: var(--fs-20); line-height: var(--lh-loose); color: var(--fg-1); }
.h5 { font-weight: 700; font-size: var(--fs-16); line-height: var(--lh-snug); color: var(--fg-1); }

.p   { font-weight: 400; font-size: var(--fs-16); line-height: var(--lh-loose); color: var(--fg-1); }
.p-sm { font-weight: 400; font-size: var(--fs-14); line-height: var(--lh-normal); color: var(--fg-2); }
.caption { font-weight: 400; font-size: var(--fs-12); line-height: var(--lh-normal); color: var(--fg-3); letter-spacing: 0.02em; }
.overline { font-weight: 600; font-size: var(--fs-12); line-height: 1.2; text-transform: uppercase; letter-spacing: 0.12em; color: var(--fg-2); }

code, .code { font-family: var(--font-mono); font-size: 13px; background: var(--bg-3); padding: 2px 6px; border-radius: var(--r-xs); }
