/* Base: fondo de una sola noche, tipografía, máscara de líneas, botones, enlaces, foco, capas fijas. */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
}
html::-webkit-scrollbar { display: none; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--tinta);
  font-family: var(--fonte);
  font-size: var(--corpo);
  font-stretch: 100%;
  line-height: 1.5;
  background: linear-gradient(180deg, var(--preto-topo) 0, var(--preto) 100vh, var(--preto-meio) 42%, var(--preto-verde) 72%, var(--preto-fim) 100%);
  overflow-x: clip;
}
p, h1, h2, h3, figure { margin: 0; }
h1, h2 { font-weight: inherit; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
strong { font-weight: inherit; color: var(--tinta); }
::selection { background: rgba(241, 215, 233, .3); color: var(--branco); }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* main, section y footer nunca crean contexto de apilamiento: solo sus hijos suben a z 2 */
main > section > *, .rodape > * { position: relative; z-index: 2; }

/* ---------- capas fijas ---------- */
.globo {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 1; pointer-events: none;
  opacity: 0; transition: opacity 1.2s var(--ease-out);
}
.globo.is-pronto { opacity: 1; }
.ponto-voo {
  position: fixed; left: 0; top: 0; z-index: 3;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--luz); box-shadow: var(--luz-sombra);
  pointer-events: none; opacity: 0; will-change: transform;
}
.ponto-voo.is-voando { opacity: 1; }

/* ---------- tipografía ---------- */
.palavra {
  margin: 0; color: var(--fantasma);
  font-weight: 500; font-stretch: 125%;
  line-height: 1; letter-spacing: -.02em;
  white-space: nowrap; text-align: center;
  user-select: none;
}
.titulo {
  font-size: var(--titulo); font-weight: 450; font-stretch: 118%;
  line-height: 1.02; letter-spacing: -.022em;
}
.corpo {
  font-size: var(--corpo); line-height: 1.5; color: var(--tinta-2); max-width: 34ch;
}
.titulo + .corpo { margin-top: clamp(18px, 2.2vw, 30px); }

/* la máscara de cada línea: margen arriba y abajo para el acento y la cola de la g */
.linha {
  display: block; overflow: hidden; white-space: nowrap;
  padding: .14em 0 .22em; margin: -.14em 0 -.22em;
}
.linha > span {
  display: inline-block;
  transform: translate3d(0, 112%, 0);
  transition: transform .9s var(--ease-out) calc(var(--atraso, 0ms) + var(--i, 0) * 70ms);
}
.sobe {
  opacity: 0; transform: translate3d(0, 14px, 0);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: calc(var(--atraso, 0ms) + 180ms + var(--d, 0ms));
}
.is-visivel .linha > span, .is-visivel .sobe, .is-visivel.sobe { transform: none; opacity: 1; }

/* ---------- retícula ---------- */
.grade {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap); padding-inline: var(--margem);
}

/* ---------- enlaces: filete que se dibuja y se va ---------- */
.link {
  background: linear-gradient(currentColor, currentColor) no-repeat 100% 100% / 0 1px;
  padding-bottom: 2px;
  transition: background-size .45s var(--ease-snap), color .45s var(--ease-snap);
}
:where(html:not(.is-scrolling)) .link:hover, .link.is-toque, .link:focus-visible {
  background-size: 100% 1px; background-position: 0 100%;
}

/* ---------- etiqueta que rueda ---------- */
.rola { position: relative; display: inline-block; overflow: hidden; line-height: 1.25; vertical-align: middle; }
.rola__a, .rola__b { display: block; transition: transform .45s var(--ease-snap); white-space: nowrap; }
.rola__b { position: absolute; left: 0; top: 0; width: 100%; transform: translateY(110%); }

