/* ============================================================================
   Lifafa (by Ledgerline) — Design Tokens
   ----------------------------------------------------------------------------
   ONE product, THREE persona design directions, ONE shared token contract.

   Every visual value is a CSS custom property (--ml-*). Components style
   themselves ONLY through these tokens, so swapping the persona on a wrapper
   restyles the whole UI without restructuring.

   Apply a persona by setting a data attribute on any wrapper:
       <div data-persona="genz">…</div>
       <div data-persona="millennial">…</div>
       <div data-persona="senior">…</div>

   RULE: ONE brand hue per persona. --ml-color-accent-2 is a muted TINT of that
   same hue — never a second color. Green (positive) / red (negative) appear
   ONLY as +/- meaning, never as decoration.

   Fonts are Google Fonts: Bricolage Grotesque, Spectral, Josefin Sans,
   Playfair Display (italic, quotes — shared across all personas).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@10..48,400;10..48,600;10..48,700&family=Spectral:ital,wght@0,300;0,400;0,600;1,400&family=Josefin+Sans:wght@500;600;700&family=Playfair+Display:ital,wght@1,400;1,600;0,600&display=swap');

/* ── Root fallbacks (anything outside a persona wrapper still reads) ──────── */
:root {
  --ml-color-bg: #f6f4ee;
  --ml-color-text: #15241d;
  --ml-font-sans: 'Spectral', Georgia, 'Times New Roman', serif;
  --ml-font-quote: 'Playfair Display', Georgia, serif;
  --ml-font-size-base: 16px;
  --ml-line-height: 1.55;

  /* Spacing scale — components multiply base spacing by --ml-density */
  --ml-space-1: 4px;
  --ml-space-2: 8px;
  --ml-space-3: 12px;
  --ml-space-4: 16px;
  --ml-space-5: 24px;
  --ml-space-6: 32px;
  --ml-space-8: 48px;
  --ml-space-10: 64px;
}

/* ============================================================================
   GEN Z — loud but disciplined. Near-black canvas, ONE electric-lime accent,
   chunky radii, lime glow, springy motion, emoji on purpose, big display nums.
   ========================================================================== */
