/* Site institucional da Qiara. Brand System v3.2 (ver BRANDBOOK.md §4.8):
   marketing light-first (papel branco-quente, tinta Ink, violet raro 90/10),
   produto aparece como "janela acesa" (card dark com glow violet).
   Estático e self-contained de proposito (deploy simples, sem build). */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

:root {
  /* light de marketing (BRANDBOOK §4.8) */
  --paper-warm: #faf9f7;
  --paper: #ffffff;
  --mist: #ede9fe;
  --tx-0: #0d0d14;
  --tx-1: #3f3f4a;
  --tx-2: #6b6b7a;
  --tx-3: #8a8a98;
  --line: rgba(13, 13, 20, 0.08);
  --line-strong: rgba(13, 13, 20, 0.14);
  --deep: #2e1065;
  --violet-400: #a78bfa;
  --violet-600: #7c3aed;
  --violet-700: #6d28d9;
  /* tokens dark, usados SO dentro da janela acesa (§4.2/§4.3/§7.7) */
  --ink: #0d0d14;
  --w-fg-0: #f5f5f7;
  --w-fg-3: #9a9aa8;
  --w-bubble-in: #1f2933;
  --sans: 'Geist', system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper-warm);
  color: var(--tx-1);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Atmosfera: radial violet suave + grid Construction sutil sobre o papel
   (§4.8: alpha <= 0.10 no radial, <= 0.05 no grid), com fade pra baixo. */
.atmo {
  position: absolute; top: 0; left: 0; right: 0; height: 760px;
  pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 820px 460px at 72% -5%, rgba(139, 92, 246, 0.1), transparent 65%),
    linear-gradient(rgba(139, 92, 246, 0.045) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(139, 92, 246, 0.045) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
}

/* --- header --- */
header.site {
  position: sticky; top: 0; z-index: 10;
  background: rgba(250, 249, 247, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--tx-0); }
.brand .mark { width: 26px; height: 26px; }
.brand .word { font-weight: 700; font-size: 21px; letter-spacing: -0.05em; line-height: 1; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--tx-2); text-decoration: none; font-size: 14px; transition: color 0.15s ease-out; }
.nav-links a:hover { color: var(--tx-0); }
.nav a.login { color: var(--tx-2); text-decoration: none; font-size: 14px; white-space: nowrap; transition: color 0.15s ease-out; }
.nav a.login:hover { color: var(--violet-600); }

/* --- tipografia de secao --- */
.eyebrow {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--violet-600); margin-bottom: 16px;
}
h1, h2 { color: var(--tx-0); font-weight: 600; text-wrap: balance; }
.accent { color: var(--deep); }

