/* Identidade herdada de growth.cleitonmaranhao.com */
:root {
  --canvas: #100c0a;
  --background: #16120e;
  --surface: #261f1a;
  --card: #1e1814;
  --foreground: #f1eee9;
  --ink: #f7f5f1;
  --muted: #29231f;
  --muted-foreground: #9d9790;
  --ember: #3bcddc;
  --ember-soft: #1d97a3;
  --hairline: rgba(241, 238, 231, 0.12);
  --input-border: rgba(241, 238, 231, 0.16);
  --radius: 1.25rem;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
}

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

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

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  min-height: 100dvh;
}

/* progresso */
.progress-track {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--hairline);
  z-index: 20;
}
#progress-bar {
  height: 100%;
  width: 0%;
  background: var(--ember);
  transition: width 0.3s ease;
}
#progress-count {
  position: fixed;
  top: 10px;
  right: 16px;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--muted-foreground);
  z-index: 20;
}

/* cabecalho */
.page-head {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 20px 8px;
  text-align: center;
}
.page-head img.logo {
  height: 36px;
  width: auto;
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--muted-foreground);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 12px;
}

/* conversa */
main {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 20px 40px;
}
#chat {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 20px;
}

.msg-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  animation: rise 0.25s ease both;
}
.msg-row.user {
  justify-content: flex-end;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .msg-row {
    animation: none;
  }
  #progress-bar {
    transition: none;
  }
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid var(--hairline);
}

.bubble {
  max-width: 78%;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 17px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.bot-bubble {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-bottom-left-radius: 6px;
}
.user-bubble {
  background: var(--ember);
  color: var(--canvas);
  border: none;
  border-bottom-right-radius: 6px;
  font-family: inherit;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.user-bubble:hover,
.user-bubble:focus-visible {
  background: #5ad8e5;
}
.user-bubble:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* digitando */
.typing {
  display: flex;
  gap: 5px;
  padding: 16px 18px;
}
.typing .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-foreground);
  animation: blink 1.2s infinite both;
}
.typing .dot:nth-child(2) {
  animation-delay: 0.2s;
}
.typing .dot:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.25;
  }
  40% {
    opacity: 1;
  }
}

/* area de input */
#input-area {
  padding-top: 6px;
}
.input-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--input-border);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.15s ease;
}
.field::placeholder {
  color: var(--muted-foreground);
  opacity: 0.7;
}
.field:focus {
  border-color: var(--ember);
}
.field-textarea {
  resize: none;
  min-height: 88px;
}

.field-prefix-wrap {
  position: relative;
}
.field-prefix {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ember);
  font-weight: 600;
  font-size: 17px;
  pointer-events: none;
}
.field-with-prefix {
  padding-left: 40px;
}

.btn-primary {
  min-height: 52px;
  padding: 14px 32px;
  background: var(--ember);
  color: var(--canvas);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  align-self: flex-start;
}
.btn-primary:hover {
  background: #5ad8e5;
}
.btn-primary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.btn-primary:active {
  transform: scale(0.98);
}

/* multipla escolha */
.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.choice-btn {
  min-height: 52px;
  padding: 14px 20px;
  background: var(--card);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  border: 1.5px solid var(--input-border);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.choice-btn:hover {
  border-color: var(--ember);
  background: var(--surface);
}
.choice-btn:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}
.choice-btn[aria-checked='true'] {
  border-color: var(--ember);
}

/* estados auxiliares */
.field-error {
  color: #ea3c3f;
  font-size: 15px;
}
.email-suggest {
  font-size: 15px;
  color: var(--muted-foreground);
}
.suggest-btn {
  background: none;
  border: none;
  color: var(--ember);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0 2px;
  font-family: inherit;
}
.edit-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted-foreground);
  margin-bottom: 10px;
}
.edit-cancel {
  background: none;
  border: 1px solid var(--input-border);
  border-radius: 999px;
  color: var(--muted-foreground);
  font-size: 13px;
  padding: 3px 12px;
  cursor: pointer;
  font-family: inherit;
}
.edit-cancel:hover {
  color: var(--ink);
  border-color: var(--ember);
}

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

.hp-wrap {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

@media (max-width: 420px) {
  body {
    font-size: 16px;
  }
  .bubble {
    max-width: 85%;
    font-size: 16px;
  }
  .avatar {
    width: 38px;
    height: 38px;
  }
  .btn-primary {
    width: 100%;
    align-self: stretch;
  }
}
