/* ============================================================================
   base.css — Reset, tipografia global, utilitários e animações base.
   Consome exclusivamente tokens de tokens.css. Zero valores absolutos.
   ============================================================================ */

/* ── Reset moderno ─────────────────────────────────────────────────────── */

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

body,
h1, h2, h3, h4, h5, h6,
p,
ul, ol,
figure {
  margin: 0;
  padding: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
}

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

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

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

/* ── Body e tipografia global ──────────────────────────────────────────── */

html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  background: var(--color-bg-deep);
  color: var(--color-text-mid);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-text-high);
}

h1 {
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h2 {
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h3 {
  font-weight: 700;
  line-height: 1.3;
}

h4 {
  font-weight: 600;
  line-height: 1.3;
}

/* ── Links ─────────────────────────────────────────────────────────────── */

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast), filter var(--transition-fast);
}

a:hover,
a:focus-visible {
  filter: brightness(1.2);
}

/* ── Utilitários ───────────────────────────────────────────────────────── */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--container-pad);
}

@media (max-width: 767px) {
  .container {
    padding-inline: var(--space-4);
    width: 100%;
    max-width: 100%;
  }

  main {
    overflow-x: hidden;
    width: 100%;
  }
}

.section {
  padding-block: var(--space-16);
}

@media (min-width: 1024px) {
  .section {
    padding-block: var(--space-24);
  }
}

.accent {
  color: var(--color-accent);
}

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

/* ── Animações base (consumidas por animations.js) ─────────────────────── */

.animate-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Preferência por movimento reduzido ────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .animate-in {
    opacity: 1;
    transform: none;
  }
}

/* Divisor dourado-ciano entre seções */
.section-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-gold) 0%, var(--color-accent) 100%);
  margin: 0 auto var(--space-8);
  border-radius: 2px;
}

/* Texto com acento dourado */
.text-gold {
  color: var(--color-gold-light);
}
