/*
 * Reset e base — equivale ao Preflight do Tailwind mais as regras globais que
 * o projeto tinha em globals.css.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
  border: 0 solid var(--color-brand-gray-200);
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  height: 100%;
  tab-size: 4;
}

body {
  min-height: 100%;
  background: var(--color-brand-white);
  color: var(--color-brand-gray-800);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg,
video,
canvas,
iframe {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

/* Zera o padding herdado do navegador: as alturas dos campos e botões são
   definidas pelo design system, não pelo UA stylesheet */
button,
input,
optgroup,
select,
textarea {
  font: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

button {
  cursor: pointer;
  text-align: inherit;
}

button:disabled {
  cursor: default;
}

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

table {
  border-collapse: collapse;
  text-indent: 0;
}

hr {
  height: 0;
  color: inherit;
  border-top-width: 1px;
}

[hidden] {
  display: none !important;
}

/* Focus visível consistente (WCAG) */
:focus-visible {
  outline: 2px solid var(--color-brand-gray-800);
  outline-offset: 2px;
}

/* Só para 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-width: 0;
}

/* Pula para o conteúdo — aparece só no foco pelo teclado */
.pular-para-conteudo {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--color-brand-gray-800);
  color: #fff;
  border-radius: var(--radius-brand);
  font-size: 0.875rem;
  font-weight: 600;
  transition: top 150ms ease-out;
}

.pular-para-conteudo:focus {
  top: 1rem;
}

/* Container padrão da página: máx. 1200px, 24px mobile / 32px desktop */
.container {
  width: 100%;
  max-width: var(--container-page);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

@media (min-width: 1024px) {
  .container {
    padding-inline: 2rem;
  }
}

/* Tons de fundo das seções (REQ-005) */
.tom-branco {
  background: var(--color-brand-white);
  border-bottom: 1px solid var(--color-brand-gray-200);
}

.tom-cinza {
  background: var(--color-brand-gray-50);
  border-bottom: 1px solid var(--color-brand-gray-200);
}

.tom-faixa {
  background: var(--color-brand-gray-200);
}

.tom-escuro {
  background: var(--color-brand-gray-800);
}

@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;
  }
}
