/* ==========================================================================
   Auto4Flow — Engenharia de Automação Operacional B2B
   Estética: SaaS Editorial & Consultoria de Engenharia (Stripe / Linear / Attio)
   Suporta dois temas sem clichês de IA:
   - Caminho B (Padrão): Dark Mode Cirúrgico (#09090B, bordas 1px sutis, zero neon)
   - Caminho A (Alternável): Modo Claro Editorial (#F8FAFC, grafite #0F172A)
   ========================================================================== */

:root,
[data-theme="dark"] {
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --bg:           #09090B;
  --bg-alt:       #0E0E12;
  --surface:      #121217;
  --surface-2:    #18181F;
  --surface-3:    #1F1F29;
  --header-bg:    rgba(9, 9, 11, 0.82);

  --text:         #FAFAFA;
  --text-secondary:#A1A1AA;
  --text-muted:   #71717A;

  --border:       rgba(255, 255, 255, 0.08);
  --border-strong:rgba(255, 255, 255, 0.15);

  /* Botões sólidos de alto contraste sem box-shadow neon */
  --btn-primary-bg:   #FAFAFA;
  --btn-primary-text: #09090B;
  --btn-primary-hover:#E4E4E7;

  /* Acento técnico sóbrio (azul engenharia + verde status operacional) */
  --accent:       #3B82F6;
  --accent-soft:  rgba(59, 130, 246, 0.12);
  --accent-border:rgba(59, 130, 246, 0.32);

  --status-ok:    #10B981;
  --status-ok-bg: rgba(16, 185, 129, 0.11);
  --status-warn:  #F59E0B;
  --status-bad:   #EF4444;
  --status-bad-bg:rgba(239, 68, 68, 0.11);

  --logo-filter:  none;
  --shadow-card:  0 12px 32px -8px rgba(0, 0, 0, 0.5);
  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    16px;
  --container:    1200px;
}

/* Caminho A — Modo Claro Editorial (#F8FAFC / #0F172A) */
[data-theme="light"] {
  --bg:           #F8FAFC;
  --bg-alt:       #F1F5F9;
  --surface:      #FFFFFF;
  --surface-2:    #F8FAFC;
  --surface-3:    #E2E8F0;
  --header-bg:    rgba(248, 250, 252, 0.86);

  --text:         #0F172A;
  --text-secondary:#475569;
  --text-muted:   #64748B;

  --border:       rgba(15, 23, 42, 0.09);
  --border-strong:rgba(15, 23, 42, 0.18);

  --btn-primary-bg:   #0F172A;
  --btn-primary-text: #FFFFFF;
  --btn-primary-hover:#1E293B;

  --accent:       #2563EB;
  --accent-soft:  rgba(37, 99, 235, 0.08);
  --accent-border:rgba(37, 99, 235, 0.25);

  --status-ok:    #059669;
  --status-ok-bg: rgba(5, 150, 105, 0.1);
  --status-bad:   #DC2626;
  --status-bad-bg:rgba(220, 38, 38, 0.08);

  --logo-filter:  brightness(0.15) contrast(1.2);
  --shadow-card:  0 10px 30px -10px rgba(15, 23, 42, 0.08);
}

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input {
  font-family: inherit;
}

/* ── TIPOGRAFIA EDITORIAL (Com respiro adequado) ────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1.15;
  font-weight: 700;
}

p {
  color: var(--text-secondary);
}

.mono-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  padding: 6px 12px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.mono-tag-sm {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--status-ok);
  display: inline-block;
  flex-shrink: 0;
}

/* ── BOTÕES SÓLIDOS (Sem neon / Sem brilho difuso) ───────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-sm {
  padding: 9px 16px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 14px 24px;
  font-size: 0.95rem;
}

.btn-primary {
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}

.btn-primary:hover {
  background-color: var(--btn-primary-hover);
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background-color: var(--surface-2);
  border-color: var(--text-muted);
}

/* ── HEADER FIXO COM BLUR(12PX) E 4+ LINKS DIRETOS ──────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 72px;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  filter: var(--logo-filter);
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  border-left: 1px solid var(--border-strong);
  padding-left: 12px;
  letter-spacing: 0.05em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }

.mobile-menu-btn {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ── HERO SECTION (2 COLUNAS + DEMO + ECOSSISTEMA) ──────── */
.hero-section {
  padding-top: 132px;
  padding-bottom: 72px;
  border-bottom: 1px solid var(--border);
}

