/* =========================================================
   BASE — reset, tipografia, layout
   Usa apenas tokens. Não colocar valores visuais soltos aqui.
   ========================================================= */

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

* {
  margin: 0;
}

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

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

a {
  color: inherit;
}

address {
  font-style: normal;
}

/* ===== Tipografia ===== */
h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: var(--fw-heading);
  line-height: var(--lh-heading);
  color: var(--color-heading);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p {
  text-wrap: pretty;
}

.prose > * + * {
  margin-top: 1em;
}

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

.link {
  color: var(--color-primary);
  font-weight: 600;
}

/* ===== Ícones (Font Awesome via sprite) ===== */
.icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  fill: currentColor;
}

/* ===== Container ===== */
.container {
  width: min(var(--container-width), var(--container-max));
  margin-inline: auto;
}

.container--narrow {
  width: min(var(--container-width), var(--container-narrow));
}

/* ===== Seções ===== */
.section {
  padding-block: var(--section-py);
}

.section--surface {
  background: var(--color-surface);
}

.section--dark {
  background: var(--color-dark);
  color: var(--color-on-dark);
  --color-heading: var(--color-on-dark);
  --color-text: var(--color-on-dark);
}

.section--primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
  --color-heading: var(--color-on-primary);
  --color-text: var(--color-on-primary);
}

.section__header {
  max-width: 720px;
}

.section__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ===== Stack: espaçamento vertical entre filhos =====
   Padrão: --space-md (30px). Trocar localmente com --stack-gap. */
.stack > * + * {
  margin-top: var(--stack-gap);
}

/* ===== Grid com colunas por breakpoint (como no Elementor) =====
   Configure por componente: .servicos__grid { --cols-d: 3; } */
.grid {
  display: grid;
  gap: var(--grid-gap, var(--space-sm));
  grid-template-columns: repeat(var(--cols-m, 1), minmax(0, 1fr));
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(var(--cols-t, 2), minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(var(--cols-d, 3), minmax(0, 1fr));
  }
}

/* ===== Utilitários ===== */
.u-center {
  text-align: center;
  justify-content: center;
}

/* ===== Acessibilidade ===== */
.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: -100px;
  z-index: 100;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-primary);
  color: var(--color-on-primary);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

/* Marcador de conteúdo pendente: visível de propósito */
.pendente {
  outline: 2px dashed #D93025;
  background: #FDECEA;
  color: #8A1C14;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
