/* Design tokens: the ONLY file allowed to hold colour values (test/no-hex.test.ts).
 * Layer 1, palette: the 11 Figma variables (design/README.md).
 * Layer 2, semantic: what app.css uses. Components never use the palette directly.
 * Sizes come from the 1080×2400 frames divided by 3. */

/* Figtree, SIL Open Font License 1.1 (public/fonts/OFL.txt). Self-hosted: no Google Fonts requests.
 * Variable weight 300–900, from @fontsource-variable/figtree 5.3.0. */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(/fonts/figtree-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(/fonts/figtree-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* ---- Palette (Figma variables) ---- */
  --palette-background: #F7F3EA;
  --palette-surface: #FFFFFF;
  --palette-surface-muted: #EBE4D4;
  --palette-ink: #1F1511;
  --palette-ink-muted: #5C4F47;
  --palette-chrome: #2B211C; /* device bars in the mock-up only; not used */
  --palette-link: #00688F;
  --palette-warning: #B4501F;
  --palette-accent: #F5ECD7;
  --palette-border: #E4DCCB;
  --palette-accent-tint: #F7E9C9;

  /* ---- Semantic colours ---- */
  --color-bg: var(--palette-background);
  --color-surface: var(--palette-surface);
  --color-surface-muted: var(--palette-surface-muted);
  --color-text: var(--palette-ink);
  --color-text-muted: var(--palette-ink-muted);
  --color-link: var(--palette-link);
  --color-warning: var(--palette-warning);
  --color-accent: var(--palette-accent);
  --color-accent-tint: var(--palette-accent-tint);
  --color-border: var(--palette-border);
  --color-focus: var(--palette-link);
  --color-press: rgb(31 21 17 / 0.12);
  --color-press-on-dark: rgb(255 255 255 / 0.14);
  --shadow-card: 0 1px 3px rgb(31 21 17 / 0.06);
  --shadow-bar: 0 2px 6px rgb(31 21 17 / 0.06);
  --shadow-bar-inset: inset 0 2px 6px rgb(31 21 17 / 0.06);

  /* ---- Type ----
   * The frames' text is ~32px (body) and ~42px (titles) at 1080 wide, i.e. ~11px and
   * ~14px CSS. That's too small to read on a phone, so the scale keeps the design's
   * proportions (titles ≈ 1.3 × body) from a 14px body. Inputs stay at 16px so iOS
   * doesn't zoom on focus. (PHASE2_REPORT.md, deviations.) */
  --font-sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.8125rem;   /* 13px: helper text, fee lines */
  --text-md: 0.875rem;    /* 14px: body */
  --text-input: 1rem;     /* 16px: form inputs */
  --text-lg: 1.0625rem;   /* 17px: card titles, event intro */
  --text-xl: 1.125rem;    /* 18px: section headings, Total */
  --text-2xl: 1.5rem;     /* 24px: nav title, username */
  --text-3xl: 1.5rem;     /* 24px: reference beside username */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --leading: 1.35;

  /* ---- Spacing ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --gutter: 14px;          /* 42px in the frame */

  /* ---- Radii, lines, sizes ---- */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-pill: 999px;
  --line-hairline: 1px;
  --line-strong: 2px;
  --focus-ring: 3px;
  --tap: 44px;             /* minimum tap target (132px in the frame) */
  --nav-height: 66px;
  --kb-inset: 0px;         /* on-screen keyboard height; app.js sets it on iOS */
  --logo-size: 46px;
  --page-max: 520px;
  --thumb-size: 64px;
}
