/*
 * Cartas da versão vsl: overlay escuro translúcido, carta branca centralizada
 * (largura máxima 26rem, margem de 16px no celular) e as ilustrações animadas.
 * As animações são curtas (transition/@keyframes) e desligadas para quem
 * prefere movimento reduzido: nesses casos a carta aparece já no estado final.
 */

.rq-cartas-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000000; /* acima dos bloqueadores do motor (1000/100000) */
  display: flex;
  overflow-y: auto;
  padding: 16px; /* margem de 16px no celular (e respiro no desktop) */
  background: rgba(0, 0, 0, 0.65);
  animation: rq-cartas-funde 0.2s ease-out backwards;
}

.rq-cartas-card {
  width: 100%;
  min-width: 0;
  max-width: 26rem;
  margin: auto; /* centraliza; quando a carta é maior que a tela, deixa rolar do topo */
  padding: 24px 20px 20px;
  background: #ffffff;
  color: #18181b;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  text-align: center;
  animation: rq-cartas-entra 0.25s ease-out backwards;
}

.rq-cartas-fechando {
  opacity: 0;
  transition: opacity 0.16s ease;
}

.rq-cartas-titulo {
  margin: 0 0 10px;
  font-size: 1.2rem;
  line-height: 1.25;
  font-weight: 700;
  color: #111111;
}

.rq-cartas-texto {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.5;
  color: #3f3f46;
}

.rq-cartas-depois {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 600;
  color: #1f1f24;
}

.rq-cartas-fonte {
  display: inline-block;
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.4;
  color: #6b7280;
  text-decoration: underline;
}

