/* ============================================================
   XML Core — home.css (página pública de apresentação, "/")
   Reaproveita os tokens de cor/tema de app.css (carregado antes),
   então o tema claro/escuro e a paleta "slate + amber" ficam
   idênticos ao resto do sistema. Tudo aqui é prefixado com .hp-
   pra não colidir com as classes do painel.
   ============================================================ */

/* Tema escuro da Home: paleta mais clara que a do painel. A do painel
   (#0f1117/#181c26, bordas #2a3045) é boa pra tela de trabalho densa, mas
   numa página de apresentação deixava tudo num bloco só de preto —
   seção, cartão e borda quase do mesmo tom, texto secundário apagado.
   Sobrescreve só aqui (html.hp-root), o painel não muda. */
html.hp-root:not([data-theme="light"]) {
  --bg:         #141a28;
  --bg-2:       #1c2335;
  --bg-3:       #252e45;
  --border:     #313b58;
  --border-2:   #46527a;
  --text:       #f1f4fb;
  --text-muted: #aab4cc;
  --text-dim:   #7c87a4;
  --shadow:     0 10px 30px rgba(0, 0, 0, .35);
}

/* app.css fixa `html { font-size: 14px }` (o painel é denso de
   propósito) — aqui volta pra 16px, senão todo `rem` desta página
   encolhe junto. Classe própria no <html> pra não vazar pro painel. */
html.hp-root { font-size: 16px; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) {
  html.hp-root { scroll-behavior: smooth; }
}

body.hp {
  height: auto;          /* app.css fixa 100% — quebraria o header sticky */
  min-height: 100vh;
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;   /* fallback */
  overflow-x: clip;     /* corta o que sai da vitrine inclinada sem virar container de rolagem (não atrapalha o sticky) */
}

/* :where() zera a especificidade — senão "a" herdando a cor do texto
   venceria a cor própria dos botões (.hp-btn-primary etc.). */
:where(.hp) a { color: inherit; text-decoration: none; }
:where(.hp) code, :where(.hp) pre { font-family: 'DM Mono', ui-monospace, monospace; }

.hp-container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.hp-skip {
  position: absolute; left: 16px; top: -48px;
  background: var(--accent); color: #111; padding: 8px 14px;
  border-radius: var(--radius); font-weight: 600; z-index: 100;
}
.hp-skip:focus { top: 12px; }

.hp :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ── Botões ─────────────────────────────────────────────────── */
.hp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600; font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.hp-btn-primary {
  background: var(--accent);
  color: #111;
  box-shadow: 0 8px 24px -8px rgba(245, 158, 11, .55);
}
.hp-btn-primary:hover { background: var(--accent-dk); transform: translateY(-1px); }
:root[data-theme="light"] .hp-btn-primary { color: #fff; box-shadow: 0 8px 24px -10px rgba(180, 83, 9, .5); }

.hp-btn-ghost {
  background: var(--bg-2);
  color: var(--text);
  border-color: var(--border-2);
}
.hp-btn-ghost:hover { border-color: var(--accent); transform: translateY(-1px); }

.hp-btn-sm { padding: 8px 16px; font-size: 14px; border-radius: 9px; }
.hp-btn-lg { padding: 15px 28px; font-size: 16px; }

.hp-icon-btn {
  width: 38px; height: 38px;
  display: inline-grid; place-items: center;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-muted);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.hp-icon-btn:hover { color: var(--accent); border-color: var(--accent); }

/* ── Marca ──────────────────────────────────────────────────── */
.hp-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.hp-brand-icon {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent-lt), var(--accent));
  color: #111; font-size: 15px;
  box-shadow: 0 6px 18px -6px rgba(245, 158, 11, .6);
}
:root[data-theme="light"] .hp-brand-icon { color: #fff; }
.hp-brand-sm .hp-brand-icon { width: 28px; height: 28px; font-size: 13px; border-radius: 8px; }
.hp-brand-sm { font-size: 15px; }

/* ── Navegação ──────────────────────────────────────────────── */
.hp-nav {
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease;
}
.hp-nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom-color: var(--border);
}
.hp-nav-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.hp-nav-links { display: flex; gap: 28px; margin-left: auto; font-size: 14.5px; font-weight: 500; }
.hp-nav-links a { color: var(--text-muted); transition: color .2s ease; }
.hp-nav-links a:hover { color: var(--text); }
.hp-nav-actions { display: flex; align-items: center; gap: 10px; }

