/* ==========================================================================
   3DTCI DESIGN TOKENS  -  single source of truth for colors, type, radii.
   --------------------------------------------------------------------------
   Master copy lives in  brand/tokens/tokens.css
   The landing site uses a copy at  landing/assets/css/tokens.css
   (run  python tools/export-assets.py  to sync it, or copy the file by hand).
   The same values are in brand/tokens/tokens.json (Figma / Tailwind) and in
   the Odoo theme kit (brand/theme-kits/odoo/).

   Contrast (WCAG 2.x), checked:
     Ink on Paper ............ 18.0 : 1   body text
     Ink on Fuse 500 ......... 5.3 : 1    primary button label  (use INK, not white)
     Fuse 500 on Ink ......... 5.3 : 1    accent text on dark
     Fuse 600 on Paper ....... 4.8 : 1    links / small accent text on light
     Fuse 600 on White ....... 5.2 : 1
     White on Fuse 600 ....... 5.2 : 1    (white text needs Fuse 600, never 500)
     Fuse 500 on White ....... 3.7 : 1    large display text + icons ONLY
     Ink 500 on Paper ........ 4.5 : 1    muted text minimum on light
     Ink 300 on Ink .......... 11.0 : 1   muted text on dark
     Ion 400 on Ink .......... 12.8 : 1   dark-only highlight
   ========================================================================== */

:root {
  /* ---- Raw palette: Ink (neutrals) ------------------------------------- */
  --ink-950: #0A0B10;   /* brand "Ink" */
  --ink-900: #12141B;
  --ink-800: #1A1C25;
  --ink-700: #2A2D39;
  --ink-600: #454A59;   /* "Graphite" */
  --ink-500: #6B7080;
  --ink-400: #9398A8;
  --ink-300: #BEC2CE;
  --ink-200: #DEE0E7;
  --ink-100: #EEEFF3;
  --paper:   #F6F5F2;   /* brand "Paper" */
  --white:   #FFFFFF;

  /* ---- Raw palette: Fuse (brand accent, electric blue) ----------------- */
  --fuse-50:  #EEF4FF;
  --fuse-100: #D6E3FF;
  --fuse-200: #ABC7FF;
  --fuse-300: #7CA8FF;
  --fuse-400: #568FFF;
  --fuse-500: #3D7EFF;  /* brand "Fuse" */
  --fuse-600: #1560F5;
  --fuse-700: #104CC5;
  --fuse-800: #103A8D;
  --fuse-900: #0A2357;

  /* ---- Raw palette: Ion (cyan, dark-background highlight only) --------- */
  --ion-300: #8BF0FF;
  --ion-400: #4BE3FB;   /* brand "Ion" */
  --ion-500: #1FC8E6;
  --ion-600: #0A9DB8;

  /* ---- Status (store / forms) ----------------------------------------- */
  --success: #1F9D61;
  --warning: #E8A317;
  --danger:  #D93636;

  /* ---- Semantic roles: light surfaces ---------------------------------- */
  --color-bg:            var(--paper);
  --color-surface:       var(--white);
  --color-surface-2:     var(--ink-100);
  --color-border:        var(--ink-200);
  --color-text:          var(--ink-950);
  --color-text-muted:    var(--ink-600);
  --color-accent:        var(--fuse-500);  /* fills, icons, large display text */
  --color-accent-text:   var(--fuse-600);  /* links + small accent text on light */
  --color-on-accent:     var(--ink-950);   /* label color on Fuse 500 buttons */

  /* ---- Semantic roles: dark surfaces (hero, CTA band, footer) ---------- */
  --color-dark-bg:          var(--ink-950);
  --color-dark-surface:     var(--ink-900);
  --color-dark-surface-2:   var(--ink-800);
  --color-dark-border:      var(--ink-700);
  --color-dark-text:        var(--white);
  --color-dark-text-muted:  var(--ink-300);
  --color-dark-accent:      var(--fuse-500);
  --color-dark-highlight:   var(--ion-400);

  /* ---- Typography ------------------------------------------------------ */
  --font-display: "Unbounded", "Readex Pro", system-ui, sans-serif;
  --font-body:    "Manrope", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* Fluid type scale (min @375px -> max @1440px) */
  --text-xs:   0.8125rem;                                  /* 13 */
  --text-sm:   0.9375rem;                                  /* 15 */
  --text-md:   1.0625rem;                                  /* 17 body */
  --text-lg:   clamp(1.125rem, 1.05rem + 0.35vw, 1.375rem);/* 18-22 */
  --text-xl:   clamp(1.375rem, 1.2rem + 0.8vw, 1.875rem);  /* 22-30 */
  --text-2xl:  clamp(1.75rem, 1.4rem + 1.6vw, 2.75rem);    /* 28-44 */
  --text-3xl:  clamp(2rem, 1.5rem + 2.4vw, 3.5rem);        /* 32-56 */
  --text-hero: clamp(2.375rem, 1.5rem + 3.6vw, 4.5rem);    /* 38-72 */

  --leading-tight: 1.08;
  --leading-heading: 1.15;
  --leading-body: 1.6;
  --tracking-display: -0.02em;
  --tracking-label: 0.14em;

  /* ---- Shape & depth --------------------------------------------------- */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgb(10 11 16 / 0.06), 0 2px 8px rgb(10 11 16 / 0.05);
  --shadow-md: 0 4px 12px rgb(10 11 16 / 0.08), 0 16px 40px rgb(10 11 16 / 0.08);
  --shadow-glow: 0 0 0 1px rgb(61 126 255 / 0.35), 0 10px 40px rgb(61 126 255 / 0.35);

  /* ---- Layout ---------------------------------------------------------- */
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-pad: clamp(72px, 9vw, 136px);

  /* ---- Motion ---------------------------------------------------------- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 160ms;
  --dur-med: 320ms;
}

/* Arabic: brand Latin fonts first so Latin words keep the brand look,
   Arabic glyphs fall through to Readex Pro / IBM Plex Sans Arabic. */
:root:lang(ar) {
  --font-display: "Unbounded", "Readex Pro", system-ui, sans-serif;
  --font-body:    "Manrope", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --leading-tight: 1.3;
  --leading-heading: 1.35;
  --leading-body: 1.85;
  --tracking-display: 0;
  --tracking-label: 0;
}
