:root {
  --bg: #f6f3ee;
  --bg-2: #ebe6dd;
  --card: #fffdf9;
  --text: #1c2630;
  --muted: #5a6670;
  --line: #d9d2c5;
  --teal: #2f8f99;
  --teal-2: #1f6670;
  --teal-soft: #d5ecee;
  --amber: #e89b2c;
  --pink: #f06a8a;
  --ink: #16303a;
  --edge: #16303a;
  --shadow: 0 1px 0 rgba(0,0,0,.04), 0 8px 24px rgba(22,48,58,.08);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11191f;
    --bg-2: #172229;
    --card: #1b272f;
    --text: #e8eef1;
    --muted: #9eb0ba;
    --line: #2b3a44;
    --teal: #4fb6c0;
    --teal-2: #7fd0d8;
    --teal-soft: #1d3a40;
    --ink: #0b1216;
    --edge: #3f8c95;
    --shadow: 0 1px 0 rgba(0,0,0,.2), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, canvas { max-width: 100%; }
a { color: var(--teal-2); }
a:hover { color: var(--teal); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
section { padding: 72px 0; }
section + section { border-top: 1px solid var(--line); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 42ch; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--teal-2); background: var(--teal-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 14px;
}
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head p { color: var(--muted); }

/* ---------- topo ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; image-rendering: pixelated; }
.top nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.top nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-weight: 600; font-size: .95rem; }
.top nav a:hover { color: var(--text); background: var(--bg-2); }
@media (max-width: 720px) { .top nav a:not(.nav-cta) { display: none; } }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px; font-weight: 700; font-size: 1rem; text-decoration: none;
  border: 2px solid var(--edge); cursor: pointer; transition: transform .08s, box-shadow .08s;
  box-shadow: 4px 4px 0 var(--edge); font-family: inherit;
}
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--edge); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { color: #fff; background: var(--teal-2); }
.btn-secondary { background: var(--card); color: var(--text); }
.btn-secondary:hover { color: var(--text); background: var(--bg-2); }
.btn[aria-disabled="true"] { opacity: .65; cursor: default; box-shadow: 2px 2px 0 var(--edge); }
.btn small { font-weight: 600; opacity: .85; }
.nav-cta { padding: 6px 12px !important; border: 2px solid var(--edge); background: var(--amber); color: var(--ink) !important; box-shadow: 2px 2px 0 var(--edge); }

/* ---------- herói ---------- */
.hero { padding: 64px 0 72px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }
.hero h1 .hl { color: var(--teal); }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin: 28px 0 14px; }
.fine { font-size: .9rem; color: var(--muted); }
.portrait {
  position: relative; justify-self: center; width: min(380px, 100%); aspect-ratio: 1;
  border-radius: 28px; border: 3px solid var(--edge); box-shadow: 10px 10px 0 var(--edge);
  background: #3b98a2; overflow: hidden;
}
.portrait canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.portrait .tag {
  position: absolute; left: 14px; bottom: 14px; padding: 4px 12px; border-radius: 999px;
  background: rgba(16,24,30,.85); color: #fff; font-weight: 700; font-size: .9rem;
}
.works { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: .9rem;
}

/* ---------- demo ---------- */
.demo { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .demo { grid-template-columns: 1fr; } }
.chat {
  background: var(--card); border: 2px solid var(--edge); border-radius: var(--radius); box-shadow: 6px 6px 0 var(--edge);
  display: flex; flex-direction: column; height: 440px; overflow: hidden;
}
.chat-head { padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 700; display: flex; gap: 8px; align-items: center; }
.chat-head .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--teal); color: #fff; border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: var(--bg-2); border-bottom-left-radius: 4px; }
.msg.ai .hidden-tag { opacity: .45; text-decoration: line-through; font-size: .85em; }
.chat-empty { margin: auto; color: var(--muted); text-align: center; max-width: 30ch; }
.prompts { display: flex; flex-wrap: wrap; gap: 8px; }
.prompts button {
  font: inherit; font-weight: 600; font-size: .95rem; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  background: var(--card); color: var(--text); border: 2px solid var(--line);
}
.prompts button:hover:not(:disabled) { border-color: var(--teal); }
.prompts button:disabled { opacity: .5; cursor: default; }
.demo-note { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: var(--teal-soft); font-size: .95rem; }
.demo-note code { font-size: .9em; }

/* ---------- passos ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px;
  border-radius: 10px; border: 2px solid var(--edge); background: var(--amber); color: var(--ink);
  font-weight: 800; font-size: 1.1rem; box-shadow: 3px 3px 0 var(--edge);
}
.step p { color: var(--muted); margin: 0; }
kbd {
  font: 600 .85em ui-monospace, Consolas, monospace; padding: 1px 6px; border-radius: 6px;
  border: 1px solid var(--line); border-bottom-width: 2px; background: var(--bg-2);
}

/* ---------- expressões ---------- */
.faces { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px; }
.face {
  font: inherit; color: var(--text); background: var(--card); border: 2px solid var(--line); border-radius: 14px;
  padding: 8px 8px 10px; cursor: pointer; text-align: center; transition: transform .1s, border-color .1s;
}
.face:hover { transform: translateY(-3px); border-color: var(--teal); }
.face canvas { width: 100%; aspect-ratio: 1; border-radius: 10px; display: block; background: #3b98a2; }
.face span { display: block; font-weight: 700; font-size: .9rem; margin-top: 6px; }
.face small { display: block; color: var(--muted); font-size: .78rem; font-family: ui-monospace, Consolas, monospace; }

/* ---------- recursos ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feature .ico { font-size: 1.6rem; line-height: 1; margin-bottom: 10px; display: block; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ---------- instalar ---------- */
.install { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 860px) { .install { grid-template-columns: 1fr; } }
.install .card { display: flex; flex-direction: column; gap: 14px; }
.install ol { margin: 0; padding-left: 1.3em; color: var(--muted); }
.install ol li { margin: 4px 0; }
.install code { font-size: .9em; background: var(--bg-2); padding: 1px 6px; border-radius: 6px; }
.badge { align-self: flex-start; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-2); }

/* ---------- privacidade / faq ---------- */
.privacy-box { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.privacy-box .big { font-size: 3rem; }
@media (max-width: 560px) { .privacy-box { grid-template-columns: 1fr; } }
details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 700; padding: 14px 0; }
details p { color: var(--muted); }

footer { padding: 40px 0 120px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }
footer .wrap { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }

/* ---------- página de texto (privacidade) ---------- */
.doc { max-width: 760px; padding: 48px 20px 120px; margin: 0 auto; }
.doc h2 { font-size: 1.3rem; margin-top: 2em; }
.doc li { margin: 6px 0; }
.doc .updated { color: var(--muted); }

/* seletor de idioma */
.lang-pick { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.lang-pick select {
  font: inherit; font-size: .9rem; font-weight: 600; color: var(--text); background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; cursor: pointer;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 720px) { .top nav { margin-left: auto; } }
