/* ==========================================================================
   CLV — Design tokens
   Tudo que é decisão de design mora aqui. Componentes só consomem variáveis.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fonte Inter, hospedada localmente para o site funcionar sem internet.
   Arquivo variável: um só download cobre os pesos 400 a 800.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.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: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin.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 {
  /* ------------------------------------------------------------------------
     Cores — paleta base
     ------------------------------------------------------------------------ */
  --clv-navy: #0f172a;
  --clv-navy-800: #1e293b;
  --clv-navy-700: #334155;
  --clv-blue: #2563eb;
  --clv-blue-600: #1d4ed8;
  --clv-blue-400: #60a5fa;
  --clv-blue-50: #eff6ff;
  --clv-white: #ffffff;
  --clv-gray: #f8fafc;
  --clv-gray-100: #f1f5f9;
  --clv-gray-200: #e2e8f0;
  --clv-gray-300: #cbd5e1;
  --clv-gray-400: #94a3b8;
  --clv-gray-500: #64748b;
  --clv-gray-600: #475569;

  --clv-win: #16a34a;
  --clv-win-bg: #dcfce7;
  --clv-loss: #dc2626;
  --clv-loss-bg: #fee2e2;
  --clv-warn: #d97706;
  --clv-warn-bg: #fef3c7;

  /* Dourado usado com parcimônia: líder da tabela, pódio, destaques. */
  --clv-gold: #d4a017;
  --clv-gold-bg: #fef9e7;

  /* ------------------------------------------------------------------------
     Papéis semânticos — é isto que os componentes usam
     ------------------------------------------------------------------------ */
  --bg-page: var(--clv-gray);
  --bg-surface: var(--clv-white);
  --bg-subtle: var(--clv-gray-100);
  --bg-dark: var(--clv-navy);

  --text-strong: var(--clv-navy);
  --text-body: var(--clv-gray-600);
  --text-muted: var(--clv-gray-500);
  --text-on-dark: var(--clv-white);
  --text-on-dark-muted: rgba(255, 255, 255, 0.68);

  --border: var(--clv-gray-200);
  --border-strong: var(--clv-gray-300);

  --accent: var(--clv-blue);
  --accent-hover: var(--clv-blue-600);
  --accent-soft: var(--clv-blue-50);

  /* ------------------------------------------------------------------------
     Tipografia — escala com passo ~1.2
     ------------------------------------------------------------------------ */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  /* Números de placar e tabela: tabular para as colunas não dançarem. */
  --font-numeric: var(--font-sans);

  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.8125rem;  /* 13px */
  --text-base: 0.9375rem;/* 15px */
  --text-md: 1rem;       /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.375rem;   /* 22px */
  --text-2xl: 1.75rem;   /* 28px */
  --text-3xl: 2.25rem;   /* 36px */
  --text-4xl: 3rem;      /* 48px */

  --leading-tight: 1.15;
  --leading-snug: 1.35;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;
  --tracking-caps: 0.08em;

  /* ------------------------------------------------------------------------
     Espaçamento — base 4px
     ------------------------------------------------------------------------ */
  --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;

  /* ------------------------------------------------------------------------
     Formas e profundidade
     ------------------------------------------------------------------------ */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.07), 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 24px rgba(15, 23, 42, 0.09), 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 22px 48px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-accent: 0 8px 20px rgba(37, 99, 235, 0.24);

  /* ------------------------------------------------------------------------
     Movimento
     ------------------------------------------------------------------------ */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 120ms;
  --dur: 180ms;
  --dur-slow: 320ms;

  /* ------------------------------------------------------------------------
     Layout
     ------------------------------------------------------------------------ */
  --container: 1200px;
  --container-narrow: 760px;
  --gutter: var(--space-4);
  --header-h: 68px;

  --z-dropdown: 100;
  --z-header: 200;
  --z-overlay: 300;
  --z-modal: 400;
}

@media (min-width: 768px) {
  :root {
    --gutter: var(--space-6);
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: var(--space-8);
  }
}