.rq-cartas-botao {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  background: #E5484D;
  color: #ffffff;
  font: 600 16px/1 Inter, sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.rq-cartas-botao:hover { background: #d93a3f; }
.rq-cartas-botao:active { transform: scale(0.99); }

/* ---------- resumo: os blocos marcados um a um (visual checklist) ---------- */

.rq-cartas-lista {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  text-align: left;
}
.rq-cartas-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 2px;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 500;
  color: #27272a;
  animation: rq-cartas-marca 0.3s ease-out backwards;
}
.rq-cartas-check {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #E5484D;
  color: #ffffff;
  animation: rq-cartas-pop 0.25s ease-out backwards;
}
.rq-cartas-check svg {
  display: block;
  width: 13px;
  height: 13px;
  margin: 4.5px auto;
}

/* ---------- ilustrações ---------- */

.rq-cartas-visual {
  max-width: 240px;
  margin: 0 auto 12px;
}
.rq-vis {
  display: block;
  width: 100%;
  height: auto;
}
.rq-vis text {
  font: 600 8.5px/1.2 Inter, sans-serif, system-ui, Arial, sans-serif;
  fill: #6b7280;
}

/* pulso: círculos concêntricos pulsando */
.rq-vis .rq-pulso {
  fill: none;
  stroke: #E5484D;
  stroke-width: 2.5;
  opacity: 0.9;
  transform-box: fill-box;
  transform-origin: center;
  animation: rq-cartas-pulso 1.6s ease-in-out infinite;
}
.rq-vis .rq-pulso.b { opacity: 0.6; animation-delay: 0.15s; }
.rq-vis .rq-pulso.c { opacity: 0.35; animation-delay: 0.3s; }
.rq-vis .rq-pulso-n {
  fill: #E5484D;
  transform-box: fill-box;
  transform-origin: center;
  animation: rq-cartas-bate 1.6s ease-in-out infinite;
}

/* duas-barras: sobem até alturas diferentes, cada uma no seu tempo */
.rq-vis .rq-barras-chao { stroke: #d4d4d8; stroke-width: 2; stroke-linecap: round; }
.rq-vis .rq-barra {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: rq-cartas-sobe 0.8s ease-out backwards;
}
.rq-vis .rq-barra.a { fill: #E5484D; }
.rq-vis .rq-barra.b { fill: #f4a9ac; animation-delay: 0.3s; }

/* grade-93: grade 10×10 de pontos que se acendem até 93, linha por linha */
.rq-grade path { fill: none; stroke-width: 4; stroke-linecap: round; }
.rq-grade path.off { stroke: #e5e7eb; }
.rq-grade path.on { stroke: #E5484D; animation: rq-cartas-acende 0.25s ease-out backwards; }
.rq-grade path.on:nth-child(2) { animation-delay: 0.05s; }
.rq-grade path.on:nth-child(3) { animation-delay: 0.1s; }
.rq-grade path.on:nth-child(4) { animation-delay: 0.15s; }
.rq-grade path.on:nth-child(5) { animation-delay: 0.2s; }
.rq-grade path.on:nth-child(6) { animation-delay: 0.25s; }
.rq-grade path.on:nth-child(7) { animation-delay: 0.3s; }
.rq-grade path.on:nth-child(8) { animation-delay: 0.35s; }
.rq-grade path.on:nth-child(9) { animation-delay: 0.4s; }
.rq-grade path.on:nth-child(10) { animation-delay: 0.45s; }

/* ciclo: olhar → aperto → vontade de mandar mensagem, girando devagar */
.rq-ciclo .rq-ciclo-a { fill: none; stroke: #E5484D; stroke-width: 2; }
.rq-ciclo .rq-ciclo-p { fill: #E5484D; }
.rq-ciclo text { font-size: 8px; }
.rq-ciclo .rq-ciclo-g {
  transform-box: view-box;
  transform-origin: 100px 52px;
  animation: rq-cartas-gira 16s linear infinite;
}

/* espelho: silhueta que ganha contorno aos poucos */
.rq-vis .rq-esp-moldura { fill: none; stroke: #d4d4d8; stroke-width: 2; }
.rq-vis .rq-esp-traco {
  fill: rgba(229, 72, 77, 0.07);
  stroke: #E5484D;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 100;
  animation: rq-cartas-desenha 1.2s ease-out backwards;
}
.rq-vis .rq-esp-t2 { animation-delay: 0.5s; }

/* ponte: dois adultos e uma criança no meio, ligados por um arco */
.rq-vis .rq-ponte-chao { stroke: #d4d4d8; stroke-width: 2; stroke-linecap: round; }
.rq-vis .rq-ponte-p { fill: #9ca3af; animation: rq-cartas-acende 0.3s ease-out backwards; }
.rq-vis .rq-ponte-p2 { animation-delay: 0.15s; }
.rq-vis .rq-ponte-p3 { fill: #E5484D; animation-delay: 0.3s; }
.rq-vis .rq-ponte-arco {
  fill: none;
  stroke: #E5484D;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 100;
  animation: rq-cartas-desenha 0.9s ease-out 0.5s backwards;
}

/* ---------- keyframes ---------- */

@keyframes rq-cartas-funde { from { opacity: 0; } to { opacity: 1; } }
@keyframes rq-cartas-entra {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@keyframes rq-cartas-marca {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
@keyframes rq-cartas-pop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}
@keyframes rq-cartas-pulso {
  0%, 100% { transform: scale(1); }
  35% { transform: scale(1.12); }
}
@keyframes rq-cartas-bate {
  0%, 100% { transform: scale(1); }
  35% { transform: scale(1.3); }
}
@keyframes rq-cartas-sobe {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}
@keyframes rq-cartas-acende { from { opacity: 0; } to { opacity: 1; } }
@keyframes rq-cartas-gira { to { transform: rotate(1turn); } }
@keyframes rq-cartas-desenha {
  from { stroke-dashoffset: 100; fill-opacity: 0; }
  to { stroke-dashoffset: 0; fill-opacity: 1; }
}

/* movimento reduzido: tudo desligado, a carta já aparece no estado final */
@media (prefers-reduced-motion: reduce) {
  .rq-cartas-overlay,
  .rq-cartas-overlay * {
    animation: none !important;
    transition: none !important;
  }
}
