/* ============================================================
   NINA — Design System Foundations
   Colors + Typography tokens (light mode only)
   Identity: "Calor humano" — warm, human, trustworthy, simple.
   ============================================================ */

/* --- Fonts ---------------------------------------------------
   Fraunces (display serif) + Plus Jakarta Sans (body) are both
   on Google Fonts. Linked from CDN here for convenience. For a
   fully offline/portable system, vendor the .woff2 files into
   /fonts and swap the @import for @font-face rules.
   ------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700;9..144,900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* ---------- COLOR — raw palette (light) ---------- */
  --page:          #FFFBF5; /* page background — cream */
  --surface:       #FFFFFF; /* cards */
  --surface-warm:  #FFF1E6; /* warm highlight sections */
  --line:          #F0E6DC; /* borders / dividers */

  --ink:           #1F2937; /* primary text */
  --muted:         #6B7280; /* secondary text */
  --subtle:        #9CA3AF; /* tertiary / hint text */

  --coral:         #FF7A59; /* BRAND / action */
  --coral-strong:  #E14E2E; /* coral behind white text (AA) */
  --coral-tint:    #FFE4DB; /* soft coral background */

  --mint:          #34D399; /* positive / income */
  --mint-strong:   #059669; /* positive text / emphasis */
  --mint-tint:     #D1FAE5; /* soft mint background */

  --amber:         #FBBF24; /* highlight / focus ring */
  --amber-tint:    #FEF3C7; /* soft amber background */

  --expense:       #EF4444; /* spend / negative */
  --expense-tint:  #FEE2E2; /* soft red background */

  --info:          #0EA5E9; /* informational */

  /* warm coral→amber gradient — hero details only */
  --grad-warm: linear-gradient(135deg, #FF7A59 0%, #FBBF24 100%);

  /* ---------- COLOR — semantic aliases ---------- */
  --bg:            var(--page);
  --fg1:           var(--ink);   /* primary foreground */
  --fg2:           var(--muted); /* secondary foreground */
  --fg3:           var(--subtle);/* tertiary foreground */
  --border:        var(--line);
  --accent:        var(--coral);
  --accent-text:   var(--coral-strong);
  --positive:      var(--mint-strong);
  --negative:      var(--expense);

  /* ---------- TYPE — families ---------- */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Plus Jakarta Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', 'Roboto Mono', Menlo, monospace;

  /* ---------- TYPE — scale (px) ---------- */
  --text-xs:   12px;
  --text-sm:   14px;
  --text-base: 16px;  /* body */
  --text-md:   18px;
  --text-lg:   20px;
  --text-xl:   24px;
  --text-2xl:  30px;
  --text-3xl:  36px;
  --text-4xl:  48px;
  --text-5xl:  60px;

  --leading-tight: 1.1;
  --leading-snug:  1.25;
  --leading-body:  1.5;

  --weight-regular: 400;
  --weight-medium:  500;
  --weight-semi:    600;
  --weight-bold:    700;
  --weight-black:   900; /* display only */

  /* ---------- SPACE — base 4px scale ---------- */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* ---------- RADIUS ---------- */
  --radius-btn:   12px;
  --radius-card:  20px;
  --radius-input: 12px;
  --radius-pill:  999px;
  --radius-full:  9999px;

  /* ---------- SHADOW — soft & warm ---------- */
  --shadow-sm: 0 2px 8px rgba(225, 78, 46, 0.06);
  --shadow-md: 0 8px 24px rgba(225, 78, 46, 0.08);
  --shadow-lg: 0 16px 48px rgba(225, 78, 46, 0.12);
  --shadow-focus: 0 0 0 2px var(--amber);

  /* ---------- MOTION — calor humano, com propósito ---------- */
  /* Durations: ≤200ms p/ resposta de UI · 200–320ms p/ entradas · nada lento.    */
  --dur-fast:   120ms;  /* hover, press, toggles                                  */
  --dur-base:   200ms;  /* entradas de elemento, crossfade                        */
  --dur-slow:   320ms;  /* página/modal, draw de gráfico                          */
  /* Easings: out padrão (saída macia) · spring p/ overshoot amigável             */
  /*          (chips, sucesso, bottom-sheet) — usar com parcimônia.               */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  /* Defasagem entre itens de uma lista/grid em entrada (stagger).                */
  --stagger:    50ms;
}

/* Acessibilidade: zera transforms/durations (mantém opacity para crossfade).
   Loops decorativos (float, idle, confete) devem ser desligados pelo autor com
   esta mesma media-query no componente. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 0ms;
    --dur-base: 0ms;
    --dur-slow: 0ms;
    --stagger:  0ms;
  }
}

/* ============================================================
   SEMANTIC ELEMENT STYLES — opt-in via .ds-prose or apply vars
   ============================================================ */
.ds-type-h1 {
  font-family: var(--font-display);
  font-weight: var(--weight-semi);
  font-size: var(--text-5xl);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  color: var(--ink);
}
.ds-type-h2 {
  font-family: var(--font-display);
  font-weight: var(--weight-semi);
  font-size: var(--text-3xl);
  line-height: var(--leading-snug);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.ds-type-h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-medium);
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
  color: var(--ink);
}
.ds-type-lead {
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  font-size: var(--text-lg);
  line-height: var(--leading-body);
  color: var(--muted);
}
.ds-type-body {
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--ink);
}
.ds-type-small {
  font-family: var(--font-body);
  font-weight: var(--weight-medium);
  font-size: var(--text-sm);
  line-height: var(--leading-body);
  color: var(--muted);
}
.ds-type-label {
  font-family: var(--font-body);
  font-weight: var(--weight-semi);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--subtle);
}
/* Monetary values — tabular figures */
.ds-money {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}
