/* ============================================================
   BM ENTERPRISES — base.css
   Tokens, reset, tipografia, botões "frame", navegação, hero,
   manifesto e contadores. Secções restantes: sections.css
   REGRA VISUAL: zero border-radius (arestas vivas) — excepção
   única: indicadores circulares de estado (pontos da rota).
   ============================================================ */

:root {
  /* Paleta confirmada: branco, azul, cinzento — preto quando necessário */
  --azul-900: #071B33;    /* hero, o azul mais profundo */
  --azul-800: #0A2540;    /* gradiente do hero */
  --azul-600: #2563EB;    /* azul de acção — CTAs, acentos */
  --azul-700: #1D4ED8;    /* gradiente do CTA final */
  --azul-claro: #7EA6F4;  /* acento sobre fundos escuros */
  --preto: #0A0A0A;       /* secções escuras, rodapé */
  --branco: #FFFFFF;
  --cinza-50: #F5F5F7;    /* superfícies claras alternadas */
  --cinza-200: #E5E5E7;   /* linhas e contornos */
  --cinza-500: #6E6E73;   /* texto secundário */
  --tinta: #1D1D1F;       /* texto corrente, quase-preto */
  --wa-verde: #25D366;    /* exclusivo WhatsApp */
  --wa-tinta: #06341D;

  --f-display: "Space Grotesk", sans-serif;
  --f-corpo: "Inter", sans-serif;
  --f-mono: "IBM Plex Mono", monospace;

  --largura: 1280px;
  --transicao: 200ms ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-corpo);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--tinta);
  background: var(--branco);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

:focus-visible { outline: 3px solid var(--azul-600); outline-offset: 2px; }

.container { max-width: var(--largura); margin-inline: auto; padding-inline: clamp(20px, 4vw, 32px); }
.section { padding-block: clamp(3.5rem, 9vw, 8rem); }
.section-head { max-width: 680px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

/* --- Tipografia --- */
h1, h2, h3 { font-family: var(--f-display); line-height: 1.1; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.5rem, 7.5vw, 6.5rem); font-weight: 700; line-height: .98; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.75rem); font-weight: 700; margin-bottom: 1rem; }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); font-weight: 600; margin-bottom: .5rem; }
.texto { color: var(--cinza-500); margin-bottom: 1rem; max-width: 56ch; }
.mono { font-family: var(--f-mono); }

/* Eyebrow — etiqueta estilo "manifesto de carga" (assinatura) */
.eyebrow {
  font-family: var(--f-mono);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--azul-600);
  margin-bottom: 1.1rem;
}
.eyebrow::before { content: "// "; color: var(--cinza-500); }
.eyebrow-claro { color: var(--azul-claro); }

/* ============================================================
   BOTÕES "FRAME" — moldura deslocada que se alinha em hover.
   Variants: primario | secundario | outline | fantasma | wa
   Tamanho reduzido: acrescentar .btn-sm
   ============================================================ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-weight: 600;
  font-size: .95rem;
  min-height: 48px;
  padding: .8rem 1.75rem;
  border: 1px solid transparent;
  border-radius: 0;
  transition: background-color var(--transicao), color var(--transicao),
              border-color var(--transicao), transform var(--transicao);
}
.btn::after {
  content: "";
  position: absolute;
  top: 5px; left: 5px;
  width: 100%; height: 100%;
  border: 1px solid;
  pointer-events: none;
  transition: transform .25s ease, opacity .25s ease;
  z-index: -1;
}
.btn:hover::after { transform: translate(-5px, -5px); opacity: 0; }
.btn:hover { transform: translate(2px, 2px); }

.btn-primario { background: var(--azul-600); color: var(--branco); border-color: var(--azul-600); }
.btn-primario::after { border-color: rgba(37, 99, 235, .5); }
.btn-primario:hover { background: var(--azul-700); }

.btn-secundario { background: var(--branco); color: var(--tinta); border-color: var(--tinta); }
.btn-secundario::after { border-color: rgba(29, 29, 31, .3); }
.btn-secundario:hover { color: var(--azul-600); border-color: var(--azul-600); }

.btn-outline { background: transparent; color: var(--azul-600); border-color: rgba(37, 99, 235, .45); }
.btn-outline::after { border-color: rgba(37, 99, 235, .18); }
.btn-outline:hover { border-color: var(--azul-600); }

.btn-fantasma { background: transparent; color: var(--branco); border-color: rgba(255,255,255,.4); }
.btn-fantasma::after { border-color: rgba(255,255,255,.15); }
.btn-fantasma:hover { border-color: var(--branco); background: rgba(255,255,255,.06); }

.btn-wa { background: var(--wa-verde); color: var(--wa-tinta); border-color: var(--wa-verde); }
.btn-wa::after { border-color: rgba(37, 211, 102, .45); }

.btn-sm { min-height: 44px; padding: .55rem 1.2rem; font-size: .85rem; }
.btn-sm::after { top: 4px; left: 4px; }
.btn-sm:hover::after { transform: translate(-4px, -4px); }

/* --- Navegação fixa --- */
.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  padding-block: 14px;
  transition: background-color var(--transicao), box-shadow var(--transicao), padding var(--transicao);
}
.nav.solida {
  background: var(--azul-900);
  box-shadow: 0 1px 0 rgba(255,255,255,.08);
  padding-block: 8px;
}
.nav-inner { display: flex; align-items: center; gap: 2rem; }

