/* AttyClub — tokens do design system. Terminal juridico: marinho quase preto, ciano eletrico, dourado escasso. */

:root {
  /* ---------------- superficies */
  --bg: #080c14;
  --bg-2: #0b1120;
  --surface: #111826;
  --surface-2: #161f31;
  --surface-3: #1b2639;
  --surface-hover: #1a2334;
  --border: #1f2a3d;
  --border-2: #2a3850;
  --border-strong: #35466220;
  --overlay: rgba(4, 7, 13, 0.72);

  /* ---------------- texto
     Contrastes sobre --surface (#111826): --text 15.9:1 · --text-2 6.9:1 · --text-3 5.1:1 (AA).
     O #64748b da direcao de arte rende 3.7:1 e reprova AA em texto pequeno, entao vive
     em --text-faint, so para uso decorativo (icones, traços, separadores), nunca em texto. */
  --text: #e8edf5;
  --text-2: #94a3b8;
  --text-3: #7c8ba3;
  --text-faint: #64748b;
  --text-on-accent: #04121a;
  --text-on-gold: #1a1403;

  /* ---------------- interacao / IA */
  --accent: #22d3ee;
  --accent-2: #3b82f6;
  --accent-dim: #0e7490;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --accent-soft-2: rgba(34, 211, 238, 0.22);
  --blue-soft: rgba(59, 130, 246, 0.14);

  /* ---------------- autoridade (usar pouco) */
  --gold: #c9a227;
  --gold-dim: #8a6f16;
  --gold-soft: rgba(201, 162, 39, 0.14);

  /* ---------------- semantica */
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, 0.13);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.13);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.13);
  --info: #60a5fa;
  --info-soft: rgba(96, 165, 250, 0.13);
  --neutral: #94a3b8;
  --neutral-soft: rgba(148, 163, 184, 0.12);

  /* lados do debate */
  --side-favoravel: var(--ok);
  --side-contraria: var(--danger);
  --side-neutro: var(--neutral);

  /* ---------------- tipografia */
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;

  --fs-2xs: 0.6875rem;  /* 11px */
  --fs-xs: 0.75rem;     /* 12px */
  --fs-sm: 0.8125rem;   /* 13px */
  --fs-base: 0.875rem;  /* 14px */
  --fs-md: 0.9375rem;   /* 15px */
  --fs-lg: 1.0625rem;   /* 17px */
  --fs-xl: 1.25rem;     /* 20px */
  --fs-2xl: 1.5rem;     /* 24px */
  --fs-3xl: 1.875rem;   /* 30px */
  --fs-4xl: 2.25rem;    /* 36px */

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  --lh-tight: 1.2;
  --lh-snug: 1.35;
  --lh-normal: 1.5;
  --lh-relaxed: 1.65;

  --ls-tight: -0.011em;
  --ls-wide: 0.04em;
  --ls-caps: 0.09em;

  /* ---------------- espacamento (base 4px) */
  --s-0: 0;
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 28px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;

  /* ---------------- raios */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 10px;
  --r-xl: 14px;
  --r-full: 999px;

  /* ---------------- sombras (sutis e escuras) */
  --sh-1: 0 1px 2px rgba(0, 0, 0, 0.45);
  --sh-2: 0 2px 6px rgba(0, 0, 0, 0.5);
  --sh-3: 0 6px 18px rgba(0, 0, 0, 0.55);
  --sh-4: 0 14px 40px rgba(0, 0, 0, 0.62);
  --sh-inset: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  --ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
  --glow-accent: 0 0 0 1px var(--accent-dim), 0 0 16px rgba(34, 211, 238, 0.22);
  --glow-gold: 0 0 0 1px var(--gold-dim), 0 0 18px rgba(201, 162, 39, 0.24);
  --glow-danger: 0 0 0 1px rgba(248, 113, 113, 0.5), 0 0 16px rgba(248, 113, 113, 0.22);

  /* ---------------- layout */
  --sidebar-w: 248px;
  --topbar-h: 56px;
  --container-max: 1280px;

  /* ---------------- z-index */
  --z-base: 0;
  --z-fx: 5;
  --z-sticky: 100;
  --z-sidebar: 200;
  --z-drawer: 300;
  --z-modal: 400;
  --z-toast: 500;
  --z-tooltip: 600;

  /* ---------------- duracoes */
  --d-instant: 70ms;
  --d-fast: 130ms;
  --d-base: 200ms;
  --d-slow: 320ms;
  --d-slower: 560ms;
  --d-pulse: 1800ms;
  --d-spin: 900ms;
  --d-shimmer: 1400ms;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.55, 0.06, 0.68, 0.19);
}

/* Sob reducao de movimento as duracoes vao a ~1 frame: o estado permanece, o movimento some. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --d-instant: 1ms;
    --d-fast: 1ms;
    --d-base: 1ms;
    --d-slow: 1ms;
    --d-slower: 1ms;
    --d-pulse: 1ms;
    --d-spin: 1ms;
    --d-shimmer: 1ms;
  }
}
