/* ============================================================
   NEE.IA — Base
   Reset, tipografia base, acessibilidade e utilitários de layout.
   Carrega DEPOIS de tokens.css.
   As @font-face (Playfair/Lora) agora são globais do site, em
   /assets/css/fonts.css via BaseLayout (woff2 self-hosted site-wide).
   ============================================================ */

/* ============================================================
   LENIS (rolagem suave) — inline pra não depender de CSS externo
   (era um <link> do unpkg, render-blocking no caminho crítico)
   ============================================================ */
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: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ============================================================
   RESET MODERNO
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

/* remove scroll horizontal (o smooth fica por conta do Lenis) */
html, body {
  width: 100%;
  overflow-x: hidden !important;
  scroll-behavior: auto !important;
}
/* contém o deslocamento das animações de entrada (.scl/.scr = translate ±180px):
   enquanto não viram .ativo, ficam fora dos limites e gerariam scroll horizontal.
   clip no <main> corta esse transbordo sem criar container de rolagem aninhado. */
main {
  overflow-x: clip;
}

body {
  min-height: 100vh;
  font-family: var(--fonte-corpo);
  font-size: var(--fonte-body);
  line-height: var(--lh-corpo);
  font-weight: var(--peso-regular);
  color: var(--cor-texto);
  background-color: var(--cor-fundo);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4, li { overflow-wrap: break-word; }

/* ============================================================
   TIPOGRAFIA BASE
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--fonte-titulo);
  font-weight: var(--peso-regular);
  color: var(--cor-texto);
}
h1 {
  font-size: var(--fonte-h1);
  line-height: var(--lh-h1);
  letter-spacing: var(--ls-h1);
}
h2 {
  font-size: var(--fonte-h2);
  line-height: var(--lh-h2);
}
h3 {
  font-size: var(--fonte-h3);
  line-height: var(--lh-h3);
  font-weight: var(--peso-medio);
}

strong, b { font-weight: var(--peso-semibold); }
em, i { font-style: italic; }

/* ============================================================
   ACESSIBILIDADE
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--cor-destaque);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

@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;
  }
}

/* ============================================================
   UTILITÁRIOS DE LAYOUT (globais)
   ============================================================ */

/* Largura máxima + respiro lateral. Use em todo bloco. */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Variante estreita para blocos de texto centralizado. */
.container--estreito { max-width: var(--container-estreito); }

/* Respiro vertical padrão de seção. */
.secao { padding-block: var(--espaco-secao); }

/* Esconde visualmente mas mantém para leitores de tela. */
.visualmente-oculto {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   ANIMAÇÕES DE ENTRADA (GSAP + ScrollTrigger + Lenis)
   As classes scl/scr/sct/scb são aplicadas via JS (js/main.js)
   aos filhos de um container .lil/.lir/.lit/.lib. Como o JS é
   quem esconde, se as libs/CDN falharem o conteúdo fica visível.
   Estado inicial: deslocado + desfocado + invisível.
   .ativo (o ScrollTrigger adiciona ao entrar na viewport) leva
   o elemento à posição final.
   ============================================================ */
.scl { transform: translate(-180px, 0); opacity: 0; filter: blur(10px); transition: 0.5s; }
.scr { transform: translate(180px, 0);  opacity: 0; filter: blur(10px); transition: 0.5s; }
.sct { transform: translate(0, -180px); opacity: 0; filter: blur(10px); transition: 0.5s; }
.scb { transform: translate(0, 180px);  opacity: 0; filter: blur(10px); transition: 0.5s; }
.ativo {
  transform: translate(0px, 0px);
  opacity: 1;
  filter: blur(0px);
}
