/* =================================================================
   EscribaJus — Base compartilhada (design tokens + reset + nav + footer)
   Use junto com escribajus-layout.js em todas as páginas do produto.
   ================================================================= */

/* ---------- DESIGN TOKENS + RESET ---------- */
/* DESIGN TOKENS */
:root {
  --ink:       #0F1A14;
  --ink-soft:  #3A4A42;
  --ink-mute:  #6A7872;
  --paper:     #F6F2EA;
  --paper-2:   #EFEADF;
  --surface:   #FFFFFF;
  --line:      #D9D3C5;
  --line-soft: #E8E2D4;

  --emerald:   #0E5C43;
  --emerald-d: #0A4533;
  --emerald-l: #1B7A5A;
  --moss:      #E3EDE6;
  --gold:      #B8894B;

  /* Brand — verde mint vibrante usado na logo */
  --brand-mint: #10b981;
  --brand-black: #0f172a;

  --danger:    #8C2F23;

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(15,26,20,.04);
  --shadow:    0 4px 20px -8px rgba(15,26,20,.12), 0 2px 6px -2px rgba(15,26,20,.06);
  --shadow-lg: 0 24px 60px -20px rgba(14,92,67,.25), 0 8px 20px -8px rgba(15,26,20,.12);

  --container: 1180px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}
img, svg { display: block; max-width: 100%; }
/* Ícones via sprite — herdam color pra stroke/fill */
svg.ic { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 32px);
}



/* ---------- CABEÇALHO (NAV) ---------- */
/* CABEÇALHO */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252,248,240,.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.nav.scrolled {
  border-color: var(--line);
  box-shadow: 0 4px 20px -10px rgba(15,26,20,.08);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

/* Desktop: menu EM FLUXO, centralizado pelo próprio flex.
   ────────────────────────────────────────────────────────────────────────────
   Antes isto era `position: absolute; left: 50%` — o menu saía do fluxo, então o
   flex do .nav-inner NÃO reservava espaço para ele e os botões passavam por baixo.
   Medido em 2026-07-13 com Chromium: o menu invadia os botões em TODAS as larguras,
   inclusive 1920px (70px de sobreposição). Não era um bug do botão "Entrar" — era
   uma bomba armada que qualquer item novo no menu detonaria.
   Com `margin: 0 auto` o menu ocupa espaço próprio e centraliza no vão entre logo e
   botões: sobreposição vira impossível por construção, não por ajuste de pixel. */
@media (min-width: 1080px) {
  .nav-menu {
    margin: 0 auto;
    flex-shrink: 0;
  }
  .logo      { flex-shrink: 0; }
  .nav-right { flex-shrink: 0; }
}

/* Logo — wordmark institucional + tagline */
.logo {
  display: inline-flex; align-items: center; gap: 12px;
  flex-shrink: 0;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
/* Container do texto + tagline, empilhados */
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 4px;
}
.logo-word {
  font-family: 'EB Garamond', Garamond, 'Times New Roman', serif;
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1;
}
/* "Jus" — verde mint vibrante no header (matching a marca real) */
.logo-word em {
  font-style: normal;
  font-weight: 600;
  color: var(--brand-mint, #0CBB82);
  margin-left: 0;
}
.logo-tagline {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--ink);
  line-height: 1;
}

.logo-mark {
  width: 46px; height: 52px;
  border-radius: 12px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 12px -3px rgba(15,26,20,.15);
}
.logo-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Grupo direito: menu + ações */
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Menu desktop */
.nav-menu {
  display: flex; gap: 4px;
  list-style: none; margin: 0; padding: 0;
  align-items: center;
}
.nav-menu a {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-soft);
  padding: 10px 12px;
  border-radius: 999px;
  transition: color .3s var(--ease), background-color .3s var(--ease), transform .3s var(--ease);
  position: relative;
  overflow: hidden;
}
/* Underline elegante animado */
.nav-menu a::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 0;
  height: 1.5px;
  background: var(--emerald);
  transform: translateX(-50%);
  transition: width .35s cubic-bezier(.22,.61,.36,1);
  border-radius: 2px;
}
/* Fundo pill suave com fade */
.nav-menu a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--moss);
  border-radius: 999px;
  opacity: 0;
  transform: scale(.85);
  transition: opacity .35s cubic-bezier(.22,.61,.36,1), transform .35s cubic-bezier(.22,.61,.36,1);
  z-index: -1;
}
.nav-menu a span,
.nav-menu a {
  position: relative;
}
.nav-menu a:hover {
  color: var(--emerald-d);
  transform: translateY(-1px);
}
.nav-menu a:hover::before {
  width: 60%;
}
.nav-menu a:hover::after {
  opacity: 1;
  transform: scale(1);
}
/* Estado "ativo" só na página do link correspondente */
.nav-menu a.active {
  color: var(--emerald-d);
  background: var(--moss);
}
.nav-menu a.active::before {
  width: 60%;
}

