/* ────────────────────────────────────────────────────────────────
   Centro Sul Agro — Reset moderno
   Baseado em modern-normalize + ajustes do projeto
   ──────────────────────────────────────────────────────────── */

/* Box-sizing universal + zera margem/padding */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* HTML/Body fundamentos */
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  tab-size: 4;
  line-height: 1.15;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--ink);
  background: var(--canvas);
}

/* Mídia responsiva por padrão */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Inputs herdam tipografia */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Texto que quebra naturalmente */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Headings sem peso default (controlado por classes) */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* Links sem decoração default */
a {
  color: inherit;
  text-decoration: none;
}

/* Listas sem marker por padrão (controlamos quando precisar) */
ul,
ol {
  list-style: none;
}

/* Botão limpo */
button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

button:disabled {
  cursor: not-allowed;
}

/* Tabelas */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* HR mais discreto por padrão */
hr {
  border: none;
  border-top: 1px solid var(--hairline);
}

/* Texto selecionado com cor da marca */
::selection {
  background: var(--primary);
  color: var(--on-primary);
}

/* Foco visível padrão (acessibilidade) */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Scroll suave com respeito a preferência do usuário */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Esconde visualmente mas mantém pra leitores de tela */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
