/* ==========================================================================
   Mastery Facilities — Design tokens
   Source: Mastery Facilities Brand Identity 2026 (Color Palette p.6,
   Typography p.7–8, UI Components p.20: line icons 1.8 stroke, radius 16, grid 8)
   Change brand values HERE only. Every component reads from these variables.
   ========================================================================== */

/* ---- Fonts: self-hosted WOFF2 (brand book p.8) ------------------------- */
/* English: Poppins (SIL OFL 1.1) */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/poppins-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/poppins-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/poppins-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Arabic: brand font is Somar Sans (Baianat) — its web licence still needs
   written confirmation (brand book p.8). Until then the brand book's approved
   fallback, IBM Plex Sans Arabic (SIL OFL 1.1), is used. To switch, add the
   Somar Sans @font-face rules and put "Somar Sans" first in --font-ar. */
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

:root {
  /* ---- Brand palette (p.6) ---- */
  --c-petrol: #004751;      /* Mastery Petrol — primary */
  --c-white: #FFFFFF;       /* White — primary */
  --c-grey: #ECECEE;        /* Light Grey — primary */
  --c-ink: #2E3A40;         /* Dark Grey — text */
  --c-ice: #DCEEF5;         /* Ice Blue — secondary, backgrounds & details */

  /* ---- Functional tints derived only from the palette ---- */
  --c-petrol-90: #1A5A63;   /* hover/pressed on petrol */
  --c-petrol-08: rgb(0 71 81 / .08);
  --c-petrol-14: rgb(0 71 81 / .14);
  --c-ink-70: rgb(46 58 64 / .78);  /* secondary text, AA on white */
  --c-ink-50: rgb(46 58 64 / .72);  /* captions, ≥4.5:1 on white */
  --c-line: rgb(46 58 64 / .12);
  --c-line-strong: rgb(46 58 64 / .22);
  --c-ice-soft: #EEF7FA;
  --c-on-petrol-70: rgb(255 255 255 / .78);
  --c-danger: #B3261E;      /* form errors only (accessibility requirement) */

  /* ---- Typography (p.7–8) ---- */
  --font-en: "Poppins", Tahoma, Arial, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif;
  --font: var(--font-en);
  --fw-regular: 400; --fw-medium: 500; --fw-strong: 600;

  --fs-xs: .8125rem;   /* 13 */
  --fs-sm: .9375rem;   /* 15 */
  --fs-base: 1.0625rem;/* 17 */
  --fs-lg: 1.25rem;    /* 20 */
  --fs-xl: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
  --fs-2xl: clamp(1.875rem, 1.3rem + 2vw, 2.75rem);
  --fs-3xl: clamp(2.25rem, 1.4rem + 3.2vw, 3.75rem);
  --fs-hero: clamp(2.5rem, 1.5rem + 4.2vw, 4.75rem);
  --lh-tight: 1.12; --lh-snug: 1.3; --lh-body: 1.7;
  --tracking-caps: .14em;

  /* ---- Space: 8-point grid (p.20) ---- */
  --s-1: .5rem; --s-2: 1rem; --s-3: 1.5rem; --s-4: 2rem; --s-5: 2.5rem;
  --s-6: 3rem; --s-8: 4rem; --s-10: 5rem; --s-12: 6rem; --s-16: 8rem;
  --section-y: clamp(4.5rem, 3rem + 6vw, 8.5rem);
  --gutter: clamp(1.25rem, .6rem + 2.6vw, 2.5rem);
  --container: 76rem;
  --container-wide: 88rem;

  /* ---- Shape (p.20: radius 16) ---- */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;

  /* ---- Elevation ---- */
  --shadow-sm: 0 1px 2px rgb(0 71 81 / .06), 0 1px 1px rgb(0 71 81 / .04);
  --shadow-md: 0 12px 32px -12px rgb(0 71 81 / .22), 0 2px 6px rgb(0 71 81 / .06);
  --shadow-lg: 0 32px 64px -24px rgb(0 71 81 / .30);

  /* ---- Motion ---- */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 160ms; --t-med: 320ms; --t-slow: 700ms;

  /* ---- Icons (p.20: line, 1.8 stroke, round) ---- */
  --icon-stroke: 1.8;

  /* ---- Header ---- */
  --header-h: 80px;
}

html[lang="ar"] { --font: var(--font-ar); --tracking-caps: 0; }
@media (max-width: 960px) { :root { --header-h: 68px; } }
