/* ════════════════════════════════════════════════════════════
   VALOR BETA — substitui o vídeo por 4 cards SVG animados
   ════════════════════════════════════════════════════════════ */

.value-section.is-beta {
  padding: 100px 0 110px;
  position: relative;
  overflow: hidden;
}
.value-section.is-beta .value-media-wrap { display: none !important; }
.value-section.is-beta .content-wrapper {
  position: relative;
  z-index: 1;
}

.vs-wrap {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 64px;
  padding: 40px 0;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════
   Background: ROI subindo + mensagens voando
   ═══════════════════════════════════════════════════ */
.vs-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  /* Máscara: animação só na faixa dos cards, some antes de bater no texto */
  -webkit-mask-image: linear-gradient(to bottom,
    #000 0%,
    #000 52%,
    transparent 60%,
    transparent 100%);
  mask-image: linear-gradient(to bottom,
    #000 0%,
    #000 52%,
    transparent 60%,
    transparent 100%);
}

/* Mensagens voando: ícone de chat deslizando esquerda → direita
   Parallax: 4 camadas de profundidade (xs far → xl near) */
.vs-msg {
  --peak: 0.55;
  position: absolute;
  left: -56px;
  top: var(--y);
  width: 26px;
  height: 20px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 22'><path d='M5 2h18a3 3 0 0 1 3 3v9a3 3 0 0 1-3 3h-9l-5 4v-4H5a3 3 0 0 1-3-3V5a3 3 0 0 1 3-3z' fill='%23183EEB'/><circle cx='10' cy='10' r='1.4' fill='%23fff'/><circle cx='14' cy='10' r='1.4' fill='%23fff'/><circle cx='18' cy='10' r='1.4' fill='%23fff'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0;
  filter: drop-shadow(0 5px 12px rgba(24, 62, 235, 0.18));
  animation: vs-msg-fly var(--dur) linear infinite;
  animation-delay: var(--d);
  will-change: transform, opacity;
}

/* Camada FAR — pequena, muito translúcida, um pouco desfocada */
.vs-msg--xs {
  --peak: 0.22;
  width: 14px;
  height: 11px;
  filter: blur(0.5px) drop-shadow(0 2px 6px rgba(24, 62, 235, 0.1));
}
/* Camada NEAR — maior, mais sólida */
.vs-msg--l {
  --peak: 0.72;
  width: 38px;
  height: 30px;
  filter: drop-shadow(0 10px 22px rgba(24, 62, 235, 0.25));
}
/* Camada XL — muito perto, bold, levemente mais saturada */
.vs-msg--xl {
  --peak: 0.92;
  width: 52px;
  height: 40px;
  filter: drop-shadow(0 14px 28px rgba(24, 62, 235, 0.32)) saturate(1.1);
}

@keyframes vs-msg-fly {
  0%   { transform: translateX(0);                  opacity: 0; }
  6%   {                                             opacity: var(--peak); }
  94%  {                                             opacity: var(--peak); }
  100% { transform: translateX(calc(100vw + 120px)); opacity: 0; }
}

