/* ===========================================================================
   Controller — tokens e reset
   ===========================================================================

   Os tokens de marca sao os mesmos de site/css/styles.css, ja aprovados.
   Nao reinventar cor aqui: se mudar la, muda aqui.

   Regra de contraste do institucional/LE-DIGITAL.md:
   texto pequeno NUNCA em --rose (#ff7bb1) sobre creme — da 2,2:1 e reprova.
   O gradiente entra so em detalhe e CTA, nunca atras de texto corrido.
   =========================================================================== */

:root {
  /* Marca */
  --brand-pink: #ff66c4;
  --brand-yellow: #ffde59;
  --rose: #ff7bb1;
  --accent: #b83a83;

  /* Superficies */
  --cream: #f6f2ea;
  --cream-deep: #efe8dc;
  --white: #ffffff;
  --surface: rgba(255, 255, 255, 0.72);

  /* Tinta */
  --ink: #3b2430;
  --ink-soft: #6e5460;
  --muted: #7d6874;

  --line: rgba(59, 36, 48, 0.12);
  --line-forte: rgba(59, 36, 48, 0.22);

  --gradient: linear-gradient(100deg, var(--brand-pink) 0%, var(--brand-yellow) 100%);
  --gradient-soft: linear-gradient(100deg, rgba(255, 102, 196, 0.16), rgba(255, 222, 89, 0.16));

  /* Estado — cores de sistema, nao de marca. Legibilidade acima de tudo. */
  --ok: #1f7a4d;
  --ok-fundo: #e7f5ee;
  --aviso: #8a5a00;
  --aviso-fundo: #fdf3e0;
  --erro: #a52334;
  --erro-fundo: #fdeaec;
  --info: #2b5f8a;
  --info-fundo: #e9f1f8;

  /* Score */
  --quente: #c8341f;
  --bom: #b3620f;
  --morno: #8a7515;
  --frio: var(--muted);

  --font-titulo: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-corpo: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Consolas", monospace;

  --raio: 0.75rem;
  --raio-sm: 0.5rem;
  --lateral-w: 15rem;
  --topo-h: 3.5rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --sombra: 0 1px 2px rgba(59, 36, 48, 0.06), 0 4px 12px rgba(59, 36, 48, 0.05);
  --sombra-alta: 0 8px 24px rgba(59, 36, 48, 0.12);
}

/* --- Reset ---------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-corpo);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-titulo);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

img, svg { display: block; max-width: 100%; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--ink); }

code, pre { font-family: var(--font-mono); font-size: 0.85em; }

/* Foco visivel sempre. Nunca use outline:none sem um substituto — a Laura
   navega no teclado entre campos, e some tudo se isso quebrar. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Pular para o conteudo: some ate receber foco pelo teclado. */
.pular {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--raio-sm) 0;
}
.pular:focus { left: 0; }

/* Faixa de ambiente — so aparece fora de producao. Deliberadamente feia:
   ela precisa incomodar enquanto o local estiver ligado no banco real. */
.faixa-ambiente {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 0.375rem 1rem;
  font-size: 0.75rem;
  text-align: center;
  background: var(--info-fundo);
  color: var(--info);
  border-bottom: 1px solid currentColor;
}

.faixa-ambiente.faixa-perigo {
  background: #7a1020;
  color: #ffe8ec;
  border-bottom-color: #4d0a14;
}

.so-mobile { display: none; }

@media (max-width: 48rem) {
  .so-mobile { display: inline-flex; }
}
