/* ==========================================================================
   Contabify — Landing Page (redesign 2026)
   Ficheiro dedicado ao index.html. NÃO é usado por blog.html / article.html
   (esses continuam a usar style.css).
   ========================================================================== */

:root {
  /* Superfícies */
  --bg: #0a0a0c;
  --bg-footer: rgba(8, 8, 10, 0.8);
  --surface-card: linear-gradient(180deg, rgba(20, 20, 24, 0.9), rgba(12, 12, 15, 0.9));
  --surface-panel: linear-gradient(180deg, rgba(20, 20, 24, 0.94), rgba(12, 12, 15, 0.94));
  --surface-subtle: rgba(255, 255, 255, 0.025);
  --surface-soft: rgba(255, 255, 255, 0.02);

  /* Bordas */
  --border: rgba(255, 255, 255, 0.07);
  --border-2: rgba(255, 255, 255, 0.08);
  --border-3: rgba(255, 255, 255, 0.09);

  /* Marca */
  --accent: #2ee6c5;
  --accent-hover: #6ff3dc;
  --accent-ink: #05231e;
  --accent-soft: #b6f4e7;
  --accent-soft-2: #9df0e0;
  --accent-soft-3: #8fd8c9;
  --blue: #2b7fff;
  --blue-grad: #4d9bff;
  --blue-soft: #85b8ff;
  --blue-soft-2: #a8c9ff;
  --warn: #f5b74a;
  --success: #34d399;
  --purple: #a78bfa;

  /* Texto */
  --text: #f4f4f6;
  --text-strong: #f0f0f4;
  --text-2: #a2a2ad;
  --text-2b: #a8a8b3;
  --text-3: #8b8b95;
  --text-3b: #7d7d88;
  --text-muted: #6f6f7a;
  --text-muted-2: #6c6c77;
  --text-muted-3: #5f5f6a;

  /* Papel (recibo) */
  --paper: #f6f6f3;
  --paper-ink: #17171a;

  /* Layout */
  --wrap: 1200px;
  --wrap-wide: 1240px;
  --pad-x: clamp(18px, 4vw, 32px);

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* clip não cria um scroll container no eixo x — evita que o Safari trate o
     body como área de scroll e baralhe o header sticky / o fundo fixed */
  overflow-x: clip;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4, p, ul, figure, figcaption { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { max-width: 100%; }
button { font: inherit; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--pad-x); padding-right: var(--pad-x); }

.mono { font-family: var(--mono); }

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

/* --------------------------------------------------------------------------
   Fundo animado (decorativo)
   -------------------------------------------------------------------------- */
.bg-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  /* isola o repaint do fundo do resto da página */
  contain: layout paint style;
}
.bg-decor .blob {
  position: absolute;
  border-radius: 50%;
}
.bg-decor .blob-a {
  top: -22%; left: -12%;
  width: 68vw; height: 68vw;
  filter: blur(120px);
  opacity: 0.5;
  background: radial-gradient(circle at 50% 50%, rgba(46, 230, 197, 0.42), rgba(46, 230, 197, 0) 68%);
  animation: aurora-a 26s ease-in-out infinite;
}
.bg-decor .blob-b {
  top: 18%; right: -18%;
  width: 60vw; height: 60vw;
  filter: blur(130px);
  opacity: 0.42;
  background: radial-gradient(circle at 50% 50%, rgba(43, 127, 255, 0.4), rgba(43, 127, 255, 0) 70%);
  animation: aurora-b 32s ease-in-out infinite;
}
.bg-decor .grid {
  position: absolute;
  inset: -80px 0;
  opacity: 0.16;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 72px 72px;
  animation: grid-drift 18s linear infinite;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 78%);
}

@keyframes aurora-a {
  0%   { transform: translate3d(-6%, -4%, 0) scale(1); }
  50%  { transform: translate3d(8%, 6%, 0) scale(1.18); }
  100% { transform: translate3d(-6%, -4%, 0) scale(1); }
}
@keyframes aurora-b {
  0%   { transform: translate3d(6%, 8%, 0) scale(1.1); }
  50%  { transform: translate3d(-8%, -6%, 0) scale(0.92); }
  100% { transform: translate3d(6%, 8%, 0) scale(1.1); }
}
@keyframes grid-drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, -72px, 0); }
}
@keyframes scan {
  0%   { transform: translateY(0); opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateY(240px); opacity: 0; }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50%      { opacity: 1; transform: scale(1); }
}

