/* ZapMaster — sala de controle. Escuro por padrão; claro é exceção. */
:root {
  --bg: #070B16;
  --bg-2: #0B1222;
  --surface: #0F1830;
  --surface-2: #162040;
  --line: #22305A;
  --line-2: #2E3E70;
  --fg: #EAF0FB;
  --muted: #8E9CC0;
  --accent: #35D0FF;
  --accent-2: #7CF2C2;
  --accent-ink: #04111C;
  --ok: #3DDC84;
  --warn: #FFB547;
  --bad: #FF6B6B;
  --glow: rgba(53,208,255,.22);
  --grid: rgba(53,208,255,.055);
  --f-display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --f-body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F5F7FC; --bg-2: #EEF2FA; --surface: #FFFFFF; --surface-2: #E7EDF9; --line: #D3DBEC; --line-2: #B9C5E0;
    --fg: #0B1222; --muted: #58658A; --accent: #0A84B8; --accent-2: #0E8F62; --accent-ink: #FFFFFF;
    --ok: #13955A; --warn: #B7791F; --bad: #C53434; --glow: rgba(10,132,184,.16); --grid: rgba(10,132,184,.07);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F5F7FC; --bg-2: #EEF2FA; --surface: #FFFFFF; --surface-2: #E7EDF9; --line: #D3DBEC; --line-2: #B9C5E0;
  --fg: #0B1222; --muted: #58658A; --accent: #0A84B8; --accent-2: #0E8F62; --accent-ink: #FFFFFF;
  --ok: #13955A; --warn: #B7791F; --bad: #C53434; --glow: rgba(10,132,184,.16); --grid: rgba(10,132,184,.07);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; } }
body { background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 17px; line-height: 1.6; margin: 0; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.1; text-wrap: balance; margin: 0; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.4vw, 3.5rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.5rem); letter-spacing: -0.02em; }
h3 { font-size: 1.05rem; font-weight: 500; }
p { margin: 0; }
.mono { font-family: var(--f-mono); }
.eyebrow { font-family: var(--f-mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .16em; color: var(--accent); }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 20px; }
.lede { color: var(--muted); font-size: 1.12rem; max-width: 60ch; }
.hl { color: var(--accent); }

/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; color: var(--fg); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; filter: drop-shadow(0 0 10px var(--glow)); }
.brand-mark svg { width: 30px; height: 30px; }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav a:hover { color: var(--fg); }
.btn { display: inline-flex; align-items: center; gap: 8px; justify-content: center; font-family: var(--f-body); font-weight: 600; font-size: 1rem; padding: 13px 22px; border-radius: 10px; border: 1px solid transparent; text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 0 var(--glow); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 30px var(--glow); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--accent); }
.nav .btn { padding: 9px 16px; font-size: .92rem; color: var(--accent-ink); }
@media (max-width: 900px) { .nav a:not(.btn) { display: none; } }

/* Hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 48px 48px; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto; height: 70%; background: radial-gradient(60% 60% at 70% 30%, var(--glow), transparent 70%); pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; padding-block: 76px 84px; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-proof { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: .95rem; }
.hero-proof b { font-family: var(--f-display); font-size: 1.5rem; color: var(--fg); font-variant-numeric: tabular-nums; }
.hero-proof .sep { width: 1px; height: 28px; background: var(--line-2); }
@media (max-width: 940px) { .hero .wrap { grid-template-columns: 1fr; padding-block: 52px 60px; } }

/* Diagrama de arquitetura */
.arch { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; box-shadow: 0 40px 80px -40px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.02) inset; }
.arch-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .78rem; color: var(--muted); font-family: var(--f-mono); }
.live { display: inline-flex; align-items: center; gap: 7px; color: var(--ok); text-transform: uppercase; letter-spacing: .12em; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.arch svg { width: 100%; height: auto; display: block; }
.arch .lbl { font-family: var(--f-mono); font-size: 11px; fill: var(--muted); }
.arch .lbl-strong { font-family: var(--f-body); font-weight: 600; font-size: 13px; fill: var(--fg); }
.arch .box { fill: var(--surface-2); stroke: var(--line-2); stroke-width: 1; }
.arch .box-core { fill: var(--bg-2); stroke: var(--accent); }
.arch .pipe { stroke: var(--line-2); stroke-width: 1.5; fill: none; }
.arch .dot { fill: var(--accent); filter: drop-shadow(0 0 4px var(--accent)); }
.arch .st { font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.arch .st-ok { fill: var(--ok); } .arch .st-warn { fill: var(--warn); }
.arch .node.is-down .box { stroke: var(--warn); stroke-dasharray: 4 3; }
.arch .node.is-down .lbl-strong { fill: var(--muted); }
.arch .node.is-down .ring { stroke: var(--warn); opacity: 1; }
.arch .ring { fill: none; stroke: var(--warn); stroke-width: 1; opacity: 0; }
.arch-status { font-family: var(--f-mono); font-size: .78rem; color: var(--muted); min-height: 1.4em; }
.arch-status.is-warn { color: var(--warn); }

/* Prova */
.proof { border-bottom: 1px solid var(--line); background: var(--bg-2); }
.proof .wrap { padding-block: 44px; display: flex; flex-direction: column; gap: 22px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 4px 24px; border-left: 1px solid var(--line-2); min-width: 0; }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat .num { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.7rem, 3.2vw, 2.5rem); color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat p { color: var(--muted); font-size: .95rem; }
.proof-line { color: var(--muted); font-size: .98rem; }
.proof-line strong { color: var(--fg); font-weight: 600; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; } .stat:nth-child(3) { border-left: 0; padding-left: 0; } }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr; } .stat { border-left: 0; padding-left: 0; } }

/* Seções */
section { scroll-margin-top: 80px; }
.band { padding-block: 92px; }
.band + .band { border-top: 1px solid var(--line); }
.band-alt { background: var(--bg-2); }
.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 44px; max-width: 780px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1101px) { #para-quem .grid-4 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; } #para-quem .who { padding: 20px 18px; } }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .grid-4 { grid-template-columns: 1fr; } }

.who { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); min-width: 0; transition: border-color .2s ease, transform .2s ease; }
.who:hover { border-color: var(--accent); transform: translateY(-2px); }
.who .mono { font-size: .72rem; color: var(--accent); text-transform: uppercase; letter-spacing: .12em; }
.who p { color: var(--muted); font-size: .97rem; }

/* Diferenciais: 3 visuais grandes + 3 curtos */
.feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 960px) { .feats { grid-template-columns: 1fr; } }
.feat { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); min-width: 0; }
.feat .viz { border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); padding: 14px; min-height: 150px; display: grid; place-items: center; }
.feat .viz svg { width: 100%; height: auto; max-width: 300px; }
.feat p { color: var(--muted); font-size: .97rem; }
.feats-small { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
@media (max-width: 960px) { .feats-small { grid-template-columns: 1fr; } }
.feat-s { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: 12px; border: 1px solid var(--line); min-width: 0; }
.feat-s svg { width: 26px; height: 26px; color: var(--accent); flex: none; margin-top: 2px; }
.feat-s p { color: var(--muted); font-size: .95rem; }
.feat-s b { display: block; color: var(--fg); font-weight: 600; margin-bottom: 2px; }

/* Painel de campanha (sistema) */
.tool { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .tool { grid-template-columns: 1fr; } }
.board { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; box-shadow: 0 30px 70px -40px rgba(0,0,0,.7); }
.board-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .78rem; color: var(--muted); font-family: var(--f-mono); }
.lane { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid transparent; transition: border-color .3s ease; }
.lane.is-warn { border-color: var(--warn); }
.lane-id { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; min-width: 0; }
.lane-id b { font-weight: 600; font-size: .95rem; }
.q { font-family: var(--f-mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; }
.q-ok { color: var(--ok); } .q-warn { color: var(--warn); }
.count { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-size: .9rem; text-align: right; }
.tpls { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.tpl { font-family: var(--f-mono); font-size: .68rem; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); transition: all .18s ease; }
.tpl.hit { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 0 10px var(--glow); }
.lane.is-warn .tpl { opacity: .4; }
.board-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.board-foot strong { color: var(--fg); font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-weight: 500; }
.status { min-height: 1.4em; font-size: .8rem; color: var(--muted); font-family: var(--f-mono); }
.status.is-warn { color: var(--warn); }
.tool-list { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tool-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: .97rem; }
.tool-list li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); margin-top: 9px; box-shadow: 0 0 8px var(--accent-2); }
.tool-list b { color: var(--fg); font-weight: 600; }