.hero-grid-layout {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 48px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.25rem, 4.1vw, 3.45rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-lead {
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 560px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.hero-meta-item svg {
  color: var(--status-ok);
  flex-shrink: 0;
}

/* ── MOCKUP DE JANELA (HERO & SOLUÇÕES) ──────────────────── */
.window-frame {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.window-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

.window-address {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.window-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--status-ok);
  white-space: nowrap;
}

.pulse-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-ok);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.window-body {
  position: relative;
  padding: 18px;
}

/* Quando um arquivo .webm/.mp4 real é carregado, ele aparece; caso contrário fica oculto e exibe a simulação ao vivo */
.native-video-slot {
  display: none;
  width: 100%;
  border-radius: var(--radius-sm);
  background: #000;
}

.native-video-slot[data-video-ready="true"] {
  display: block;
}

.flow-timeline-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.flow-step-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.flow-step-pill.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--text);
}

.step-idx {
  font-weight: 600;
  color: var(--accent);
}

.flow-scene {
  display: none;
  min-height: 270px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.flow-scene.active {
  display: block;
  animation: fadeInScene 0.25s ease;
}

@keyframes fadeInScene {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.scene-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
}

.scene-app-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
}

.badge-whatsapp {
  background: var(--status-ok-bg);
  color: var(--status-ok);
}

.badge-crm {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge-calendar {
  background: rgba(245, 158, 11, 0.12);
  color: var(--status-warn);
}

.scene-latency {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.scene-latency strong {
  color: var(--text);
}

/* Simulação WhatsApp */
.wa-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wa-msg {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 92%;
}

.wa-incoming {
  background: var(--surface-2);
  border: 1px solid var(--border);
  align-self: flex-start;
}

.wa-outgoing {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  align-self: flex-end;
}

.wa-sender {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.wa-text {
  color: var(--text);
}

.wa-time {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: right;
}

/* Simulação CRM */
.crm-board-preview {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 12px;
}

.crm-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}

.crm-col.highlight {
  border-color: var(--accent-border);
}

.crm-col-title {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.crm-card-mini {
  padding: 10px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.78rem;
}

.crm-card-name {
  font-weight: 600;
  color: var(--text-secondary);
}

.crm-card-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.crm-card-featured {
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--accent-border);
}

.crm-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.crm-score {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--status-ok);
  background: var(--status-ok-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

.crm-value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.crm-card-featured h4 {
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.crm-card-featured p {
  font-size: 0.78rem;
  line-height: 1.45;
  margin-bottom: 10px;
}

.crm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crm-tags span {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

/* Simulação Google Agenda */
.calendar-preview-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cal-event-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
}

.cal-date-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  padding: 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  font-family: var(--font-mono);
}

.cal-day {
  font-size: 0.68rem;
  color: var(--accent);
}

.cal-num {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.cal-details h4 {
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.cal-details p {
  font-size: 0.78rem;
  margin-bottom: 10px;
}

.cal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cal-badge-ok {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--status-ok);
  background: var(--status-ok-bg);
  padding: 3px 8px;
  border-radius: 4px;
}

.webhook-log-line {
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.window-footer-note {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.mono-hint {
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

/* ── BARRA DE PROVA DE ECOSSISTEMA ───────────────────────── */
.ecosystem-bar {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.ecosystem-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 20px;
}

.ecosystem-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.eco-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 500;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.eco-item:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

/* ── SEÇÕES PADRÃO ───────────────────────────────────────── */
.section-block {
  padding: 96px 0;
  border-bottom: 1px solid var(--border);
}

.section-alt {
  background-color: var(--bg-alt);
}

.section-header {
  max-width: 760px;
  margin-bottom: 48px;
}

.section-title {
  font-size: clamp(1.85rem, 3.3vw, 2.65rem);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── SEÇÃO COMPARATIVO (OPERAÇÃO MANUAL VS. AUTO4FLOW) ────── */
.comparison-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.comparison-header-row {
  display: grid;
  grid-template-columns: 0.85fr 1.075fr 1.075fr;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.comparison-header-row > div {
  padding: 16px 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comp-dot-manual {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-bad);
}

.comp-dot-auto {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-ok);
}

.comparison-row {
  display: grid;
  grid-template-columns: 0.85fr 1.075fr 1.075fr;
  border-bottom: 1px solid var(--border);
}

.comparison-row:last-child {
  border-bottom: none;
}

.comp-topic,
.comp-manual,
.comp-auto {
  padding: 24px 22px;
}

.comp-topic {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  border-right: 1px solid var(--border);
}

.comp-topic strong {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text);
}

.comp-topic span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.comp-manual {
  border-right: 1px solid var(--border);
  background: rgba(239, 68, 68, 0.02);
}

.comp-auto {
  background: rgba(16, 185, 129, 0.03);
}

.comp-manual p,
.comp-auto p {
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 12px;
}

.comp-metric-bad,
.comp-metric-good {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 4px;
}

.comp-metric-bad {
  background: var(--status-bad-bg);
  color: var(--status-bad);
}

.comp-metric-good {
  background: var(--status-ok-bg);
  color: var(--status-ok);
}

/* ── SEÇÃO SOLUÇÕES (4 ABAS INTERATIVAS + PALCO DE VÍDEO) ─── */
.solutions-interactive-layout {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 32px;
  align-items: start;
}

.solutions-tabs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sol-tab-btn {
  width: 100%;
  text-align: left;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
  position: relative;
  overflow: hidden;
}

.sol-tab-btn:hover {
  border-color: var(--border-strong);
}

.sol-tab-btn.active {
  background: var(--surface-2);
  border-color: var(--accent-border);
}

.sol-tab-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.sol-tab-num {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent);
}

.sol-tab-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.sol-tab-btn h3 {
  font-size: 1.12rem;
  margin-bottom: 6px;
}

.sol-tab-btn p {
  font-size: 0.88rem;
  line-height: 1.55;
  margin-bottom: 12px;
}

.sol-tab-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sol-tab-stack span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.sol-tab-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
}

.sol-tab-btn.active .sol-tab-progress-bar {
  height: 100%;
  background: var(--accent);
  width: 100%;
}

.sol-panel {
  display: none;
}

.sol-panel.active {
  display: block;
  animation: fadeInScene 0.25s ease;
}

.sol-demo-canvas {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.demo-flow-diagram {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--border);
}

.node-box {
  padding: 12px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.node-box.highlight {
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.node-type {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--accent);
}

.node-box strong {
  font-size: 0.84rem;
  color: var(--text);
}

.node-box small {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.node-arrow {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 1rem;
}

.demo-terminal-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--border);
}

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.terminal-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.t-line {
  line-height: 1.5;
}

.t-time {
  color: var(--text-muted);
  margin-right: 6px;
}

.t-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.68rem;
  margin-right: 6px;
}

.t-tag.t-ok {
  background: var(--status-ok-bg);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--status-ok);
}

.demo-outcome-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.84rem;
}

.demo-outcome-bar strong {
  color: var(--text);
  margin-right: 6px;
}

.demo-outcome-bar span {
  color: var(--text-secondary);
}

/* Painel BI KPIs */
.bi-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.bi-kpi-card {
  padding: 14px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bi-kpi-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.bi-kpi-val {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--text);
}

.bi-kpi-delta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.bi-kpi-delta.positive {
  color: var(--status-ok);
}

/* ── SEÇÃO "POR QUE NÓS?" (VÍDEO 60S + ARQUITETURA) ───────── */
.why-us-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 48px;
  align-items: center;
}

.founder-video-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.founder-video-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.video-audio-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
}

