/* ============================================================
   Fala — soluções conversacionais da Applied Intelligence
   Identidade Applied Intelligence v4.1 (docs/id_visual_appint)
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Paleta oficial (06_Paleta_Tokens/brand-tokens.css) */
  --preto-profundo: #0B0B0D;
  --grafite: #1A1D24;
  --azul-eletrico: #2563FF;
  --roxo-tecnologico: #6E3CFF;
  --dourado: #D4AF37;
  --dourado-claro: #F2C866;
  --branco-gelo: #F5F7FA;

  /* Gradientes da marca */
  --grad-marca: linear-gradient(135deg, #2563FF 0%, #6E3CFF 100%);
  --grad-dourado: linear-gradient(135deg, #F2C866 0%, #D4AF37 100%);

  /* Neutros derivados */
  --superficie: #12141A;
  --superficie-2: #171A21;
  --linha: rgba(245, 247, 250, 0.10);
  --texto: var(--branco-gelo);
  --texto-suave: rgba(245, 247, 250, 0.70);
  --texto-fraco: rgba(245, 247, 250, 0.52);

  /* Layout */
  --container: 1160px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.30);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45);

  /* Tipografia (manual §6) */
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--texto);
  background: var(--preto-profundo);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 4.6vw, 3.35rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }

p { margin: 0 0 1rem; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

section { padding-block: clamp(56px, 8vw, 104px); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dourado);
  margin-bottom: 0.9rem;
}

.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--texto-suave); font-size: 1.06rem; margin: 0; }

.accent {
  background: linear-gradient(135deg, #4D82FF 0%, #9A76FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--grad-marca);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-ghost {
  background: transparent;
  color: var(--texto);
  border-color: var(--linha);
}
.btn-ghost:hover { border-color: rgba(122, 154, 255, 0.7); color: #A9C0FF; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 13, 0.82);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.site-header.scrolled { border-bottom-color: var(--linha); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

/* Lockup endossado: símbolo oficial + nome do produto (manual §8) */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 6px 0;
}
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.32rem;
  letter-spacing: -0.02em;
  color: var(--texto);
}
.brand-by {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--texto-fraco);
}

.nav { display: flex; align-items: center; gap: 28px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 500;
  color: var(--texto-suave);
  transition: color 0.16s ease;
}
.nav-links a:hover { color: #A9C0FF; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: none;
  border: 1px solid var(--linha);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--texto);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(56px, 8vw, 96px) clamp(64px, 9vw, 112px);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -30% 45% 35% -12%;
  background: radial-gradient(closest-side, rgba(37, 99, 255, 0.26), transparent);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  inset: -15% -12% 35% 48%;
  background: radial-gradient(closest-side, rgba(110, 60, 255, 0.24), transparent);
  pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero-sub {
  font-size: 1.12rem;
  color: var(--texto-suave);
  max-width: 33rem;
  margin-bottom: 1.8rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 1.6rem; }

.endorse {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.87rem;
  color: var(--texto-fraco);
}
.endorse .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--grad-dourado);
}

/* ---- Mockup de conversa ---- */
.chat-wrap { display: flex; justify-content: center; }
.chat {
  width: min(100%, 400px);
  background: var(--superficie);
  border: 1px solid var(--linha);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.chat-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--superficie-2);
  border-bottom: 1px solid var(--linha);
}
.chat-top .avatar { width: 38px; height: 38px; border-radius: 10px; }
.chat-top .who { font-weight: 600; font-size: 0.95rem; }
.chat-top .status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--texto-fraco);
}
.chat-top .live { width: 7px; height: 7px; border-radius: 50%; background: #2ecc71; }
.chat-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.bubble {
  max-width: 86%;
  padding: 11px 14px 8px;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.5;
}
.bubble.in {
  align-self: flex-start;
  background: var(--superficie-2);
  border: 1px solid var(--linha);
  border-bottom-left-radius: 5px;
}
.bubble.out {
  align-self: flex-end;
  background: rgba(37, 99, 255, 0.16);
  border: 1px solid rgba(110, 60, 255, 0.36);
  border-bottom-right-radius: 5px;
}
.bubble .meta {
  display: block;
  font-size: 0.68rem;
  color: var(--texto-fraco);
  text-align: right;
  margin-top: 3px;
}

/* ---------- Soluções (cards do hub) ---------- */
.solucoes { background: var(--grafite); }
.cards-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.solucao {
  display: flex;
  flex-direction: column;
  background: var(--superficie);
  border: 1px solid var(--linha);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.solucao:hover { border-color: rgba(122, 154, 255, 0.45); transform: translateY(-3px); }
.solucao-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(37, 99, 255, 0.14);
  border: 1px solid rgba(37, 99, 255, 0.30);
  color: #A9C0FF;
  margin-bottom: 14px;
}
.solucao h3 { font-size: 1.32rem; margin-bottom: 0.45rem; }
.solucao-resumo { color: var(--texto-suave); font-size: 0.99rem; }
.solucao ul {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
  flex: 1;
}
.solucao li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 0.5rem;
  font-size: 0.94rem;
  color: var(--texto-suave);
}
.solucao li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-marca);
}
.solucao-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: #A9C0FF;
  transition: gap 0.16s ease;
}
.solucao-link:hover { gap: 12px; }
.solucao-link .seta { transition: transform 0.16s ease; }
.solucao-link:hover .seta { transform: translateX(2px); }

