/* =========================================================
   SERA — Theme tokens (dark default + light)
   كل الألوان تُعرَّف هنا فقط. لا تكتب ألواناً مباشرة في الملفات الأخرى.
   ========================================================= */

@font-face {
  font-family: "Plex Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/plex-arabic-arabic-400.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Plex Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/plex-arabic-arabic-500.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Plex Arabic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/plex-arabic-arabic-700.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Plex Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/plex-arabic-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Plex Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/plex-arabic-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Plex Arabic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/plex-arabic-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2212;
}

/* ---------- Shared (theme‑independent) tokens ---------- */
:root {
  --font: "Plex Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;

  /* Brand purple scale */
  --purple-300: #c4b5fd;
  --purple-400: #a78bfa;
  --purple-500: #8b5cf6;
  --purple-600: #7c3aed;
  --purple-700: #6d28d9;

  /* Type scale */
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.625rem;
  --fs-2xl: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  --fs-3xl: clamp(2.25rem, 1.4rem + 3.8vw, 4.25rem);

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4.5rem;
  --sp-9: 6.5rem;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --container: 1160px;
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Buttons use the same purple in both themes (white text = 5.7:1) */
  --btn-bg: var(--purple-600);
  --btn-bg-hover: var(--purple-700);
  --btn-text: #ffffff;
}

/* ---------- Dark theme (default — brand black) ---------- */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090d;
  --bg-elevated: #111118;
  --surface: #14141c;
  --surface-2: #1c1c27;
  --border: #282838;
  --border-strong: #3a3a50;
  --text: #f4f4f7;
  --text-muted: #a3a3b8;
  --accent: #a78bfa;          /* accent used for text/icons on dark */
  --accent-soft: rgba(139, 92, 246, 0.14);
  --accent-glow: rgba(124, 58, 237, 0.35);
  --success: #4ade80;
  --success-soft: rgba(74, 222, 128, 0.12);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.12);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.12);
  --header-bg: rgba(9, 9, 13, 0.78);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* ---------- Light theme ---------- */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-elevated: #fafafc;
  --surface: #f6f5fb;
  --surface-2: #eeecf7;
  --border: #e4e2ee;
  --border-strong: #cfcbe0;
  --text: #0e0e14;
  --text-muted: #555366;
  --accent: #6d28d9;          /* accent used for text/icons on white (7:1) */
  --accent-soft: rgba(124, 58, 237, 0.09);
  --accent-glow: rgba(124, 58, 237, 0.18);
  --success: #15803d;
  --success-soft: rgba(21, 128, 61, 0.09);
  --danger: #b91c1c;
  --danger-soft: rgba(185, 28, 28, 0.08);
  --warning: #a16207;
  --warning-soft: rgba(161, 98, 7, 0.1);
  --header-bg: rgba(255, 255, 255, 0.82);
  --shadow: 0 10px 30px rgba(20, 16, 40, 0.08);
}
