@charset "UTF-8";

/* 3. RESET ESTRUTURAL E DE CAIXA (Zero CLS) */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  min-width: 0; /* Evita que itens dentro de Flex/Grid quebrem o container */
  -webkit-tap-highlight-color: transparent; /* Remove flash azul no mobile */
}

/* 4. CONFIGURAÇÕES DO DOCUMENTO (Body/Html) */
html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100svh; /* Altura real no mobile, ignorando barra de endereço */
  width: 100%;
  overflow-x: hidden;
  background-color: var(--cor-fundo);
  color: var(--cor-texto);
  font-family: var(--fonte-sans);
  line-height: 1.6; /* 1.6 favorece a leitura longa de artigos corporativos */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 5. MÍDIAS E TEXTOS (Anti-Quebra e Editorial) */
picture {
  display: contents; /* Mantém a estrutura intacta, aplicando CSS direto no <img> interno */
}

img,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
  font-style: italic; /* Caso a imagem quebre, o alt text fica estilizado */
}

/* Tipografia avançada para layouts complexos */
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
  text-wrap: balance; /* Evita palavras órfãs e equilibra títulos */
}

p {
  overflow-wrap: break-word;
  text-wrap: pretty; /* Previne a última linha de ter apenas uma palavra */
}

/* 6. RESET DE ELEMENTOS INTERATIVOS E FOCO */
a {
  text-decoration: none;
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
  border: none;
  background: none;
  color: inherit;
  appearance: none; 
  -webkit-appearance: none;
}

button {
  cursor: pointer;
}

/* Padronização de foco acessível para navegação por teclado */
:focus-visible {
  outline: 2px solid var(--cor-primaria);
  outline-offset: 2px;
}

/* 7. UTILITÁRIOS GLOBAIS DE ARQUITETURA  */

.pulse-wrapper {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--espaco-md);
}

.texto-serif-italico {
  font-family: var(--fonte-serif);
  font-style: italic;
  font-weight: 400;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* 8. ACESSIBILIDADE E PERFORMANCE (A11Y)  */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
