/* ==========================================================================
   BasicQ Design System — tokens  ·  v3.0 “Jelly”
   --------------------------------------------------------------------------
   Three layers, and components only ever touch the last two:

     1. Primitives  — raw values, named for what they are  (--nile-400)
     2. Semantic    — named for what they do                (--brand, --ink-2)
     3. Scales      — type, space, radius, elevation, motion, layers

   One theme: white. The page is paper, the ink is near-black with a little
   of the river in it, and colour arrives as the jelly shapes do — teal for
   the brand, with lilac, coral and sun as the shapes around it. The older
   primitives stay defined so the design-system page keeps rendering.
   ========================================================================== */

:root{
  /* ---------------------------------------------------------------- 1. primitives */
  /* Nile — the brand. 400 is the river under moonlight, 600 its daylight depth */
  --nile-50:#DCEAE2;
  --nile-300:#5EEAD4;
  --nile-400:#2DD4BF;
  --nile-500:#12B39F;
  --nile-600:#0F766E;
  --nile-650:#0E6F68;
  --nile-700:#0B534D;
  --nile-900:#0C2B27;
  --nile-950:#03211D;

  /* the two rivers, as the hero draws them */
  --nile-blue:#3FE0CF;
  --nile-white:#EFE6D3;

  /* sand — the banks */
  --sand-400:#D9B67C;
  --sand-500:#C39355;
  --sand-600:#A98549;
  --sand-700:#8A6A3B;

  /* papyrus — daylight surfaces and ink */
  --papyrus-50:#FBF7EF;
  --papyrus-100:#F3ECDE;
  --papyrus-150:#F4ECDD;
  --papyrus-175:#F0E9DB;
  --papyrus-200:#E9E2D4;
  --papyrus-250:#E5DCCA;
  --papyrus-300:#DAD0BB;
  --papyrus-400:#BCAB8D;
  --papyrus-450:#ABA18E;
  --papyrus-500:#887D6A;
  --papyrus-600:#6B6254;
  --papyrus-700:#4A4335;
  --papyrus-900:#141009;

  /* night — the warm dark */
  --night-sky:#05080A;
  --night-950:#0A0806;
  --night-900:#151109;
  --night-875:#1A1208;
  --night-850:#1B160D;
  --night-800:#1E1509;
  --night-775:#221C12;
  --night-750:#261A0C;
  --night-700:#2A1E0E;
  --night-650:#2B2417;
  --night-600:#362813;
  --night-550:#3A2B16;

  /* partners' own colours, used only for their own marks */
  --odoo-plum:#714B67;
  --odoo-lilac:#C79BFF;
  --taajr-500:#7B3FE4;
  --hawaij-700:#16513F;

  /* signal */
  --danger-light:#C2603F;
  --danger-dark:#E08A66;

  /* ink and paper, for daylight */
  --paper:#FFFFFF;
  --paper-2:#F7F9FA;
  --paper-3:#EEF2F4;
  --ink-900:#0B1418;
  --ink-700:#3F4C54;
  --ink-500:#5E6B72;
  --line-200:#E3E8EB;
  --line-100:#EDF1F3;

  /* the jelly: the shapes' own colours, for the few places type needs them */
  --jelly-teal:#0F766E;
  --jelly-lilac:#6B3FDF;
  --jelly-coral:#D9481F;
  --jelly-sun:#B86A00;

  /* ---------------------------------------------------------------- 2. semantic */
  --ground:var(--paper);
  --card:var(--paper);
  --card-2:var(--paper-2);
  --deep:var(--paper-2);
  --deep-2:var(--paper-3);
  --deep-ink:var(--ink-900);
  --deep-ink-2:var(--ink-700);
  --deep-line:var(--line-200);
  --scene:var(--paper);

  --ink:var(--ink-900);
  --ink-2:var(--ink-700);
  --ink-3:var(--ink-500);
  --line:var(--line-200);
  --line-2:var(--line-100);

  --brand:var(--nile-600);
  --brand-2:var(--nile-700);
  --brand-text:var(--nile-600);
  --brand-soft:#E7F7F4;
  --brand-bright:var(--nile-500);
  --on-brand:#FFFFFF;

  --sand:var(--sand-600);
  --sand-2:var(--sand-700);
  --odoo:var(--odoo-plum);
  --danger:var(--danger-light);

  --lens-bg:#EFE8DA;
  --lens-ink:#07211C;
  --hawaij:var(--hawaij-700);
  --taajr:var(--taajr-500);
  --taajr-tile:#1F0433;
  --taajr-face:#AE72FF;

  --course:var(--line);
  --course-2:var(--line-2);

  /* ---------------------------------------------------------------- 3. scales */
  /* type */
  --font-display:'Outfit','IBM Plex Sans Arabic','Helvetica Neue',Arial,sans-serif;
  --font-sans:'Work Sans','IBM Plex Sans Arabic',system-ui,-apple-system,'Segoe UI',sans-serif;
  --font-mono:'IBM Plex Mono',ui-monospace,SFMono-Regular,Menlo,monospace;
  --font-arabic:'IBM Plex Sans Arabic','Noto Kufi Arabic',system-ui,sans-serif;

  --t-mono:.7rem;
  --t-xs:.78rem;
  --t-sm:.875rem;
  --t-body:clamp(1rem,.36vw + .92rem,1.06rem);
  --t-lg:clamp(1.1rem,1.6vw,1.3rem);
  --t-xl:clamp(1.22rem,1.9vw,1.5rem);
  --t-2xl:clamp(1.75rem,2.9vw,2.4rem);
  --t-h2:clamp(1.95rem,4vw,3.15rem);
  --t-display:clamp(2.5rem,6.6vw,5.2rem);
  --t-hero:clamp(3rem,7.2vw,6.25rem);

  --lh-tight:.98;
  --lh-snug:1.18;
  --lh-body:1.65;
  --lh-loose:1.72;
  --tr-display:-.035em;
  --tr-mono:.13em;

  /* space — a 4px grid, with fluid section rhythm on top */
  --sp-1:4px;
  --sp-2:8px;
  --sp-3:12px;
  --sp-4:16px;
  --sp-5:20px;
  --sp-6:24px;
  --sp-7:32px;
  --sp-8:40px;
  --sp-9:56px;
  --sp-10:80px;
  --wrap:1240px;
  --gut:clamp(10px,1.2vw,18px);
  --pad:clamp(26px,4.8vw,80px);
  --section:clamp(78px,10vw,150px);

  /* radius */
  --r-xs:6px;
  --r-sm:14px;
  --r-md:17px;
  --r-lg:26px;
  --r:30px;
  --r-pill:999px;

  /* elevation */
  --shadow-inset:inset 0 1px 0 rgba(255,255,255,.9);
  --shadow-sm:0 1px 2px rgba(11,20,24,.05),0 2px 8px -2px rgba(11,20,24,.06);
  --shadow-float:0 24px 60px -28px rgba(11,20,24,.22);
  --shadow-lift:0 30px 70px -36px rgba(11,40,40,.28),0 8px 20px -12px rgba(11,20,24,.12);
  --glow-brand:0 0 0 1px color-mix(in srgb,var(--brand-bright) 40%,transparent),
               0 18px 50px -18px color-mix(in srgb,var(--brand-bright) 55%,transparent);

  /* motion — one family of curves, three speeds */
  --ease-out:cubic-bezier(.22,.61,.36,1);
  --ease-in-out:cubic-bezier(.65,0,.35,1);
  --ease-spring:cubic-bezier(.34,1.56,.64,1);
  --ease-jelly:linear(0,.28 7%,.78 16%,1.1 26%,1.16 32%,1.08 42%,.97 55%,.99 70%,1);
  --dur-fast:.2s;
  --dur-base:.32s;
  --dur-slow:.7s;
  --dur-scene:1.6s;

  /* layers */
  --z-scene:0;
  --z-scrim:1;
  --z-content:2;
  --z-menu:59;
  --z-mast:60;
  --z-skip:90;
}