/* ── Hero ───────────────────────────────────────────────────── */
/* isolation: o fundo decorativo (z-index:-1) precisa ficar acima do
   fundo opaco do <body> — sem um contexto de empilhamento próprio aqui,
   ele seria pintado por baixo e sumiria. */
.hp-hero { position: relative; isolation: isolate; padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 104px); }
.hp-hero-bg {
  position: absolute; inset: -68px 0 0 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 55% at 78% 30%, rgba(245, 158, 11, .16), transparent 70%),
    radial-gradient(45% 45% at 10% 10%, rgba(59, 130, 246, .10), transparent 70%),
    linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, var(--border) 1px, transparent 1px) 0 0 / 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 35%, transparent 80%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 35%, transparent 80%);
  opacity: .9;
}
:root[data-theme="light"] .hp-hero-bg { opacity: .7; }

.hp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hp-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: var(--bg-2);
  color: var(--text-muted);
  font-size: 13px; font-weight: 500;
}
.hp-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, .18);
}

.hp-hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(2.15rem, 4.6vw, 3.55rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.hp-grad {
  background: linear-gradient(95deg, var(--accent) 10%, var(--accent-lt) 90%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hp-lead { font-size: clamp(1rem, 1.4vw, 1.12rem); color: var(--text-muted); max-width: 560px; text-wrap: pretty; }

.hp-cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.hp-trust {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  margin-top: 28px;
  font-size: 13.5px; color: var(--text-muted);
}
.hp-trust i { color: var(--accent); margin-right: 6px; }

/* ── Vitrine do produto (mock) ──────────────────────────────── */
.hp-hero-visual { position: relative; padding: 18px 8px 26px; }

.hp-window {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 16px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .02) inset;
  overflow: hidden;
  transform: perspective(1400px) rotateY(-5deg) rotateX(2deg);
  transform-origin: left center;
}
:root[data-theme="light"] .hp-window { box-shadow: 0 30px 70px -30px rgba(20, 24, 40, .35); }

.hp-window-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-3);
}
.hp-window-bar > span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-2); }
.hp-window-bar > span:nth-child(1) { background: #ef4444; opacity: .8; }
.hp-window-bar > span:nth-child(2) { background: #f59e0b; opacity: .8; }
.hp-window-bar > span:nth-child(3) { background: #10b981; opacity: .8; }
.hp-window-title { margin-left: 10px; font-size: 12.5px; color: var(--text-muted); font-weight: 500; }
.hp-window-title i { color: var(--accent); margin-right: 5px; }

.hp-window-body { padding: 14px; display: grid; gap: 8px; }

.hp-filter-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.hp-chip {
  font-size: 11.5px; font-weight: 500;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-muted);
}
.hp-chip.is-active { background: rgba(245, 158, 11, .14); border-color: rgba(245, 158, 11, .45); color: var(--accent-lt); }

.hp-doc {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--bg);
}
:root[data-theme="light"] .hp-doc { background: var(--bg-3); }
.hp-doc.is-new { border-color: rgba(245, 158, 11, .5); box-shadow: 0 0 0 3px rgba(245, 158, 11, .08); }

.hp-doc-main { display: grid; gap: 2px; min-width: 0; }
.hp-doc-main strong { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-doc-main code { font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-doc-side { display: grid; justify-items: end; gap: 3px; }
.hp-money { font-family: 'DM Mono', monospace; font-size: 12.5px; color: var(--text); }

.hp-tag {
  font-family: 'DM Mono', monospace;
  font-size: 10.5px; font-weight: 500;
  padding: 5px 8px; border-radius: 7px;
  min-width: 52px; text-align: center;
}
.hp-tag-nfe  { background: rgba(245, 158, 11, .14); color: var(--accent-lt); }
.hp-tag-cte  { background: rgba(59, 130, 246, .14); color: var(--info-lt); }
.hp-tag-mdfe { background: rgba(139, 92, 246, .16); color: var(--purple-lt); }
.hp-tag-nfse { background: rgba(20, 184, 166, .14); color: var(--teal-lt); }

.hp-status { font-size: 11px; font-weight: 500; }
.hp-status i { font-size: 10px; margin-right: 3px; }
.hp-status.is-ok  { color: var(--success-lt); }
.hp-status.is-new { color: var(--accent-lt); }

.hp-float {
  position: absolute;
  display: flex; align-items: center; gap: 11px;
  padding: 11px 15px 11px 11px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 13px;
  box-shadow: var(--shadow);
  font-size: 13px; line-height: 1.3;
}
.hp-float strong { display: block; font-weight: 600; }
.hp-float small { color: var(--text-muted); font-size: 11.5px; }
.hp-float-icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
  background: rgba(239, 68, 68, .14); color: var(--danger-lt);
}
.hp-float-icon.is-green { background: rgba(16, 185, 129, .14); color: var(--success-lt); }
.hp-float-pdf  { right: -14px; bottom: -6px; }
.hp-float-sync { left: -22px; top: 54px; }

@media (prefers-reduced-motion: no-preference) {
  .hp-float-pdf  { animation: hp-flutuar 6s ease-in-out infinite; }
  .hp-float-sync { animation: hp-flutuar 7s ease-in-out -2s infinite; }
  .hp-dot        { animation: hp-pulso 2.4s ease-in-out infinite; }
}
@keyframes hp-flutuar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes hp-pulso  { 0%, 100% { box-shadow: 0 0 0 4px rgba(16,185,129,.18); } 50% { box-shadow: 0 0 0 7px rgba(16,185,129,.06); } }

/* ── Números ────────────────────────────────────────────────── */
.hp-stats { border-block: 1px solid var(--border); background: var(--bg-2); }
.hp-stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hp-stat { padding: 30px 22px; display: grid; gap: 6px; }
.hp-stat + .hp-stat { border-left: 1px solid var(--border); }
.hp-stat strong {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.1;
  color: var(--accent);
}
.hp-stat span { font-size: 13.5px; color: var(--text-muted); line-height: 1.45; }

/* ── Seções ─────────────────────────────────────────────────── */
.hp-section { padding: clamp(64px, 9vw, 112px) 0; }
.hp-section-alt { background: var(--bg-2); border-block: 1px solid var(--border); }

.hp-section-head { max-width: 680px; margin-bottom: clamp(36px, 5vw, 56px); }
.hp-kicker {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 12px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent);
  margin-bottom: 12px;
}
.hp h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.45rem);
  font-weight: 700; line-height: 1.15; letter-spacing: -.03em;
  text-wrap: balance;
}
.hp-section-head p { margin-top: 14px; color: var(--text-muted); font-size: 1.05rem; }

