/* =========================================================
   VISIONARY — colors_and_type.css
   Foundation tokens: brand palette + typography system
   ---------------------------------------------------------
   Brand palette is lifted directly from the Fiche de marque
   V.2026. Ratios guide usage: Crème 60% surface, Cacao 30%,
   Café noir 7%, Moka 3%.
   ========================================================= */

/* ---- Webfonts ------------------------------------------------
   Local variable-font files (one woff2 per family, full weight range).
   Display: Outfit           — warm geometric sans.
   Text:    Instrument Sans  — modern neutral, high legibility.
   Mono:    JetBrains Mono   — code samples, metadata.
   Stored under /fonts so the design system works fully offline.
--------------------------------------------------------------- */
@font-face {
  font-family: 'Outfit';
  src: url('fonts/outfit.woff2') format('woff2-variations'),
       url('fonts/outfit.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('fonts/instrument-sans.woff2') format('woff2-variations'),
       url('fonts/instrument-sans.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/jetbrains-mono.woff2') format('woff2-variations'),
       url('fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ==========================================================
     COLORS — Brand palette
     ========================================================== */
  --cacao:       #4E3321;  /* signature — logo, titles, CTA, borders (60% usage) */
  --creme:       #F1E6CE;  /* surface — main background, breathing room (30%) */
  --cafe-noir:   #2E1E12;  /* text dense — maximum contrast (7%) */
  --moka:        #8B6B4A;  /* accent — subtitles, metadata (3%) */

  /* Tonal steps derived from the palette (oklch harmonious) */
  --creme-50:    #FBF7EC;  /* lightest surface, hover-lift */
  --creme-100:   #F7F0DC;
  --creme-200:   #F1E6CE;  /* = creme (base) */
  --creme-300:   #E6D7B2;
  --creme-400:   #D4BF8E;

  --moka-300:    #B39070;
  --moka-400:    #9C7C5D;
  --moka-500:    #8B6B4A;  /* = moka (base) */
  --moka-600:    #71563A;
  --moka-700:    #5E482F;

  --cacao-400:   #6B4A30;
  --cacao-500:   #5B3D27;
  --cacao-600:   #4E3321;  /* = cacao (base) */
  --cacao-700:   #3E2819;
  --cacao-800:   #2E1E12;  /* = cafe-noir */

  /* ==========================================================
     SEMANTIC — foreground & surface
     ========================================================== */
  --bg:          var(--creme);
  --bg-raised:   var(--creme-50);
  --bg-sunk:     var(--creme-300);
  --bg-inverse:  var(--cacao);

  --fg:          var(--cafe-noir);
  --fg-1:        var(--cafe-noir);   /* primary text */
  --fg-2:        var(--cacao);       /* secondary — titles */
  --fg-3:        var(--moka);        /* tertiary — metadata, captions */
  --fg-on-cacao: var(--creme);       /* text on dark */
  --fg-on-moka:  var(--creme);

  --border:      color-mix(in oklch, var(--cacao) 18%, transparent);
  --border-strong: var(--cacao);
  --border-hair: color-mix(in oklch, var(--cacao) 10%, transparent);

  --accent:      var(--cacao);
  --accent-hover:var(--cacao-700);
  --accent-press:var(--cacao-800);

  /* Status (tinted to stay in warm family) */
  --success:     #5F7A3E;
  --warning:     #B8863A;
  --danger:      #A04A2E;

  /* ==========================================================
     TYPOGRAPHY — families
     ========================================================== */
  --font-display: 'Outfit', ui-sans-serif, system-ui, sans-serif;
  --font-text:    'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* Type scale — modular, 1.25 minor third on display */
  --fs-xs:   12px;
  --fs-sm:   14px;
  --fs-base: 16px;
  --fs-md:   18px;
  --fs-lg:   20px;
  --fs-xl:   24px;
  --fs-2xl:  32px;
  --fs-3xl:  44px;
  --fs-4xl:  60px;
  --fs-5xl:  80px;
  --fs-6xl:  104px;

  /* Line heights */
  --lh-tight:  1.04;
  --lh-snug:   1.18;
  --lh-normal: 1.45;
  --lh-loose:  1.65;

  /* Tracking — the brand uses wide tracking on small caps eyebrows */
  --tr-tight:   -0.02em;
  --tr-normal:  0;
  --tr-wide:    0.06em;
  --tr-wider:   0.18em;   /* section eyebrows "F I C H E D E M A R Q U E" */
  --tr-widest:  0.32em;   /* page labels */

  /* Weights */
  --fw-light:    300;
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;
  --fw-black:    800;

  /* ==========================================================
     SPACING — 4px base
     ========================================================== */
  --sp-0:  0;
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;
  --sp-32: 128px;

  /* ==========================================================
     RADII — sparse. The brand is squared / documentary.
     ========================================================== */
  --r-none: 0;
  --r-xs:   2px;
  --r-sm:   4px;
  --r-md:   8px;
  --r-lg:   14px;
  --r-xl:   22px;
  --r-full: 999px;

  /* ==========================================================
     SHADOWS — soft, warm-tinted (cacao-based)
     ========================================================== */
  --sh-xs: 0 1px 0 0 color-mix(in oklch, var(--cacao) 10%, transparent);
  --sh-sm: 0 1px 2px 0 color-mix(in oklch, var(--cacao) 14%, transparent);
  --sh-md: 0 4px 12px -2px color-mix(in oklch, var(--cacao) 16%, transparent),
           0 2px 4px -1px color-mix(in oklch, var(--cacao) 10%, transparent);
  --sh-lg: 0 16px 32px -8px color-mix(in oklch, var(--cacao) 22%, transparent),
           0 4px 8px -2px color-mix(in oklch, var(--cacao) 10%, transparent);
  --sh-xl: 0 32px 56px -12px color-mix(in oklch, var(--cacao) 28%, transparent),
           0 8px 16px -4px color-mix(in oklch, var(--cacao) 14%, transparent);
  --sh-inner: inset 0 1px 0 0 color-mix(in oklch, #fff 40%, transparent);

  /* ==========================================================
     MOTION — subtle, crafted. No bounces.
     ========================================================== */
  --ease-out:    cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in:     cubic-bezier(0.42, 0, 0.58, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:    140ms;
  --dur-base:    240ms;
  --dur-slow:    420ms;

  /* Layout */
  --container:   1240px;
  --container-narrow: 880px;
}

/* =========================================================
   SEMANTIC TEXT STYLES
   Use these directly on real elements (h1, p, etc).
   ========================================================= */

html { background: var(--bg); color: var(--fg-1); font-family: var(--font-text); font-size: var(--fs-base); line-height: var(--lh-normal); -webkit-font-smoothing: antialiased; }

/* Display — hero titles. Tight, confident, minus-tracked. */
.t-display, h1.hero {
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: clamp(48px, 8vw, var(--fs-6xl));
  line-height: var(--lh-tight);
  letter-spacing: var(--tr-tight);
  color: var(--fg-2);
}

/* H1 — section titles */
h1, .t-h1 {
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: var(--fs-4xl);
  line-height: var(--lh-tight);
  letter-spacing: var(--tr-tight);
  color: var(--fg-2);
}

/* H2 */
h2, .t-h2 {
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: var(--fs-3xl);
  line-height: var(--lh-snug);
  letter-spacing: var(--tr-tight);
  color: var(--fg-2);
}

/* H3 */
h3, .t-h3 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-2xl);
  line-height: var(--lh-snug);
  letter-spacing: var(--tr-normal);
  color: var(--fg-2);
}

/* H4 */
h4, .t-h4 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-xl);
  line-height: var(--lh-snug);
  color: var(--fg-2);
}

