/* O site de vendas (108): os três desenhos da IA (105 e 106): o áudio que preenche a ficha, a
   descrição no tom escolhido e o que vai para a IA e o que fica no painel. Feitos das peças dos
   outros desenhos (fichas brancas de contorno de tinta, pílulas, a praça no balão da conversa);
   nenhum é captura de tela (CA-005). O estado parado é o desenho completo: a ficha preenchida, o
   texto escrito, as características a caminho da IA. */

/* ---------- Preencher: o áudio do WhatsApp e a ficha que se preenche, campo a campo. ---------- */

.cena-ia-preencher {
  display: grid;
  gap: 0.9em;
  align-content: center;
  padding: 6% 7%;
  container-type: inline-size;
}

/* O texto do áudio, para conferir: só no desenho largo; no estreito, a ficha precisa da altura. */
.transcricao {
  font-style: italic;
  animation: preencher 10s 0.3s infinite both;
}

.transcricao small {
  color: var(--tinta-fraca);
  font-size: 0.82em;
  font-style: normal;
}

@container (max-width: 26rem) {
  .transcricao {
    display: none;
  }
}

/* O áudio: o balão da conversa (o mesmo do WhatsApp do site), com o botão de tocar e a voz. */
.audio {
  display: flex;
  gap: 0.6em;
  align-items: center;
  justify-self: start;
  width: min(100%, 19em);
  padding: 0.55em 0.9em 0.55em 0.55em;
  border: 1.5px solid var(--tinta);
  border-radius: 1em 1em 1em 0.2em;
  background: var(--praca);
}

.tocar {
  position: relative;
  flex: none;
  width: 2.2em;
  height: 2.2em;
  border-radius: 50%;
  background: var(--tinta);
}

.tocar::after {
  content: '';
  position: absolute;
  left: 38%;
  top: 50%;
  border-block: 0.42em solid transparent;
  border-left: 0.68em solid var(--rua);
  transform: translateY(-50%);
}

.ondas {
  display: flex;
  flex: 1;
  gap: 0.18em;
  align-items: center;
  height: 2.2em;
}

.ondas i {
  flex: 1;
  height: var(--h);
  border-radius: 999px;
  background: var(--tinta);
  animation: falar 1.2s ease-in-out calc(var(--n) * -0.17s) infinite alternate;
}

@keyframes falar {
  from {
    transform: scaleY(0.3);
  }

  to {
    transform: none;
  }
}

.audio small {
  flex: none;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* A ficha do imóvel novo: os campos chegam um a um, cada um com a etiqueta da IA. */
.ficha-nova {
  padding: 0.75em 0.9em 0.85em;
  border: 1.5px solid var(--tinta);
  border-radius: 0.9em;
  background: var(--rua);
  box-shadow: 0 10px 22px rgb(27 27 24 / 14%);
}

.ficha-nova > b {
  font: 700 1.3em/1 var(--placa);
  text-transform: uppercase;
}

.campos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45em 1em;
  margin-top: 0.55em;
}

.campos > span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 0.4em;
  align-items: center;
  padding-bottom: 0.3em;
  border-bottom: 1.5px solid var(--tinta);
}

.campos small {
  grid-column: 1 / -1;
  color: var(--tinta-fraca);
  font-size: 0.82em;
}

.campos b {
  min-height: 1.25em;
}

.campos b,
.campos em {
  animation: preencher 10s calc(var(--d) * 0.5s + 0.8s) infinite both;
}

.campos em {
  padding: 0.1em 0.5em;
  border-radius: 999px;
  background: var(--tinta);
  color: var(--rua);
  font-size: 0.75em;
  font-weight: 700;
}

@keyframes preencher {
  0% {
    opacity: 0;
    transform: translateY(0.35em);
  }

  4%,
  88% {
    opacity: 1;
    transform: none;
  }

  94%,
  100% {
    opacity: 0;
    transform: none;
  }
}

/* ---------- Escrever: o tom escolhido, a descrição que se escreve e os dois textos prontos. ---------- */

.cena-ia-escrever {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.75em;
  padding: 6% 7%;
  container-type: inline-size;
}

/* No desenho estreito, a descrição mostra três linhas. */
@container (max-width: 24rem) {
  .descricao > span:last-child {
    display: none;
  }
}

.tons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
}

.tons span {
  padding: 0.3em 0.8em;
  border: 1.5px solid var(--tinta);
  border-radius: 999px;
  background: var(--rua);
  font-weight: 700;
}

.tons .escolhido {
  background: var(--tinta);
  color: var(--rua);
  animation: escolher-o-tom 10s infinite;
}

@keyframes escolher-o-tom {
  0%,
  5% {
    background: var(--rua);
    color: var(--tinta);
  }

  8%,
  100% {
    background: var(--tinta);
    color: var(--rua);
  }
}

.descricao {
  display: grid;
  overflow: hidden;
  gap: 0.1em;
  align-content: start;
  min-height: 0;
  padding: 0.65em 0.9em;
  border: 1.5px solid var(--tinta);
  border-radius: 0.8em;
  background: var(--rua);
}

.descricao small {
  margin-bottom: 0.2em;
  color: var(--tinta-fraca);
  font-size: 0.82em;
}

/* Cada linha se escreve da esquerda para a direita, uma depois da outra. */
.descricao > span {
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  animation: escrever-a-linha 10s linear calc(var(--d) * 0.7s + 1s) infinite both;
}

@keyframes escrever-a-linha {
  0% {
    clip-path: inset(0 100% 0 0);
  }

  6%,
  88% {
    clip-path: inset(0);
  }

  92%,
  100% {
    clip-path: inset(0 100% 0 0);
  }
}

.prontos {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 0.6em;
}

.prontos > span {
  position: relative;
  padding: 0.5em 0.65em 0.6em;
  border: 1.5px solid var(--tinta);
  border-radius: 0.7em;
  background: var(--rua);
  animation: chegar-pronto 10s 4.2s infinite both;
}

.prontos > span + span {
  animation-delay: 4.6s;
}

.prontos small {
  font-size: 0.85em;
  font-weight: 700;
}

.prontos i {
  height: 0.35em;
  margin-top: 0.45em;
  border-radius: 999px;
  background: rgb(27 27 24 / 22%);
}

.prontos i + i {
  width: 60%;
}

.prontos em {
  position: absolute;
  right: 0.45em;
  top: 0.4em;
  padding: 0.05em 0.5em;
  border: 1.5px solid var(--tinta);
  border-radius: 999px;
  background: var(--rua);
  font-size: 0.75em;
  font-weight: 700;
}

@keyframes chegar-pronto {
  0% {
    opacity: 0;
    transform: translateY(0.5em);
  }

  5%,
  50% {
    opacity: 1;
    transform: none;
  }

  54%,
  100% {
    opacity: 0;
    transform: none;
  }
}
