/* ===== RESET ===== */

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

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* evita que o conteudo fique escondido atras da barra de alerta fixa */
  scroll-padding-top: 72px;
  /* "clip" e melhor que "hidden" aqui: nao cria caixa de rolagem,
     entao nao quebra o position:sticky da barra de alerta. */
  overflow-x: clip;
}

body {
  font-family: var(--f-base);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--t-on-light);
  background: var(--c-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Nunca pode haver scroll horizontal.
     "hidden" primeiro como fallback para navegadores antigos;
     "clip" sobrescreve nos modernos e nao interfere no sticky. */
  overflow-x: hidden;
  overflow-x: clip;
}

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

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

button {
  background: none;
  border: 0;
  cursor: pointer;
}

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

ul, ol { list-style: none; }

h1, h2, h3, h4 {
  line-height: var(--lh-tight);
  text-wrap: balance;
}

p { text-wrap: pretty; }

/* ===== Foco visivel para navegacao por teclado ===== */
:focus-visible {
  outline: 3px solid var(--c-amber);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ===== Conteudo apenas 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: 0;
}

.skip-link {
  position: absolute;
  top: -100px; left: var(--s-4);
  z-index: 999;
  padding: var(--s-3) var(--s-5);
  background: var(--c-teal);
  color: #fff;
  font-weight: var(--fw-bold);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
}
.skip-link:focus { top: 0; }

/* ===== Respeito a preferencia de menos movimento ===== */
@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;
  }
}