.founder-video-stage {
  padding: 20px;
}

.founder-native-video {
  display: none;
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.founder-native-video[data-video-ready="true"] {
  display: block;
}

.founder-profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.founder-avatar-badge {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-family: var(--font-display);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.founder-profile-row strong {
  display: block;
  font-size: 1rem;
  color: var(--text);
}

.founder-profile-row span {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.cost-architecture-preview {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--border);
  margin-bottom: 18px;
}

.cost-bar-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  margin-bottom: 8px;
}

.cost-bar-head span {
  color: var(--text-secondary);
}

.cost-bad {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--status-bad);
}

.cost-good {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--status-ok);
}

.cost-track {
  height: 8px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
}

.cost-fill {
  height: 100%;
  border-radius: 99px;
}

.cost-fill-high {
  width: 92%;
  background: var(--status-bad);
}

.cost-fill-low {
  width: 28%;
  background: var(--status-ok);
}

.video-chapters {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chapter-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.chapter-item span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
}

.section-lead {
  font-size: 1.05rem;
  line-height: 1.65;
  margin-bottom: 28px;
}

.architecture-pillars {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.arch-pillar {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.arch-pillar-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.arch-pillar h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.arch-pillar p {
  font-size: 0.9rem;
  line-height: 1.55;
}

/* ── SEÇÃO "COMO TRABALHAMOS" (LINHA DO TEMPO CONECTADA) ─── */
.timeline-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.timeline-step {
  display: flex;
  flex-direction: column;
}

.timeline-marker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.timeline-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  white-space: nowrap;
}

.timeline-line {
  flex: 1;
  height: 1px;
  background: var(--border-strong);
}

.timeline-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.timeline-step-num {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.timeline-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.timeline-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 18px;
  flex: 1;
}

.timeline-deliverable {
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.timeline-deliverable strong {
  color: var(--text);
}

/* ── SEÇÃO CASES ("ANTES VS. DEPOIS") ─────────────────────── */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.case-card {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.case-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.case-sector {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
}

.case-stack {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.case-card h3 {
  font-size: 1.18rem;
  margin-bottom: 18px;
}

.case-before-after {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  flex: 1;
}

.case-box {
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.case-before {
  background: var(--bg);
}

.case-after {
  background: var(--status-ok-bg);
  border-color: rgba(16, 185, 129, 0.25);
}

.case-box-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.case-before .case-box-label {
  color: var(--text-muted);
}

.case-after .case-box-label {
  color: var(--status-ok);
}

.case-box p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.case-after p {
  color: var(--text);
}

.case-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.case-metrics strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text);
}

.case-metrics span {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ── SEÇÃO FAQ (CENTRALIZADA E ALINHADA) ──────────────────── */
.faq-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: start;
}

.faq-cta-box {
  margin-top: 28px;
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.faq-cta-box strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 6px;
}

.faq-cta-box p {
  font-size: 0.88rem;
  margin-bottom: 14px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.faq-item {
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

.faq-item.open {
  border-color: var(--border-strong);
}

.faq-q {
  width: 100%;
  padding: 18px 20px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-arrow {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.faq-item.open .faq-arrow {
  transform: rotate(45deg);
  color: var(--text);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.65;
  transition: max-height 0.25s ease, padding 0.25s ease;
}

.faq-item.open .faq-a {
  max-height: 260px;
  padding-bottom: 20px;
}

/* ── CTA FINAL CONSULTIVO ─────────────────────────────────── */
.cta-final-section {
  padding: 96px 0;
}

.cta-final-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  padding: 48px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border-strong);
}

.cta-final-content h2 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  margin-bottom: 16px;
}

.cta-final-content p {
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 28px;
}

.cta-final-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cta-final-checklist {
  padding: 28px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--border);
}

.cta-check-title {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.cta-final-checklist ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cta-final-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.cta-final-checklist svg {
  color: var(--status-ok);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── RODAPÉ COMPLETO ──────────────────────────────────────── */
.site-footer {
  padding: 64px 0 36px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--border);
}

.footer-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  margin-top: 14px;
  margin-bottom: 16px;
  max-width: 340px;
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.footer-links-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-col h4 {
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 6px;
}

.footer-links-col a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.footer-links-col a:hover {
  color: var(--text);
}

.footer-cta-link {
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-social {
  display: flex;
  gap: 10px;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.social-link:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

/* ── CHAT WIDGET (ESTÉTICA SÓBRIA DE CONSULTORIA) ─────────── */
#chat-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(9, 9, 11, 0.78);
  backdrop-filter: blur(8px);
}

#chat-overlay.open {
  display: flex;
}

#chat-box {
  width: 100%;
  max-width: 460px;
  height: min(640px, 88vh);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

#chat-box.visible {
  transform: translateY(0);
  opacity: 1;
}

#chat-header {
  padding: 16px 20px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar-wrap {
  position: relative;
}

.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-online-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--status-ok);
  border: 2px solid var(--surface-2);
}

.chat-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.chat-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chat-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-close-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.chat-progress-wrap {
  height: 3px;
  background: var(--surface-3);
}

#chat-progress {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.35s ease;
}

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg-bot {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.chat-msg-user {
  display: flex;
  justify-content: flex-end;
}

.bot-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bubble-bot {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px 10px 10px 2px;
  padding: 12px 15px;
  font-size: 0.88rem;
  line-height: 1.55;
  max-width: 85%;
}

.bubble-user {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-radius: 10px 10px 2px 10px;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  max-width: 80%;
}

#chat-input-area {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

#btn-area {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-chip {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 6px;
  padding: 9px 13px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.chat-chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

#text-input-area {
  display: none;
  flex-direction: column;
  gap: 8px;
}

