/* ═══════════════════════════════════════════════════════════════
   EBENEZER AGENCY — base: tokens, reset, tipografia, utilitários
   Sem dependências. Sem build.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Cor */
  --preto: #050506;
  --grafite: #0e0e11;
  --grafite-2: #16161a;
  --grafite-3: #1f1f25;
  --branco: #f4f4f5;
  --prata: #9ba1ab;
  --prata-escuro: #5a606b;
  --azul: #2f6bff;
  --azul-claro: #7aa2ff;
  --borda: rgba(244, 244, 245, 0.1);
  --borda-forte: rgba(244, 244, 245, 0.22);

  /* Tipografia */
  --sans: "Helvetica Neue", Helvetica, Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: Georgia, "Times New Roman", serif;

  /* Escala fluida */
  --t-mega: clamp(3rem, 11vw, 9.5rem);
  --t-gigante: clamp(2.4rem, 7vw, 5.6rem);
  --t-grande: clamp(1.9rem, 4.6vw, 3.4rem);
  --t-medio: clamp(1.35rem, 2.4vw, 1.9rem);
  --t-corpo: clamp(1rem, 1.15vw, 1.125rem);
  --t-pequeno: 0.8125rem;

  /* Ritmo */
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --secao: clamp(5rem, 12vw, 11rem);
  --largura: 1500px;

  --curva: cubic-bezier(0.22, 1, 0.36, 1);
  --curva-suave: cubic-bezier(0.65, 0, 0.35, 1);
}

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

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

body {
  margin: 0;
  background: var(--preto);
  color: var(--branco);
  font-family: var(--sans);
  font-size: var(--t-corpo);
  line-height: 1.55;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

::selection { background: var(--azul); color: #fff; }

/* ── Estrutura ───────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--largura);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.secao {
  position: relative;
  padding-block: var(--secao);
}

/* ── Grão de filme (textura global) ──────────────────────────── */
.grao {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Tipografia utilitária ───────────────────────────────────── */
.rotulo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--t-pequeno);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--prata);
  font-weight: 600;
}
.rotulo::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: var(--borda-forte);
}

.gigante { font-size: var(--t-gigante); }
.mega { font-size: var(--t-mega); }

.destaque { color: var(--azul-claro); }

.serifa {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.texto-fraco { color: var(--prata); }

/* ── Botões ──────────────────────────────────────────────────── */
.botao {
  --bg: transparent;
  --fg: var(--branco);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.05rem 1.9rem;
  border: 1px solid var(--borda-forte);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.4s var(--curva), border-color 0.4s var(--curva);
}
.botao::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--branco);
  transform: translateY(101%);
  transition: transform 0.5s var(--curva);
}
.botao:hover, .botao:focus-visible { color: var(--preto); border-color: var(--branco); }
.botao:hover::after, .botao:focus-visible::after { transform: translateY(0); }

.botao--solido {
  --bg: var(--azul);
  --fg: #fff;
  border-color: var(--azul);
}
.botao--solido::after { background: var(--branco); }

.botao--seta { padding-right: 1.5rem; }
.botao__seta {
  display: inline-block;
  transition: transform 0.4s var(--curva);
}
.botao:hover .botao__seta { transform: translateX(4px); }

/* ── Revelação no scroll ─────────────────────────────────────── */
[data-revelar] {
  opacity: 0;
  transform: translateY(2.5rem);
  transition: opacity 1s var(--curva), transform 1s var(--curva);
  transition-delay: var(--atraso, 0ms);
}
[data-revelar].visivel { opacity: 1; transform: none; }

/* Máscara de linha para títulos: cada linha sobe de dentro de um corte */
.linha-mascara {
  display: block;
  overflow: hidden;
}
.linha-mascara > span {
  display: block;
  transform: translateY(105%);
  transition: transform 1.1s var(--curva);
  transition-delay: var(--atraso, 0ms);
}
.visivel .linha-mascara > span,
.linha-mascara.visivel > span { transform: none; }

/* ── Cursor personalizado ────────────────────────────────────── */
.cursor, .cursor-ponto {
  position: fixed;
  top: 0; left: 0;
  z-index: 9500;
  pointer-events: none;
  border-radius: 50%;
  will-change: transform;
}
.cursor {
  width: 34px; height: 34px;
  border: 1px solid rgba(244,244,245,0.5);
  margin: -17px 0 0 -17px;
  transition: width 0.3s var(--curva), height 0.3s var(--curva),
              margin 0.3s var(--curva), background-color 0.3s, border-color 0.3s, opacity 0.3s;
}
.cursor-ponto {
  width: 4px; height: 4px;
  margin: -2px 0 0 -2px;
  background: var(--branco);
}
.cursor.ativo {
  width: 74px; height: 74px;
  margin: -37px 0 0 -37px;
  background: rgba(47, 107, 255, 0.16);
  border-color: var(--azul);
}
.sem-cursor, .sem-cursor * { cursor: none; }
@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-ponto { display: none; }
  .sem-cursor, .sem-cursor * { cursor: auto; }
}

/* ── Acessibilidade ──────────────────────────────────────────── */
.pular {
  position: fixed;
  top: 1rem; left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--branco);
  color: var(--preto);
  border-radius: 6px;
  font-weight: 700;
  transform: translateY(-200%);
  transition: transform 0.3s var(--curva);
}
.pular:focus { transform: none; }

body.travado { overflow: hidden; }

:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--azul-claro);
  outline-offset: 3px;
  border-radius: 4px;
}

.oculto-visual {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Respeito a movimento reduzido ───────────────────────────── */
@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;
  }
  [data-revelar] { opacity: 1; transform: none; }
  .linha-mascara > span { transform: none; }
  .cursor, .cursor-ponto { display: none; }
  .sem-cursor, .sem-cursor * { cursor: auto; }
}

/* ── Transição entre páginas (View Transitions nativo) ───────── */
@view-transition { navigation: auto; }
::view-transition-old(root) {
  animation: sair 0.35s var(--curva-suave) both;
}
::view-transition-new(root) {
  animation: entrar 0.5s var(--curva) both;
}
@keyframes sair { to { opacity: 0; transform: scale(0.99); } }
@keyframes entrar { from { opacity: 0; transform: scale(1.01); } }