/* Recursos */
.hp-features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.hp-feature {
  padding: 24px 22px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.hp-feature:hover { transform: translateY(-3px); border-color: var(--border-2); box-shadow: var(--shadow); }
.hp-feature h3 { font-size: 1.02rem; font-weight: 600; margin: 16px 0 8px; letter-spacing: -.01em; }
.hp-feature p { font-size: 14.5px; color: var(--text-muted); line-height: 1.55; }

.hp-feature-icon {
  width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center; font-size: 17px;
}
.c-amber  { background: rgba(245, 158, 11, .14); color: var(--accent-lt); }
.c-red    { background: rgba(239, 68, 68, .13);  color: var(--danger-lt); }
.c-green  { background: rgba(16, 185, 129, .13); color: var(--success-lt); }
.c-blue   { background: rgba(59, 130, 246, .13); color: var(--info-lt); }
.c-purple { background: rgba(139, 92, 246, .15); color: var(--purple-lt); }
.c-teal   { background: rgba(20, 184, 166, .13); color: var(--teal-lt); }

/* Como funciona */
.hp-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: none; }
.hp-step {
  position: relative;
  padding: 28px 26px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
:root[data-theme="light"] .hp-step { background: var(--bg-3); }
.hp-step-num {
  font-family: 'DM Mono', monospace;
  font-size: 13px; font-weight: 500;
  color: var(--accent);
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, .4);
  background: rgba(245, 158, 11, .08);
}
.hp-step h3 { font-size: 1.12rem; font-weight: 600; margin: 18px 0 8px; }
.hp-step p { color: var(--text-muted); font-size: 14.5px; }
.hp-step:not(:last-child)::after {
  content: "";
  position: absolute; top: 44px; right: -21px;
  width: 22px; height: 1px;
  background: linear-gradient(90deg, var(--border-2), transparent);
}

