/* voice-promo.css — hover-card de demonstração do Facilita.voice (_VoicePromo).
   Um "mini-filme" de 4 cenas (mensagem → ditado → texto limpo → marca) que roda
   ao passar o mouse em qualquer menção ao Voice ([data-voice-promo]).
   Identidade do produto (creme + violeta + Fraunces), portada dos mesmos tokens
   de voice-mock.css — o card é uma "folha do app" flutuando sobre o site, igual
   ao precedente do .voice-plan-paper. Seletores escopados com prefixo fvp-. */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/fraunces-latin-standard-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/fraunces-latin-standard-italic.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Gatilho (menções ao Voice que abrem o card) ---------- */
/* Só ganha affordance nas páginas que carregam este CSS junto do card —
   em páginas sem o card o atributo fica inerte e nada muda visualmente. */
.fvp-trigger {
  cursor: pointer;
  text-decoration: underline dotted rgb(var(--color-voice-brand) / 0.55);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 0.15s ease;
}
.fvp-trigger:hover,
.fvp-trigger:focus-visible {
  text-decoration-style: solid;
  text-decoration-color: rgb(var(--color-voice-brand));
}
.fvp-trigger:focus-visible {
  outline: 2px solid rgb(var(--color-voice-brand) / 0.6);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Card ---------- */
.fvp-card {
  --fvp-page: #F7F5F1;
  --fvp-surface: #FFFFFF;
  --fvp-muted: #EFEDE7;
  --fvp-ink: #1B1A17;
  --fvp-ink-soft: #403D37;
  --fvp-subtle: #6B675E;
  --fvp-faint: #9A958A;
  --fvp-line: #E5E1D8;
  --fvp-line-strong: #D8D3C7;
  --fvp-brand-50: #F1EFFD;
  --fvp-brand-100: #E5E1FB;
  --fvp-brand-200: #CFC8F7;
  --fvp-brand-400: #8B7BEC;
  --fvp-brand: #5646E5;
  --fvp-brand-600: #4636CE;
  --fvp-brand-700: #3A2CAB;
  --fvp-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --fvp-serif: 'Fraunces', Georgia, 'Times New Roman', serif;

  position: fixed;
  z-index: 60; /* acima do conteúdo; header/menus do site ficam em z-50 */
  width: min(340px, calc(100vw - 24px));
  background: var(--fvp-page);
  color: var(--fvp-ink);
  border: 1px solid var(--fvp-line-strong);
  border-radius: 18px;
  box-shadow:
    0 1px 2px rgb(25 23 18 / 0.08),
    0 24px 64px -16px rgb(0 0 0 / 0.5),
    0 12px 32px -8px rgb(86 70 229 / 0.28);
  font-family: var(--fvp-sans);
  opacity: 0;
  transform: translateY(6px) scale(0.985);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.fvp-card.fvp-open { opacity: 1; transform: none; pointer-events: auto; }
.fvp-card[hidden] { display: none; }
.fvp-card * { box-sizing: border-box; margin: 0; }

/* ---------- Palco (a "tela" do vídeo) ---------- */
.fvp-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 17px 17px 0 0;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, rgb(86 70 229 / 0.07), transparent 60%),
    var(--fvp-page);
  border-bottom: 1px solid var(--fvp-line);
}

/* Progresso segmentado (1 segmento por cena, estilo stories) */
.fvp-progress {
  position: absolute;
  top: 8px; left: 10px; right: 10px;
  display: flex; gap: 4px;
  z-index: 5;
}
.fvp-progress span {
  position: relative;
  flex: 1; height: 3px;
  border-radius: 99px;
  background: rgb(27 26 23 / 0.12);
  overflow: hidden;
}
.fvp-progress span i {
  position: absolute; inset: 0;
  border-radius: 99px;
  background: var(--fvp-brand);
  transform: scaleX(0);
  transform-origin: left center;
}
.fvp-progress span.fvp-seg-run i {
  transition: transform linear;
  transition-duration: var(--fvp-dur, 2s);
  transform: scaleX(1);
}
.fvp-progress span.fvp-seg-done i { transform: scaleX(1); }

