/* Landing do FlowOps (v112). Mesmos tokens e componentes do painel admin (admin-panel/styles.css):
   cores, fonte do sistema, raios 8/12, painel com cabecalho, selos em pilula, KPI e o bloco
   verde-escuro da tela de login. Tema escuro em [data-theme="dark"]. */
:root {
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg: #f2f5f4;
  --surface: #ffffff;
  --surface-2: #f6f8f8;
  --surface-3: #edf1f0;
  --ink: #13201e;
  --text: #33413f;
  --muted: #5d6c69;
  --line: #dde4e2;
  --line-strong: #c5d0cd;
  --brand: #12806f;
  --brand-hover: #0e6b5d;
  --brand-ink: #ffffff;
  --brand-soft: #e2f3ef;
  --accent: #0b8f83;
  --focus: #0b8f83;
  --link: #0f7466;
  --shadow: 0 1px 2px rgb(19 32 30 / 6%), 0 8px 24px rgb(19 32 30 / 5%);
  --shadow-pop: 0 18px 48px rgb(8 24 22 / 22%);
  --deep-bg: radial-gradient(120% 90% at 0% 0%, #13434a 0%, #0d2b2e 55%, #0a2022 100%);
  --deep-ink: #f2faf8;
  --deep-text: #dbe9e6;
  --deep-muted: #a9c7c2;
  --deep-teal: #5fd8c9;
  --deep-line: rgb(255 255 255 / 12%);
  --success-bg: #e2f5e9; --success-ink: #13663a;
  --info-bg: #e3edf9; --info-ink: #1b5292;
  --neutral-bg: #edf0f0; --neutral-ink: #475654;
  --screen-bg: #0b0f0f;
  --radius-lg: 12px;
  --radius: 8px;
  --radius-sm: 6px;
  /* nomes antigos ainda usados pelos dialogos */
  --paper: var(--bg);
  --card: var(--surface);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0e1517;
  --surface: #152023;
  --surface-2: #1a272b;
  --surface-3: #213135;
  --ink: #eef5f3;
  --text: #c8d5d2;
  --muted: #94a7a3;
  --line: #29393d;
  --line-strong: #3b4e53;
  --brand: #2bb5a6;
  --brand-hover: #43c9b9;
  --brand-ink: #052320;
  --brand-soft: rgb(43 181 166 / 14%);
  --accent: #2bb5a6;
  --focus: #5fd8c9;
  --link: #6fdccd;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%);
  --shadow-pop: 0 18px 48px rgb(0 0 0 / 50%);
  --success-bg: #12341f; --success-ink: #8fe0b0;
  --info-bg: #132b46; --info-ink: #9ec6f6;
  --neutral-bg: #223236; --neutral-ink: #b6c4c1;
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; color: var(--ink); line-height: 1.25; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wrap { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.muted { color: var(--muted); }
h2 { font-size: clamp(24px, 2.6vw, 30px); font-weight: 650; letter-spacing: -0.5px; }
h3 { font-size: 16px; font-weight: 650; }
.label { font-size: 13px; font-weight: 600; color: var(--muted); }
.lead { font-size: 16px; }
.section { padding: 64px 0; }
.section-head { display: grid; gap: 8px; max-width: 62ch; margin-bottom: 28px; }
.section-head p:last-child { font-size: 15px; }
.band { background: var(--surface); border-block: 1px solid var(--line); }

/* --------------------------------------------------------------- buttons */
.btn, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 0 14px; border: 1px solid transparent; border-radius: var(--radius);
  background: var(--brand); color: var(--brand-ink);
  font-weight: 650; font-size: 14px; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn:hover:not(:disabled), .button:hover:not(:disabled) { background: var(--brand-hover); }
.btn:disabled, .button:disabled { cursor: not-allowed; opacity: 0.6; }
.btn.alt, .btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn.alt:hover:not(:disabled), .btn-secondary:hover:not(:disabled) { background: var(--surface-3); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover:not(:disabled) { background: var(--surface-3); }
.btn.inverse { background: transparent; color: var(--deep-ink); border-color: var(--deep-line); }
.btn.inverse:hover:not(:disabled) { background: rgb(255 255 255 / 8%); }
.btn-lg { min-height: 44px; padding: 0 18px; font-size: 15px; }
.full { width: 100%; }
/* botao secundario dos dialogos (o teste de contraste confere estas cores no tema claro) */
.button.secondary { color: #10242b; background: #fff; border-color: var(--line-strong); }
.button.secondary:hover:not(:disabled) { background: var(--surface-3); }
[data-theme="dark"] .button.secondary { color: var(--ink); background: var(--surface-3); }
.text-link { color: var(--text); font-weight: 600; font-size: 14px; }
.text-link:hover { color: var(--ink); }
.text-link[type="button"] { padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; }

/* ------------------------------------------------------------------ brand */
.brand-logo { display: inline-flex; align-items: center; gap: 10px; color: inherit; min-width: 0; }
.brand-mark {
  display: inline-grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 9px;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 18px; letter-spacing: -0.5px;
}
.brand-word { font-size: 19px; font-weight: 750; letter-spacing: -0.4px; color: var(--ink); }
.brand-word span { color: var(--accent); }

/* ----------------------------------------------------------------- topbar */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.nav-links { display: flex; align-items: center; gap: 22px; margin-right: auto; font-size: 14px; font-weight: 550; color: var(--text); }
.nav-links a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.theme-switch { min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.theme-switch:hover { background: var(--surface-3); }
.menu-button { display: none; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: 18px; cursor: pointer; }

/* ------------------------------------------------------------------ panel */
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h3 { font-size: 16px; }
.panel-head p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.panel-body { padding: 18px; }
.panel-foot { padding: 12px 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.tone-success { background: var(--success-bg); color: var(--success-ink); }
.tone-info { background: var(--info-bg); color: var(--info-ink); }
.tone-neutral { background: var(--neutral-bg); color: var(--neutral-ink); }
.tone-brand { background: var(--brand-soft); color: var(--link); }

/* bloco verde-escuro: o mesmo da tela de login do admin */
.deep { background: var(--deep-bg); color: var(--deep-text); border-radius: var(--radius-lg); }
.deep h1, .deep h2 { color: var(--deep-ink); }
.deep .label { color: var(--deep-muted); }
.deep .lead { color: var(--deep-muted); }
.points { display: grid; gap: 10px; font-size: 15px; }
.points li { display: flex; align-items: center; gap: 10px; }
.points li::before { content: ""; flex: 0 0 18px; width: 18px; height: 2px; border-radius: 2px; background: var(--deep-teal); }
.copy .points li::before { background: var(--brand); }

/* ------------------------------------------------------------------- hero */
.hero { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 20px; align-items: stretch; padding: 28px 0 0; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: clamp(28px, 4vw, 48px); }
.hero h1 { font-size: clamp(32px, 3.6vw, 46px); font-weight: 650; letter-spacing: -0.8px; line-height: 1.12; max-width: 16ch; }
.hero .lead { max-width: 44ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.trust { color: var(--deep-muted); }

/* tela do produto dentro de um painel */
.screen { display: flex; flex-direction: column; margin: 0; overflow: hidden; }
.screen .panel-head { padding: 12px 16px; }
.screen-preview { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--screen-bg); cursor: zoom-in; flex: 1 1 auto; }
.screen-preview:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.screen img { display: block; width: 100%; height: 100%; aspect-ratio: 1264 / 712; object-fit: cover; background: var(--screen-bg); }
.zoom-hint { position: absolute; right: 12px; bottom: 12px; padding: 4px 9px; border-radius: 999px; background: rgb(5 15 16 / 82%); color: #fff; font-size: 12px; font-weight: 650; }
.screen figcaption { padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ----------------------------------------------------------------- strip */
.value-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 20px; }
.value-strip article { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 4px 12px; padding: 16px 18px; border-right: 1px solid var(--line); }
.value-strip article:last-child { border-right: 0; }
.value-strip .icon-box { grid-row: 1 / 3; }
.value-strip strong { font-size: 14px; color: var(--ink); }
.value-strip span { font-size: 13px; color: var(--muted); }
.icon-box { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--brand-soft); color: var(--link); }

/* --------------------------------------------------------------- recursos */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature-grid .panel-head { justify-content: flex-start; }
.feature-grid .panel-body p { font-size: 14px; }

/* ---------------------------------------------------------------- produto */
.product-grid { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: 40px; align-items: center; }
.product-grid.reverse { grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr); }
.product-grid.reverse .copy { order: 2; }
.copy { display: grid; gap: 14px; }
.copy .points { margin-top: 6px; font-size: 14px; color: var(--text); }

/* --------------------------------------------------------------- workflow */
.steps { display: grid; }
.steps li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 12px; align-items: baseline; padding: 14px 18px; }
.steps li + li { border-top: 1px solid var(--line); }
.steps .kind { font-size: 12px; font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; }
.steps strong { display: block; font-size: 15px; color: var(--ink); }
.steps span { font-size: 14px; color: var(--muted); }

/* ------------------------------------------------------------ casos de uso */
.use-case-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.use-case-card { display: grid; align-content: start; gap: 12px; padding: 18px; }
.use-case-card h3 { font-size: 18px; letter-spacing: -0.2px; }
.use-case-card p { font-size: 14px; }

/* ----------------------------------------------------------------- planos */
.plans-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-top: 3px solid var(--line-strong); }
.plan-card.featured { border-color: var(--brand); border-top-color: var(--brand); }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-head h3 { font-size: 18px; }
.plan-description { min-height: 3.2em; font-size: 14px; color: var(--muted); }
.plan-price { display: flex; align-items: baseline; gap: 4px; }
.plan-price strong { font-size: 28px; font-weight: 750; letter-spacing: -0.5px; color: var(--ink); font-variant-numeric: tabular-nums; }
.plan-price small { font-size: 13px; color: var(--muted); }
.plan-card ul { flex: 1 1 auto; display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text); }
.plan-card li { display: flex; align-items: flex-start; gap: 10px; }
.plan-card li::before { content: ""; flex: 0 0 18px; width: 18px; height: 2px; margin-top: 10px; border-radius: 2px; background: var(--brand); }
.plan-cta{ margin-top: auto; }
.plan-card:not(.featured) .plan-cta { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.plan-card:not(.featured) .plan-cta:hover:not(:disabled) { background: var(--surface-3); }
.loading-state { grid-column: 1 / -1; display: grid; justify-items: center; gap: 10px; padding: 36px 20px; text-align: center; color: var(--muted); font-size: 14px; }

/* -------------------------------------------------------------------- faq */
.faq { max-width: 860px; }
.faq details + details { border-top: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; cursor: pointer; list-style: none; font-size: 15px; font-weight: 600; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: 0 0 auto; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--muted); font-size: 16px; font-weight: 600; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 18px 16px; font-size: 14px; color: var(--muted); max-width: 70ch; }

/* ------------------------------------------------------------------ final */
.final { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: clamp(28px, 4vw, 44px); margin: 0 auto 64px; }
.final h2 { max-width: 24ch; }
.final p { margin-top: 8px; max-width: 48ch; }

/* ----------------------------------------------------------------- footer */
footer { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; width: min(1160px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 56px; border-top: 1px solid var(--line); }
footer > div { display: grid; align-content: start; gap: 8px; }
footer strong { font-size: 13px; color: var(--ink); }
footer a, footer p, footer .text-link { font-size: 13px; color: var(--muted); font-weight: 500; }
footer a:hover, footer .text-link:hover { color: var(--ink); }
footer small { grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

/* --------------------------------------------------------------- dialogos */
dialog { width: min(640px, calc(100% - 28px)); padding: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); }
dialog::backdrop { background: rgb(5 15 16 / 60%); }
dialog form, .success-content { display: grid; gap: 14px; padding: 24px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dialog-head h2 { font-size: 22px; letter-spacing: -0.3px; margin-top: 4px; }
.dialog-head button { width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.dialog-head button:hover { background: var(--surface-3); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.form-grid input { width: 100%; min-height: 38px; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 400; }
.form-grid input:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.terms-check { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--muted); }
.terms-check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--brand); }
.terms-check a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.selected-plan { font-size: 13px; font-weight: 650; color: var(--link); }
.form-message { min-height: 20px; font-size: 13px; color: var(--muted); }
.success-content h2 { font-size: 22px; }
#successActions { display: flex; flex-wrap: wrap; gap: 10px; }
.image-dialog { width: min(1120px, calc(100% - 28px)); }
.image-dialog .dialog-head { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.image-dialog .dialog-head strong { color: var(--ink); font-size: 14px; }
.image-dialog img { display: block; width: 100%; height: auto; background: var(--screen-bg); }

/* -------------------------------------------------------------- utilidades */
.top { position: fixed; right: 16px; bottom: 16px; z-index: 20; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity 180ms ease, transform 180ms ease, visibility 180ms; }
.top.show { opacity: 1; visibility: visible; transform: none; }

/* ------------------------------------------------------------- responsivo */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
  .value-strip, .feature-grid, .plans-grid, .use-case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .value-strip article:nth-child(2n) { border-right: 0; }
  .value-strip article:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .product-grid, .product-grid.reverse { grid-template-columns: 1fr; gap: 24px; }
  .product-grid.reverse .copy { order: 0; }
  .final { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav-links { display: none; position: absolute; top: calc(100% + 8px); left: 16px; right: 16px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-pop); }
  .nav-links.open { display: grid; gap: 2px; }
  .nav-links a { padding: 10px 12px; border-radius: var(--radius); }
  .nav-links a:hover { background: var(--surface-3); }
  .menu-button { display: inline-grid; place-items: center; }
  .header-actions .text-link { display: none; }
  .topbar-inner { position: relative; gap: 12px; }
  .brand-logo { margin-right: auto; }
  .form-grid { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr 1fr; }
  .section { padding: 48px 0; }
}
@media (max-width: 700px) {
  .value-strip, .feature-grid, .plans-grid, .use-case-grid { grid-template-columns: 1fr; }
  .value-strip article { border-right: 0; border-bottom: 1px solid var(--line); }
  .value-strip article:last-child { border-bottom: 0; }
  .steps li { grid-template-columns: 1fr; gap: 2px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .final .btn { width: 100%; }
}
@media (max-width: 560px) {
  .wrap, footer { width: min(100% - 32px, 1160px); }
  .header-actions > .btn { display: none; }
  footer { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .button, .top { transition: none; }
}
