/*
 * Muslim identity tokens: the one place the site's colours, type, radii and motion are set.
 * Source: «دليل الهوية الرقمية» (tokens.css, p.12) and «دليل تطوير المنصة» (phase 2, p.5).
 *
 * Loaded before every other site stylesheet. Tutor LMS, the Edumall theme and our own mslp-* files
 * read these values, so changing a colour here changes it everywhere.
 */

/* 1. Identity tokens ------------------------------------------------------------------------- */
:root {
  --color-brand: #0A192F;         /* logo, header, footer */
  --color-accent: #1D8CF8;        /* main buttons, links */
  --color-accent-hover: #0F74D6;  /* hover */
  --color-accent-soft: #E8F3FF;   /* badge backgrounds */
  --color-bg: #FFFFFF;            /* page background */
  --color-surface: #F4F8FC;       /* alternate sections */
  --color-text: #0A192F;          /* main text */
  --color-text-muted: #5B6B82;    /* secondary text */
  --color-border: #DCE6F2;        /* borders, dividers */
  --color-success: #16A34A;       /* completed, free */
  --color-warning: #F59E0B;       /* notice */
  --color-danger: #E5484D;        /* error, live */

  /* Dark-mode values from the guide, kept here for when a dark mode is built. */
  --color-dark-bg: #06101F;
  --color-dark-surface: #0F2240;
  --color-dark-text: #E6EEF8;
  --color-dark-accent: #4AA3FA;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow-md: 0 8px 24px rgba(10, 25, 47, .10);

  --font: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --fs-display: clamp(2.5rem, 5vw, 4rem);  /* weight 700, line-height 1.2 */
  --fs-h1: clamp(2rem, 3.5vw, 3rem);       /* 700, 1.25 */
  --fs-h2: clamp(1.5rem, 2.5vw, 2.25rem);  /* 600, 1.3 */
  --fs-h3: 1.375rem;                       /* 600, 1.4 */
  --fs-body: 1.0625rem;                    /* 400, 1.8 */
  --fs-small: .875rem;                     /* 500, 1.6 */

  /* 4/8 spacing scale */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;
  --container: 1280px;

  --ease-out: ease-out;
  --ease-open: cubic-bezier(.2, .8, .2, 1);
  --dur-hover: 100ms;   /* buttons */
  --dur-open: 200ms;    /* menus, cards */
  --dur-page: 400ms;    /* page transitions */

  /* Tutor 4 semantic layer. Plain :root, so a page stylesheet that tunes these (the dashboard) still wins. */
  --tutor-font-family-body: var(--font);
  --tutor-font-family-heading: var(--font);
  --tutor-text-primary: var(--color-text);
  --tutor-border-idle: var(--color-border);
}

/*
 * 2. Bridge to Tutor and Edumall. `html:root` outranks the `:root` blocks they print from their own
 * settings (Tutor's brand colour, Edumall's generated file loaded last), whatever the load order.
 */
html:root {
  /* Tutor 4 brand scale, from #1D8CF8 with Tutor's own palette formula; 200/600/700 pinned to the guide. */
  --tutor-brand-100: #f2f9ff;
  --tutor-brand-200: var(--color-accent-soft);
  --tutor-brand-300: #d9edfd;
  --tutor-brand-400: #9ad2fc;
  --tutor-brand-450: #8ec8fa;
  --tutor-brand-500: #33a7fe;
  --tutor-brand-600: var(--color-accent);
  --tutor-brand-700: var(--color-accent-hover);
  --tutor-brand-800: #125cbb;
  --tutor-brand-900: #134a95;
  --tutor-brand-950: #102e5a;

  /* Tutor classic variables (course, lesson and quiz pages). */
  --tutor-color-primary: var(--color-accent);
  --tutor-color-primary-rgb: 29, 140, 248;
  --tutor-color-primary-hover: var(--color-accent-hover);
  --tutor-body-color: var(--color-text);
  --tutor-body-color-rgb: 10, 25, 47;
  --tutor-border-color: var(--color-border);
  --tutor-color-secondary: var(--color-text-muted);
  --tutor-color-muted: var(--color-text-muted);
  --tutor-color-success: var(--color-success);
  --tutor-color-success-rgb: 22, 163, 74;
  --tutor-color-warning: var(--color-warning);
  --tutor-color-warning-rgb: 245, 158, 11;
  --tutor-color-danger: var(--color-danger);
  --tutor-color-danger-rgb: 229, 72, 77;

  /* Edumall theme colours (blog, archives and older templates). */
  --edumall-color-primary: var(--color-brand);
  --edumall-color-primary-rgb: 10, 25, 47;
  --edumall-color-heading: var(--color-text);
  --edumall-color-text: var(--color-text-muted);
  --edumall-color-link: var(--color-text);
  --edumall-color-link-hover: var(--color-accent);
  --edumall-color-box-border: var(--color-border);
  --edumall-color-form-focus-border: var(--color-accent);
}

/*
 * This file sets values only. It adds no component rules (button shapes, shadows, card corners):
 * the site's approved page designs stay as they are and simply read these colours.
 */
