/* ============================================================
   BASE — reset + fontes + elementos fundamentais
   ============================================================ */

@font-face {
  font-family: "Rizoma";
  src: url("../fonts/RizomaM-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Helvetica Local";
  src: url("../fonts/Helvetica-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Helvetica Local";
  src: url("../fonts/Helvetica-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  font-synthesis: none;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-ink-900);
  background-color: var(--color-forest-900);
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
fieldset,
legend {
  margin: 0;
  padding: 0;
  border: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-title);
  font-weight: 400;
  color: var(--color-ink-900);
}

button {
  font-family: inherit;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

/* Utilitários mínimos */
.u-visually-hidden {
  position: absolute !important;
  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;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--color-gold-500);
  color: var(--color-on-gold);
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-body);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  left: var(--space-2);
  top: var(--space-2);
}

:focus-visible {
  outline: 2px solid var(--color-gold-300);
  outline-offset: 2px;
}

/* Títulos ganham foco apenas para reposicionar leitores de tela entre
   telas (ver dom.js focusScreenHeading) — não são controles, então o
   retângulo de outline padrão lê como erro de formulário sobre a
   serifada Rizoma. Um brilho suave mantém o sinal para quem navega por
   teclado sem parecer um artefato visual para quem só usa o mouse/toque. */
[data-focus-target]:focus-visible {
  outline: none;
  text-shadow: 0 0 14px rgba(228, 197, 112, 0.5);
}

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