/* Ações do topo: Entrar (secundário) + Criar conta grátis (CTA primário) */
.nav-actions {
  display: flex; flex-direction: row;
  align-items: center;
  gap: 12px;
}
/* "Entrar" — link discreto, secundário ao CTA */
.nav-signin {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: color .25s var(--ease);
}
.nav-signin:hover { color: var(--emerald-d); }
/* Login mobile — escondido no desktop */
.nav-menu li.nav-menu-login { display: none; }
.btn-login {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 26px;
  min-height: 44px;          /* alvo de toque (Apple HIG) — antes fechava em ~38px */
  color: var(--paper);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  border-radius: 999px;
  transition: all .35s cubic-bezier(.22,.61,.36,1);
  white-space: nowrap;
  position: relative;
  background: linear-gradient(180deg, var(--emerald-l) 0%, var(--emerald) 50%, var(--emerald-d) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 -1px 0 rgba(0,0,0,.2),
    0 1px 2px rgba(14,92,67,.2),
    0 6px 16px -4px rgba(14,92,67,.4),
    0 2px 4px -1px rgba(14,92,67,.22);
}
.btn-login::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.1) 0%, transparent 50%);
  pointer-events: none;
}
.btn-login:hover {
  background: linear-gradient(180deg, var(--emerald) 0%, var(--emerald-d) 100%);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -1px 0 rgba(0,0,0,.25),
    0 1px 2px rgba(14,92,67,.25),
    0 14px 28px -6px rgba(14,92,67,.5),
    0 4px 8px -2px rgba(14,92,67,.28);
}
.btn-login:active {
  transform: translateY(0);
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,.25),
    0 2px 4px rgba(14,92,67,.3);
}
/* ── Entrar: mesma FORMA do botão primário, peso visual menor ──────────────────
   Substitui o antigo .nav-signin (link de texto de 13px, cinza, quase invisível —
   e pior ainda para o público míope que o produto atende).
   Contornado, não sólido: o cabeçalho tem UM primário só, e ele é o cadastro.
   Quem já é cliente PROCURA o login; quem chegou agora precisa ser empurrado.
   ─────────────────────────────────────────────────────────────────────────────── */
.btn-login.btn-login-ghost {
  color: var(--emerald);
  background: transparent;
  border: 1.5px solid var(--emerald);
  box-shadow: none;
}
.btn-login.btn-login-ghost::before { display: none; }   /* mata o brilho do sólido */
.btn-login.btn-login-ghost:hover {
  background: var(--moss);
  color: var(--emerald-d);
  border-color: var(--emerald-d);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -6px rgba(14,92,67,.28);
}
.btn-login.btn-login-ghost:active { transform: translateY(0); box-shadow: none; }
.btn-login:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.nav-cadastro {
  font-size: 11.5px;
  color: var(--ink-mute);
}
.nav-cadastro a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.nav-cadastro a:hover { color: var(--emerald); }