/* API */
.hp-split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.hp-split-copy p { color: var(--text-muted); margin: 16px 0 22px; font-size: 1.02rem; }
.hp-checks { list-style: none; display: grid; gap: 10px; margin-bottom: 28px; font-size: 15px; }
.hp-checks i {
  width: 20px; height: 20px; border-radius: 6px;
  display: inline-grid; place-items: center;
  font-size: 10px; margin-right: 10px;
  background: rgba(16, 185, 129, .14); color: var(--success-lt);
}

.hp-code {
  background: #10162a;
  border: 1px solid #2c3656;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 70px -35px rgba(0, 0, 0, .7);
}
.hp-code-tabs { display: flex; gap: 4px; padding: 10px 10px 0; background: #171e33; border-bottom: 1px solid #2c3656; }
.hp-code-tab {
  font: 500 13px 'DM Sans', sans-serif;
  color: #8f9ab6;
  background: transparent;
  border: 1px solid transparent; border-bottom: none;
  padding: 9px 14px;
  border-radius: 9px 9px 0 0;
  cursor: pointer;
}
.hp-code-tab:hover { color: #e8eaf0; }
.hp-code-tab.is-active { color: #fcd34d; background: #10162a; border-color: #2c3656; margin-bottom: -1px; }
.hp-code-body {
  margin: 0;
  padding: 22px 22px 24px;
  overflow-x: auto;
  font-size: 13px; line-height: 1.75;
  color: #d6dcea;
  min-height: 300px;
}
.hp-code-body[hidden] { display: none; }
.tk-c { color: #7783a3; }
.tk-k { color: #f59e0b; }
.tk-s { color: #6ee7b7; }
.tk-p { color: #93c5fd; }
.tk-n { color: #fca5a5; }

/* Segurança */
.hp-sec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.hp-sec {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
:root[data-theme="light"] .hp-sec { background: var(--bg-3); }
.hp-sec > i {
  flex: none;
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; font-size: 18px;
  background: rgba(245, 158, 11, .12); color: var(--accent-lt);
}
.hp-sec h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.hp-sec p { font-size: 14.5px; color: var(--text-muted); }

/* CTA final */
.hp-final { padding: clamp(64px, 9vw, 104px) 0; }
.hp-final-card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  padding: clamp(32px, 5vw, 52px);
  border-radius: 22px;
  border: 1px solid rgba(245, 158, 11, .35);
  background:
    radial-gradient(70% 120% at 100% 0%, rgba(245, 158, 11, .20), transparent 60%),
    var(--bg-2);
}
.hp-final-card p { color: var(--text-muted); margin-top: 8px; font-size: 1.05rem; }

/* Rodapé */
.hp-footer { border-top: 1px solid var(--border); padding: 28px 0 calc(28px + env(safe-area-inset-bottom, 0px)); }
.hp-footer-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.hp-footer-links { display: flex; gap: 22px; font-size: 14px; color: var(--text-muted); }
.hp-footer-links a:hover { color: var(--text); }
.hp-footer small { margin-left: auto; color: var(--text-dim); font-size: 13px; }

/* ── Tema escuro: luz e profundidade ────────────────────────────
   Só a paleta mais clara (topo do arquivo) não basta: superfícies
   escuras chapadas continuam "pesadas". Aqui entram brilhos de cor
   suaves nas seções e um leve reflexo no topo de cada cartão, pra
   separar visualmente fundo, seção e cartão. Tema claro não muda. */
html.hp-root:not([data-theme="light"]) .hp-hero-bg {
  background:
    radial-gradient(55% 60% at 80% 28%, rgba(245, 158, 11, .26), transparent 70%),
    radial-gradient(45% 50% at 8% 8%, rgba(99, 102, 241, .22), transparent 70%),
    radial-gradient(40% 40% at 50% 100%, rgba(20, 184, 166, .10), transparent 70%),
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px) 0 0 / 44px 44px;
  opacity: 1;
}

html.hp-root:not([data-theme="light"]) :is(.hp-feature, .hp-step, .hp-sec, .hp-window, .hp-float, .hp-modal) {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0) 55%);
}
html.hp-root:not([data-theme="light"]) .hp-feature:hover {
  border-color: rgba(245, 158, 11, .45);
  box-shadow: 0 18px 44px -20px rgba(245, 158, 11, .38);
}

html.hp-root:not([data-theme="light"]) .hp-stats {
  background: linear-gradient(90deg, rgba(245, 158, 11, .08), rgba(99, 102, 241, .07)), var(--bg-2);
}
html.hp-root:not([data-theme="light"]) .hp-section-alt {
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(245, 158, 11, .07), transparent 60%),
    radial-gradient(50% 70% at 0% 100%, rgba(99, 102, 241, .09), transparent 60%),
    var(--bg-2);
}
html.hp-root:not([data-theme="light"]) .hp-final-card {
  background:
    radial-gradient(70% 140% at 100% 0%, rgba(245, 158, 11, .28), transparent 60%),
    radial-gradient(60% 120% at 0% 100%, rgba(99, 102, 241, .18), transparent 60%),
    var(--bg-2);
}
html.hp-root:not([data-theme="light"]) .hp-window {
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7), 0 0 60px -20px rgba(245, 158, 11, .25);
}

/* ── Modal de login (<dialog>) ──────────────────────────────── */
.hp-modal {
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--border-2);
  border-radius: 20px;
  background: var(--bg-2);
  color: var(--text);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .75);
  overflow: auto;
}
:root[data-theme="light"] .hp-modal { box-shadow: 0 40px 90px -30px rgba(20, 24, 40, .4); }
.hp-modal::backdrop {
  background: rgba(6, 8, 14, .62);
  -webkit-backdrop-filter: blur(5px);
          backdrop-filter: blur(5px);
}
:root[data-theme="light"] .hp-modal::backdrop { background: rgba(20, 24, 40, .38); }
/* trava a rolagem da página enquanto o modal está aberto */
html.hp-root:has(.hp-modal[open]) { overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
  .hp-modal[open] { animation: hp-modal-entrar .22s cubic-bezier(.2, .7, .2, 1); }
  .hp-modal[open]::backdrop { animation: hp-fundo-entrar .22s ease; }
}
@keyframes hp-modal-entrar { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes hp-fundo-entrar { from { opacity: 0; } to { opacity: 1; } }

.hp-modal-body { position: relative; padding: 34px 32px 26px; }
.hp-modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: none; border-radius: 9px;
  background: transparent; color: var(--text-muted);
  cursor: pointer; font-size: 16px;
  transition: background .15s ease, color .15s ease;
}
.hp-modal-close:hover { background: var(--bg-3); color: var(--text); }

.hp-modal-head { text-align: center; margin-bottom: 24px; }
.hp-modal-head .hp-brand-icon { width: 46px; height: 46px; font-size: 19px; border-radius: 13px; margin: 0 auto 16px; }
.hp-modal-head h2 { font-size: 1.45rem; letter-spacing: -.02em; }
.hp-modal-head p { color: var(--text-muted); font-size: 14.5px; margin-top: 4px; }

.hp-alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px; margin-bottom: 18px;
  border-radius: 11px;
  font-size: 14px; line-height: 1.45;
}
.hp-alert i { margin-top: 3px; }
.hp-alert-danger  { background: rgba(239, 68, 68, .12);  color: var(--danger-lt); }
.hp-alert-warning { background: rgba(245, 158, 11, .12); color: var(--accent-lt); }
.hp-alert-success { background: rgba(16, 185, 129, .12); color: var(--success-lt); }
.hp-alert-info    { background: rgba(59, 130, 246, .12); color: var(--info-lt); }

