/* Lume: tokens de cor, tipo e espaço. Trocar a marca = trocar este arquivo e o config.js.
   Contraste conferido (WCAG 2.2 AA) nos dois temas: texto ≥ 4.5:1, bordas de controle ≥ 3:1.
   Ideia de cor: tinta azul-marinho (confiança) + luz âmbar (a marca Lume) + cobalto nos links. */

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4.woff2") format("woff2-variations");
  font-weight: 200 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans.woff2") format("woff2-variations");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --escala: 1;                       /* "Tamanho do texto" nos Ajustes */
  --t-xs: 0.8125rem;  /* 13 */
  --t-sm: 0.9375rem;  /* 15 */
  --t-md: 1.0625rem;  /* 17 */
  --t-lg: 1.1875rem;  /* 19 */
  --t-xl: 1.4375rem;  /* 23 */
  --t-2xl: 1.875rem;  /* 30 */
  --t-3xl: 2.5rem;    /* 40 */
  --t-hero: clamp(3.5rem, 11vw, 5.5rem);

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px;
  --raio: 12px; --raio-sm: 8px; --raio-lg: 20px;
  --alvo: 44px;
  --leitura: 68ch;
  --conteudo: 1160px;

  color-scheme: light dark;
}
html { font-size: calc(100% * var(--escala)); }
html[data-texto="grande"] { --escala: 1.125; }

/* ---------- tema escuro (padrão quando o sistema pede escuro) ---------- */
:root, :root[data-theme="dark"] {
  --bg: #070e20;
  --bg-2: #0c1630;
  --surface: #101b3a;
  --surface-2: #16244a;
  --line: #26365f;
  --line-forte: #6a7da9;
  --text: #eef2ff;
  --muted: #aab6d8;
  --acento: #86a6ff;           /* links, aba ativa, ícones de ação */
  --acento-fill: #ffc247;      /* botão principal: a luz do Lume */
  --on-acento: #0b1226;
  --acento-soft: rgb(134 166 255 / 0.14);
  --luz: #ffc247;              /* brilho da marca, "novo", destaque */
  --on-luz: #0b1226;
  --luz-brilho: rgb(255 194 71 / 0.22); --numero: #ffc247;
  --danger: #ff9c8f;
  --danger-fill: #a8281c;
  --ok: #7fd89a;
  --focus: #ffd980;
  --sombra: 0 1px 0 rgb(255 255 255 / 0.04) inset, 0 12px 32px rgb(0 0 0 / 0.38);
  --sombra-bloco: 0 1px 0 rgb(255 255 255 / 0.05) inset, 0 6px 18px rgb(0 0 0 / 0.28);
  --vidro: rgb(7 14 32 / 0.78);
  --halo: radial-gradient(60% 90% at 12% 0%, rgb(255 194 71 / 0.20), transparent 70%), radial-gradient(50% 80% at 95% 10%, rgb(110 140 255 / 0.20), transparent 70%);

  --area-trabalhista: #82b4ff;
  --area-tributario: #7fe0a0;
  --area-civil: #5fd6cf;
  --area-familia: #d4e86f;
  --area-penal: #ff9c8f;
  --area-previdenciario: #c0a6ff;
  --area-empresarial: #ffb066;
  --area-consumidor: #ff9cc9;
  --area-administrativo: #b3c0dc;
  color-scheme: dark;
}

/* ---------- tema claro ---------- */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3f6fc; --bg-2: #e9eef9; --surface: #ffffff; --surface-2: #eaf0fb; --line: #d3dbed; --line-forte: #6a7ba3;
    --text: #0b1226; --muted: #44536f;
    --acento: #1c45d6; --acento-fill: #0b1f5c; --on-acento: #ffffff; --acento-soft: rgb(28 69 214 / 0.09);
    --luz: #ffb81f; --on-luz: #0b1226; --luz-brilho: rgb(255 184 31 / 0.30); --numero: #0b1f5c;
    --danger: #b3261e; --danger-fill: #b3261e; --ok: #1f7a3a; --focus: #1c45d6;
    --sombra: 0 1px 2px rgb(11 18 38 / 0.06), 0 14px 34px rgb(11 18 38 / 0.10);
    --sombra-bloco: 0 1px 2px rgb(11 18 38 / 0.05), 0 6px 18px rgb(11 18 38 / 0.07);
    --vidro: rgb(243 246 252 / 0.82);
    --halo: radial-gradient(60% 90% at 12% 0%, rgb(255 184 31 / 0.28), transparent 70%), radial-gradient(50% 80% at 95% 10%, rgb(28 69 214 / 0.14), transparent 70%);
    --area-trabalhista: #1f5fad; --area-tributario: #1f7a3a; --area-civil: #0f716b; --area-familia: #66750a; --area-penal: #b3261e;
    --area-previdenciario: #6a45b8; --area-empresarial: #a2520b; --area-consumidor: #a8336f; --area-administrativo: #4a5568;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f3f6fc; --bg-2: #e9eef9; --surface: #ffffff; --surface-2: #eaf0fb; --line: #d3dbed; --line-forte: #6a7ba3;
  --text: #0b1226; --muted: #44536f;
  --acento: #1c45d6; --acento-fill: #0b1f5c; --on-acento: #ffffff; --acento-soft: rgb(28 69 214 / 0.09);
  --luz: #ffb81f; --on-luz: #0b1226; --luz-brilho: rgb(255 184 31 / 0.30); --numero: #0b1f5c;
  --danger: #b3261e; --danger-fill: #b3261e; --ok: #1f7a3a; --focus: #1c45d6;
  --sombra: 0 1px 2px rgb(11 18 38 / 0.06), 0 14px 34px rgb(11 18 38 / 0.10);
  --sombra-bloco: 0 1px 2px rgb(11 18 38 / 0.05), 0 6px 18px rgb(11 18 38 / 0.07);
  --vidro: rgb(243 246 252 / 0.82);
  --halo: radial-gradient(60% 90% at 12% 0%, rgb(255 184 31 / 0.28), transparent 70%), radial-gradient(50% 80% at 95% 10%, rgb(28 69 214 / 0.14), transparent 70%);
  --area-trabalhista: #1f5fad; --area-tributario: #1f7a3a; --area-civil: #0f716b; --area-familia: #66750a; --area-penal: #b3261e;
  --area-previdenciario: #6a45b8; --area-empresarial: #a2520b; --area-consumidor: #a8336f; --area-administrativo: #4a5568;
  color-scheme: light;
}

/* Rodapé Koa Mind: cores do design system da marca, só neste trecho. */
:root { --koa-roxo: #592392; --koa-laranja: #f1a641; --koa-k: #eef2ff; }
:root[data-theme="light"] { --koa-k: #592392; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --koa-k: #592392; } }