/* --- hero --- */
.hero { position: relative; z-index: 1; padding: clamp(56px, 8vw, 104px) 0 clamp(48px, 6vw, 88px); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(40px, 6vw, 80px); align-items: center;
}
.hero h1 { font-size: clamp(2.7rem, 6vw, 4.4rem); line-height: 1.04; letter-spacing: -0.035em; }
.hero .lead { margin-top: 22px; font-size: clamp(1rem, 1.6vw, 1.17rem); color: var(--tx-1); max-width: 54ch; text-wrap: pretty; }
.cta-row { margin-top: 32px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cta-note {
  margin-top: 14px; font-family: var(--mono); font-size: 12.5px;
  color: var(--tx-2); max-width: 46ch; line-height: 1.7;
}

/* --- botoes --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 10px; min-height: 44px;
  font-size: 15px; font-weight: 500; text-decoration: none;
  transition: background 0.15s ease-out, transform 0.15s ease-out, border-color 0.15s ease-out;
}
.btn-primary {
  background: var(--violet-600); color: #fff;
  box-shadow: 0 10px 28px -10px rgba(124, 58, 237, 0.45);
}
.btn-primary:hover { background: var(--violet-700); transform: translateY(-1px); }
.btn-ghost { color: var(--tx-1); border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--violet-600); color: var(--tx-0); }
a:focus-visible, button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--paper-warm), 0 0 0 4px var(--violet-600);
  border-radius: 6px;
}
.btn:focus-visible { border-radius: 10px; }

/* --- janela acesa (§4.8): o produto dark dentro do site claro --- */
.window-col { display: flex; flex-direction: column; align-items: center; }
.chat-window {
  width: min(400px, 100%);
  background: var(--ink);
  border-radius: 16px;
  box-shadow:
    0 24px 60px -24px rgba(13, 13, 20, 0.35),
    0 0 90px -12px rgba(139, 92, 246, 0.38);
}
.chat-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.chat-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--violet-700); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.4);
}
.chat-avatar .mark { width: 18px; height: 18px; }
/* motion signature §10, loop lento de hero: o spark pulsa devagar */
.chat-avatar .spark { animation: spark-soft 3.2s ease-in-out infinite; }
@keyframes spark-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.chat-id { display: flex; flex-direction: column; gap: 2px; }
.chat-name { color: var(--w-fg-0); font-weight: 700; font-size: 15px; letter-spacing: -0.03em; line-height: 1; }
.chat-status { font-family: var(--mono); font-size: 11px; color: var(--w-fg-3); display: inline-flex; align-items: center; gap: 5px; }
.chat-status .dot { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; display: inline-block; }
.chat-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 20px; }
.msg {
  max-width: 84%; padding: 9px 12px 7px; border-radius: 10px;
  font-size: 13.5px; line-height: 1.45;
  animation: chat-in 0.45s ease-out backwards;
}
.msg.in { align-self: flex-start; background: var(--w-bubble-in); color: var(--w-fg-0); border-top-left-radius: 4px; }
.msg.out { align-self: flex-end; background: var(--violet-600); color: #fff; border-top-right-radius: 4px; }
.msg:nth-child(1) { animation-delay: 0.5s; }
.msg:nth-child(2) { animation-delay: 1.7s; }
.msg:nth-child(3) { animation-delay: 3s; }
.msg:nth-child(4) { animation-delay: 4.2s; }
.msg time { display: block; text-align: right; font-family: var(--mono); font-size: 10px; margin-top: 4px; opacity: 0.6; }
/* sobre violet-600 a transparencia derruba o contraste (AA): timestamp solido */
.msg.out time { color: #fff; opacity: 1; }
@keyframes chat-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-caption { margin-top: 16px; font-family: var(--mono); font-size: 12px; color: var(--tx-2); }

/* --- secoes --- */
section.block { position: relative; z-index: 1; padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); }

/* numeros do custo de esperar (estudo de mercado 2026) */
.stats-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(24px, 4vw, 56px); }
.stat { border-top: 2px solid var(--line-strong); padding-top: 16px; }
.stat .num { display: block; font-size: clamp(2.1rem, 4.5vw, 3rem); font-weight: 600; letter-spacing: -0.03em; color: var(--tx-0); line-height: 1; }
.stat p { margin-top: 10px; font-size: 14.5px; color: var(--tx-1); max-width: 32ch; }
.block h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -0.025em; line-height: 1.15; }
.block .sub { margin-top: 14px; color: var(--tx-1); max-width: 58ch; font-size: 1.02rem; text-wrap: pretty; }

/* cards de produto */
.cards { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 26px;
  transition: border-color 0.15s ease-out, transform 0.15s ease-out, box-shadow 0.15s ease-out;
}
.card:hover {
  border-color: rgba(124, 58, 237, 0.35); transform: translateY(-2px);
  box-shadow: 0 16px 40px -24px rgba(13, 13, 20, 0.18);
}
.card .ico {
  width: 40px; height: 40px; border-radius: 10px; background: var(--mist);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
  color: var(--violet-600);
}
.card h3 { font-size: 17px; color: var(--tx-0); font-weight: 600; margin-bottom: 8px; letter-spacing: -0.01em; }
.card p { font-size: 14.5px; color: var(--tx-1); }

/* como funciona: sequencia real, numeracao carrega informacao */
.steps { margin-top: 44px; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); }
.step { border-top: 2px solid var(--line-strong); padding-top: 18px; }
.step .n { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--violet-600); }
.step h3 { margin-top: 10px; font-size: 18px; color: var(--tx-0); font-weight: 600; letter-spacing: -0.01em; }
.step p { margin-top: 8px; font-size: 14.5px; color: var(--tx-1); }

/* plataforma: lista mono */
.plat { margin-top: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px 40px; max-width: 880px; }
.plat li {
  list-style: none; font-family: var(--mono); font-size: 13.5px; color: var(--tx-1);
  padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px;
}
.plat li::before { content: '·'; color: var(--violet-600); font-weight: 700; }

