/* ===== Tokens ===== */
:root {
  --mar: #0B2545;        /* azul profundo: texto e superfícies escuras */
  --mar-2: #163A66;
  --atlantico: #1D5BD0;  /* azul do banner: links, foco */
  --sol: #F2B33D;        /* dourado de sol: selos e detalhes */
  --sol-escuro: #8A5D05;
  --branco: #FFFFFF;
  --nevoa: #EEF3F7;      /* fundo de seções */
  --nevoa-2: #E2EAF1;
  --linha: #D5DFE9;
  --texto: #0B2545;
  --suave: #4E5F76;
  --zap: #13804A;
  --zap-2: #0F6B3D;
  --erro: #B42318;
  --ok: #13804A;

  --f-titulo: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --f-texto: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-foto: 14px;
  --r-painel: 22px;
  --r-campo: 10px;
  --sombra: 0 1px 2px rgba(11, 37, 69, .06), 0 8px 24px -12px rgba(11, 37, 69, .18);
  --sombra-alta: 0 2px 4px rgba(11, 37, 69, .06), 0 24px 48px -20px rgba(11, 37, 69, .35);
  --vidro: rgba(255, 255, 255, .14);
  --vidro-borda: rgba(255, 255, 255, .28);

  --larg: 1200px;
  --pad: clamp(18px, 4vw, 40px);
  --t: .22s cubic-bezier(.2, .7, .2, 1);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--f-texto); font-size: 1rem; line-height: 1.55;
  color: var(--texto); background: var(--branco);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, h4 { text-wrap: balance; font-family: var(--f-titulo); line-height: 1.08; margin: 0; font-weight: 700; letter-spacing: -.02em; font-variation-settings: 'opsz' 48; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--atlantico); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--sol); color: var(--mar); }

[hidden] { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 1.25em; height: 1.25em; flex: none; }
.conteiner { width: 100%; max-width: var(--larg); margin-inline: auto; padding-inline: var(--pad); }

/* ===== Botões ===== */
.btn {
  --bg: var(--mar); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: .7em 1.25em; border-radius: 999px; border: 1px solid transparent;
  background: var(--bg); color: var(--fg); font-weight: 650; font-size: 1rem; line-height: 1.1;
  text-decoration: none; white-space: nowrap;
  transition: background var(--t), transform var(--t), box-shadow var(--t), border-color var(--t);
}
.btn:hover { background: var(--mar-2); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn--zap { --bg: var(--zap); }
.btn--zap:hover { background: var(--zap-2); box-shadow: 0 10px 24px -12px rgba(19, 128, 74, .8); }
.btn--claro { --bg: #fff; --fg: var(--mar); border-color: var(--linha); }
.btn--claro:hover { background: var(--nevoa); }
.btn--fantasma { --bg: transparent; --fg: var(--mar); }
.btn--fantasma:hover { background: var(--nevoa); }
.btn--perigo { --bg: var(--erro); }
.btn--perigo:hover { background: #8f1c13; }
.btn--sm { min-height: 38px; padding: .45em .9em; font-size: .92rem; }
.btn--ic { padding: 0; width: 44px; min-height: 44px; }
.btn--bloco { width: 100%; }

/* ===== Campos ===== */
.campo { display: grid; gap: 6px; }
.campo > span, .rotulo { font-size: .9rem; font-weight: 600; color: var(--texto); }
.campo small, .ajuda { font-size: .82rem; color: var(--suave); }
.entrada, .campo input:not([type=checkbox]):not([type=radio]):not([type=file]), .campo select, .campo textarea {
  width: 100%; min-height: 46px; padding: .65em .85em; border-radius: var(--r-campo);
  border: 1px solid var(--linha); background: #fff; color: var(--texto); font-size: 1rem;
  transition: border-color var(--t), box-shadow var(--t);
}
.campo textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.campo select { appearance: none; padding-right: 2.4em;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B2545' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right .8em center / 18px; }
.campo input:focus, .campo select:focus, .campo textarea:focus, .entrada:focus {
  outline: none; border-color: var(--atlantico); box-shadow: 0 0 0 3px rgba(29, 91, 208, .18);
}
.campo--erro input, .campo--erro select, .campo--erro textarea { border-color: var(--erro); }
.campo .msg-erro { color: var(--erro); font-size: .85rem; font-weight: 600; }

/* ===== Selo ===== */
.selo {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  padding: .32em .7em; border-radius: 999px; font-size: .78rem; font-weight: 700;
  background: var(--sol); color: var(--mar); letter-spacing: .01em;
}
.selo--encerrado { background: var(--mar); color: #fff; }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 200;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--mar); color: #fff; padding: .8em 1.2em; border-radius: 12px; font-weight: 600;
  box-shadow: var(--sombra-alta); transition: opacity var(--t), transform var(--t); max-width: calc(100% - 32px);
}
.toast--on { opacity: 1; transform: translate(-50%, 0); }
.toast.erro { background: var(--erro); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
