/* ==========================================================================
   Base: reset, tipografia, utilitários, Lenis
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--graphite-deep);
}

body {
  margin: 0;
  font-family: var(--f-text);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); font-variation-settings: "opsz" 96; }
h2 { font-size: var(--fs-h2); font-variation-settings: "opsz" 72; }
h3 { font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -0.015em; }

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
img, svg { display: block; max-width: 100%; }

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

::selection { background: var(--signal); color: var(--graphite); }

/* Foco visível */
:focus-visible {
  outline: 2px solid var(--signal-deep);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-dark :focus-visible,
.site-header :focus-visible,
.menu :focus-visible { outline-color: var(--signal-light); }

/* Ícones (sprite) */
.i {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Utilitários */
.container {
  width: min(100% - var(--gutter) * 2, var(--max));
  margin-inline: auto;
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  left: 1rem; top: -4rem;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  background: var(--signal);
  color: var(--graphite);
  font-weight: 700;
  border-radius: var(--r-s);
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

[hidden] { display: none !important; }

/* Âncoras compensam o header fixo */
[id] { scroll-margin-top: calc(var(--header-h) + 8px); }

/* Lenis (smooth scroll) — CSS recomendado pela biblioteca */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* Estados iniciais de animação — só existem se JS + GSAP + movimento permitido */
.js-anim [data-hero-line] { visibility: hidden; }
.js-anim [data-hero-fade] { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
