/* ============================================================
 *  BASE — Reset moderno + tipografia global
 *  ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-padding-top: var(--topbar-h);
  scrollbar-color: var(--color-brand) var(--color-ink-900);
  scrollbar-width: thin;
}

/* Scrollbar custom — Chromium/Safari */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track {
  background: var(--color-ink-900);
}
::-webkit-scrollbar-thumb {
  background: var(--color-brand);
  border-radius: var(--radius-pill);
  border: 3px solid var(--color-ink-900);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-brand-pressed); }
::-webkit-scrollbar-corner { background: var(--color-ink-900); }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-body-lg);
  line-height: var(--lh-normal);
  overflow-x: hidden;
}

/* Imagens fluidas por default */
img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

/* SVGs inline com sprite: paths herdam cor do elemento svg */
svg { fill: currentColor; }

/* Botões e inputs herdando tipografia */
button, input, select, textarea {
  font: inherit;
  color: inherit;
}

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

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

/* Headings limpos */
h1, h2, h3, h4, h5, h6, p, blockquote, figure {
  margin: 0;
}

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

/* Focus visível e consistente — acessibilidade */
:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* Skip link para teclado */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--color-brand);
  color: var(--color-text-on-brand);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-weight: var(--fw-bold);
  z-index: var(--z-modal);
}
.skip-link:focus { top: var(--space-4); }

/* Selection styling */
::selection {
  background: var(--color-brand);
  color: var(--color-text-on-brand);
}

/* Tipografia utilitária */
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: var(--fs-overline);
  letter-spacing: var(--ls-overline);
  text-transform: uppercase;
  color: var(--color-brand);
}

.display-1 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-hero);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
}

.display-2 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
}

.subtitle {
  font-size: var(--fs-subtitle);
  line-height: var(--lh-loose);
  color: var(--color-text-secondary);
}

.section-title {
  text-align: center;
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
}

.section-sub {
  text-align: center;
  color: var(--color-text-secondary);
  max-width: 36rem;
  margin-inline: auto;
}

/* Container padrão */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--section-pad-x);
}

/* Reveal-on-scroll (CSS progresivo; sem JS as seções aparecem direto) */
.reveal {
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}
.js .reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(16px);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Helpers visualmente ocultos (mas lidos por leitores 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;
}
