/* ==========================================================================
   Base — reset, fontes, elementos
   ========================================================================== */

/* --- Fontes self-hosted ---------------------------------------------------
   Só o subset latino: cobre todos os acentos do português. */
@font-face {
  font-family: 'Poppins';
  src: url('../assets/fonts/poppins-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'Poppins';
  src: url('../assets/fonts/poppins-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'Roboto';
  src: url('../assets/fonts/roboto-var.woff2') format('woff2-variations'),
       url('../assets/fonts/roboto-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--altura-header) + 1rem);
}

body {
  font-family: var(--fonte-corpo);
  font-size: var(--txt-base);
  line-height: var(--linha-corpo);
  color: var(--cor-texto);
  background: var(--cor-fundo);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

/* --- Tipografia ----------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--fonte-titulo);
  font-weight: var(--peso-forte);
  line-height: var(--linha-titulo);
  color: var(--cor-texto);
  text-wrap: balance;
}

h1 { font-size: var(--txt-3xl); line-height: var(--linha-apertada); letter-spacing: -0.02em; }
h2 { font-size: var(--txt-2xl); letter-spacing: -0.015em; }
h3 { font-size: var(--txt-xl); letter-spacing: -0.01em; }
h4 { font-size: var(--txt-lg); }
h5 { font-size: var(--txt-md); }

p { text-wrap: pretty; }

a {
  color: var(--cor-acento);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--t-rapida);
}
a:hover { color: var(--cor-acento-hover); }

ul, ol { padding-left: 1.25rem; }

strong, b { font-weight: var(--peso-medio); }

hr {
  border: 0;
  border-top: 1px solid var(--cor-borda);
  margin: var(--e-8) 0;
}

/* --- Foco visível (nunca remover) ----------------------------------------- */
:focus-visible {
  outline: 3px solid var(--cor-foco);
  outline-offset: 2px;
  border-radius: var(--raio-sm);
}
:focus:not(:focus-visible) { outline: none; }

/* --- Selecção -------------------------------------------------------------- */
::selection {
  background: var(--cor-acento);
  color: var(--cor-texto-inverso);
}

/* --- Movimento reduzido ---------------------------------------------------- */
@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;
  }
}
