:root {
  /* Identidade TechM2 IT — claro, marinho + laranja-cenoura */
  --bg: #f5f7fb;
  --bg-soft: #eef1f8;
  --card: #ffffff;
  --card-2: #f4f6fb;
  --line: #e4e9f2;
  --line-soft: #edf0f6;
  --ink: #0e1430;        /* títulos (marinho profundo) */
  --text: #1b2347;       /* corpo */
  --muted: #5f6c88;
  --muted-2: #95a0b8;
  --navy: #101840;
  --navy-2: #0d141a;
  --brand: #fb8b1e;      /* laranja-cenoura */
  --brand-2: #fd7a16;
  --brand-deep: #e9700a;
  --carrot-green: #46b955;
  --green: #12a067;
  --red: #e0394c;
  --amber: #d98600;
  --gold: #f0b429;
  --grad: linear-gradient(135deg, #ffb020 0%, #fb7e16 100%);
  --grad-2: linear-gradient(135deg, #fda01a, #fb7414);
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 16px 44px rgba(16,24,64,.10);
  --shadow-sm: 0 4px 16px rgba(16,24,64,.06);
  --shadow-glow: 0 10px 26px rgba(251,124,20,.32);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 22px; }
a { color: var(--brand-deep); }
h1, h2, h3, h4 { letter-spacing: -.02em; color: var(--ink); }

.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(700px 460px at 12% -8%, rgba(251,124,20,.10), transparent 60%),
    radial-gradient(680px 460px at 92% -2%, rgba(16,24,64,.06), transparent 55%),
    radial-gradient(600px 480px at 50% 108%, rgba(251,124,20,.07), transparent 60%);
}

/* topbar */
.topbar { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); background: rgba(245,247,251,.8); backdrop-filter: blur(14px); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--navy); box-shadow: var(--shadow-sm); }
.brand-mark svg { width: 26px; height: 26px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 18px; font-weight: 800; }
.brand-name strong { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-by { font-size: 11px; font-weight: 600; color: var(--muted-2); letter-spacing: .02em; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.plan-badge { font-size: 12px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-weight: 600; background: #fff; }
.plan-badge.premium { color: #43320a; background: linear-gradient(135deg, var(--gold), #ffe08a); border-color: transparent; }

/* buttons */
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 0; cursor: pointer;
  background: var(--grad-2); color: #fff; font-weight: 700; font-size: 15px; font-family: inherit;
  padding: 14px 24px; border-radius: 13px; box-shadow: var(--shadow-glow); transition: transform .08s, filter .2s, box-shadow .2s; }
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 14px 36px rgba(251,124,20,.42); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .65; cursor: default; }
.btn-primary.block, .btn-ghost.block { width: 100%; }
.btn-primary.lg { padding: 17px 34px; font-size: 17px; border-radius: 15px; }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); padding: 9px 16px; border-radius: 11px; cursor: pointer; font-size: 13px; font-weight: 600; font-family: inherit; transition: border-color .2s, background .2s; }
.btn-ghost:hover { border-color: var(--brand); background: rgba(251,124,20,.06); }

/* hero */
.hero { padding: 64px 0 30px; text-align: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--brand-deep);
  background: rgba(251,124,20,.1); border: 1px solid rgba(251,124,20,.26); padding: 7px 14px; border-radius: 999px; margin-bottom: 22px; }
.hero h1 { font-size: clamp(32px, 6vw, 56px); line-height: 1.08; margin: 0 0 18px; font-weight: 800; }
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .sub { color: var(--muted); max-width: 620px; margin: 0 auto 34px; font-size: 17.5px; }
.hero .sub strong { color: var(--text); font-weight: 700; }

.search { display: flex; gap: 11px; max-width: 620px; margin: 0 auto; }
.input-wrap { position: relative; flex: 1; }
.input-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted-2); display: grid; }
#cnpjInput { width: 100%; height: 58px; padding: 0 18px 0 48px; font-size: 18px; letter-spacing: .4px; font-family: inherit;
  background: #fff; border: 1px solid var(--line); color: var(--ink); border-radius: 14px; outline: none; box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s; }