/* ---------- botón píldora ---------- */
.botao {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; padding: 0 24px; border-radius: 999px;
  background: var(--tinta); color: var(--vinho);
  font-size: 15px; font-weight: 500; font-stretch: 104%;
  white-space: nowrap;
  transition: transform .45s var(--ease-snap), box-shadow .45s var(--ease-snap);
}
.botao::before {
  content: ''; position: absolute; inset: -40% -10%; z-index: -1;
  background: radial-gradient(60% 55% at 50% 100%, rgba(241, 215, 233, .9), rgba(241, 215, 233, 0) 70%);
  transform: translateY(60%); opacity: 0;
  transition: transform .6s var(--ease-snap), opacity .45s var(--ease-snap);
}
:where(html:not(.is-scrolling)) .botao:hover, .botao.is-toque {
  box-shadow: 0 10px 34px -8px rgba(241, 215, 233, .4);
}
:where(html:not(.is-scrolling)) .botao:hover::before, .botao.is-toque::before { transform: translateY(18%); opacity: 1; }
:where(html:not(.is-scrolling)) :is(.botao, .tld__acao, .nav__menu):hover .rola__a,
:is(.botao, .tld__acao, .nav__menu).is-toque .rola__a { transform: translateY(-110%); }
:where(html:not(.is-scrolling)) :is(.botao, .tld__acao, .nav__menu):hover .rola__b,
:is(.botao, .tld__acao, .nav__menu).is-toque .rola__b { transform: none; }
.botao:active { transform: scale(.97); }

/* ---------- botón de la flecha ---------- */
.botao-seta {
  position: relative; overflow: hidden; flex: none;
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--tinta); color: var(--vinho);
  transition: transform .45s var(--ease-snap), box-shadow .45s var(--ease-snap), background-color .45s var(--ease-snap), color .45s var(--ease-snap);
}
.botao-seta--contorno { background: transparent; color: var(--tinta); border: 1px solid var(--fio-forte); }
:where(html:not(.is-scrolling)) .botao-seta--contorno:hover, .botao-seta--contorno.is-toque { border-color: var(--tinta); }
.botao-seta:disabled { opacity: .35; pointer-events: none; }
.seta--esq { transform: scaleX(-1); }
.seta { width: 42%; height: 42%; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.seta g { transition: transform .45s var(--ease-snap); }
.seta__b { transform: translateX(-200%); }
:where(html:not(.is-scrolling)) .botao-seta:hover .seta__a, .botao-seta.is-toque .seta__a { transform: translateX(200%); }
:where(html:not(.is-scrolling)) .botao-seta:hover .seta__b, .botao-seta.is-toque .seta__b { transform: none; }
:where(html:not(.is-scrolling)) .botao-seta:hover, .botao-seta.is-toque { box-shadow: 0 10px 30px -8px rgba(241, 215, 233, .4); }
.botao-seta:active { transform: scale(.94); }

/* ---------- foco ---------- */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--laranja); outline-offset: 5px; }

/* ---------- punto que respira ---------- */
.ponto { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--luz); box-shadow: var(--luz-sombra); flex: none; }
.ponto--vivo { animation: respira 2.8s var(--ease-io) infinite; }
@keyframes respira { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.82); } }

@keyframes treme {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(-7px); } 36% { transform: translateX(6px); }
  54% { transform: translateX(-4px); } 72% { transform: translateX(2px); }
}
@keyframes corre { from { transform: scaleX(0); transform-origin: 0 50%; } 50% { transform: scaleX(1); transform-origin: 0 50%; } 50.01% { transform-origin: 100% 50%; } to { transform: scaleX(0); transform-origin: 100% 50%; } }
@keyframes pisca { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .2; } }

/* ---------- barra de scroll propia ---------- */
.barra { position: fixed; top: 0; right: 0; bottom: 0; width: 14px; z-index: 30; }
.barra__polegar {
  position: absolute; right: 3px; top: 0; width: 3px; border-radius: 3px;
  background: var(--fio-forte); opacity: 0;
  transition: opacity .5s var(--ease-io), width .3s var(--ease-snap);
}
.barra.is-ativa .barra__polegar, .barra:hover .barra__polegar, .barra.is-arrastando .barra__polegar { opacity: 1; }
.barra:hover .barra__polegar, .barra.is-arrastando .barra__polegar { width: 6px; }
@media (hover: none), (pointer: coarse) { .barra { display: none; } }

.filtros { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  .linha > span, .sobe { transform: none !important; transition: opacity .6s linear !important; }
  .linha > span { opacity: 0; }
  .is-visivel .linha > span { opacity: 1; }
  .ponto--vivo, .suporte__dois, .busca__cursor { animation: none !important; }
  .globo { transition: none; }
}