/* Grid de cards */
.vs-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.vs-card {
  position: relative;
  aspect-ratio: 1 / 1.08;
  border-radius: 24px;
  background: linear-gradient(155deg, #ffffff 0%, #F2F6FE 100%);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.95) inset,
    0 -2px 0 rgba(24, 62, 235, 0.05) inset,
    0 16px 34px rgba(24, 62, 235, 0.11),
    0 4px 10px rgba(24, 62, 235, 0.06);
  padding: 24px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  opacity: 0;
  transform: translateY(22px) scale(0.88);
  animation: vs-pop-in 680ms cubic-bezier(0.22, 1.25, 0.36, 1) forwards;
  overflow: hidden;
}
.vs-card:nth-child(1) { animation-delay: 0.10s; }
.vs-card:nth-child(2) { animation-delay: 0.30s; }
.vs-card:nth-child(3) { animation-delay: 0.50s; }
.vs-card:nth-child(4) { animation-delay: 0.70s; }

@keyframes vs-pop-in {
  0%   { opacity: 0; transform: translateY(22px) scale(0.88); }
  55%  { opacity: 1; transform: translateY(-4px) scale(1.04); }
  100% { opacity: 1; transform: translateY(0)   scale(1); }
}

.vs-card__visual {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 0 10px;
}
.vs-card__visual svg {
  width: 88%;
  max-width: 180px;
  height: auto;
}
.vs-card__visual .vs-burst {
  width: 170px;
  height: 130px;
}

.vs-card__title {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.25;
  color: #183EEB;
  text-align: center;
  margin: 0 0 6px;
}
.vs-card__desc {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.4;
  color: #5a5a5a;
  text-align: center;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}

/* ────── SVG animations internas ────── */

/* Card 1 — disparo em massa (lista de contatos recebendo em cascata) */
.vs-burst {
  position: relative;
  width: 180px;
  height: 140px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 4px 6px 30px;
  box-sizing: border-box;
}

.vb-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  opacity: 0.45;
  animation: vb-row-activate 4s ease-out infinite;
}
.vb-r1 { animation-delay: 0.15s; }
.vb-r2 { animation-delay: 0.40s; }
.vb-r3 { animation-delay: 0.65s; }
.vb-r4 { animation-delay: 0.90s; }
.vb-r5 { animation-delay: 1.15s; }

@keyframes vb-row-activate {
  0%      { opacity: 0.30; transform: translateX(-2px); }
  6%      { opacity: 0.30; transform: translateX(-2px); }
  14%     { opacity: 1;    transform: translateX(0); }
  80%     { opacity: 1;    transform: translateX(0); }
  100%    { opacity: 0.30; transform: translateX(-2px); }
}

