/*
 * 3 Point Academy — design tokens
 * --------------------------------------------------------------
 * Single source of truth for colour, type, spacing, radii, shadows
 * and motion. Every other stylesheet consumes these variables only.
 *
 * Brand source: "Three Point Academy — Brand Showcase" (May 2025) and
 * "color palette.pdf" from the brand Drive folder. Official colours:
 *   Indigo  #4743CB   (primary)        Paper   #F7F6F0  (background)
 *   Yellow  #F8D126   (accent)         Sky     #30C8F6  (secondary accent)
 *   Purple  #8354BF   (tertiary)
 * Tints/shades below are derived from those five.
 *
 * Contrast (on #FFFFFF unless stated):
 *   ink        #14122E  17.6:1   body text
 *   ink-2      #3F3D5C  10.6:1   secondary text
 *   ink-3      #5E5C78   6.4:1   meta text (5.9:1 on paper)
 *   brand-600  #4743CB   7.2:1   links, primary buttons (white text 7.2:1)
 *   accent-700 #8A6A00   5.1:1   accent text on light
 *   yellow #F8D126 on brand-900 #15134A  11.6:1;  on brand-600  4.8:1
 *   sky #30C8F6 is decorative only on light backgrounds (fails as text).
 *
 * Brand typefaces (KO Sans, Neulis Cursive) are kept in the logo artwork.
 * Site text uses IBM Plex Sans Arabic / IBM Plex Sans (OFL) because the
 * brand font files carry no web-embedding licence.
 */