/* ---------- Não é bot (comparativo) ---------- */
.compare-table {
  border: 1px solid var(--linha);
  border-radius: var(--radius);
  overflow: hidden;
}
.compare-row { display: grid; grid-template-columns: 1fr 1fr; }
.compare-row + .compare-row { border-top: 1px solid var(--linha); }
.compare-cell { padding: 15px 22px; font-size: 0.97rem; }
.compare-cell.old { color: var(--texto-fraco); border-right: 1px solid var(--linha); }
.compare-cell.new { color: var(--texto); font-weight: 500; }
.compare-row.head .compare-cell {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  background: var(--superficie);
}
.compare-row.head .compare-cell.new {
  background: linear-gradient(135deg, rgba(37, 99, 255, 0.18), rgba(110, 60, 255, 0.18));
}

/* ---------- Integrações ---------- */
.integra { background: var(--grafite); }
.integra-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.integra-card {
  background: var(--superficie);
  border: 1px solid var(--linha);
  border-radius: var(--radius-sm);
  padding: 22px 20px;
}
.integra-card h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.integra-card p { font-size: 0.91rem; color: var(--texto-suave); margin: 0; }

.ico-box {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(37, 99, 255, 0.12);
  border: 1px solid rgba(37, 99, 255, 0.26);
  color: #A9C0FF;
  margin-bottom: 14px;
}
.ico-box svg { width: 22px; height: 22px; }

/* ---------- Como funciona (timeline) ---------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
.tstep {
  position: relative;
  padding-top: 26px;
  border-top: 2px solid var(--linha);
}
.tnum {
  position: absolute;
  top: -15px;
  left: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad-marca);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}
.tstep h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.tstep p { font-size: 0.92rem; color: var(--texto-suave); margin: 0; }

/* ---------- CTA final ---------- */
.cta { background: var(--grafite); text-align: center; }
.cta .container { max-width: 720px; }
.cta p { color: var(--texto-suave); font-size: 1.06rem; }
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 1.6rem;
}
.cta-email { margin-top: 1.4rem; font-size: 0.95rem; color: var(--texto-fraco); }
.cta-email a { color: #A9C0FF; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--preto-profundo);
  border-top: 1px solid var(--linha);
  padding-block: 56px 28px;
  font-size: 0.94rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 36px;
  padding-bottom: 32px;
}
.footer-logo img { width: 200px; margin-bottom: 14px; }
.footer-col h4 {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dourado);
  margin-bottom: 0.8rem;
}
.footer-col p { color: var(--texto-suave); margin: 0; }
.footer-col a { color: var(--texto-suave); text-decoration: none; }
.footer-col a:hover { color: #A9C0FF; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.4rem; }
.footer-assinatura { color: var(--texto-fraco); font-size: 0.9rem; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  align-items: center;
  padding-top: 22px;
  border-top: 1px solid var(--linha);
  color: var(--texto-fraco);
  font-size: 0.86rem;
}

/* ---------- Reveal on scroll (progressive enhancement) ---------- */
.js-enabled .reveal { opacity: 0; transform: translateY(14px); }
.js-enabled .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* ---------- Responsivo ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .integra-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }

  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
    background: var(--preto-profundo);
    border-bottom: 1px solid var(--linha);
    display: none;
  }
  .nav.open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links a { display: block; padding: 12px 0; border-bottom: 1px solid var(--linha); }
  .nav .btn { margin-top: 14px; }

  .cards-2,
  .integra-grid,
  .timeline,
  .footer-top { grid-template-columns: 1fr; }

  .compare-cell { padding: 13px 16px; font-size: 0.92rem; }
  .hero-actions .btn,
  .cta-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .js-enabled .reveal { opacity: 1; transform: none; }
}
