/* =================================================================
   Pages outside the landing: /chat (where the ads lead) and /privacidade.
   Same night palette and type as site.css, quieter: thin 1px lines, no
   boxes around the assistant's words, the cyan light only as a detail.
   ================================================================= */

:root {
  --bg: #04060b;
  --text: #eef2f8;
  --text-2: rgba(238, 242, 248, 0.66);
  --text-3: rgba(238, 242, 248, 0.42);
  --line: rgba(170, 200, 255, 0.12);
  --line-2: rgba(170, 200, 255, 0.22);
  --glow-rgb: 127, 208, 255;
  --glow: rgb(var(--glow-rgb));
  --whatsapp: #25d366;
  --danger: #e0786b;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --heading: "Inter Tight", var(--sans);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --indent: 38px; /* avatar (26) + gap (12): the assistant's text column */
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-optical-sizing: auto;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

button, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 1px solid rgba(255, 255, 255, 0.6); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  background: rgba(4, 6, 11, 0.86);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.top__brand, .top__who { text-decoration: none; }

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

.top__text { display: flex; flex-direction: column; gap: 2px; line-height: 1.2; }

.top__name { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }

.top__status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); }

.top__status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--glow); opacity: 0.8; }

.top__site { font-size: 13px; color: var(--text-3); text-decoration: none; transition: color 0.2s; }

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

/* the wordmark (privacy page) */
.logo {
  display: inline-block;
  font-family: var(--heading);
  font-weight: 500;
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.035em;
  color: #fff;
  white-space: nowrap;
}

.logo__i { display: inline-block; position: relative; width: 0.24em; height: 0.545em; margin-left: 0.03em; }

.logo__i::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0.108em;
  height: 100%;
  background: currentColor;
  transform: translateX(-50%);
}

.logo__i::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.65em;
  width: 0.2em;
  height: 0.2em;
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 0.35em 0.08em rgba(var(--glow-rgb), 0.6);
  transform: translateX(-50%);
}

/* the assistant's mark: a quiet circle holding the light of the logo's i */
.avatar {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0a0f19;
  border: 1px solid var(--line-2);
}

.avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 22%;
  height: 22%;
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 8px 1px rgba(var(--glow-rgb), 0.45);
}

.avatar--sm { width: 26px; height: 26px; }

/* ---------- chat ---------- */
.chat-page { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }

.chat {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(170, 200, 255, 0.16) transparent;
}

.chat::-webkit-scrollbar { width: 6px; }

.chat::-webkit-scrollbar-thumb { background: rgba(170, 200, 255, 0.16); border-radius: 3px; }

.chat__log {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 18px 24px;
}

.chat__noscript { max-width: 640px; margin: 24px auto; padding: 0 18px; color: var(--text-2); }

.day {
  align-self: center;
  padding: 3px 12px;
  font-size: 12px;
  color: var(--text-3);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.msg { font-size: 15px; line-height: 1.6; animation: msg-in 0.35s var(--ease) both; }

/* the assistant: words on the page, the mark only at the start of a run */
.msg--agent { display: flex; align-items: flex-start; gap: 12px; max-width: 560px; color: rgba(238, 242, 248, 0.9); }

.msg--agent .avatar { margin-top: 1px; }

.msg--agent.is-cont { margin-top: -4px; }

.msg--agent.is-cont .avatar { visibility: hidden; }

.msg__text { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }

/* the person: a faint, thin-edged bubble */
.msg--contact {
  align-self: flex-end;
  max-width: min(82%, 480px);
  padding: 9px 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  border-radius: 16px 16px 4px 16px;
}

@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* typing… */
.typing { display: inline-flex; gap: 5px; align-items: center; height: 24px; }

.typing span { width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); animation: typing 1.2s infinite ease-in-out; }

.typing span:nth-child(2) { animation-delay: 0.15s; }

.typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing { 0%, 60%, 100% { opacity: 0.35; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }

/* the two paths, the suggestions and the WhatsApp shortcut: thin outlines, aligned with the text */
.actions {
  align-self: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 560px;
  margin-left: var(--indent);
  animation: msg-in 0.35s var(--ease) both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn:hover { background: rgba(255, 255, 255, 0.045); border-color: rgba(238, 242, 248, 0.38); }

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn--fill { border-color: rgba(238, 242, 248, 0.42); }

.btn--chip { color: var(--text-2); }

.btn--chip:hover { color: var(--text); }

.btn--whatsapp { border-color: rgba(37, 211, 102, 0.42); }

.btn--whatsapp svg { color: var(--whatsapp); }

.btn--whatsapp:hover { background: rgba(37, 211, 102, 0.07); border-color: rgba(37, 211, 102, 0.7); }

.actions--used .btn { display: none; }

/* what the person sent: photo, PDF, audio (+ what we understood of the audio) */
.msg--file { display: flex; flex-direction: column; gap: 6px; }

.msg--file img { display: block; max-width: 100%; max-height: 260px; border-radius: 10px; }

.msg__tag { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); }

.msg__tag svg { width: 16px; height: 16px; flex-shrink: 0; }

.msg__transcript { font-size: 13.5px; line-height: 1.5; color: var(--text-3); font-style: italic; }

/* in the site's chat balloon: the panel has its own header */
.is-embed .top { display: none; }

.is-embed .chat__log { padding-top: 16px; }

/* ---------- composer: one quiet card ---------- */
.composer { padding: 10px max(14px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }

.composer[hidden] { display: none; }

.composer__box {
  max-width: 640px;
  margin: 0 auto;
  padding: 8px 8px 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-2);
  border-radius: 20px;
  transition: border-color 0.2s;
}

.composer__box:focus-within { border-color: rgba(238, 242, 248, 0.32); }

.composer__label { display: block; padding: 2px 0 0 8px; font-size: 12px; color: var(--text-3); }

.composer__form { display: flex; align-items: flex-end; gap: 4px; }

.composer__input {
  flex: 1;
  min-height: 40px;
  max-height: 140px;
  padding: 9px 8px;
  font-size: 16px; /* 16px: iOS does not zoom into the field */
  line-height: 1.4;
  resize: none;
  background: transparent;
  border: none;
  outline: none;
}

.composer__input::placeholder { color: var(--text-3); }

.composer__send[hidden], .composer__icon[hidden], .composer__input[hidden], .composer__rec[hidden], .composer__file[hidden], .composer__label[hidden] { display: none; }

.composer__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 40px;
  flex-shrink: 0;
  border: none;
  background: none;
  color: var(--text-3);
  cursor: pointer;
  transition: color 0.2s;
}

.composer__icon svg { width: 19px; height: 19px; }

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

.composer__icon:disabled { opacity: 0.35; cursor: default; }

.composer__send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 1px;
  flex-shrink: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: var(--text);
  color: #0a0a0b;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}

.composer__send svg { width: 18px; height: 18px; }

.composer__send:hover { background: #fff; }

/* nothing to send yet: the button stays, quiet */
.composer__send:disabled { background: transparent; color: var(--text-3); border-color: var(--line-2); cursor: default; }

/* the mic waits as a quiet outline too */
#mic { background: transparent; color: var(--text-2); border-color: var(--line-2); }

#mic:hover { color: var(--text); border-color: rgba(238, 242, 248, 0.38); }

.composer__rec { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; color: var(--text-2); }

.composer__rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); animation: rec 1.2s infinite ease-in-out; }

.composer__rec-time { font-variant-numeric: tabular-nums; color: var(--text); }

@keyframes rec { 50% { opacity: 0.3; } }

/* the file waiting to be sent, inside the card */
.composer__file { padding: 2px 0 6px; }

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 5px 5px 5px 7px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
}

.file-chip img { width: 36px; height: 36px; object-fit: cover; border-radius: 7px; }

.file-chip svg { width: 20px; height: 20px; color: var(--text-2); flex-shrink: 0; }

.file-chip__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; color: var(--text-2); }

.file-chip__remove {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--text-3);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.file-chip__remove:hover { color: var(--text); }

.composer__legal { max-width: 640px; margin: 8px auto 0; font-size: 11px; line-height: 1.4; color: var(--text-3); text-align: center; }

.composer__legal a { text-underline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .msg, .actions { animation: none; }
  .typing span, .composer__rec-dot { animation: none; opacity: 0.7; }
}

/* ---------- document pages (/privacidade) ---------- */
.doc { max-width: 720px; margin: 0 auto; padding: 48px 16px 72px; }

.doc h1 { font-family: var(--heading); font-weight: 400; font-size: clamp(2rem, 6vw, 2.8rem); line-height: 1.05; letter-spacing: -0.035em; }

.doc__updated { margin-top: 12px; font-size: 14px; color: var(--text-3); }

.doc h2 { margin-top: 40px; font-family: var(--heading); font-weight: 500; font-size: 1.25rem; letter-spacing: -0.02em; }

.doc p, .doc li { margin-top: 12px; color: var(--text-2); font-size: 16px; line-height: 1.65; }

.doc ul { padding-left: 20px; }

.doc li { margin-top: 8px; }

.doc strong { color: var(--text); font-weight: 600; }

.doc a { color: var(--text); text-underline-offset: 3px; }

.doc__back { display: inline-block; margin-top: 48px; font-size: 15px; }
