/* =========================================================
   BASE — tipografia, body, seleção, scrollbar
   ========================================================= */

body {
  font-family: var(--font-base);
  font-size: var(--fs-16);
  font-weight: var(--fw-regular);
  color: var(--branco);
  background-color: var(--preto-base);
  line-height: 1.6;
  letter-spacing: -0.005em;
}

/* Seleção de texto */
::selection {
  background-color: var(--amarelo-principal);
  color: var(--preto-base);
}

::-moz-selection {
  background-color: var(--amarelo-principal);
  color: var(--preto-base);
}

/* Scrollbar custom */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--preto-base);
}

::-webkit-scrollbar-thumb {
  background: var(--amarelo-principal);
  border-radius: 999px;
  border: 3px solid var(--preto-base);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--amarelo-hover);
}

/* Firefox */
html {
  scrollbar-color: var(--amarelo-principal) var(--preto-base);
  scrollbar-width: thin;
}

/* Headings base */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-base);
  font-weight: var(--fw-black);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

p {
  font-size: var(--fs-16);
  color: var(--cinza-texto);
}

strong, b {
  font-weight: var(--fw-bold);
}

/* Foco visível e acessível em tudo */
:focus-visible {
  outline: 3px solid var(--amarelo-principal);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Helpers de cor */
.yellow {
  color: var(--amarelo-principal);
}

.white {
  color: var(--branco);
}

.muted {
  color: var(--cinza-suave);
}

/* Sublinhado em destaque escuro (usado em sections amarelas) */
.underline-dark {
  position: relative;
  display: inline-block;
}

.underline-dark::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6%;
  height: 18%;
  background-color: var(--preto-base);
  opacity: 0.08;
  z-index: -1;
  border-radius: 4px;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out-soft), transform 0.6s var(--ease-out-soft);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Prefere movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Acessibilidade — esconder visualmente, manter leitor de tela */
.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;
}