/* Eyebrow — the signature "F I C H E  D E  M A R Q U E" treatment */
.t-eyebrow {
  font-family: var(--font-text);
  font-weight: var(--fw-medium);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tr-wider);
  color: var(--fg-3);
}

/* Eyebrow large — section dividers like "PRINCIPES DE MARQUE 01" */
.t-eyebrow-lg {
  font-family: var(--font-text);
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: var(--tr-wider);
  color: var(--fg-2);
}

/* Lede — intro paragraph */
.t-lede {
  font-family: var(--font-text);
  font-weight: var(--fw-regular);
  font-size: var(--fs-lg);
  line-height: var(--lh-loose);
  color: var(--fg-1);
  max-width: 60ch;
}

/* Body */
p, .t-body {
  font-family: var(--font-text);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--fg-1);
}

/* Small / meta */
.t-meta, small {
  font-family: var(--font-text);
  font-size: var(--fs-sm);
  color: var(--fg-3);
  line-height: var(--lh-normal);
}

/* Label — for numbered items "01", "02" — geometric, confident */
.t-label {
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: var(--fs-xl);
  letter-spacing: var(--tr-wide);
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
}

/* Mono / code */
code, kbd, pre, .t-mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: var(--fg-2);
}

/* Link */
a { color: var(--cacao); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color var(--dur-fast) var(--ease-out); }
a:hover { color: var(--cacao-800); }
