/* ==========================================================================
   INAEC · 01-BASE
   Reset moderno + tipografia institucional + primitivas de layout.

   >>> MIGRAÇÃO ELEMENTOR PRO
   O conteúdo deste arquivo pertence a Elementor → Configurações do Site →
   Tipografia / Layout. As classes .container e .section correspondem,
   respectivamente, à "Largura do conteúdo" e ao "Padding" do Container.
   ========================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-xs));
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  min-height: 100svh;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums; /* MIV: algarismos tabulares */
}

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

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

ul[class], ol[class] { list-style: none; padding: 0; }

/* --- Tipografia --------------------------------------------------------- */
/* MIV: alinhamento à esquerda, bandeira à direita. Justificado apenas em
   documentos oficiais com hifenização. */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-heading);
  color: var(--color-heading);
  /* `balance` iguala o comprimento das linhas e, ao fazer isso, partia
     expressões que precisam andar juntas (o realce do banner, por exemplo).
     `pretty` preenche a linha naturalmente e só evita órfãs — o texto flui
     livre, sem quebras bruscas. */
  text-wrap: pretty;
  text-align: left;
  /* Nenhuma palavra longa deve vazar do contêiner nem se sobrepor. */
  overflow-wrap: break-word;
  hyphens: none;
}

h1 { font-size: var(--fs-display);  line-height: var(--lh-display); letter-spacing: var(--tracking-display); }
h2 { font-size: var(--fs-title);    line-height: var(--lh-title);   letter-spacing: var(--tracking-title); }
h3 { font-size: var(--fs-subtitle); line-height: var(--lh-subtitle); font-weight: var(--fw-semibold); letter-spacing: 0; }
h4 { font-size: 1.125rem;           line-height: 1.4;                 font-weight: var(--fw-semibold); letter-spacing: 0; }
h5, h6 { font-size: var(--fs-body); line-height: 1.45;                font-weight: var(--fw-semibold); letter-spacing: 0; }

p { text-wrap: pretty; max-width: var(--measure); }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }

/* MIV: ênfase por peso ou cor institucional — nunca por sublinhado */
strong, b { font-weight: var(--fw-semibold); color: inherit; }

/* --- Acessibilidade ----------------------------------------------------- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: var(--space-xs);
  top: var(--space-xs);
  z-index: calc(var(--z-drawer) + 1);
  padding: var(--space-2xs) var(--space-xs);
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
  transition: transform var(--duration) var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

/* Oculto visualmente, mas legível por leitores de tela */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Primitivas de layout ----------------------------------------------
   .container  → "Largura do conteúdo" do Container Elementor
   .section    → "Padding" vertical do Container Elementor
   ------------------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-gutter);
}

.section { padding-block: var(--section-padding-y); }

.section--alt     { background-color: var(--color-bg-alt); }
.section--surface { background-color: var(--color-surface); }
.section--inverse { background-color: var(--color-bg-inverse); color: var(--color-text-inverse); }
.section--inverse :is(h1, h2, h3, h4, h5, h6) { color: var(--color-text-inverse); }

/* Stack vertical — equivale ao "gap" do Container flex do Elementor */
.stack { display: flex; flex-direction: column; }
.stack--2xs { gap: var(--space-2xs); }
.stack--xs  { gap: var(--space-xs); }
.stack--sm  { gap: var(--space-sm); }
.stack--md  { gap: var(--space-md); }
.stack--lg  { gap: var(--space-lg); }

/* Linha flexível — equivale ao Container flex em direção "row" */
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
}
