/* ContextIA — fontes e tokens de cor (claro/escuro). Fonte única das cores: nada de cores soltas nos outros arquivos.
   Contraste conferido por tools/check_contrast.py (WCAG 2.x). */

/* Inter (OFL 1.1) hospedada localmente; só os três pesos usados. Licença: assets/fonts/LICENSE-Inter-OFL.txt */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.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; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.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; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-700-normal.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; }

/* ---------- Tema claro (padrão) ---------- */
:root {
  color-scheme: light;
  --bg: #F5F0E6;              /* fundo principal */
  --surface: #FFFCF7;         /* superfícies e cartões */
  --text: #20201D;            /* texto principal */
  --text-2: #625D56;          /* texto secundário */
  --line: #D8D0C4;            /* divisórias */
  --brand-orange: #F57010;    /* marca (gráficos; não usar como cor de texto pequeno) */
  --brand-red: #D91828;
  --accent-text: #C4161F;     /* vermelho da marca escurecido para TEXTO pequeno (contraste >= 4,5:1) */
  --menu-gradient: linear-gradient(110deg, #B94708, #C7192D);
  --on-gradient: #FFFFFF;     /* texto sobre o degradê */
  --focus: #5B21B6;           /* foco por teclado: distinto da seleção (degradê) */
  --field-border: #8C857A;
  --media-bg: #E9E2D4;
  --danger: #B3261E;
  --danger-bg: #FBE9E7;
  --ok: #1D6B3A;
  --ok-bg: #E4F2E8;
  --warn-bg: #FFF3CD;
  --warn-border: #8A6A00;
  --chip-bg: #ECE5D8;
  --scroll-fade: #F5F0E6;
}

/* ---------- Tema escuro ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171717;
  --surface: #222222;
  --text: #F4EFE7;
  --text-2: #C1B9AE;
  --line: #3C3833;
  --accent-text: #FF8A4C;
  --focus: #C4A0FF;
  --field-border: #8C857A;
  --media-bg: #2B2926;
  --danger: #FF8F86;
  --danger-bg: #3A2220;
  --ok: #7FD39A;
  --ok-bg: #1F3326;
  --warn-bg: #3A3014;
  --warn-border: #D1A21A;
  --chip-bg: #2C2A26;
  --scroll-fade: #171717;
}
/* Sem JavaScript: segue o sistema */
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    color-scheme: dark;
    --bg: #171717;
    --surface: #222222;
    --text: #F4EFE7;
    --text-2: #C1B9AE;
    --line: #3C3833;
    --accent-text: #FF8A4C;
    --focus: #C4A0FF;
    --field-border: #8C857A;
    --media-bg: #2B2926;
    --danger: #FF8F86;
    --danger-bg: #3A2220;
    --ok: #7FD39A;
    --ok-bg: #1F3326;
    --warn-bg: #3A3014;
    --warn-border: #D1A21A;
    --chip-bg: #2C2A26;
    --scroll-fade: #171717;
  }
}
