/*
 * Agenda de Feiras · base
 * Reset leve, tipografia, links, foco e utilitários. Depende de tokens.css.
 */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--altura-topo) + 1rem);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font-family: var(--fonte-corpo);
  font-weight: var(--peso-corpo);
  font-size: var(--fs-base);
  line-height: var(--lh-corpo);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, video, picture { max-width: 100%; height: auto; }
img { display: block; }

h1, h2, h3, h4 {
  font-family: var(--fonte-titulo);
  font-weight: var(--peso-titulo);
  line-height: var(--lh-titulo);
  letter-spacing: -0.01em;
  color: var(--texto);
  margin: 0 0 0.45em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.15; }
h4 { font-size: var(--fs-lg); }

p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li + li { margin-top: 0.25em; }
small { font-size: var(--fs-sm); }
strong, b { font-weight: var(--peso-forte); }
code, kbd {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--cor-creme);
  border: 1px solid var(--cor-linha);
  border-radius: var(--raio-xs);
  padding: 0.1em 0.4em;
  overflow-wrap: anywhere;
}
hr { border: 0; border-top: 2px dashed var(--cor-linha); margin: var(--esp-6) 0; }

a {
  color: var(--link);
  font-weight: var(--peso-forte);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: var(--cor-amarelo);
  transition: color var(--duracao) var(--curva), text-decoration-color var(--duracao) var(--curva);
}
a:hover { color: var(--cor-grafite); text-decoration-color: var(--cor-laranja); }

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

::selection { background: var(--cor-amarelo); color: var(--cor-grafite); }

:focus { outline: none; }
:focus-visible {
  outline: var(--foco-largura) solid var(--foco-cor);
  outline-offset: var(--foco-offset);
  border-radius: 6px;
}

/* Pular para o conteúdo */
.skip {
  position: absolute;
  left: var(--esp-4);
  top: -5rem;
  z-index: 100;
  background: var(--cor-grafite);
  color: var(--cor-branco);
  padding: 0.7rem 1.1rem;
  border-radius: var(--raio-pilula);
  font-weight: var(--peso-black);
  text-decoration: none;
}
.skip:focus { top: var(--esp-3); color: var(--cor-branco); }

/* Contêineres */
.wrap {
  width: min(var(--largura-max), 100% - 2 * var(--margem-lateral));
  margin-inline: auto;
}
.estreito { width: min(760px, 100% - 2 * var(--margem-lateral)); margin-inline: auto; }
main { display: block; min-height: 50vh; overflow-x: clip; }

/* Utilitários */
.sr-only, .visualmente-oculto {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 0; overflow: hidden; }
.ink-soft, .texto-suave { color: var(--texto-suave); }
.titulo { font-family: var(--fonte-titulo); font-weight: var(--peso-titulo); }
.display { font-family: var(--fonte-titulo); font-weight: var(--peso-titulo); font-size: var(--fs-display); line-height: 1.02; letter-spacing: -0.015em; }
.lead { font-size: var(--fs-lg); line-height: 1.5; color: var(--texto); max-width: 40rem; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  margin: 0 0 var(--esp-4);
  font-size: var(--fs-xs);
  font-weight: var(--peso-black);
  letter-spacing: var(--tracking-etiqueta);
  text-transform: uppercase;
  color: var(--texto);
}
.eyebrow::before {
  content: "";
  width: 0.7em; height: 0.7em;
  border-radius: 50%;
  background: var(--cor-laranja);
  flex: none;
}

/* Ritmo de seções (creme / amarelo / laranja) */
.secao { padding-block: var(--esp-secao); }
.fundo-offwhite { background: var(--cor-offwhite); }
.fundo-creme { background: var(--cor-creme); }
.fundo-branco { background: var(--cor-branco); }
.fundo-amarelo { background: var(--cor-amarelo); }
.fundo-laranja { background: var(--cor-laranja); }
.fundo-amarelo, .fundo-laranja { color: var(--cor-grafite); }
.fundo-amarelo a:not(.btn), .fundo-laranja a:not(.btn) { color: var(--cor-grafite); text-decoration-color: currentColor; }
.fundo-amarelo .eyebrow::before { background: var(--cor-grafite); }
.fundo-laranja .eyebrow::before { background: var(--cor-amarelo); }
.fundo-grade { background-image: url("../img/grade-calendario.svg"); background-size: 72px 72px; }

/* Ícone da sprite: <svg class="ico"><use href="<?= e(icone_url('i-calendario')) ?>"/></svg> (no JS: data-icones do <html>) */
.ico {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.2em;
}
.ico-lg { width: 1.75rem; height: 1.75rem; }