.hp-login-form { display: grid; }
.hp-label { font-size: 13.5px; font-weight: 600; margin-bottom: 7px; }
.hp-label-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; }
.hp-label-row a { font-size: 13px; color: var(--accent); }
.hp-label-row a:hover { text-decoration: underline; }

.hp-input {
  display: flex; align-items: center;
  border: 1px solid var(--border-2);
  border-radius: 11px;
  background: var(--bg);
  transition: border-color .15s ease, box-shadow .15s ease;
}
:root[data-theme="light"] .hp-input { background: #fff; }
.hp-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245, 158, 11, .18); }
.hp-input > i { padding-left: 14px; color: var(--text-dim); font-size: 14px; }
.hp-input input {
  flex: 1; min-width: 0;
  padding: 12px 12px;
  border: none; outline: none;
  background: transparent;
  color: var(--text);
  font: inherit; font-size: 15px;
}
.hp-input input::placeholder { color: var(--text-dim); }
.hp-input-btn {
  border: none; background: transparent; cursor: pointer;
  color: var(--text-dim);
  padding: 0 14px; align-self: stretch;
  border-radius: 0 11px 11px 0;
}
.hp-input-btn:hover { color: var(--text); }
/* o :focus-visible genérico da página já desenha o contorno — aqui o anel fica no .hp-input inteiro */
.hp-input input:focus-visible { outline: none; }

