/* ==========================================================================
   SALDO — design tokens
   Ported verbatim from the Saldo Design System (tokens/{fonts,colors,
   typography,spacing,borders,motion}.css). Values are load-bearing: the
   contrast ratios, the 4px scale and the zeroed radius/shadow are all
   specified by the brand board. Do not "improve" them locally.
   ========================================================================== */

/* Archivo (900/800) · Inter (400/500/600) · JetBrains Mono (400/700).
   All three are open-source and served from Google Fonts. If self-hosting is
   required, drop woff2 files in public/assets/fonts/ and replace this @import
   with @font-face rules pointing at them. */
@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@800;900&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;700&display=swap");

:root {
  /* --- colour: one loud colour, one black, warm paper --------------------- */
  --signal: #ffe000; /* the one loud colour. A surface, not an accent. */
  --ink: #0c0c0d; /* text, borders, all buttons. 18.69:1 on Papier, AAA. */
  --ink-700: #3a3a3e; /* secondary text, 10.82:1, AAA. */
  --ink-500: #6b6b72; /* muted only, 5.05:1, AA. */
  --papier: #fafaf6; /* page ground — never pure white. */
  --papier-2: #efefe8; /* surfaces, alternating rows. */
  --rot: #c9270f; /* deadlines, errors. 5.31:1, AA. */
  --gruen: #1f7a4d; /* settled states only. 5.08:1, AA. */

  /* --- semantic aliases --------------------------------------------------- */
  --surface-page: var(--papier);
  --surface-alt: var(--papier-2);
  --surface-card: var(--papier);
  --surface-invert: var(--ink);
  --surface-signal: var(--signal);
  --text-body: var(--ink);
  --text-secondary: var(--ink-700);
  --text-muted: var(--ink-500);
  --text-on-ink: var(--papier);
  --text-on-signal: var(--ink);
  --text-error: var(--rot);
  --text-settled: var(--gruen);
  --border-default: var(--ink);
  --border-muted: var(--ink-500);
  --focus-ring: var(--ink);
  --btn-bg: var(--ink);
  --btn-fg: var(--signal);
  --btn-bg-invert: var(--signal);
  --btn-fg-invert: var(--ink);

  /* --- typography --------------------------------------------------------- */
  --font-display: "Archivo", "Archivo Black", Helvetica Neue, Arial, sans-serif;
  --font-body: "Inter", system-ui, Helvetica Neue, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --weight-display: 900;
  --weight-display-sub: 800;
  --weight-body: 400;
  --weight-body-medium: 500;
  --weight-body-strong: 600;
  --weight-mono: 400;
  --weight-mono-strong: 700;

  --type-hero-size: clamp(46px, 9vw, 104px);
  --type-hero-leading: 0.92;
  --type-hero-tracking: -0.04em;

  --type-h2-size: clamp(32px, 5.6vw, 60px);
  --type-h2-leading: 0.95;
  --type-h2-tracking: -0.035em;

  --type-h3-size: 22px;
  --type-h3-leading: 1.1;
  --type-h3-tracking: -0.02em;

  --type-body-l-size: 19px;
  --type-body-l-leading: 1.55;
  --type-body-size: 17px;
  --type-body-leading: 1.6;
  --type-body-min: 16px; /* floor. Never below 16px. */
  --type-measure: 66ch;

  --type-label-size: 11px;
  --type-label-leading: 1.4;
  --type-label-tracking: 0.2em;

  --type-amount-size: 36px;
  --type-amount-size-lg: 48px;
  --type-amount-tracking: -0.01em;

  /* --- spacing: 4px scale -------------------------------------------------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;
  --section-y: 96px;
  --gutter: 24px;
  --container: 1200px;
  --container-narrow: 720px;
  --tap-target: 48px;
  --control-height: 48px;

  /* --- borders: radius 0, no shadows --------------------------------------- */
  --radius: 0px;
  --radius-full: 0px;
  --border-width: 2px;
  --border-width-heavy: 4px;
  --border: var(--border-width) solid var(--ink);
  --border-hairline: 1px solid var(--ink-500);
  --shadow-none: none; /* the system has no shadows: structure comes from 2px ink borders */

  /* --- motion: colour-only, 120ms ------------------------------------------ */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-balance: 500ms; /* the "account balances" motion, confirmation screen only */
  --transition-control:
    background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-base: 0ms;
    --duration-balance: 0ms;
  }
}
