/* =========================================================
   Base: reset, tipografia, layout e animação de entrada
   ========================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: -0.006em; /* Inter fica mais firme com um aperto mínimo */
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body.menu-open {
  overflow: hidden;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

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

button {
  cursor: pointer;
}

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

::selection {
  background: var(--brand-300);
  color: var(--black);
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(72px, 10vw, 128px);
}

.section--muted {
  background: var(--gray-50);
}

.nowrap {
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Animação de entrada no scroll ----------
   Só esconde o conteúdo quando há JavaScript (classe .js no <html>)
   e quando o visitante não pediu movimento reduzido no sistema.
   Controlado por assets/js/reveal.js. */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    transition-delay: var(--delay, 0ms);
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

.stagger > :nth-child(2) { --delay: 80ms; }
.stagger > :nth-child(3) { --delay: 160ms; }
.stagger > :nth-child(4) { --delay: 240ms; }
.stagger > :nth-child(5) { --delay: 320ms; }
.stagger > :nth-child(6) { --delay: 400ms; }

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
}