[data-persona="genz"] {
  --ml-color-bg: #0a0b0d;
  --ml-color-surface: #15171b;
  --ml-color-surface-raised: #1d2026;
  --ml-color-border: #2a2e36;
  --ml-color-text: #f2f4f5;
  --ml-color-text-muted: #9aa3ad;
  --ml-color-accent: #c6ff3a;
  --ml-color-accent-contrast: #0a0b0d;
  --ml-color-accent-2: #e6eaed;        /* neutral tint, NOT a 2nd hue */
  --ml-color-positive: #7fd99a;
  --ml-color-negative: #ff7a85;
  --ml-color-warning: #e8c95a;

  --ml-gradient-hero: linear-gradient(135deg, #c6ff3a 0%, #8fd64a 100%);
  --ml-gradient-accent: linear-gradient(120deg, #c6ff3a 0%, #b6f53a 100%);
  --ml-glow: 0 0 0 1px rgba(198,255,58,0.22), 0 14px 50px rgba(198,255,58,0.16);

  --ml-radius-sm: 12px;
  --ml-radius-md: 20px;
  --ml-radius-lg: 30px;
  --ml-density: 0.95;

  --ml-font-sans: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --ml-font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --ml-font-quote: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --ml-font-size-base: 15px;
  --ml-scale-ratio: 1.4;
  --ml-line-height: 1.35;
  --ml-font-weight-normal: 400;
  --ml-font-weight-medium: 600;
  --ml-font-weight-bold: 700;

  --ml-shadow-sm: 0 2px 6px rgba(0,0,0,0.5);
  --ml-shadow-md: 0 2px 4px rgba(0,0,0,0.6), 0 18px 60px -12px rgba(177,77,255,0.30);

  --ml-motion-fast: 100ms;
  --ml-motion-base: 300ms;
  --ml-motion-ease: cubic-bezier(0.34,1.56,0.64,1);   /* springy overshoot */
}

/* ============================================================================
   MILLENNIAL — premium & calm. Warm cream canvas, ONE evergreen accent
   (accent2 = sage tint), Spectral serif at light weights, gentle depth.
   ========================================================================== */
[data-persona="millennial"] {
  --ml-color-bg: #f6f4ee;
  --ml-color-surface: #ffffff;
  --ml-color-surface-raised: #fbfaf5;
  --ml-color-border: #e7e1d4;
  --ml-color-text: #15241d;
  --ml-color-text-muted: #5c6a61;
  --ml-color-accent: #157a5f;
  --ml-color-accent-contrast: #ffffff;
  --ml-color-accent-2: #6aa48f;        /* sage tint of the evergreen */
  --ml-color-positive: #1f9d6b;
  --ml-color-negative: #cf4d43;
  --ml-color-warning: #bd7d1f;

  --ml-gradient-hero: linear-gradient(135deg, #157a5f 0%, #1f9d6b 52%, #36b9a0 130%);
  --ml-gradient-accent: linear-gradient(135deg, #157a5f 0%, #1f9d6b 100%);
  --ml-glow: 0 10px 40px rgba(21,122,95,0.20);

  --ml-radius-sm: 8px;
  --ml-radius-md: 14px;
  --ml-radius-lg: 22px;
  --ml-density: 1;

  --ml-font-sans: 'Spectral', Georgia, 'Times New Roman', serif;
  --ml-font-display: 'Spectral', Georgia, serif;
  --ml-font-quote: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --ml-font-size-base: 16px;
  --ml-scale-ratio: 1.3;
  --ml-line-height: 1.55;
  --ml-font-weight-normal: 300;
  --ml-font-weight-medium: 400;
  --ml-font-weight-bold: 600;

  --ml-shadow-sm: 0 1px 2px rgba(15,18,34,0.06);
  --ml-shadow-md: 0 1px 2px rgba(15,18,34,0.08), 0 12px 32px -8px rgba(15,18,34,0.14);

  --ml-motion-fast: 120ms;
  --ml-motion-base: 240ms;
  --ml-motion-ease: cubic-bezier(0.22,1,0.36,1);     /* smooth ease-out */
}

/* ============================================================================
   SENIOR — clear & dignified. White canvas, navy accent (accent2 = steel tint),
   Josefin Sans, large 20px base, high contrast, NO glow, roomy spacing.
   ========================================================================== */
[data-persona="senior"] {
  --ml-color-bg: #ffffff;
  --ml-color-surface: #ffffff;
  --ml-color-surface-raised: #f2f5fa;
  --ml-color-border: #8b94a6;          /* strong, visible border */
  --ml-color-text: #0a0d12;
  --ml-color-text-muted: #384150;
  --ml-color-accent: #13456b;
  --ml-color-accent-contrast: #ffffff;
  --ml-color-accent-2: #5e7d99;        /* steel tint of the navy */
  --ml-color-positive: #0a7d3c;
  --ml-color-negative: #b3261e;
  --ml-color-warning: #7a4f00;

  --ml-gradient-hero: linear-gradient(135deg, #13456b 0%, #0e3552 100%);
  --ml-gradient-accent: linear-gradient(0deg, #13456b 0%, #13456b 100%);
  --ml-glow: none;

  --ml-radius-sm: 8px;
  --ml-radius-md: 12px;
  --ml-radius-lg: 18px;
  --ml-density: 1.25;

  --ml-font-sans: 'Josefin Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ml-font-display: 'Josefin Sans', ui-sans-serif, system-ui, sans-serif;
  --ml-font-quote: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --ml-font-size-base: 20px;
  --ml-scale-ratio: 1.2;
  --ml-line-height: 1.7;
  --ml-font-weight-normal: 500;
  --ml-font-weight-medium: 600;
  --ml-font-weight-bold: 700;

  --ml-shadow-sm: 0 1px 2px rgba(10,13,18,0.1);
  --ml-shadow-md: 0 4px 12px rgba(10,13,18,0.14);

  --ml-motion-fast: 160ms;
  --ml-motion-base: 300ms;
  --ml-motion-ease: ease-out;
}

/* ============================================================================
   SEMANTIC TYPE — resolve from the active persona's font + scale tokens.
   Sizes use the modular scale ratio off the base size.
   ========================================================================== */
.ml-root {
  background: var(--ml-color-bg);
  color: var(--ml-color-text);
  font-family: var(--ml-font-sans);
  font-size: var(--ml-font-size-base);
  line-height: var(--ml-line-height);
  font-weight: var(--ml-font-weight-normal, 400);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.ml-display {                                  /* big expressive numbers/headlines */
  font-family: var(--ml-font-display);
  font-weight: var(--ml-font-weight-bold, 700);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.ml-h1 { font-family: var(--ml-font-display); font-weight: var(--ml-font-weight-bold,700); font-size: 2.4em; line-height: 1.08; letter-spacing: -0.01em; }
.ml-h2 { font-family: var(--ml-font-display); font-weight: var(--ml-font-weight-bold,700); font-size: 1.8em; line-height: 1.15; }
.ml-h3 { font-family: var(--ml-font-display); font-weight: var(--ml-font-weight-bold,700); font-size: 1.3em; line-height: 1.25; }
.ml-body { font-size: 1em; line-height: var(--ml-line-height); }
.ml-small { font-size: 0.85em; color: var(--ml-color-text-muted); }
.ml-eyebrow { font-size: 0.78em; text-transform: uppercase; letter-spacing: 0.2em; color: var(--ml-color-text-muted); font-weight: var(--ml-font-weight-medium,600); }
.ml-quote { font-family: var(--ml-font-quote); font-style: italic; line-height: 1.3; }

/* Money + figures align in columns */
.ml-tnum { font-variant-numeric: tabular-nums lining-nums; }

/* Persona-specific eyebrow tweaks (Senior never gets tracked caps — legibility) */
[data-persona="senior"] .ml-eyebrow { text-transform: none; letter-spacing: 0; font-size: 0.85em; }
[data-persona="genz"] .ml-eyebrow { text-transform: lowercase; letter-spacing: -0.01em; }