/* integracoes: trilho de ferramentas (logos monocromaticos, 90/10 preservado) */
.tools { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 10px; }
.tool {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); font-size: 14px; color: var(--tx-0); font-weight: 500;
}
.tool svg { width: 18px; height: 18px; flex-shrink: 0; }
.tool em {
  font-style: normal; font-family: var(--mono); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--violet-600);
  background: var(--mist); padding: 3px 8px; border-radius: 999px;
}
.tool.soon { color: var(--tx-2); }
.tool.soon svg { opacity: 0.55; }

/* trilho de canais: rotulo curto acima da fileira de chips */
.rail-label {
  margin-top: 40px; font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--tx-2);
}
.rail-label + .tools { margin-top: 14px; }
.stats .rail-intro { margin-top: 44px; }

/* fluxo esquematico na linguagem Construction (nao e print do produto) */
.flow {
  margin-top: 36px; padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line); border-radius: 14px;
  background:
    linear-gradient(rgba(139, 92, 246, 0.04) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(139, 92, 246, 0.04) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--paper);
  display: flex; flex-direction: column; gap: 14px;
}
.flow-spine, .flow-branch { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.flow-branches { display: flex; flex-direction: column; gap: 12px; padding-left: clamp(0px, 4vw, 48px); }
.f-arrow { color: var(--tx-3); font-size: 15px; }
.f-label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--violet-600); }
.fnode { display: inline-flex; align-items: center; gap: 8px; border-radius: 10px; padding: 8px 13px; font-size: 13.5px; line-height: 1.35; }
.f-trigger { font-family: var(--mono); font-size: 12.5px; background: var(--mist); color: var(--deep); }
.f-agent { background: var(--paper-warm); border: 1px solid var(--line-strong); color: var(--tx-0); font-weight: 600; }
.f-agent small { font-weight: 400; font-size: 12.5px; color: var(--tx-2); }
.f-agent .mark { width: 14px; height: 14px; }
.f-cond { border: 1px dashed var(--line-strong); color: var(--tx-1); font-family: var(--mono); font-size: 12.5px; }
.f-action { background: var(--paper); border: 1px solid var(--line); color: var(--tx-1); }
.f-action svg { width: 14px; height: 14px; flex-shrink: 0; }

/* cta final: faixa mist pra fechar com calor */
section.closing { position: relative; z-index: 1; background: var(--mist); border-top: 1px solid var(--line); }
.closing-inner { padding: clamp(64px, 9vw, 110px) 0; text-align: center; display: flex; flex-direction: column; align-items: center; }
.closing h2 { font-size: clamp(2rem, 4.4vw, 3rem); letter-spacing: -0.03em; }
.closing .sub { margin: 16px auto 0; color: var(--tx-1); max-width: 52ch; text-wrap: pretty; }
.closing .cta-row { justify-content: center; }
/* sobre Mist, tx-2 fica a 4.41:1 (reprova AA por pouco): usa tx-1 */
.closing .trust { margin-top: 16px; font-family: var(--mono); font-size: 12.5px; color: var(--tx-1); }
.closing .eyebrow { margin-bottom: 14px; }
.closing a:focus-visible { box-shadow: 0 0 0 2px var(--mist), 0 0 0 4px var(--violet-600); }

/* --- footer --- */
footer.site { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 48px 0 56px; }
.foot-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-links { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.foot-links a { color: var(--tx-2); text-decoration: none; font-size: 14px; transition: color 0.15s ease-out; }
.foot-links a:hover { color: var(--violet-600); }
.legal {
  margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 12.5px; color: var(--tx-2); line-height: 1.9;
}
.legal strong { color: var(--tx-1); font-weight: 500; }
.legal a { color: var(--tx-2); text-decoration: none; }
.legal a:hover { color: var(--violet-600); }

/* --- pagina de conteudo (privacidade) --- */
.doc { position: relative; z-index: 1; padding: 56px 0 72px; max-width: 760px; }
.doc h1 { font-size: 34px; letter-spacing: -0.02em; color: var(--tx-0); font-weight: 600; }
.doc .updated { font-family: var(--mono); font-size: 12px; color: var(--tx-2); margin-top: 10px; }
.doc h2 { font-size: 20px; color: var(--tx-0); font-weight: 600; margin: 36px 0 12px; letter-spacing: -0.01em; }
.doc p, .doc li { color: var(--tx-1); font-size: 15px; margin-bottom: 12px; }
.doc ul { padding-left: 22px; }
.doc a { color: var(--violet-600); }

/* --- responsivo --- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .window-col { align-items: flex-start; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
}

/* --- acessibilidade de movimento (§10) --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