/* Hambúrguer — escondido no desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 0 11px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- MOBILE ---------- */
@media (max-width: 1079px) {
  .nav-inner { padding: 14px 20px; }
  .logo-word { font-size: 21px; }
  .logo-tagline { font-size: 8.5px; letter-spacing: .18em; }
  .logo-mark { width: 39px; height: 44px; border-radius: 10px; }

  .nav-toggle { display: flex; }

  /* Menu vira dropdown clássico abaixo do header */
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    transform: none;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    border-top: 1px solid var(--line-soft);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 20px;
    box-shadow: 0 20px 30px -10px rgba(15,26,20,.15);
  }
  .nav-menu.open { display: flex; }
  .nav-menu li {
    width: 100%;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav-menu li:last-child { border-bottom: none; }
  .nav-menu a:not(.btn-login-menu) {
    display: block;
    padding: 16px 0;
    font-size: 14px;
    color: var(--ink);
    border-radius: 0;
    overflow: visible;
  }

  .nav-menu a::before,
  .nav-menu a::after { display: none; }
  .nav-menu a:hover {
    transform: none;
    color: var(--emerald);
  }

  /* Ações mobile: só o botão, sem microcopy */
  .nav-cadastro { display: none; }
  .btn-login {
    padding: 9px 18px;
    font-size: 11.5px;
    letter-spacing: .1em;
  }

  /* Reduz gap no grupo direito */
  .nav-right { gap: 10px; }
  /* Login vai pro menu no mobile */
  .nav-actions { display: none; }


  /* LOGIN mobile — bloco único consolidado */
  .nav-menu li.nav-menu-login {
    border-bottom: none !important;
    padding: 20px 0 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
  }
  .nav-menu a.btn-login-menu {
    display: inline-flex !important;
    width: auto !important;
    border-radius: 999px !important;
    padding: 14px 30px !important;
    color: var(--paper) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: .08em !important;
    background: linear-gradient(180deg, var(--emerald-l) 0%, var(--emerald) 50%, var(--emerald-d) 100%) !important;
  }
  .nav-menu-cadastro {
    font-size: 12px;
    color: var(--ink-mute);
    white-space: nowrap;
    text-align: center;
    display: block;
  }
  .nav-menu-cadastro a {
    color: var(--gold) !important;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
  }
  /* Nav inner vira relative pro dropdown posicionar certo */
  .nav-inner { position: relative; }
}

@media (max-width: 380px) {
  .logo-word { font-size: 18px; }
  .logo-tagline { font-size: 8px; letter-spacing: .14em; }
  .btn-login { padding: 8px 14px; font-size: 11px; }
  .nav-toggle { width: 40px; height: 40px; }
  /* 3.1 — btn-login-menu proporcional */
  .nav-menu a.btn-login-menu { padding: 12px 22px !important; font-size: 12px !important; }
  /* 3.2 — microcopy sem quebra em 320px */
  .nav-menu-cadastro { font-size: 10.5px; white-space: nowrap; }
}


/* ---------- RODAPÉ (FOOTER) ---------- */
/* FOOTER (modelo da imagem 1) */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 72px 0 32px;
  border-radius: 32px 32px 0 0;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 40px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

.footer .logo { color: var(--paper); margin-bottom: 18px; }
.footer .logo-word { color: var(--paper); }
/* No footer, "Jus" fica em dourado institucional sobre fundo escuro */
.footer .logo-word em { color: var(--gold); }
.footer .logo-tagline { color: rgba(246,242,234,.55); }
.footer-desc {
  color: rgba(246,242,234,.65);
  font-size: 15px;
  line-height: 1.55;
  max-width: 34ch;
  margin: 0 0 20px;
}
/* Link discreto pro ecossistema Escriba (dobra o antigo card "Escriba") */
.footer-eco {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(246,242,234,.75);
  padding: 8px 14px 8px 12px;
  border: 1px solid rgba(246,242,234,.14);
  border-radius: 999px;
  transition: border-color .25s var(--ease), color .25s var(--ease), background-color .25s var(--ease);
}
.footer-eco svg { width: 16px; height: 16px; color: var(--brand-mint); }
.footer-eco:hover {
  color: var(--paper);
  border-color: rgba(16,185,129,.5);
  background: rgba(16,185,129,.08);
}
.footer-col h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 18px;
}
.footer-col ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.footer-col a {
  font-size: 15px;
  color: rgba(246,242,234,.72);
  transition: color .2s var(--ease);
}
.footer-col a:hover { color: var(--gold); }
/* E-mail é longo — cabe sem estourar a coluna estreita */
.footer-mail { font-size: 13.5px; word-break: break-word; }
.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid rgba(246,242,234,.1);
  text-align: center;
  font-size: 13px;
  color: rgba(246,242,234,.55);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
