/* ==========================================================================
   BASE — reset, tipografia global e utilitários
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem; /* compensa o header fixo nos anchors */
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text-2);
  background-color: var(--ink-950);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

h1 { font-size: var(--fs-hero); font-weight: 700; }
h2 { font-size: var(--fs-h2); font-weight: 700; }
h3 { font-size: var(--fs-h3); font-weight: 600; }

p { max-width: 62ch; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

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

ul { list-style: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

::selection {
  background: var(--accent);
  color: var(--ink-950);
}

/* ---- Utilitários ---- */

.container {
  width: min(var(--container), 100% - 3rem);
  margin-inline: auto;
}

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

.section--alt { background: var(--ink-900); }

/* Cabeçalho padrão de seção */
.section-head {
  max-width: 40rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--center p { margin-inline: auto; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: var(--accent);
}

.section-head--center .eyebrow::after {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: var(--accent);
}

.section-head p { color: var(--text-2); margin-top: 0.9rem; }

.text-accent { color: var(--accent); }
.text-mono { font-family: var(--font-mono); }

/* Ícones SVG inline */
.icon {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Acessibilidade */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* Animação de entrada (ativada pelo reveal.js) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Delays escalonados para grupos de cards */
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

/* Respeita preferência por menos movimento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