/* Comparação */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
thead th { font-family: var(--f-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); background: var(--surface-2); font-weight: 500; }
thead th.own { color: var(--accent); }
td:first-child { color: var(--muted); width: 26%; }
td.own { font-weight: 500; }
td .mark { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.m-ok { background: var(--ok); box-shadow: 0 0 6px var(--ok); } .m-bad { background: var(--bad); } .m-warn { background: var(--warn); }

/* Calculadora */
.calc { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }
.calc-in { padding: 30px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.calc-out { padding: 30px; background: var(--surface-2); display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field label { font-weight: 500; }
.field output, .val { font-family: var(--f-mono); font-variant-numeric: tabular-nums; color: var(--accent); }
.field small { color: var(--muted); font-size: .85rem; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
input[type="text"], select, textarea { width: 100%; font: inherit; color: var(--fg); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 13px; }
.out-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; border-bottom: 1px dashed var(--line-2); padding-bottom: 12px; }
.out-row span:first-child { color: var(--muted); }
.out-row .val { color: var(--fg); font-size: 1.05rem; }
.payback .big { font-family: var(--f-display); font-size: clamp(2rem, 4vw, 2.9rem); color: var(--accent); font-variant-numeric: tabular-nums; text-shadow: 0 0 30px var(--glow); }
.note { color: var(--muted); font-size: .84rem; }

/* Processo */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; counter-reset: s; position: relative; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, var(--accent), var(--accent-2), transparent); }
.steps li { counter-increment: s; display: flex; flex-direction: column; gap: 10px; padding-top: 20px; min-width: 0; }
.steps li::before { content: "0" counter(s); font-family: var(--f-mono); font-size: .8rem; color: var(--accent); }
.steps p { color: var(--muted); font-size: .95rem; }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Resgate */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.checks .q { flex: none; margin-top: 3px; }

/* FAQ */
.faq { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; padding: 22px 0; display: flex; justify-content: space-between; gap: 16px; font-weight: 600; font-size: 1.05rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--f-mono); color: var(--accent); font-size: 1.2rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); padding-bottom: 22px; max-width: 70ch; }

/* Contato */
form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
form .full { grid-column: 1 / -1; }
@media (max-width: 560px) { form { grid-template-columns: 1fr; } }
form label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: .95rem; }
.form-msg { color: var(--muted); font-size: .9rem; }

/* Artigo (páginas internas) */
.article { padding-block: 64px 92px; }
.article .wrap { max-width: 820px; display: flex; flex-direction: column; gap: 28px; }
.article h2 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); margin-top: 18px; }
.article p, .article li { color: var(--muted); }
.article ul, .article ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.article strong { color: var(--fg); }
.crumbs { font-family: var(--f-mono); font-size: .78rem; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.cta-box { margin-top: 12px; padding: 28px; border-radius: 16px; border: 1px solid var(--accent); background: var(--surface); display: flex; flex-direction: column; gap: 14px; box-shadow: 0 0 60px -30px var(--accent); }
.related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .related { grid-template-columns: 1fr; } }
.related a { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--fg); background: var(--surface); }
.related a:hover { border-color: var(--accent); }
.related span { color: var(--muted); font-size: .9rem; }

/* Rodapé */
footer { border-top: 1px solid var(--line); padding-block: 40px; color: var(--muted); font-size: .92rem; background: var(--bg-2); }
footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { footer .wrap { grid-template-columns: 1fr; } }
footer h3 { font-family: var(--f-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: 10px; }
footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--fg); }
.foot-note { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 18px; font-size: .84rem; }