/* ---------- Fonts (self-hosted, swap) ---------- */
@font-face {
  font-family: "Plex Arabic";
  src: url("/assets/fonts/plex-arabic-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
}
@font-face {
  font-family: "Plex Arabic";
  src: url("/assets/fonts/plex-arabic-semibold.woff2") format("woff2");
  font-weight: 500 600; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
}
@font-face {
  font-family: "Plex Arabic";
  src: url("/assets/fonts/plex-arabic-bold.woff2") format("woff2");
  font-weight: 700 800; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
}
@font-face {
  font-family: "Plex Sans";
  src: url("/assets/fonts/plex-sans-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Plex Sans";
  src: url("/assets/fonts/plex-sans-semibold.woff2") format("woff2");
  font-weight: 500 600; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Plex Sans";
  src: url("/assets/fonts/plex-sans-bold.woff2") format("woff2");
  font-weight: 700 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}

:root {
  /* ---------- Colour: brand (indigo) ---------- */
  --c-brand-950: #0F0D33;
  --c-brand-900: #15134A;
  --c-brand-800: #26238A;
  --c-brand-700: #3A36B0;
  --c-brand-600: #4743CB;   /* official */
  --c-brand-500: #6460D6;
  --c-brand-200: #CFCDF3;
  --c-brand-100: #E7E6FA;
  --c-brand-50:  #F3F2FD;

  /* ---------- Colour: accents ---------- */
  --c-accent-700: #8A6A00;
  --c-accent-500: #E5BB0B;
  --c-accent-400: #F8D126;  /* official yellow */
  --c-accent-100: #FEF6D3;
  --c-sky-500: #30C8F6;     /* official sky — decorative on light */
  --c-sky-100: #DDF5FD;
  --c-purple-500: #8354BF;  /* official purple */
  --c-purple-100: #EFE7F8;

  /* ---------- Colour: ink & surface ---------- */
  --c-ink:      #14122E;
  --c-ink-2:    #3F3D5C;
  --c-ink-3:    #5E5C78;
  --c-line:     #E6E4DC;
  --c-line-2:   #D2CFC4;
  --c-surface:  #FFFFFF;
  --c-surface-2:#F7F6F0;    /* official paper */
  --c-surface-3:#EEECE3;
  --c-on-dark:  #FFFFFF;
  --c-on-dark-2:#C9C7F2;

  /* ---------- Colour: status ---------- */
  --c-success: #146C43;
  --c-success-bg: #E3F3EA;
  --c-warning: #8F5200;
  --c-warning-bg: #FDF1DD;
  --c-danger:  #B42318;
  --c-danger-bg: #FDE9E7;
  --c-info:    var(--c-brand-600);
  --c-info-bg: var(--c-brand-100);

  /* Semantic aliases */
  --c-text: var(--c-ink);
  --c-text-muted: var(--c-ink-3);
  --c-link: var(--c-brand-600);
  --c-focus: #4743CB;
  --c-bg: var(--c-surface);

  /* ---------- Type ---------- */
  --font-ar: "Plex Arabic", "Plex Sans", "Segoe UI", Tahoma, sans-serif;
  --font-en: "Plex Sans", "Plex Arabic", "Segoe UI", system-ui, sans-serif;
  --font: var(--font-ar);

  /* Fluid scale, 360 → 1440 px (ratio ≈ 1.25 → 1.333) */
  --fs-xs:  0.8125rem;                                   /* 13 */
  --fs-sm:  0.9375rem;                                   /* 15 */
  --fs-md:  1.0625rem;                                   /* 17 body */
  --fs-lg:  clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);/* 18→21 */
  --fs-xl:  clamp(1.3125rem, 1.15rem + 0.7vw, 1.75rem);  /* 21→28 */
  --fs-2xl: clamp(1.625rem, 1.3rem + 1.4vw, 2.375rem);   /* 26→38 */
  --fs-3xl: clamp(2rem, 1.5rem + 2.3vw, 3.25rem);        /* 32→52 */
  --fs-4xl: clamp(2.375rem, 1.6rem + 3.6vw, 4.5rem);     /* 38→72 */

  --lh-tight: 1.15;
  --lh-snug: 1.3;
  --lh-body: 1.7;     /* Arabic needs generous leading */
  --fw-regular: 400;
  --fw-medium: 600;
  --fw-bold: 700;
  --tracking-caps: 0.08em;

  /* ---------- Spacing (4/8 base) ---------- */
  --s-1: 0.25rem;  /* 4 */
  --s-2: 0.5rem;   /* 8 */
  --s-3: 0.75rem;  /* 12 */
  --s-4: 1rem;     /* 16 */
  --s-5: 1.5rem;   /* 24 */
  --s-6: 2rem;     /* 32 */
  --s-7: 3rem;     /* 48 */
  --s-8: 4rem;     /* 64 */
  --s-9: 6rem;     /* 96 */
  --s-10: 8rem;    /* 128 */
  --section-y: clamp(4rem, 2.5rem + 6vw, 8rem);
  --gutter: clamp(1.25rem, 0.75rem + 2.5vw, 3rem);
  --container: 1240px;
  --container-narrow: 760px;
  --header-h: 72px;

  /* ---------- Radii ---------- */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* ---------- Shadows ---------- */
  --sh-1: 0 1px 2px rgba(21, 19, 74, .06), 0 1px 1px rgba(21, 19, 74, .04);
  --sh-2: 0 4px 12px rgba(21, 19, 74, .08), 0 1px 3px rgba(21, 19, 74, .06);
  --sh-3: 0 18px 40px -12px rgba(21, 19, 74, .22), 0 4px 10px rgba(21, 19, 74, .06);
  --sh-focus: 0 0 0 3px #fff, 0 0 0 5px var(--c-focus);

  /* ---------- Motion ---------- */
  --dur-1: 120ms;
  --dur-2: 200ms;
  --dur-3: 320ms;
  --dur-4: 600ms;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);

  /* ---------- Layers ---------- */
  --z-header: 50;
  --z-float: 60;
  --z-overlay: 80;
  --z-toast: 90;
}

:root[lang="en"] { --font: var(--font-en); --lh-body: 1.6; }

@media (prefers-reduced-motion: reduce) {
  :root { --dur-1: 0ms; --dur-2: 0ms; --dur-3: 0ms; --dur-4: 0ms; }
}
