/* ==========================================================================
   base.css — Reset minimalista + escala tipográfica (DESIGN.md, Seções 4 e 5)
   Importe DEPOIS de tokens.css.
   ========================================================================== */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-default);
  /* Transição suave ao alternar tema claro/escuro. */
  transition: background-color var(--transition-base), color var(--transition-base);
}

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

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

a {
  color: var(--color-primary-dark);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Foco visível acessível — padrão do DS. */
:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

/* Respeita usuários que pedem menos movimento. */
@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;
  }
}

/* --- Escala tipográfica (utilitárias) ---------------------------------- */
.t-h1 { font-size: var(--font-size-5xl); font-weight: var(--font-weight-medium); line-height: var(--line-height-tight); }
.t-h2 { font-size: var(--font-size-4xl); font-weight: var(--font-weight-medium); line-height: var(--line-height-tight); }
.t-h3 { font-size: var(--font-size-3xl); font-weight: var(--font-weight-medium); line-height: var(--line-height-tight); }
.t-h4 { font-size: var(--font-size-2xl); font-weight: var(--font-weight-medium); line-height: var(--line-height-tight); }
.t-h5 { font-size: var(--font-size-xl);  font-weight: var(--font-weight-medium); line-height: var(--line-height-tight); }
.t-h6 { font-size: var(--font-size-lg);  font-weight: var(--font-weight-medium); line-height: var(--line-height-tight); }

.t-body1 { font-size: var(--font-size-md); font-weight: var(--font-weight-regular); line-height: var(--line-height-normal); }
.t-body2 { font-size: var(--font-size-sm); font-weight: var(--font-weight-regular); line-height: var(--line-height-relaxed); }
