/* ==========================================================================
   EULER 1515 — DESIGN SYSTEM
   02. base.css — reset e elementos nativos
   Depende de: tokens.css
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid;
}

html {
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--surface-paper);
  color: var(--text-primary);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-kerning: normal;
  font-optical-sizing: auto;
}

/* Todo título é display, 800, caixa alta, entrelinha colapsada.
   Esta é a regra mais forte do sistema. */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  text-transform: uppercase;
  text-wrap: balance;
  font-kerning: normal;
  font-optical-sizing: auto;
}

/* <em> dentro de título não é itálico — é a palavra em destaque.
   O padrão é royal porque o chão padrão é papel: royal passa em branco (7,6:1)
   e em amarelo (5,2:1). Superfícies escuras trocam para amarelo em
   components.css — assim esquecer a classe de contexto nunca gera texto
   ilegível, só menos vibrante. */
h1 em,
h2 em,
h3 em,
h4 em,
blockquote em {
  font-style: normal;
  color: var(--text-emphasis-alt);
}

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

img,
svg,
video,
canvas,
iframe {
  display: block;
  vertical-align: middle;
}

img,
video {
  max-width: 100%;
  height: auto;
}

ul,
ol,
menu {
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: transparent;
  border-radius: 0;
}

button {
  cursor: pointer;
  appearance: button;
}

/* Foco visível e consistente. Nunca remova sem substituir. */
:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

.on-dark :focus-visible,
[data-theme="dark"] :focus-visible {
  outline-color: var(--focus-ring-on-dark);
}

/* `hidden` tem que ganhar de qualquer `display` de componente. Sem o
   !important, uma regra como `.card { display: grid }` anula o atributo e o
   elemento aparece mesmo marcado como escondido — falha silenciosa e comum. */
[hidden] {
  display: none !important;
}

/* Conteúdo visível 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;
}

/* Movimento reduzido: obrigatório em qualquer entrega. */
@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;
  }
}
