/* ============================================================
   WISE — Design System Tokens
   colors_and_type.css
   ------------------------------------------------------------
   Single source of truth for color, typography, spacing,
   radius and elevation tokens.

   FONT SUBSTITUTION NOTE
   Wise Sans is proprietary and not redistributable. This system
   substitutes:
     • Display (weight 900) → Manrope 800 (geometric, heavy)
     • Sub-display + body     → Inter (the brand's actual 2nd face)
   Swap in real Wise Sans @font-face files under /fonts when
   licensed; keep the --font-display var pointing at it.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&family=Manrope:wght@600;700;800&display=swap');

:root {
  /* ---------- BRAND & ACCENT ---------- */
  --color-primary:          #9fe870;  /* Wise Green — universal CTA */
  --color-primary-active:   #cdffad;  /* lighter active/hover green */
  --color-primary-neutral:  #c5edab;  /* mid-saturation neutral fill */
  --color-primary-pale:     #e2f6d5;  /* lightest tint / badge bg */
  --color-on-primary:       #163300;  /* ink used ON the green pill */

  /* ---------- SURFACE ---------- */
  --color-canvas:           #ffffff;  /* card interiors */
  --color-canvas-soft:      #e8ebe6;  /* sage page background */

  /* ---------- TEXT ---------- */
  --color-ink:              #0e0f0c;  /* default text + headings */
  --color-ink-deep:         #163300;  /* deep forest ink (on positive) */
  --color-body:             #454745;  /* secondary body */
  --color-mute:             #868685;  /* captions / placeholder */

  /* ---------- SEMANTIC: POSITIVE ---------- */
  --color-positive:         #2ead4b;
  --color-positive-deep:    #054d28;

  /* ---------- SEMANTIC: WARNING ---------- */
  --color-warning:          #ffd11a;
  --color-warning-deep:     #b86700;
  --color-warning-content:  #4a3b1c;

  /* ---------- SEMANTIC: NEGATIVE ---------- */
  --color-negative:         #d03238;
  --color-negative-deep:    #a72027;
  --color-negative-darkest: #a7000d;
  --color-negative-bg:      #320707;

  /* ---------- TERTIARY ILLUSTRATION ACCENTS ---------- */
  --color-accent-orange:    #ffc091;
  --color-accent-cyan:      #38c8ff;

  /* ============================================================
     TYPOGRAPHY
     ============================================================ */
  --font-display: 'Manrope', 'Inter', system-ui, sans-serif;     /* Wise Sans substitute */
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* Display scale — Wise Sans weight 900 (Manrope 800 substitute) */
  --type-display-mega:   900 126px/107.1px var(--font-display);
  --type-display-xxl:    900 96px/81.6px   var(--font-display);
  --type-display-xl:     900 64px/54.4px   var(--font-display);
  --type-display-lg:     400 47px/70.5px   var(--font-body);   /* lighter sub-display */
  --type-display-md:     900 40px/34px     var(--font-display);
  --type-display-sm:     600 32px/38.4px   var(--font-body);
  --type-display-xs:     600 24px/31.2px   var(--font-body);

  /* Body scale — Inter */
  --type-body-lg:        400 20px/30px     var(--font-body);
  --type-body-md:        400 16px/24px     var(--font-body);
  --type-body-md-strong: 600 16px/24px     var(--font-body);
  --type-body-sm:        400 14px/20px     var(--font-body);
  --type-body-sm-strong: 600 14px/20px     var(--font-body);
  --type-caption:        400 12px/16px     var(--font-body);
  --type-button-md:      600 16px/24px     var(--font-body);

  /* Letter spacing companions (apply alongside the font shorthand) */
  --tracking-display-lg: -0.108px;
  --tracking-display-sm: -0.96px;
  --tracking-display-xs: -0.48px;

  /* ============================================================
     SPACING — base unit 4px
     ============================================================ */
  --space-xxs: 2px;
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  12px;
  --space-lg:  16px;
  --space-xl:  24px;
  --space-2xl: 32px;
  --space-3xl: 48px;

  /* ============================================================
     RADIUS
     ============================================================ */
  --radius-none: 0px;
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;   /* canonical card + button radius */
  --radius-pill: 9999px;
  --radius-full: 9999px;

  /* ============================================================
     ELEVATION
     The brand uses surface contrast (sage canvas vs white card)
     as the primary elevation cue. Shadows are minimal.
     ============================================================ */
  --border-hairline: 1px solid var(--color-ink);   /* Level 1 */
  --shadow-soft:  0 2px 8px rgba(14, 15, 12, 0.06);
  --shadow-card:  0 8px 24px rgba(14, 15, 12, 0.08);
  --shadow-modal: 0 24px 64px rgba(14, 15, 12, 0.18);

  /* Layout */
  --container-max: 1200px;
}

/* ============================================================
   SEMANTIC ELEMENT DEFAULTS
   Opt-in helpers — apply via the `.wise` scope so the tokens
   never leak into host chrome.
   ============================================================ */
.wise {
  font: var(--type-body-md);
  color: var(--color-ink);
  font-feature-settings: "calt";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wise h1 { font: var(--type-display-xl);  letter-spacing: 0;     margin: 0; }
.wise h2 { font: var(--type-display-md);  letter-spacing: 0;     margin: 0; }
.wise h3 { font: var(--type-display-sm);  letter-spacing: var(--tracking-display-sm); margin: 0; }
.wise h4 { font: var(--type-display-xs);  letter-spacing: var(--tracking-display-xs); margin: 0; }
.wise p  { font: var(--type-body-md);     color: var(--color-body); margin: 0; }
.wise small { font: var(--type-caption);  color: var(--color-mute); }
.wise a  { color: var(--color-ink); text-decoration: underline; text-underline-offset: 2px; }
