/* ==========================================================================
   base.css — Reset, tipografia base, layout global.
   Mobile-first: estilos escritos primeiro pro viewport pequeno; media queries
   usam min-width pra expandir (design system, seção 4).
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  /* Compensa o header fixo: âncoras param abaixo dele, não escondidas atrás. */
  scroll-padding-top: 80px;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Impede que o full-bleed do Hero (100vw, que inclui a barra de rolagem) gere
     scroll horizontal. `clip` (não `hidden`) NÃO cria container de rolagem, então
     não transforma o body em scroller — a window continua rolando normalmente e o
     scroll-padding-top segue valendo. Ver sections.css → .hero. */
  overflow-x: clip;
}

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

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

/* --- Container / seções ------------------------------------------------- */
.wrap {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-40) var(--pad-inline-mobile) var(--space-64);
}

section { margin-bottom: var(--space-56); }
section:last-child { margin-bottom: 0; }

/* --- Tipografia base ---------------------------------------------------- */
h1 {
  font-size: var(--fs-h1);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
}

h3, h4 { font-weight: var(--fw-semibold); }

p { font-size: var(--fs-body); }

/* --- Etiqueta (eyebrow) e rótulo de seção ------------------------------- */
.eyebrow {
  display: inline-block;
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--accent-yellow);
  background: rgba(255, 208, 42, 0.08);
  border: 1px solid rgba(255, 208, 42, 0.25);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-20);
}

.section-label {
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-section-label);
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--space-12);
}

.section-title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-28);
  max-width: 560px;
}

.subtitle {
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  color: var(--text-secondary);
}

/* Acessibilidade: esconde visualmente mas mantém pra leitor de tela */
.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;
}

/* --- Reveal ao rolar (fade + leve deslocamento) — design system seção 6 - */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur-reveal) var(--ease),
              transform var(--dur-reveal) var(--ease);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* --- Foco visível pra navegação por teclado (acessibilidade) ------------ */
/* No tema escuro, o anel padrão do navegador é fraco/inconsistente. Este anel
   amarelo de destaque só aparece em interação por teclado (:focus-visible não
   dispara em clique de mouse/touch) — reforça o item de navegação por teclado
   do accordion e dos CTAs (CLAUDE.md, seção 8). */
:focus-visible {
  outline: 2px solid var(--accent-yellow);
  outline-offset: 3px;
}
/* Navegadores sem suporte a :focus-visible mantêm o outline padrão (fallback). */

/* ==========================================================================
   Breakpoints (mobile-first, min-width) — design system, seção 4
   ========================================================================== */

/* ≥ 480px — respiro maior, estrutura ainda compacta */
@media (min-width: 480px) {
  .wrap { padding: var(--space-56) var(--pad-inline) var(--space-96); }
  .eyebrow { font-size: var(--fs-eyebrow-desktop); padding: 6px 16px; margin-bottom: var(--space-28); }
}

/* ≥ 720px — grid de serviços em 3 colunas, mais respiro entre seções */
@media (min-width: 720px) {
  section { margin-bottom: var(--space-64); }
  .section-title { font-size: var(--fs-h2-desktop); margin-bottom: var(--space-40); }
}

/* ≥ 1000px — largura máxima do container atingida, só respiro lateral extra */
@media (min-width: 1000px) {
  .wrap { padding-top: var(--space-64); }
}

/* --- Respeita quem prefere menos movimento (obrigatório) --------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