/* --------------------------------------------------------------------------
   Botões
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  padding: 11px 20px;
  box-shadow: 0 8px 26px rgba(46, 230, 197, 0.24);
}
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-lg {
  font-size: 16px;
  padding: 15px 28px;
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(46, 230, 197, 0.28);
}
.btn-ghost {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: #eaeaef;
  font-size: 16px;
  font-weight: 600;
  padding: 15px 26px;
  border-radius: 12px;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }

/* --------------------------------------------------------------------------
   Header / navegação
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  background: rgba(10, 10, 12, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px var(--pad-x);
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 40px);
}
.nav-logo { display: flex; align-items: center; flex: none; }
.nav-logo svg { display: block; width: 152px; height: 42px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 0 auto 0 0;
  font-size: 15px;
  font-weight: 500;
  flex-wrap: wrap;
}
.nav-links a { color: #b9b9c2; }
.nav-links a:hover { color: #fff; }

.nav-actions { display: flex; align-items: center; gap: 12px; flex: none; }
.nav-login { color: #d6d6dd; font-size: 15px; font-weight: 600; padding: 10px 14px; }
.nav-login:hover { color: #fff; }

/* Seletor de idioma */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  flex: none;
}
.lang-btn {
  background: none;
  border: 0;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.lang-btn:hover { color: #fff; }
.lang-btn.active { background: rgba(46, 230, 197, 0.14); color: var(--accent); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  margin-left: auto;
  /* mata o atraso de 300ms e o duplo-toque-para-zoom do Safari iOS */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: #e6e6eb;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Drawer mobile */
.nav-drawer { display: none; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
main { position: relative; z-index: 1; }

.hero {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(52px, 9vw, 96px) var(--pad-x) 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 26px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px 7px 11px;
  text-align: left;
  border: 1px solid rgba(46, 230, 197, 0.3);
  background: rgba(46, 230, 197, 0.08);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-soft-2);
}
.pill .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  animation: pulse-dot 2.4s ease-in-out infinite;
}
.hero h1 {
  font-size: clamp(38px, 6.4vw, 74px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.035em;
  max-width: 940px;
  text-wrap: balance;
}
.gradient-text {
  background: linear-gradient(100deg, var(--accent), var(--blue-grad));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.55;
  color: var(--text-2b);
  max-width: 700px;
  text-wrap: pretty;
}
.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}
.hero-proof {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 14px;
  color: var(--text-3b);
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Painel da aplicação (mockup principal)
   -------------------------------------------------------------------------- */
.panel-section {
  max-width: var(--wrap-wide);
  margin: 0 auto;
  padding: 26px clamp(14px, 4vw, 32px) clamp(64px, 10vw, 110px);
}
.panel {
  position: relative;
  border-radius: 20px;
  border: 1px solid var(--border-3);
  background: var(--surface-panel);
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(46, 230, 197, 0.06);
  overflow: hidden;
}
.panel-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}
.panel-bar i {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #3a3a42;
  flex: none;
}
.panel-url {
  margin-left: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted-2);
}
.panel-shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); }
.panel-side {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.015);
}
.panel-side-label {
  padding: 0 10px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted-3);
}
.side-item {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 500;
}
.side-item.active {
  background: rgba(46, 230, 197, 0.1);
  color: var(--accent-soft);
  font-weight: 600;
}
.panel-workspace {
  margin-top: auto;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 12px;
  color: #74747f;
  line-height: 1.5;
}
.panel-workspace span { color: #4f4f59; }

.panel-main { padding: 26px 28px; min-width: 0; }
.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 20px;
  margin-bottom: 22px;
}
.panel-head .panel-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.panel-head p { font-size: 13px; color: #74747f; margin-top: 4px; }
.panel-head-actions { display: flex; gap: 8px; }
.chip-outline {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  padding: 8px 13px;
  font-size: 12px;
  color: #b3b3bc;
}
.chip-solid {
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 9px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.kpi {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: var(--surface-soft);
}
.kpi dt { font-size: 12px; color: #74747f; }
.kpi dd {
  margin: 8px 0 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.kpi.is-accent { border-color: rgba(46, 230, 197, 0.22); background: rgba(46, 230, 197, 0.06); }
.kpi.is-accent dt { color: var(--accent-soft-3); }
.kpi.is-accent dd { color: var(--accent); }
.kpi dd.is-warn { color: var(--warn); }

.table {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.table-head,
.table-row {
  display: grid;
  grid-template-columns: 46px 82px minmax(120px, 1fr) 88px 74px 104px;
  gap: 10px;
  align-items: center;
}
.table-head {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.table-row {
  padding: 13px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13px;
}
.c-id { font-family: var(--mono); color: #62626d; }
.c-date { font-family: var(--mono); color: #9a9aa4; }
.c-company { color: #e9e9ee; font-weight: 600; }
.c-total { font-family: var(--mono); color: #f2f2f5; }
.c-vat { font-family: var(--mono); color: var(--accent); }
.tag {
  justify-self: start;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #b0b0ba;
}

/* --------------------------------------------------------------------------
   Cabeçalho de secção
   -------------------------------------------------------------------------- */
.section-intro {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad-x) 40px;
}
.section-intro > div { max-width: 720px; display: flex; flex-direction: column; gap: 16px; }
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--accent);
}
.h2 {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.lead {
  font-size: clamp(15px, 1.9vw, 18px);
  line-height: 1.62;
  color: var(--text-2);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Passos (linhas alternadas)
   -------------------------------------------------------------------------- */
.step {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(36px, 7vw, 56px) var(--pad-x);
}
.step:last-of-type { padding-bottom: clamp(64px, 10vw, 110px); }
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 64px;
  align-items: center;
}
.split.is-reverse { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }

.step-copy { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.step-num { font-family: var(--mono); font-size: 12px; color: var(--text-muted-3); }
.step-copy h3 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.step-copy p {
  font-size: clamp(15px, 1.9vw, 17px);
  line-height: 1.65;
  color: var(--text-2);
  text-wrap: pretty;
}
.check-list { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.check-list li {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 15px;
  color: #d3d3da;
}
.check-list li::before {
  content: "✓";
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(46, 230, 197, 0.14);
  color: var(--accent);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.mock {
  border-radius: 18px;
  border: 1px solid var(--border-2);
  background: var(--surface-card);
  padding: clamp(16px, 3vw, 24px);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.5);
  min-width: 0;
}
.mock .mock-title { font-size: 17px; font-weight: 700; }
.mock-sub { font-size: 13px; color: #74747f; margin-top: 5px; }

/* Passo 1 — membros */
.members {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: auto hidden;
}
.members-head,
.members-row {
  min-width: 470px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 0.8fr 0.8fr;
  gap: 8px;
  align-items: center;
}
.members-head {
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.members-row { padding: 12px 16px; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.member { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(43, 127, 255, 0.2);
  color: var(--blue-soft);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.member-id { display: flex; flex-direction: column; min-width: 0; }
.member-name { font-size: 13px; font-weight: 600; color: #eaeaef; }
.member-mail { font-size: 11px; color: var(--text-muted-2); }
.role {
  justify-self: start;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #b0b0ba;
}
.member-state { font-size: 12px; color: #8e8e98; }
.member-since { font-family: var(--mono); font-size: 12px; color: #8e8e98; }

/* Passo 2 — scan + linhas */
.mock-receipt {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: stretch;
}
.scan-area {
  position: relative;
  border: 1px dashed rgba(46, 230, 197, 0.35);
  border-radius: 14px;
  background: rgba(46, 230, 197, 0.04);
  padding: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.scan-line {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scan 3.6s ease-in-out infinite;
}
.scan-label {
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  color: var(--accent-soft-3);
}
.receipt {
  background: var(--paper);
  border-radius: 8px;
  padding: 14px;
  color: var(--paper-ink);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.receipt-name { font-size: 12px; font-weight: 800; letter-spacing: -0.01em; }
.receipt-meta { font-family: var(--mono); font-size: 9px; color: #6a6a70; }
.receipt hr { border: 0; height: 1px; background: #dedede; margin: 0; width: 100%; }
.receipt-line {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 9px;
  color: #3a3a40;
  gap: 10px;
}
.receipt-total {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
}
.extract { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.extract-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.extract-top strong { font-size: 13px; font-weight: 700; }
.badge-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(46, 230, 197, 0.1);
  padding: 4px 9px;
  border-radius: 999px;
  flex: none;
}
.extract-table { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.extract-head,
.extract-row {
  display: grid;
  grid-template-columns: 1fr 46px 58px 58px;
  gap: 8px;
  font-family: var(--mono);
}
.extract-head { padding: 9px 12px; background: rgba(255, 255, 255, 0.04); font-size: 10px; color: var(--text-muted); }
.extract-row { padding: 10px 12px; border-top: 1px solid rgba(255, 255, 255, 0.05); font-size: 11px; }
.e-name { color: #e4e4e9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.e-qty { color: #8e8e98; }
.e-vat { color: var(--warn); }
.e-total { color: var(--accent); }

/* Passo 3 — estatísticas */
.mock-stats { display: flex; flex-direction: column; gap: 16px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.stat {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: var(--surface-soft);
}
.stat dt { font-size: 11px; color: #74747f; }
.stat dd { margin: 6px 0 0; font-size: 22px; font-weight: 700; }
.stat.is-accent { border-color: rgba(46, 230, 197, 0.2); background: rgba(46, 230, 197, 0.06); }
.stat.is-accent dt { color: var(--accent-soft-3); }
.stat.is-accent dd { color: var(--accent); }

.chart-card { border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.chart-title { font-size: 13px; font-weight: 700; margin-bottom: 16px; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 132px; }
.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}
.bar {
  width: 100%;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--accent), rgba(43, 127, 255, 0.55));
}
.bar-label { font-family: var(--mono); font-size: 10px; color: var(--text-muted-2); }

.donut-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}
.donut {
  width: 122px; height: 122px;
  border-radius: 50%;
  justify-self: center;
  background: conic-gradient(#2ee6c5 0 57%, #2b7fff 57% 76%, #f5b74a 76% 90%, #a78bfa 90% 100%);
  -webkit-mask-image: radial-gradient(circle, transparent 52%, #000 53%);
  mask-image: radial-gradient(circle, transparent 52%, #000 53%);
}
.legend { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.legend li { display: flex; align-items: center; gap: 9px; font-size: 12px; color: #b6b6bf; }
.legend .swatch { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.legend .name { color: #e6e6eb; font-weight: 600; }
.legend .value { margin-left: auto; font-family: var(--mono); }

/* Passo 4 — árvore de arquivo */
.tree-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.tree-top strong { font-size: 15px; font-weight: 700; }
.tree-top span { font-size: 11px; font-family: var(--mono); color: var(--text-muted-2); }
.tree { display: flex; flex-direction: column; gap: 8px; }
.tree-node {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
}
.tree-node .count { font-family: var(--mono); font-size: 12px; }
.tree-year { border-left: 3px solid var(--accent); background: rgba(46, 230, 197, 0.07); font-weight: 700; color: var(--accent-soft); }
.tree-month {
  margin-left: clamp(10px, 3vw, 22px);
  padding: 11px 14px;
  border-left: 3px solid var(--blue);
  background: rgba(43, 127, 255, 0.08);
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-soft-2);
}
.tree-state {
  margin-left: clamp(20px, 6vw, 44px);
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  color: #cfcfd6;
}
.tree-state.is-done { border-left: 3px solid var(--success); }
.tree-state.is-todo { border-left: 3px solid var(--warn); }
.tree-state .count { color: #8e8e98; }
.tree-file {
  margin-left: clamp(28px, 9vw, 66px);
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: 12px;
  color: #b2b2bb;
  font-family: var(--mono);
}
.tree-file .count { color: var(--text-muted-2); }

/* --------------------------------------------------------------------------
   Planos
   -------------------------------------------------------------------------- */
.pricing {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad-x) clamp(64px, 10vw, 110px);
}
.pricing-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 660px;
  margin-bottom: 44px;
}
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 18px;
  align-items: stretch;
}
.plan {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px 22px;
  border-radius: 18px;
  border: 1px solid var(--border-2);
  background: var(--surface-subtle);
}
.plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 24px;
}
.plan h3 { font-size: 17px; font-weight: 700; }
.plan-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  flex: none;
}
.plan-price { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.plan-price .amount {
  font-size: clamp(27px, 3.2vw, 34px);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.plan-price .amount.is-text { font-size: clamp(21px, 2.4vw, 26px); }
.plan-price .period { font-size: 13px; color: var(--text-3b); }
.plan-features { display: flex; flex-direction: column; gap: 9px; margin-top: 2px; }
.plan-features li {
  display: flex;
  gap: 9px;
  font-size: 13px;
  line-height: 1.45;
  color: #bcbcc5;
}
.plan-features li::before { content: "✓"; color: var(--accent); flex: none; }
.plan-cta {
  margin-top: auto;
  text-align: center;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  color: #eaeaef;
  border: 1px solid var(--border-2);
  transition: background-color 0.18s ease, color 0.18s ease;
}
.plan-cta:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.plan.is-popular {
  border-color: rgba(46, 230, 197, 0.38);
  background: linear-gradient(180deg, rgba(46, 230, 197, 0.1), rgba(255, 255, 255, 0.02));
}
.plan.is-popular .plan-cta {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: rgba(46, 230, 197, 0.38);
}
.plan.is-popular .plan-cta:hover { background: var(--accent-hover); color: var(--accent-ink); }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--pad-x) clamp(64px, 10vw, 110px);
}
.faq > .h2 { font-size: clamp(27px, 4.4vw, 42px); margin-bottom: 30px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  border: 1px solid var(--border-2);
  border-radius: 14px;
  background: var(--surface-subtle);
  padding: 18px 22px;
}
.faq-item > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: clamp(15px, 1.9vw, 17px);
  font-weight: 600;
  color: var(--text-strong);
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary > h3 { font: inherit; margin: 0; }
.faq-item > summary::after {
  content: "+";
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
  flex: none;
  transition: transform 0.2s ease;
}
.faq-item[open] > summary::after { transform: rotate(45deg); }
.faq-item p {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-2);
  max-width: 78ch;
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   CTA App
   -------------------------------------------------------------------------- */
.app-cta {
  max-width: var(--wrap);
  margin: 0 auto clamp(72px, 12vw, 120px);
  padding: 0 var(--pad-x);
}
.app-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(46, 230, 197, 0.22);
  background: linear-gradient(120deg, rgba(46, 230, 197, 0.12), rgba(43, 127, 255, 0.1) 60%, rgba(255, 255, 255, 0.02));
  padding: clamp(40px, 8vw, 66px) clamp(22px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}
.app-card h2 {
  font-size: clamp(28px, 4.6vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  max-width: 740px;
}
.app-card p {
  font-size: clamp(15px, 1.9vw, 18px);
  color: #b6b6c0;
  max-width: 620px;
  line-height: 1.6;
}
.store-chips { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.store-chip {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 13px 22px;
  font-size: 14px;
  font-weight: 600;
  color: #cfcfd6;
  background: rgba(0, 0, 0, 0.25);
}
.app-card .btn-lg { margin-top: 12px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  background: var(--bg-footer);
}
.footer-grid {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(38px, 7vw, 56px) var(--pad-x) 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand svg { display: block; width: 26px; height: 30px; }
.footer-brand span { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.footer-about { font-size: 14px; line-height: 1.6; color: var(--text-3); max-width: 40ch; }
.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.footer-col a { font-size: 14px; color: #c6c6ce; }
.footer-col a:hover { color: var(--accent); }
.footer-col span { font-size: 14px; color: var(--text-3); }
.social-link { display: inline-flex; align-items: center; gap: 8px; }
.footer-bottom {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 20px var(--pad-x) 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  color: var(--text-muted);
}
.footer-bottom a { color: inherit; }
.footer-bottom a:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   Revelação em scroll
   -------------------------------------------------------------------------- */
/* O estado inicial invisível só se aplica quando o <html> tem .js-reveal, que
   um script inline no <head> acrescenta. Assim, se o landing.js falhar ou
   demorar, a página nasce visível em vez de ficar presa em opacity: 0.
   Sem will-change: promover 13 secções grandes a camadas permanentes é o que
   rebentava o orçamento de composição do Safari iOS. */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Mobile / Safari iOS — orçamento de composição
   O WebKit no iOS tem um limite apertado de camadas compositadas. Três coisas
   desta página estouravam esse limite ao mesmo tempo e o Safari deixava de
   pintar os tiles abaixo da dobra (página "em branco" ao fazer scroll):
     1. blobs de 68vw com filter: blur(120px) e animação infinita;
     2. .site-header sticky com backdrop-filter (obriga a re-render do backdrop
        — toda a página + o fundo fixed — a cada frame);
     3. .reveal com will-change permanente em 13 secções grandes.
   Em ecrãs pequenos trocamos tudo isso por versões estáticas e baratas.
   -------------------------------------------------------------------------- */
@media (max-width: 1023px), (hover: none) {
  /* Sem blur nem animação: o próprio radial-gradient já dá o esbatimento,
     basta alargá-lo para compensar a ausência do filter. */
  .bg-decor .blob-a,
  .bg-decor .blob-b {
    filter: none;
    animation: none;
  }
  .bg-decor .blob-a {
    top: -40vw; left: -35vw;
    width: 150vw; height: 150vw;
    opacity: 0.38;
  }
  .bg-decor .blob-b {
    top: 8%; right: -50vw;
    width: 140vw; height: 140vw;
    opacity: 0.32;
  }
  /* a grelha tem mask-image; animá-la obriga a re-rasterizar a máscara */
  .bg-decor .grid { animation: none; }

  /* Se a página abriu em desktop e o ecrã rodou para retrato, o <html> já tem
     .js-reveal. Aqui o conteúdo é sempre visível, aconteça o que acontecer ao
     IntersectionObserver. */
  .js-reveal .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  /* backdrop-filter num elemento sticky é o bug de repaint clássico do iOS:
     o header ficava com o frame antigo (ex.: menu que "não fecha"). */
  .site-header {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--bg);
  }
}

/* --------------------------------------------------------------------------
   Responsivo
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .split,
  .split.is-reverse { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .split > .mock { order: 2; }
  .panel-shell { grid-template-columns: minmax(0, 1fr); }
  .panel-side { display: none; }
  .mock-receipt { grid-template-columns: minmax(0, 1fr); }
}

/* A navegação completa só cabe acima de ~1024px (5 links + idioma + 2 CTAs) */
@media (min-width: 1024px) and (max-width: 1200px) {
  .nav { gap: 18px; }
  .nav-links { gap: 18px; }
  .nav-login { padding: 10px 8px; }
}

@media (max-width: 1023px) {
  .nav { flex-wrap: wrap; gap: 12px; }
  .nav-links,
  .nav > .nav-actions { display: none; }
  .nav-toggle { display: flex; }

  .nav-drawer {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 6px;
    padding: 8px 0 14px;
    border-top: 1px solid var(--border);
  }
  .nav-drawer.is-open { display: flex; }
  .nav-drawer a.drawer-link {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    padding: 12px 4px;
    font-size: 16px;
    font-weight: 600;
    color: #d6d6dd;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  .nav-drawer a.drawer-link:hover { color: #fff; }
  .nav-drawer .drawer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
  }
  .nav-drawer .btn-primary { flex: 1 1 auto; }
}

@media (max-width: 760px) {
  .table-head,
  .table-row { grid-template-columns: 62px minmax(120px, 1fr) 88px 74px; }
  .table-head span:nth-child(2),
  .table-row span:nth-child(2),
  .table-head span:nth-child(6),
  .table-row span:nth-child(6) { display: none; }

  .panel-main { padding: 20px 16px; }
  .hero-cta > .btn { flex: 1 1 100%; }
  .hero-proof { gap: 14px 22px; }
  .plan { padding: 22px 18px; }
  .donut-card { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .table-head,
  .table-row { grid-template-columns: minmax(110px, 1fr) 84px 70px; }
  .table-head span:nth-child(1),
  .table-row span:nth-child(1) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .js-reveal .reveal { opacity: 1; transform: none; }
}