#cnpjInput::placeholder { color: var(--muted-2); }
#cnpjInput:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(251,124,20,.15); }
.btn-primary .spinner { width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.examples { margin: 20px auto 0; color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.ex-label { color: var(--muted-2); }
.chip { background: #fff; border: 1px solid var(--line); color: var(--text); padding: 6px 13px; border-radius: 999px; cursor: pointer; font-size: 12.5px; font-weight: 600; font-family: inherit; box-shadow: var(--shadow-sm); transition: border-color .2s, transform .08s; }
.chip:hover { border-color: var(--brand); transform: translateY(-1px); }
.recent { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.form-error { color: var(--red); margin-top: 14px; font-size: 14px; font-weight: 600; }

.trust { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin-top: 30px; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.trust span { display: inline-flex; align-items: center; gap: 7px; }
.trust svg { color: var(--green); }

/* result */
.result { margin: 14px 0 40px; display: grid; gap: 18px; animation: rise .4s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 24px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.head-left { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.avatar { flex-shrink: 0; width: 52px; height: 52px; border-radius: 14px; background: var(--grad-2); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 19px; box-shadow: var(--shadow-glow); }
.headline { min-width: 0; }
.headline h2 { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.headline .fantasia { color: var(--muted); font-size: 14px; }
.cnpj-num { font-family: ui-monospace, Menlo, monospace; color: var(--brand-deep); font-size: 13px; margin-top: 7px; font-weight: 600; }
.status-pill { font-size: 13px; font-weight: 700; padding: 7px 14px; border-radius: 999px; white-space: nowrap; }
.status-ativa { background: rgba(18,160,103,.12); color: var(--green); }
.status-inativa { background: rgba(224,57,76,.12); color: var(--red); }
.status-outra { background: rgba(217,134,0,.14); color: var(--amber); }

.metabar { display: flex; gap: 12px; flex-wrap: wrap; padding: 16px 24px; background: var(--bg-soft); border-bottom: 1px solid var(--line-soft); align-items: center; }
.metabar .meter { flex: 1; min-width: 180px; }
.meter-track { height: 8px; background: #e1e6f0; border-radius: 999px; overflow: hidden; }
.meter-fill { height: 100%; background: var(--grad); border-radius: 999px; transition: width .6s ease; }
.meter-label { font-size: 12px; color: var(--muted); margin-top: 6px; }
.metabar .tools { display: flex; gap: 8px; flex-wrap: wrap; }
.tool-btn { background: #fff; border: 1px solid var(--line); color: var(--text); padding: 8px 13px; border-radius: 10px; font-size: 12.5px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; font-family: inherit; font-weight: 600; transition: border-color .2s; }
.tool-btn:hover { border-color: var(--brand); }

.summary { padding: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px 24px; }
.field { min-width: 0; }
.field .k { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted-2); margin-bottom: 4px; font-weight: 700; }
.field .v { font-size: 15px; word-break: break-word; color: var(--text); }
.field.full { grid-column: 1 / -1; }

.locked { display: inline-flex; align-items: center; gap: 7px; background: rgba(251,124,20,.09); border: 1px dashed rgba(251,124,20,.45); color: var(--brand-deep); padding: 5px 11px; border-radius: 9px; font-size: 13px; cursor: pointer; font-weight: 700; transition: background .2s; }
.locked:hover { background: rgba(251,124,20,.16); }
.locked svg { width: 14px; height: 14px; }

.section-title { display: flex; align-items: center; gap: 8px; padding: 20px 24px 0; font-size: 12px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted-2); font-weight: 700; }

.tree { padding: 10px 24px 24px; }
.node { border-left: 2px solid var(--line); margin-left: 5px; padding-left: 15px; }
.node-row { display: flex; gap: 10px; padding: 6px 0; align-items: baseline; flex-wrap: wrap; }
.node-key { color: #2b3566; font-size: 13px; min-width: 190px; font-weight: 700; }
.node-val { color: var(--text); font-size: 14px; word-break: break-word; }
.node-val .badge-bool { padding: 1px 9px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.bool-true { background: rgba(18,160,103,.14); color: var(--green); }
.bool-false { background: rgba(224,57,76,.14); color: var(--red); }
.node-val .null { color: var(--muted-2); font-style: italic; }
.collapsible > .node-key { cursor: pointer; user-select: none; }
.collapsible > .node-key::before { content: "▾ "; color: var(--muted-2); }
.collapsible.collapsed > .node-key::before { content: "▸ "; }
.collapsible.collapsed > .node { display: none; }
.arr-count { color: var(--muted-2); font-weight: 500; font-size: 12px; }

.obj-table-wrap { overflow-x: auto; margin: 8px 0; border: 1px solid var(--line); border-radius: 10px; }
table.obj-table { border-collapse: collapse; width: 100%; font-size: 13px; }
table.obj-table th, table.obj-table td { border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); padding: 8px 11px; text-align: left; white-space: nowrap; }
table.obj-table th { background: var(--bg-soft); color: var(--muted); font-weight: 700; }
table.obj-table tr:last-child td { border-bottom: 0; }
table.obj-table tr:nth-child(even) td { background: #fafbfd; }

.raw { padding: 0 24px 24px; }
.raw pre { background: #0e1430; border: 1px solid #1b2347; border-radius: 12px; padding: 18px; overflow: auto; max-height: 460px; font-size: 12px; color: #cdd6ef; }

.skeleton { background: linear-gradient(90deg, #eef1f7 25%, #e3e8f1 37%, #eef1f7 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.sk-line { height: 14px; margin: 10px 0; }

/* ===== landing ===== */
#landing { animation: rise .5s ease; }
.sec-title { text-align: center; font-size: clamp(24px, 3.5vw, 32px); font-weight: 800; margin: 0 0 10px; }
.sec-sub { text-align: center; color: var(--muted); margin: 0 auto 36px; max-width: 540px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 30px 0 70px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 16px; text-align: center; box-shadow: var(--shadow-sm); }
.stat-num { font-size: 30px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-lbl { color: var(--muted); font-size: 13px; margin-top: 4px; }

.features { margin: 0 0 80px; }
.features .sec-title { margin-bottom: 38px; }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); transition: transform .18s, border-color .18s, box-shadow .18s; }
.feat:hover { transform: translateY(-4px); border-color: rgba(251,124,20,.4); box-shadow: var(--shadow); }
.feat-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: rgba(251,124,20,.12); color: var(--brand-deep); margin-bottom: 16px; }
.feat-ic svg { width: 24px; height: 24px; }
.feat h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.feat p { margin: 0; color: var(--muted); font-size: 14px; }

.how { margin: 0 0 80px; }
.how .sec-title { margin-bottom: 38px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { text-align: center; padding: 10px; }
.step-n { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--grad-2); color: #fff; font-weight: 800; font-size: 19px; margin-bottom: 14px; box-shadow: var(--shadow-glow); }
.step h4 { margin: 0 0 6px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

.pricing { margin: 0 0 80px; }
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 760px; margin: 0 auto; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; position: relative; box-shadow: var(--shadow-sm); }
.plan.featured { border-color: transparent; background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; border: 2px solid transparent; box-shadow: var(--shadow-glow); }
.plan-tag { position: absolute; top: -12px; right: 24px; background: var(--grad-2); color: #fff; font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.plan-name { font-size: 15px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.plan-price { margin: 12px 0 20px; }
.plan-price .amount { font-size: 42px; font-weight: 800; color: var(--ink); }
.plan-price .per { color: var(--muted); font-size: 15px; }
.plan-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 11px; }
.plan-list li { padding-left: 28px; position: relative; font-size: 14.5px; }
.plan-list li.yes::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.plan-list li.no { color: var(--muted-2); }
.plan-list li.no::before { content: "✕"; position: absolute; left: 0; color: var(--muted-2); }

.faq { margin: 0 auto 80px; max-width: 720px; }
.faq .sec-title { margin-bottom: 30px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 13px; margin-bottom: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; padding: 18px 22px; font-weight: 700; font-size: 15px; list-style: none; display: flex; justify-content: space-between; align-items: center; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand-deep); font-size: 22px; font-weight: 400; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 22px 20px; color: var(--muted); font-size: 14.5px; }

.cta-final { text-align: center; padding: 56px 30px; margin: 0 0 70px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); position: relative; overflow: hidden; box-shadow: var(--shadow-sm); }
.cta-final::before { content: ""; position: absolute; inset: 0; background: radial-gradient(500px 200px at 50% 0%, rgba(251,124,20,.12), transparent 70%); }
.cta-final h2 { font-size: 28px; margin: 0 0 8px; font-weight: 800; position: relative; }
.cta-final p { color: var(--muted); margin: 0 0 26px; position: relative; }
.cta-final .btn-primary { position: relative; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(14,20,48,.55); display: grid; place-items: center; z-index: 50; padding: 20px; backdrop-filter: blur(6px); animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; max-width: 430px; width: 100%; padding: 30px; position: relative; box-shadow: var(--shadow); animation: rise .25s ease; }
.modal-close { position: absolute; right: 18px; top: 14px; background: none; border: 0; color: var(--muted); font-size: 28px; cursor: pointer; line-height: 1; }
.modal-crown { width: 52px; height: 52px; border-radius: 15px; background: var(--grad-2); color: #fff; display: grid; place-items: center; font-size: 26px; margin-bottom: 16px; box-shadow: var(--shadow-glow); }
.modal-card h2 { margin: 0 0 6px; font-size: 22px; }
.modal-sub { color: var(--muted); font-size: 14.5px; margin: 0 0 16px; }
.perks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 9px; }
.perks li { padding-left: 28px; position: relative; font-size: 14.5px; }
.perks li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.price { font-size: 38px; font-weight: 800; color: var(--ink); }
.price-per { color: var(--muted); font-size: 13px; }
.key-row { display: flex; gap: 9px; }
.key-row input { flex: 1; height: 46px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 11px; color: var(--ink); padding: 0 14px; outline: none; font-family: inherit; }
.key-row input:focus { border-color: var(--brand); }
.key-msg { font-size: 13px; margin: 10px 0 0; min-height: 18px; }
.key-msg.ok { color: var(--green); }
.key-msg.err { color: var(--red); }
.modal-hint { font-size: 12px; color: var(--muted-2); margin-top: 14px; }
.modal-hint code { background: var(--bg-soft); padding: 2px 7px; border-radius: 6px; color: var(--brand-deep); font-weight: 600; }

.footer { border-top: 1px solid var(--line); padding: 36px 0 50px; margin-top: 20px; }
.foot-brand { font-weight: 800; font-size: 17px; margin-bottom: 8px; color: var(--ink); }
.foot-brand strong { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.footer p { color: var(--muted); font-size: 12.5px; max-width: 680px; }

@media (max-width: 820px) {
  .feat-grid, .steps { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .search { flex-direction: column; }
  .feat-grid, .steps, .plans { grid-template-columns: 1fr; }
  .node-key { min-width: 100%; }
  .card-head { flex-direction: column; }
  .trust { gap: 12px 18px; }
  .hero { padding: 44px 0 20px; }
}