.vb-avatar {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4170F0, #183EEB);
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(24, 62, 235, 0.08);
}
.vb-row:nth-child(2) .vb-avatar { background: linear-gradient(135deg, #6190F5, #4170F0); }
.vb-row:nth-child(3) .vb-avatar { background: linear-gradient(135deg, #183EEB, #1530B5); }
.vb-row:nth-child(4) .vb-avatar { background: linear-gradient(135deg, #4170F0, #6190F5); }
.vb-row:nth-child(5) .vb-avatar { background: linear-gradient(135deg, #5B85F2, #183EEB); }

.vb-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #E1E8F9;
  overflow: hidden;
  position: relative;
}
.vb-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 0;
  background: linear-gradient(90deg, #183EEB, #4170F0);
  border-radius: 3px;
  animation: vb-bar-fill 4s ease-out infinite;
}
.vb-r1 .vb-bar::after { animation-delay: 0.15s; }
.vb-r2 .vb-bar::after { animation-delay: 0.40s; }
.vb-r3 .vb-bar::after { animation-delay: 0.65s; }
.vb-r4 .vb-bar::after { animation-delay: 0.90s; }
.vb-r5 .vb-bar::after { animation-delay: 1.15s; }

@keyframes vb-bar-fill {
  0%, 6%  { width: 0;    opacity: 1; }
  18%     { width: 60%;  }
  26%     { width: 100%; opacity: 1; }
  80%     { width: 100%; opacity: 1; }
  100%    { width: 100%; opacity: 0; }
}

.vb-check {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #22C55E;
  flex-shrink: 0;
  position: relative;
  opacity: 0;
  transform: scale(0.3);
  animation: vb-check-pop 4s ease-out infinite;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.35);
}
.vb-check::before {
  content: '';
  position: absolute;
  left: 3.5px;
  top: 6.5px;
  width: 3px;
  height: 1.6px;
  background: #fff;
  border-radius: 1px;
  transform: rotate(45deg);
  transform-origin: left center;
}
.vb-check::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 7.5px;
  width: 6px;
  height: 1.6px;
  background: #fff;
  border-radius: 1px;
  transform: rotate(-50deg);
  transform-origin: left center;
}
.vb-r1 .vb-check { animation-delay: 0.40s; }
.vb-r2 .vb-check { animation-delay: 0.65s; }
.vb-r3 .vb-check { animation-delay: 0.90s; }
.vb-r4 .vb-check { animation-delay: 1.15s; }
.vb-r5 .vb-check { animation-delay: 1.40s; }

@keyframes vb-check-pop {
  0%, 6%   { opacity: 0; transform: scale(0.3); }
  14%      { opacity: 1; transform: scale(1.25); }
  22%, 80% { opacity: 1; transform: scale(1); }
  100%    { opacity: 0; transform: scale(0.8); }
}

.vb-counter {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: baseline;
  gap: 5px;
  opacity: 0;
  animation: vb-counter-in 4s ease-out infinite;
  animation-delay: 1.60s;
}
.vb-counter-n {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #22C55E;
  line-height: 1;
}
.vb-counter-lbl {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 10px;
  color: #5a5a5a;
  line-height: 1;
  text-transform: lowercase;
  letter-spacing: 0.3px;
}

@keyframes vb-counter-in {
  0%, 8%   { opacity: 0; transform: translate(-50%, 4px); }
  18%, 80% { opacity: 1; transform: translate(-50%, 0); }
  100%    { opacity: 0; transform: translate(-50%, 0); }
}

/* Card 2 — tradução por IA (Google Translate style) */
.vs-translate {
  position: relative;
  width: 180px;
  height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 auto;
  padding: 4px;
  box-sizing: border-box;
}

.vt-bubble {
  position: relative;
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: 16px 16px 16px 4px;
  background: linear-gradient(180deg, #EEF3FE 0%, #DCE5FA 100%);
  border: 1px solid rgba(24, 62, 235, 0.16);
  box-shadow: 0 4px 12px rgba(24, 62, 235, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.vt-bubble::after {
  content: '';
  position: absolute;
  left: -1px;
  bottom: -5px;
  width: 12px;
  height: 10px;
  background: linear-gradient(180deg, #DCE5FA 0%, #DCE5FA 100%);
  border-left: 1px solid rgba(24, 62, 235, 0.16);
  border-bottom: 1px solid rgba(24, 62, 235, 0.16);
  border-bottom-left-radius: 10px;
  transform: skewX(-20deg);
}

.vt-phrase {
  position: absolute;
  font-family: 'Sora', sans-serif;
  font-weight: 500;
  font-size: 12.5px;
  color: #183EEB;
  letter-spacing: 0.1px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  animation: vt-phrase-cycle 10s ease-in-out infinite;
}
.vt-ph-1 { animation-delay: 0s; }
.vt-ph-2 { animation-delay: 2s; }
.vt-ph-3 { animation-delay: 4s; }
.vt-ph-4 { animation-delay: 6s; }
.vt-ph-5 { animation-delay: 8s; }

@keyframes vt-phrase-cycle {
  0%        { opacity: 0; transform: translateY(6px) scale(0.96); filter: blur(2px); }
  4%        { opacity: 1; transform: translateY(0)    scale(1);    filter: blur(0); }
  18%       { opacity: 1; transform: translateY(0)    scale(1);    filter: blur(0); }
  22%, 100% { opacity: 0; transform: translateY(-6px) scale(0.96); filter: blur(2px); }
}

.vt-langs {
  display: flex;
  gap: 4px;
  align-items: center;
}

.vt-lang {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 9.5px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 999px;
  background: #EEF3FE;
  color: #8895B2;
  letter-spacing: 0.5px;
  animation: vt-lang-cycle 10s ease-in-out infinite;
}
.vt-lg-1 { animation-delay: 0s; }
.vt-lg-2 { animation-delay: 2s; }
.vt-lg-3 { animation-delay: 4s; }
.vt-lg-4 { animation-delay: 6s; }
.vt-lg-5 { animation-delay: 8s; }

@keyframes vt-lang-cycle {
  0%, 20%   { background: #183EEB; color: #fff; transform: scale(1.1); box-shadow: 0 2px 6px rgba(24,62,235,0.3); }
  22%, 100% { background: #EEF3FE; color: #8895B2; transform: scale(1); box-shadow: none; }
}

/* Card 3 — barras crescendo em sequência */
.vs-bars rect.bar {
  transform-origin: 50% 100%;
  transform: scaleY(0);
  animation: vs-bar-grow 2.8s ease-in-out infinite;
}
.vs-bars rect.bar:nth-of-type(1) { animation-delay: 0s; }
.vs-bars rect.bar:nth-of-type(2) { animation-delay: 0.18s; }
.vs-bars rect.bar:nth-of-type(3) { animation-delay: 0.36s; }
.vs-bars rect.bar:nth-of-type(4) { animation-delay: 0.54s; }
@keyframes vs-bar-grow {
  0%      { transform: scaleY(0); }
  15%     { transform: scaleY(1); }
  75%     { transform: scaleY(1); }
  85%     { transform: scaleY(1); }
  100%    { transform: scaleY(1); }
}

/* Card 4 — Broady vs Manychat (custo x escala) */
.vs-trend .vt-line {
  stroke-dasharray: 280;
  stroke-dashoffset: 280;
}
.vs-trend .vt-manychat { animation: vt-draw-slow 4.4s ease-in-out infinite; }
.vs-trend .vt-broady   { animation: vt-draw-fast 4.4s ease-in-out infinite; animation-delay: 0.2s; }

@keyframes vt-draw-slow {
  0%, 8%   { stroke-dashoffset: 280; }
  70%, 86% { stroke-dashoffset: 0; }
  100%    { stroke-dashoffset: 280; }
}
@keyframes vt-draw-fast {
  0%, 10%  { stroke-dashoffset: 280; }
  42%, 86% { stroke-dashoffset: 0; }
  100%    { stroke-dashoffset: 280; }
}

.vs-trend .vt-tip {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
}
.vs-trend .vt-tip-manychat { animation: vt-tip-slow 4.4s ease-in-out infinite; }
.vs-trend .vt-tip-broady   { animation: vt-tip-fast 4.4s ease-in-out infinite; animation-delay: 0.2s; }

@keyframes vt-tip-slow {
  0%, 65%  { opacity: 0; transform: scale(0.3); }
  72%      { opacity: 1; transform: scale(1.35); }
  80%, 86% { opacity: 1; transform: scale(1); }
  100%    { opacity: 0; transform: scale(0.3); }
}
@keyframes vt-tip-fast {
  0%, 38%  { opacity: 0; transform: scale(0.3); }
  45%      { opacity: 1; transform: scale(1.45); }
  55%, 86% { opacity: 1; transform: scale(1); }
  100%    { opacity: 0; transform: scale(0.3); }
}

.vs-trend .vt-label {
  opacity: 0;
}
.vs-trend .vt-label-manychat { animation: vt-label-slow 4.4s ease-in-out infinite; }
.vs-trend .vt-label-broady   { animation: vt-label-fast 4.4s ease-in-out infinite; animation-delay: 0.2s; }

@keyframes vt-label-slow {
  0%, 72%  { opacity: 0; }
  80%, 86% { opacity: 1; }
  100%    { opacity: 0; }
}
@keyframes vt-label-fast {
  0%, 45%  { opacity: 0; }
  55%, 86% { opacity: 1; }
  100%    { opacity: 0; }
}

/* ────── Responsivo ────── */
@media (max-width: 900px) {
  .value-section.is-beta { padding: 70px 0 80px; }
  .vs-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 1fr;
    gap: 16px;
  }
  .vs-card {
    aspect-ratio: auto;
    padding: 16px 12px;
    justify-content: center;
    gap: 8px;
  }
  .vs-card__visual {
    flex: 0 0 auto;
    height: 104px;
    padding: 0;
    margin: 0;
  }
  .vs-card__visual svg {
    width: auto;
    max-width: 140px;
    max-height: 100px;
  }
  .vs-card__visual .vs-burst,
  .vs-burst { width: 140px; height: 100px; gap: 5px; padding: 2px 4px 16px; }
  .vs-card__visual .vs-translate,
  .vs-translate { width: 150px; height: 100px; gap: 8px; padding: 2px; }
  .vt-bubble     { height: 36px; padding: 0 10px; }
  .vt-phrase     { font-size: 11.5px; }
  .vt-lang       { font-size: 9px; padding: 3px 5px; letter-spacing: 0.4px; }
  .vs-card__title {
    font-size: 15px;
    line-height: 1.2;
    margin: 0 0 4px;
  }
  .vs-card__desc {
    font-size: 12px;
    line-height: 1.35;
    min-height: 32px;
    padding: 0 2px;
  }
  .vs-msg        { width: 22px; height: 17px; }
  .vs-msg--xs    { width: 12px; height: 10px; }
  .vs-msg--l     { width: 30px; height: 24px; }
  .vs-msg--xl    { width: 40px; height: 32px; }
}
@media (max-width: 480px) {
  .vs-wrap { margin-bottom: 44px; padding: 28px 0; }
  .vs-grid { gap: 12px; }
  .vs-card {
    padding: 14px 10px;
    border-radius: 20px;
    gap: 6px;
  }
  .vs-card__visual {
    height: 88px;
  }
  .vs-card__visual svg { max-width: 120px; max-height: 84px; }
  .vs-card__visual .vs-burst,
  .vs-burst { width: 120px; height: 84px; gap: 4px; padding: 2px 4px 14px; }
  .vb-avatar, .vb-check { width: 10px; height: 10px; }
  .vb-check::before { left: 2.5px; top: 4.6px; width: 2.2px; height: 1.2px; }
  .vb-bar        { height: 4.5px; }
  .vb-counter-n  { font-size: 13px; }
  .vb-counter-lbl{ font-size: 8.5px; }
  .vs-card__visual .vs-translate,
  .vs-translate { width: 128px; height: 84px; gap: 6px; }
  .vt-bubble     { height: 32px; padding: 0 8px; border-radius: 12px 12px 12px 4px; }
  .vt-phrase     { font-size: 10.5px; }
  .vt-lang       { font-size: 8px; padding: 2.5px 4px; letter-spacing: 0.3px; }
  .vs-card__title {
    font-size: 13.5px;
    line-height: 1.2;
    margin: 0 0 2px;
  }
  .vs-card__desc {
    font-size: 11.5px;
    line-height: 1.3;
    min-height: 30px;
    padding: 0;
  }
  .vs-msg        { width: 18px; height: 14px; }
  .vs-msg--xs    { width: 10px; height: 8px; }
  .vs-msg--l     { width: 26px; height: 20px; }
  .vs-msg--xl    { width: 34px; height: 26px; }
}

/* Respeita preferência do usuário */
@media (prefers-reduced-motion: reduce) {
  .vs-card, .vs-msg,
  .vb-row, .vb-bar::after, .vb-check, .vb-counter,
  .vt-phrase, .vt-lang, .vs-bars rect.bar,
  .vs-trend .vt-line, .vs-trend .vt-tip, .vs-trend .vt-label {
    stroke-dashoffset: 0 !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .vs-msg { display: none !important; }
}

/* ════════════════════════════════════════════════════════════
   MARCA-TEXTO ORGÂNICO — destaque pincelado atrás do texto
   ════════════════════════════════════════════════════════════ */
.vs-highlight {
  position: relative;
  display: inline-block;
  isolation: isolate;
  padding: 0 10px;
  white-space: nowrap;
}

.vs-highlight__text {
  position: relative;
  z-index: 2;
  color: inherit;
}

.vs-highlight__brush {
  position: absolute;
  left: -2px;
  right: -2px;
  top: -12%;
  width: calc(100% + 4px);
  height: 124%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transform: rotate(-1deg);
  filter: drop-shadow(0 1px 4px rgba(168, 191, 255, 0.25));
  animation: vs-highlight-paint 1s cubic-bezier(0.55, 0.05, 0.25, 1) 0.4s forwards;
  animation-play-state: paused;
}

.vs-highlight__brush path {
  opacity: 0.65;
}

/* Dispara a pintura quando a seção entra na viewport */
.value-section.is-beta.is-inview .vs-highlight__brush,
.vs-highlight.is-painted .vs-highlight__brush {
  animation-play-state: running;
}

@keyframes vs-highlight-paint {
  0% {
    clip-path: inset(0 100% 0 0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vs-highlight__brush {
    opacity: 1 !important;
    animation: none !important;
    clip-path: none !important;
  }
}
