/* ==========================================================================
   FieldTruth — Design Tokens
   Palette: warm gray / olive / sand field-gear utilitarian theme.
   Accent: safety-yellow (primary action) + burnt-orange (secondary signal).
   Type: Cabinet Grotesk (display) + Satoshi (body) — geometric, functional.
   ========================================================================== */

@import url('https://api.fontshare.com/v2/css?f[]=cabinet-grotesk@700,500,900&f[]=satoshi@400,500,700,900&display=swap');

:root,
[data-theme='light'] {
  /* Surfaces — sand / warm stone */
  --color-bg: #eeeae0;
  --color-surface: #f5f2ea;
  --color-surface-2: #faf8f2;
  --color-surface-offset: #e3ddcd;
  --color-surface-offset-2: #d9d1bc;
  --color-surface-dynamic: #cfc6ad;
  --color-divider: #cdc4ab;
  --color-border: #b9ae90;

  /* Text — deep olive-charcoal */
  --color-text: #23241d;
  --color-text-muted: #5c5b4d;
  --color-text-faint: #928e78;
  --color-text-inverse: #f7f4ea;

  /* Primary Accent — Safety Yellow (CTAs, capture indicators) */
  --color-primary: #a67c00;
  --color-primary-on: #1a1608;
  --color-primary-hover: #8a6600;
  --color-primary-active: #705100;
  --color-primary-highlight: #e8dcb4;
  --color-signal: #d8b400; /* raw hi-vis yellow, used sparingly for record dots */

  /* Secondary Accent — Burnt Orange (chain-of-custody / trust markers) */
  --color-rust: #ad4a1f;
  --color-rust-hover: #8c3a17;
  --color-rust-highlight: #e6cab6;

  /* Olive (feature grid depth) */
  --color-olive: #565c3f;
  --color-olive-hover: #454a32;
  --color-olive-highlight: #d9dcc7;

  /* Status */
  --color-success: #4a6b32;
  --color-success-highlight: #d6e0c6;
  --color-error: #8c3226;
  --color-error-highlight: #e6cec8;

  --radius-sm: 0.25rem;
  --radius-md: 0.4rem;
  --radius-lg: 0.65rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  --transition-interactive: 160ms cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 2px oklch(0.2 0.02 95 / 0.14);
  --shadow-md: 0 6px 16px oklch(0.2 0.02 95 / 0.16);
  --shadow-lg: 0 16px 40px oklch(0.18 0.02 95 / 0.22);

  --content-narrow: 640px;
  --content-default: 1000px;
  --content-wide: 1240px;
  --content-full: 100%;

  --font-display: 'Cabinet Grotesk', 'Arial Black', sans-serif;
  --font-body: 'Satoshi', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

[data-theme='dark'] {
  --color-bg: #17160f;
  --color-surface: #1d1c14;
  --color-surface-2: #232116;
  --color-surface-offset: #26241a;
  --color-surface-offset-2: #2e2b1d;
  --color-surface-dynamic: #37331f;
  --color-divider: #322f20;
  --color-border: #423d27;

  --color-text: #ece6d4;
  --color-text-muted: #a9a288;
  --color-text-faint: #726c56;
  --color-text-inverse: #1a1812;

  --color-primary: #e8c33c;
  --color-primary-on: #1a1608;
  --color-primary-hover: #f2d15c;
  --color-primary-active: #c9a52a;
  --color-primary-highlight: #3a331b;
  --color-signal: #f2d15c;

  --color-rust: #e2703b;
  --color-rust-hover: #ec8a5b;
  --color-rust-highlight: #402719;

  --color-olive: #a3ab7d;
  --color-olive-hover: #b7bd97;
  --color-olive-highlight: #2c2f1f;

  --color-success: #8fae6c;
  --color-success-highlight: #263323;
  --color-error: #d97a63;
  --color-error-highlight: #3a2620;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
  --shadow-md: 0 6px 16px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #17160f;
    --color-surface: #1d1c14;
    --color-surface-2: #232116;
    --color-surface-offset: #26241a;
    --color-surface-offset-2: #2e2b1d;
    --color-surface-dynamic: #37331f;
    --color-divider: #322f20;
    --color-border: #423d27;
    --color-text: #ece6d4;
    --color-text-muted: #a9a288;
    --color-text-faint: #726c56;
    --color-text-inverse: #1a1812;
    --color-primary: #e8c33c;
    --color-primary-on: #1a1608;
    --color-primary-hover: #f2d15c;
    --color-primary-active: #c9a52a;
    --color-primary-highlight: #3a331b;
    --color-signal: #f2d15c;
    --color-rust: #e2703b;
    --color-rust-hover: #ec8a5b;
    --color-rust-highlight: #402719;
    --color-olive: #a3ab7d;
    --color-olive-hover: #b7bd97;
    --color-olive-highlight: #2c2f1f;
    --color-success: #8fae6c;
    --color-success-highlight: #263323;
    --color-error: #d97a63;
    --color-error-highlight: #3a2620;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
    --shadow-md: 0 6px 16px oklch(0 0 0 / 0.4);
    --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
  }
}

/* ---------------- Type scale ---------------- */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 4.5rem);
  --text-hero: clamp(2.75rem, 1rem + 5.5vw, 6rem);
}

/* ---------------- Spacing ---------------- */
:root {
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}
