/* ============================================================
   Kermony Office — Design Tokens
   v1.0 — colours, typography, spacing, semantics
   ------------------------------------------------------------
   Faithful extraction of the v1.0 (Avril 2026) reference.
   Font paths are relative to this file (tokens/) and resolve
   to ../fonts/*.woff2 so the stylesheet works from any project
   depth as long as the package folder is kept intact.
   ============================================================ */

/* ------------------------------------------------------------
   Local webfonts — DM Sans, Space Grotesk, JetBrains Mono
   Subsetted woff2 extracted from the brand reference document.
   For print or non-web export, obtain the full variable files
   from Google Fonts (these are Latin / Latin-ext subsets).
   ------------------------------------------------------------ */

/* DM Sans — 300–700 */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/dm-sans-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/dm-sans-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
                 U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Space Grotesk — 300–700 */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
                 U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* JetBrains Mono — 400 & 500 */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
                 U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ============================================================
   Design tokens
   ============================================================ */
:root {
  /* ---------- Base palette ---------- */
  --ink:          #000000;   /* Text, titles, dark-surface backgrounds */
  --paper:        #FFFFFF;   /* Default surface */
  --paper-2:      #F5F5F7;   /* Subtle fill, data zones, quiet states */
  --muted:        #5F5F67;   /* Secondary text, captions, eyebrows, sources */

  /* ---------- Charte accents ---------- */
  --violet:       #6D2D68;   /* Primary brand accent (eyebrows, KPIs, numbering) */
  --violet-soft:  #8A4A84;   /* Softer violet — totals on dark */
  --cyan:         #71C8DA;   /* Accent on dark surfaces (cover, Actes, closing) */
  --navy:         #21244E;   /* Secondary accent, charts */
  --pale:         #CED7EF;   /* Highlight fills, secondary cards */
  --rouge:        #AC2369;   /* Negative / loss / exit */
  --vert:         #1F4D2E;   /* Positive / gain / entry */

  /* ---------- Hairlines & chrome ---------- */
  --rule:         rgba(0,0,0,0.14);        /* Fine rules, table borders, separators */
  --rule-dark:    rgba(255,255,255,0.18);  /* Same, inverted for dark surfaces */
  --muted-dark:   rgba(255,255,255,0.55);  /* Muted text on dark */

  /* ---------- Semantic text roles ---------- */
  --fg-1:         var(--ink);              /* Primary text */
  --fg-2:         var(--muted);            /* Secondary text */
  --fg-accent:    var(--violet);           /* Branded emphasis */
  --fg-pos:       var(--vert);             /* Positive values */
  --fg-neg:       var(--rouge);            /* Negative values */

  /* ---------- Type families ---------- */
  --font-display: 'Space Grotesk', sans-serif;  /* Titles, KPIs, eyebrows */
  --font-body:    'DM Sans', sans-serif;        /* Body, UI, paragraphs */
  --font-mono:    'JetBrains Mono', monospace;  /* ISIN, hex, tickers, code */

  /* ---------- Type scale — slides (1920 × 1080) ---------- */
  --fs-cover:     124px;    /* Cover title (Space Grotesk 500 · 0.95) */
  --fs-act:       130px;    /* Acte / section divider title */
  --fs-h1:        78px;     /* Slide H1 */
  --fs-h2:        54px;     /* Slide H2 / sub-title */
  --fs-lede:      26px;     /* Lede paragraph, 300 weight */
  --fs-body:      20px;     /* Body 400 / 1.55 */
  --fs-eyebrow:   22px;     /* Eyebrow · tracking 0.24em UC */
  --fs-caption:   13px;     /* Sources, captions — muted */
  --fs-mono:      16px;     /* Technical / ISIN */

  /* ---------- Type scale — document/web ---------- */
  --fs-web-h1:    56px;
  --fs-web-h2:    32px;
  --fs-web-body:  16px;
  --fs-web-small: 13px;

  /* ---------- Letter-spacing ---------- */
  --ls-tight:     -0.035em;   /* Very large display */
  --ls-display:   -0.03em;    /* Section titles */
  --ls-h:         -0.02em;    /* Sub-titles, H3 */
  --ls-eyebrow:    0.24em;    /* UPPERCASE eyebrows */
  --ls-small-caps: 0.22em;    /* Small caps labels, tags */
  --ls-mono:       0.02em;    /* Mono kerning */

  /* ---------- Spacing (8px grid) ---------- */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  24px;
  --s-6:  32px;
  --s-7:  48px;
  --s-8:  64px;
  --s-9:  80px;
  --s-10: 120px;             /* Slide lateral margin */

  /* ---------- Radii (deliberately sparse) ---------- */
  --r-0:  0px;               /* Default — no rounded corners */
  --r-pill: 999px;           /* SRRI pill only */

  /* ---------- Borders ---------- */
  --bw-hair:     1px;
  --bw-rule:     1.5px;      /* Field underlines, SRRI */
  --bw-accent:   3px;        /* Top-accent cards */
  --bw-strong:   2px;        /* Table footer rule */

  /* ---------- Motion ---------- */
  --dur-fast:    .15s;
  --dur-slow:    .3s;
  --ease:        cubic-bezier(.2, .7, .3, 1);
}

/* ============================================================
   Semantic element styles
   ============================================================ */

body {
  background: var(--paper);
  color: var(--fg-1);
  font-family: var(--font-body);
  font-size: var(--fs-web-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern" 1;
}

h1, h2, h3, h4, h5 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: var(--ls-h);
}

h1 { font-size: var(--fs-web-h1); line-height: 1.02; letter-spacing: var(--ls-display); }
h2 { font-size: var(--fs-web-h2); line-height: 1.05; letter-spacing: var(--ls-h); }
h3 { font-size: 26px;              line-height: 1.15; letter-spacing: var(--ls-h); }

p {
  margin: 0 0 1em;
  line-height: 1.55;
  text-wrap: pretty;
}

code, .mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: var(--ls-mono);
  font-feature-settings: "tnum" 1;
}
code {
  background: var(--paper-2);
  padding: 2px 6px;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--violet);
  font-weight: 600;
}

.lede {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 19px;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

.caption, .source {
  font-size: var(--fs-web-small);
  color: var(--muted);
  line-height: 1.45;
}

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

hr, .rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: var(--s-7) 0;
}
