/* ==========================================================================
   BASE — camada 2 da arquitetura ITCSS
   Reset leve, elementos HTML sem classe e regras globais de acessibilidade.
   ========================================================================== */

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

* {
  margin: 0;
}

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

body {
  min-height: 100dvh;
  background-color: var(--background);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}

/* --- Tipografia ----------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--tracking-display);
  color: var(--cream);
  line-height: 1.25;
  text-wrap: balance;
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }
h5 { font-size: var(--text-h5); }
h6 { font-size: var(--text-h6); }

p {
  max-width: 68ch;
}

strong { font-weight: 700; }

small { font-size: var(--text-small); }

a {
  color: var(--gold-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

a:hover { color: var(--gold); }

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

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

code {
  font-family: 'SF Mono', ui-monospace, 'Cascadia Code', Menlo, monospace;
  font-size: 0.9em;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--gold-soft);
}

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

/* --- Formulários ----------------------------------------------------------- */
input, textarea, select, button {
  font: inherit;
  color: inherit;
}

::placeholder {
  color: var(--cream-muted);
  opacity: 0.7;
}

/* --- Acessibilidade: foco visível em dourado ------------------------------- */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Texto visível apenas para leitores de tela */
.u-visually-hidden {
  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: escondido até receber foco pelo teclado */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 100;
  background-color: var(--gold);
  color: var(--background);
  font-weight: 700;
  padding: var(--space-3) var(--space-5);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
  color: var(--background);
}

/* Seleção de texto no tema da marca */
::selection {
  background-color: var(--gold);
  color: var(--background);
}

/* --- Movimento reduzido: desativa TODAS as animações ------------------------ */
@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;
  }
}