.hp-btn-block { width: 100%; margin-top: 24px; padding: 13px 22px; }

.hp-modal-foot { text-align: center; margin-top: 18px; font-size: 13px; color: var(--text-dim); }

@media (max-width: 480px) {
  .hp-modal-body { padding: 30px 22px 22px; }
}

/* ── Entrada suave (só com JS ativo — sem JS tudo aparece) ──── */
.js .hp-reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.js .hp-reveal.is-visible { opacity: 1; transform: none; }
.hp-features .hp-reveal:nth-child(4n+2), .hp-steps .hp-reveal:nth-child(2) { transition-delay: .06s; }
.hp-features .hp-reveal:nth-child(4n+3), .hp-steps .hp-reveal:nth-child(3) { transition-delay: .12s; }
.hp-features .hp-reveal:nth-child(4n+4) { transition-delay: .18s; }
@media (prefers-reduced-motion: reduce) {
  .js .hp-reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Responsivo ─────────────────────────────────────────────── */
@media (max-width: 1060px) {
  .hp-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .hp-hero-grid, .hp-split { grid-template-columns: minmax(0, 1fr); }
  .hp-hero-visual { max-width: 580px; margin-inline: auto; width: 100%; }
  .hp-window { transform: none; }
  .hp-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hp-stat:nth-child(3) { border-left: none; }
  .hp-stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .hp-steps { grid-template-columns: minmax(0, 1fr); }
  .hp-step::after { display: none; }
}
@media (max-width: 760px) {
  .hp-nav-links { display: none; }
  .hp-nav-actions { margin-left: auto; }
  .hp-sec-grid { grid-template-columns: minmax(0, 1fr); }
  .hp-float-sync { left: -6px; top: 46px; }
  .hp-float-pdf  { right: -6px; }
  .hp-footer small { margin-left: 0; width: 100%; }
}
@media (max-width: 560px) {
  .hp-features { grid-template-columns: minmax(0, 1fr); }
  .hp-cta-row .hp-btn { flex: 1 1 100%; }
  .hp-final-card .hp-btn { width: 100%; }
  .hp-doc { grid-template-columns: auto minmax(0, 1fr); }
  .hp-doc-side { grid-column: 2; justify-items: start; grid-auto-flow: column; gap: 10px; }
  .hp-float { display: none; }
  .hp-stat { padding: 22px 16px; }
}