/* Janela de e-mail (cenário do caso de uso) */
.fvp-win {
  position: absolute;
  left: 14px; right: 14px; top: 19px; bottom: 12px;
  display: flex; flex-direction: column;
  background: var(--fvp-surface);
  border: 1px solid var(--fvp-line);
  border-radius: 12px;
  box-shadow: 0 10px 30px -12px rgb(27 26 23 / 0.18);
  overflow: hidden;
}
.fvp-win-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--fvp-line);
}
.fvp-win-dots { display: flex; gap: 4px; }
.fvp-win-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--fvp-line-strong); }
.fvp-win-title {
  font-size: 10px; font-weight: 600; color: var(--fvp-subtle);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fvp-msg { display: flex; gap: 8px; padding: 10px 12px 8px; }
.fvp-msg-avatar {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #F6B03C, #D97706);
  color: #fff; font-size: 10px; font-weight: 700;
}
.fvp-msg-name {
  font-size: 9.5px; font-weight: 700; color: var(--fvp-subtle);
  text-transform: uppercase; letter-spacing: 0.03em;
}
.fvp-msg-bubble {
  margin-top: 3px;
  font-size: 11.5px; line-height: 1.45; color: var(--fvp-ink);
  background: var(--fvp-muted);
  border-radius: 3px 10px 10px 10px;
  padding: 6px 9px;
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.fvp-msg-bubble.fvp-show { opacity: 1; transform: none; }

/* Campo de resposta onde o texto ditado "cai" */
.fvp-reply {
  position: relative;
  margin: auto 10px 10px;
  min-height: 52px;
  padding: 8px 9px;
  background: var(--fvp-surface);
  border: 1px solid var(--fvp-line);
  border-radius: 10px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.fvp-reply.fvp-live {
  border-color: var(--fvp-brand-200);
  box-shadow: 0 0 0 3px rgb(86 70 229 / 0.07);
}
.fvp-reply p { font-size: 11.5px; line-height: 1.5; color: var(--fvp-ink); }
.fvp-caret {
  display: inline-block;
  width: 1.5px; height: 12px;
  background: var(--fvp-brand);
  vertical-align: -2px; margin-left: 1px;
  animation: fvp-blink 1s steps(1) infinite;
}
@keyframes fvp-blink { 50% { opacity: 0; } }
.fvp-badge {
  position: absolute; top: -9px; right: 8px;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px;
  font-size: 9px; font-weight: 700; color: var(--fvp-brand);
  background: var(--fvp-brand-50);
  border: 1px solid var(--fvp-brand-100);
  border-radius: 99px;
  opacity: 0; transform: translateY(3px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.fvp-badge svg { width: 9px; height: 9px; }
.fvp-badge.fvp-show { opacity: 1; transform: none; }

/* Fala crua (antes da limpeza por IA) */
.fvp-raw {
  position: absolute;
  left: 50%; bottom: 46px;
  transform: translateX(-50%);
  z-index: 6;
  max-width: 85%;
  padding: 5px 9px;
  background: rgb(25 23 18 / 0.78);
  color: rgb(247 245 241 / 0.92);
  border-radius: 10px;
  font-size: 10px; font-style: italic; line-height: 1.45; text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.fvp-raw.fvp-show { opacity: 1; }

/* Pill do Voice (gravando / transcrevendo), como no app real */
.fvp-pill {
  position: absolute;
  left: 50%; bottom: 10px;
  transform: translateX(-50%) translateY(8px);
  z-index: 6;
  display: flex; align-items: center; gap: 7px;
  padding: 6px 11px;
  border-radius: 99px;
  background: rgb(25 23 18 / 0.88);
  color: #F7F5F1;
  box-shadow: 0 8px 24px -6px rgb(27 26 23 / 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.fvp-pill.fvp-show { opacity: 1; transform: translateX(-50%); }
.fvp-reddot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #ef4444; flex-shrink: 0;
  animation: fvp-blink 1.1s infinite;
}
.fvp-wave { display: flex; align-items: center; gap: 2px; height: 14px; }
.fvp-wave span {
  width: 2px; height: 4px; border-radius: 2px;
  background: linear-gradient(to top, var(--fvp-brand-400), var(--fvp-brand-200));
  transition: height 0.1s ease-out;
}
.fvp-pill kbd {
  font-family: var(--fvp-sans);
  font-size: 8.5px; font-weight: 600;
  color: rgb(247 245 241 / 0.6);
  border: 1px solid rgb(255 255 255 / 0.16);
  background: rgb(255 255 255 / 0.07);
  border-radius: 99px; padding: 1.5px 6px;
  white-space: nowrap;
}
.fvp-spinner {
  width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgb(247 245 241 / 0.25);
  border-top-color: #F7F5F1;
  animation: fvp-spin 0.7s linear infinite;
}
@keyframes fvp-spin { to { transform: rotate(360deg); } }
.fvp-proc-label { font-size: 10px; font-weight: 600; white-space: nowrap; }

/* Cena final: a marca */
.fvp-brand-scene {
  position: absolute; inset: 0; z-index: 7;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  background:
    radial-gradient(120% 100% at 50% 0%, rgb(86 70 229 / 0.09), transparent 55%),
    var(--fvp-page);
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
}
.fvp-brand-scene.fvp-show { opacity: 1; }
.fvp-brand-logo {
  width: 36px; height: 36px; border-radius: 10px;
  transform: scale(0.85);
  transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.fvp-brand-scene.fvp-show .fvp-brand-logo { transform: none; }
.fvp-brand-word { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.fvp-brand-word b { color: var(--fvp-brand); }
.fvp-brand-tagline {
  font-family: var(--fvp-serif);
  font-style: italic; font-weight: 520;
  font-size: 16.5px; line-height: 1.3;
  color: var(--fvp-ink);
  text-align: center; padding: 0 20px;
}
.fvp-chips {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 5px;
  padding: 0 14px; margin-top: 3px;
}
.fvp-chips span {
  padding: 3px 9px;
  font-size: 9.5px; font-weight: 600;
  color: var(--fvp-brand-700);
  background: var(--fvp-brand-50);
  border: 1px solid var(--fvp-brand-100);
  border-radius: 99px;
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.fvp-brand-scene.fvp-show .fvp-chips span { opacity: 1; transform: none; }
.fvp-brand-scene.fvp-show .fvp-chips span:nth-child(1) { transition-delay: 0.08s; }
.fvp-brand-scene.fvp-show .fvp-chips span:nth-child(2) { transition-delay: 0.16s; }
.fvp-brand-scene.fvp-show .fvp-chips span:nth-child(3) { transition-delay: 0.24s; }

/* ---------- Rodapé do card ---------- */
.fvp-foot { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px; }
.fvp-sub {
  display: flex; align-items: flex-start; gap: 6px;
  min-height: 30px;
  font-size: 11px; font-weight: 600; line-height: 1.4;
  color: var(--fvp-ink-soft);
  transition: opacity 0.2s ease;
}
.fvp-sub.fvp-fade { opacity: 0; }
.fvp-sub svg { flex-shrink: 0; width: 12px; height: 12px; margin-top: 1px; color: var(--fvp-brand); }
.fvp-cta {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 8px 12px;
  border-radius: 10px;
  background: var(--fvp-brand);
  color: #fff !important;
  font-size: 12px; font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 16px -4px rgb(86 70 229 / 0.45);
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.fvp-cta:hover { background: var(--fvp-brand-600); transform: translateY(-1px); }
.fvp-cta svg { width: 12px; height: 12px; }
.fvp-note { font-size: 10px; color: var(--fvp-faint); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .fvp-card, .fvp-card * { animation: none !important; transition: none !important; }
  .fvp-progress { display: none; }
}