/* Logo real. Sobre navy é recolorido a branco — o azul/cinzento original
   não tem contraste suficiente contra o fundo escuro. */
.logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.logo img { height: 34px; width: auto; filter: brightness(0) invert(1); }

.nav-links { display: flex; gap: 1.75rem; margin-left: auto; }
.nav-links a {
  color: rgba(255,255,255,.8);
  font-size: .95rem;
  font-weight: 500;
  padding-block: .25rem;
  border-bottom: 2px solid transparent;
  transition: color var(--transicao), border-color var(--transicao);
}
.nav-links a:hover { color: var(--branco); }
.nav-links a[aria-current="true"] { color: var(--branco); border-color: var(--azul-600); }
.nav-wa { flex-shrink: 0; min-height: 44px; padding-block: .55rem; }
.nav-wa-mobile { display: none; }

.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 10px; }
.nav-burger span { width: 24px; height: 2px; background: var(--branco); transition: transform var(--transicao), opacity var(--transicao); }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(160deg, #071B33 0%, #0A2540 60%, #0D3158 100%);
  color: var(--branco);
  overflow: hidden;
}
.hero-rotas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  color: var(--azul-claro);
  opacity: .2;
  fill: currentColor;
}
.rota-maputo { fill: var(--wa-verde); opacity: .9; }
.rota-label { font-family: var(--f-mono); font-size: 11px; fill: #B9C9E8; letter-spacing: .2em; }

.hero-inner { position: relative; padding-top: 6rem; }
.hero-eyebrow { color: var(--azul-claro); }
.hero h1 { max-width: 14ch; }
.hero-sub {
  margin-top: 1.5rem;
  max-width: 36rem;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: rgba(255,255,255,.62);
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }

/* Entrada orquestrada (uma vez, ao carregar) */
.hero-eyebrow, .hero h1, .hero-sub, .hero-ctas { animation: heroEntra .8s ease both; }
.hero h1 { animation-delay: .1s; }
.hero-sub { animation-delay: .15s; }
.hero-ctas { animation-delay: .3s; }
@keyframes heroEntra {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* Barra de métricas — colunas separadas por linhas verticais */
.hero-trust {
  position: relative;
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,.1);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--largura);
  margin-inline: auto;
  width: calc(100% - 48px);
  animation: heroEntra .8s ease .45s both;
}
.hero-trust div { padding: 1.25rem 1rem; border-right: 1px solid rgba(255,255,255,.1); }
.hero-trust div:last-child { border-right: 0; }
.hero-trust strong {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.6vw, 2.25rem);
  display: block;
  color: var(--branco);
  line-height: 1.15;
}
.hero-trust span {
  font-size: .7rem;
  color: rgba(255,255,255,.58);
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* --- Manifesto: a frase consolida-se ao scroll (assinatura) ---
   A pista dá o curso de scroll; o bloco fica preso (sticky) enquanto
   as letras convergem da dispersão para a posição natural. */
.manifesto { background: var(--branco); }
.manifesto-pista { height: 180vh; }
.manifesto-fixo {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;          /* letras entram de fora sem criar scroll horizontal */
}
.manifesto-frase {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3.8vw, 3rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  max-width: 26ch;
  margin-inline: auto;
}
.palavra { display: inline-block; white-space: nowrap; }  /* a palavra nunca parte a meio */
.letra { display: inline-block; }

/* --- Reveal ao scroll --- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.on { opacity: 1; transform: none; }

/* --- Responsivo (nav/hero/números) --- */
@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 0;
    background: var(--azul-900);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    font-size: 1.25rem;
    transform: translateX(100%);
    transition: transform .3s ease;
  }
  .nav-links.aberto { transform: none; }
  /* Alvo de toque confortável (mín. 44px) no menu de ecrã inteiro */
  .nav-links a { display: flex; align-items: center; min-height: 48px; padding-inline: 1.5rem; }
  .nav-wa { display: none; }
  .nav-wa-mobile { display: inline-flex; margin-top: 1rem; }
  .nav-burger { display: flex; margin-left: auto; z-index: 60; }
}
@media (max-width: 640px) {
  /* Mobile: curso de scroll mais curto — o telefone não deve rolar dois ecrãs
     para montar a frase. A convergência completa-se mais cedo (ver main.js). */
  .manifesto-pista { height: 140vh; }
  .hero-inner { padding-top: 5rem; }
  .hero h1 { line-height: 1; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; }
  .hero-trust { grid-template-columns: repeat(2, 1fr); }
  .hero-trust div:nth-child(2) { border-right: 0; }
  .hero-trust div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.1); }
  .rota-label, .rota-maputo { display: none; }   /* mobile: sem indicador MAPUTO */
}

/* --- Movimento reduzido: tudo salta para o estado final --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  /* Sem assemblagem: a pista deixa de existir e a frase é só uma secção normal. */
  .manifesto-pista { height: auto; }
  .manifesto-fixo { position: static; height: auto; padding-block: clamp(4.5rem, 11vw, 9rem); }
}
