/* ==========================================================================
   Base — reset, tipografia, utilitários e acessibilidade
   ========================================================================== */

/* --- Reset -------------------------------------------------------------- */

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

* {
  margin: 0;
}

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

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

img {
  height: auto;
}

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

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

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

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

/* --- Tipografia --------------------------------------------------------- */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

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

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

h3 {
  font-size: var(--fs-h3);
  letter-spacing: -0.01em;
}

p {
  text-wrap: pretty;
}

strong {
  font-weight: var(--fw-bold);
}

/* --- Acessibilidade ------------------------------------------------------ */

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

/* O outline padrão só aparece via teclado; o clique de mouse não o dispara. */
:focus:not(:focus-visible) {
  outline: none;
}

.skip-link {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: var(--z-overlay);
  padding: var(--space-3) var(--space-5);
  background-color: var(--brand);
  color: var(--text-on-brand);
  font-weight: var(--fw-bold);
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
  transition: transform var(--dur) var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Visível apenas para leitores de tela. */
.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;
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

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

.section {
  padding-block: var(--section-gap);
  /* Compensa o header fixo quando a seção é alvo de uma âncora. */
  scroll-margin-top: var(--header-h);
}

.section--tight {
  padding-block: calc(var(--section-gap) * 0.6);
}

.section--alt {
  background-color: var(--bg-deep);
}

/* --- Cabeçalho de seção (eyebrow + título + subtítulo) ------------------- */

.section-head {
  max-width: 44rem;
  margin-inline: auto;
  margin-bottom: var(--space-9);
  text-align: center;
}

.eyebrow {
  display: block;
  margin-bottom: var(--space-3);
  color: var(--brand);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-bold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-head__title {
  margin-bottom: var(--space-4);
}

.section-head__text {
  color: var(--text-muted);
  font-size: var(--fs-lg);
}

/* Trecho em laranja dentro de um título. */
.accent {
  color: var(--brand);
}

/* --- Ícones (sprite SVG) ------------------------------------------------- */

.icon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--sm {
  width: 1.125rem;
  height: 1.125rem;
}

.icon--lg {
  width: 2rem;
  height: 2rem;
}

/* Ícones desenhados com preenchimento (estrelas, logo do Google). */
.icon--filled {
  fill: currentColor;
  stroke: none;
}

/* O sprite não deve ocupar espaço no fluxo da página. */
.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* --- Animação de entrada (scroll reveal) --------------------------------- */

/* O estado inicial escondido só existe quando o JS está ativo, para que a
   página continue legível caso o script falhe ou seja bloqueado. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

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