/* ============================================================
   _tokens.css — Contrato semântico CaseHub (theme-agnostic).

   Este arquivo declara TODOS os tokens semânticos com valores
   default (theme-agnostic, light-mode-ish). Cada theme em
   themes/<theme>.css deve sobrescrever os valores que precisar.

   Templates só consomem destes tokens. NUNCA hex literal.

   Ver: docs/handoff/casehub-templates/02-token-spec.md
   ============================================================ */

:root {
  /* Surface */
  --surface-base: #fafafa;
  --surface-raised: #ffffff;
  --surface-overlay: #ffffff;
  --surface-sunken: #f4f4f5;
  --surface-inverse: #0a0a0a;

  /* Text */
  --text-primary: #0a0a0a;
  --text-secondary: #52525b;
  --text-muted: #a1a1aa;
  --text-on-accent: #ffffff;
  --text-link: #1a73e8;

  /* Accent */
  --accent: #1a73e8;
  --accent-hover: #1664ce;
  --accent-active: #1258b6;
  --accent-muted: rgba(26, 115, 232, 0.10);
  --cta-neon-bg: linear-gradient(135deg, #DBE64C 0%, #D5E65D 54%, #6FBE54 100%);
  --cta-neon-bg-hover: linear-gradient(135deg, #ECF36A 0%, #D9EA62 52%, #66B94F 100%);
  --cta-neon-bg-active: #BFD55A;
  --cta-neon-fg: #0B1426;
  --cta-neon-shadow: 6px 6px 14px rgba(0, 31, 62, 0.16),
    -6px -6px 13px rgba(255, 255, 255, 0.58),
    0 10px 24px rgba(219, 230, 76, 0.20);
  --cta-neon-shadow-hover: 0 12px 28px rgba(0, 31, 62, 0.18),
    0 12px 28px rgba(111, 190, 84, 0.24);
  --cta-neon-shadow-active: inset 3px 3px 8px rgba(0, 31, 62, 0.14),
    inset -3px -3px 7px rgba(255, 255, 255, 0.55);

  /* Status */
  --status-success: #16a34a;
  --status-success-bg: rgba(22, 163, 74, 0.10);
  --status-warning: #d97706;
  --status-warning-bg: rgba(217, 119, 6, 0.10);
  --status-danger: #dc2626;
  --status-danger-bg: rgba(220, 38, 38, 0.10);
  --status-info: #0284c7;
  --status-info-bg: rgba(2, 132, 199, 0.10);

  /* Border */
  --border-subtle: #f4f4f5;
  --border-default: #eaeaea;
  --border-strong: #d4d4d8;
  --border-focus: var(--accent);

  /* Radius */
  --radius-none: 0;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Elevation — cada theme implementa do seu jeito */
  --elevation-0: none;
  --elevation-1: 0 1px 2px rgba(0, 0, 0, 0.05);
  --elevation-2: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.10);
  --elevation-3: 0 10px 25px rgba(0, 0, 0, 0.10);

  /* Spacing — escala 4px */
  --space-0: 0;
  --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-24: 96px;

  /* Typography */
  --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-family-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --font-family-serif: 'Source Serif Pro', Georgia, serif;

  --font-size-xs: 12px;
  --font-size-sm: 13px;
  --font-size-base: 15px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 32px;
  --font-size-4xl: 40px;

  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.2;
  --line-height-base: 1.5;
  --line-height-relaxed: 1.7;

  /* Motion */
  --motion-fast: 120ms;
  --motion-base: 180ms;
  --motion-slow: 220ms;
  --motion-curve-organic: cubic-bezier(0.32, 0.72, 0, 1);
  --motion-curve-snappy: cubic-bezier(0.4, 0, 0.2, 1);
  --motion-curve-decelerate: cubic-bezier(0, 0, 0.2, 1);

  /* Z-index */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-popover: 500;
  --z-toast: 600;
  --z-tooltip: 700;

  /* Shadow utility */
  --shadow-focus: 0 0 0 2px var(--surface-raised), 0 0 0 4px var(--border-focus);
  --shadow-error: 0 0 0 2px var(--surface-raised), 0 0 0 4px var(--status-danger);

  /* A11y helpers */
  --tap-target-min: 44px;
}

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