.input-row {
  display: flex;
  gap: 8px;
}

#chat-text-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}

#chat-text-input:focus {
  border-color: var(--accent);
}

#send-btn {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.input-error-msg {
  color: var(--status-bad);
  font-size: 0.78rem;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: pulseDot 1.2s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* ── RESPONSIVIDADE ───────────────────────────────────────── */
@media (max-width: 1040px) {
  .hero-grid-layout,
  .solutions-interactive-layout,
  .why-us-grid,
  .faq-layout,
  .cta-final-card {
    grid-template-columns: 1fr;
  }

  .timeline-track {
    grid-template-columns: repeat(2, 1fr);
  }

  .cases-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 780px) {
  .brand-badge {
    display: none;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border-strong);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px;
    gap: 14px;
  }

  .main-nav.open {
    display: flex;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .theme-toggle-label {
    display: none;
  }

  .comparison-header-row {
    display: none;
  }

  .comparison-row {
    grid-template-columns: 1fr;
  }

  .comp-topic,
  .comp-manual {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .demo-flow-diagram {
    grid-template-columns: 1fr;
  }

  .node-arrow {
    transform: rotate(90deg);
    text-align: center;
  }

  .bi-kpi-grid,
  .timeline-track,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cta-final-card {
    padding: 28px 22px;
  }

  .flow-timeline-bar {
    grid-template-columns: 1fr;
  }

  .crm-board-preview {
    grid-template-columns: 1fr;
  }
}
