/*
  Base CSS — reset leve + estilos de elemento + acessibilidade.
  Depende de tokens.css (variáveis) e fonts.css (@font-face) já carregados.
*/

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

* {
  margin: 0;
}

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

body {
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-ink);
  background-color: var(--color-ivory-50);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  cursor: pointer;
  background: none;
  border: none;
}

p,
h1,
h2,
h3,
h4 {
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

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

ul[role='list'],
ol[role='list'] {
  list-style: none;
  padding: 0;
}

/* ===== Acessibilidade ===== */

/* Indicador de foco: dourado escurecido nas superfícies claras (5,2:1 sobre
   ivory; 4,6:1 sobre stone) e dourado original nas superfícies escuras
   (6,9:1 sobre navy). O tom escuro também mantém 3,1:1 sobre navy caso
   alguma superfície escura não esteja listada abaixo. */
:root {
  --focus-ring-color: var(--color-gold-on-light);
}

.skip-link,
.site-header,
.mobile-nav,
.hero,
.manifesto,
.momentos,
.cta-final,
.site-footer,
.areas__signature,
.error-page,
.article-hero,
.article-cta,
.content-hub__hero,
.purchase-hero,
.purchase-prevention,
.contact-hero,
.contact-closing,
.condo-hero,
.condo-continuous,
.contract-hero,
.contract-movements,
.about-hero,
.about-prevention,
.lease-hero,
.lease-conflicts,
.diligence-hero,
.diligence-results,
.regularization-hero,
.regularization-paths,
.terms-hero,
.terms-closing,
.privacy-hero,
.privacy-closing {
  --focus-ring-color: var(--color-gold-500);
}

:focus-visible {
  outline: 2px solid var(--focus-ring-color);
  outline-offset: 3px;
  border-radius: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Foco não encoberto pelo header sticky (92px no masthead; 61–68px
   compacto): ao receber foco, o elemento interativo é rolado para baixo
   do header. Aplica-se só a elementos focáveis — destinos de âncora
   (seções e títulos) mantêm seus próprios scroll-margin. */
a[href],
button,
input,
select,
textarea,
summary,
[tabindex]:not([tabindex='-1']) {
  scroll-margin-top: calc(92px + var(--space-3));
}

::selection {
  background-color: var(--color-gold-400);
  color: var(--color-navy-950);
}

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

.skip-link {
  position: absolute;
  top: -48px;
  left: var(--space-3);
  z-index: var(--z-modal);
  padding: var(--space-2) var(--space-4);
  background-color: var(--color-navy-950);
  color: var(--color-ivory-50);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  border-radius: 2px;
  transition: top var(--duration-micro) var(--ease-editorial);
}

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

/* ===== Reduced motion global =====
   Além das durações já colapsadas em tokens.css, remove rolagem suave e
   garante que qualquer transição/animação futura resolva instantaneamente. */
@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;
    scroll-behavior: auto !important;
  }
}
