/* Vaca Orders: design tokens.
   Two layers. Primitives name a value; semantic tokens name a job.
   Components use semantic tokens only, so brand colours can be swapped
   by editing the primitives below. */

:root {
  color-scheme: light;

  /* Primitives: paper and rules. Colours requested by the client on 2026-11-16: plomo oscuro (dark lead grey) and
     red, with a softer plomo in headers. The greys are neutral with only a trace of cool tint (hue 250). */
  --paper-sheet: oklch(99.5% 0.002 250);
  --paper-ground: oklch(96.5% 0.003 250);
  --paper-panel: oklch(94% 0.004 250);
  --rule-light: oklch(90% 0.004 250);
  --rule-mid: oklch(80% 0.006 250);
  --rule-strong: oklch(62% 0.008 250);

  /* Primitives: ink */
  --ink-900: oklch(24% 0.008 250);
  --ink-700: oklch(40% 0.008 250);
  --ink-600: oklch(48% 0.008 250);

  /* Primitives: plomo (filled values, focus, links, selection) */
  --plomo-700: oklch(36% 0.01 250);
  --plomo-800: oklch(28% 0.01 250);
  --plomo-300: oklch(76% 0.01 250);
  --plomo-200: oklch(90% 0.005 250);
  --plomo-100: oklch(92% 0.006 250);

  /* Primitives: brand red (primary action and accents), from the logo red (#E31212) darkened for white text */
  --red-600: oklch(50% 0.21 27);
  --red-700: oklch(43% 0.19 27);

  /* Primitives: shell. Plomo oscuro. */
  --rail-900: oklch(27% 0.008 250);
  --rail-800: oklch(34% 0.008 250);
  --rail-ink: oklch(95% 0.004 250);
  --rail-ink-soft: oklch(80% 0.006 250);
  /* Primitive: the background colour of the supplied wordmark JPEG (#F7F7F7), so its nameplate has no visible edge. */
  --paper-logo: #f7f7f7;

  /* Primitives: state inks */
  --stamp-700: oklch(49% 0.19 27);
  --stamp-100: oklch(96% 0.016 27);
  --stamp-300: oklch(82% 0.08 27);
  --amber-700: oklch(42% 0.09 70);
  --amber-100: oklch(96.5% 0.035 90);
  --amber-300: oklch(82% 0.11 85);
  --green-700: oklch(40% 0.1 155);
  --green-100: oklch(96% 0.022 155);
  --green-300: oklch(80% 0.09 155);

  /* Semantic: surfaces */
  --surface-ground: var(--paper-ground);
  --surface-raised: var(--paper-sheet);
  --surface-sunken: var(--paper-panel);
  --surface-shell: var(--rail-900);
  --surface-shell-hover: var(--rail-800);
  --surface-logo: var(--paper-logo);
  --surface-selected: var(--plomo-100);
  --surface-header: var(--plomo-200);

  /* Semantic: text */
  --text: var(--ink-900);
  --text-muted: var(--ink-700);
  --text-subtle: var(--ink-600);
  --text-on-shell: var(--rail-ink);
  --text-on-shell-muted: var(--rail-ink-soft);
  --text-on-action: var(--paper-sheet);

  /* Semantic: borders */
  --border: var(--rule-light);
  --border-input: var(--rule-strong);
  --border-emphasis: var(--rule-mid);

  /* Semantic: actions and values */
  --action: var(--plomo-700);
  --action-hover: var(--plomo-800);
  --accent: var(--red-600);
  --accent-hover: var(--red-700);
  --filled: var(--plomo-700);
  --filled-wash: var(--plomo-100);
  --filled-line: var(--plomo-300);

  /* Semantic: state */
  --danger: var(--stamp-700);
  --danger-wash: var(--stamp-100);
  --danger-line: var(--stamp-300);
  --warn: var(--amber-700);
  --warn-wash: var(--amber-100);
  --warn-line: var(--amber-300);
  --ok: var(--green-700);
  --ok-wash: var(--green-100);
  --ok-line: var(--green-300);

  /* Type: system sans, fixed rem scale, ratio about 1.125 */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.3125rem;
  --text-2xl: 1.5rem;
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  /* Space: 4px base */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  /* Shape and depth */
  --radius-sm: 3px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --shadow-overlay: 0 1px 2px oklch(20% 0.03 260 / 0.1), 0 8px 24px oklch(20% 0.03 260 / 0.12);
  --focus-ring: 0 0 0 2px var(--surface-raised), 0 0 0 4px var(--action);

  /* Motion: state changes only */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 120ms;
  --duration-base: 180ms;

  /* Layout */
  --control-height: 2rem;
  --control-height-sm: 1.75rem;
  --control-height-lg: 2.5rem;
  --row-height: 2.5rem;
  --rail-width: 14rem;
  --topbar-height: 3.25rem;
}

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