/* ==========================================================================
   Barra de progresso
   ========================================================================== */
.progress-wrap {
  position: sticky;
  top: 0;
  background: var(--color-bg);
  padding: 12px 0 8px;
  z-index: 5;
}
.progress-bar {
  height: 4px;
  background: #eeeeee;
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 100%;
  background: var(--color-critical);
  /* Preenchimento por scaleX (compositável na GPU) em vez de width, que
     dispara layout+paint a cada frame da transição. */
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease-out;
}

/* ==========================================================================
   Botões
   ========================================================================== */
.btn {
  display: block;
  width: 100%;
  padding: 22px 20px;
  border: 0;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.08s ease-out, filter 0.15s ease-out, opacity 0.15s ease-out;
}
.btn:hover { filter: brightness(0.96); }
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; filter: none; }

.btn-red    { background: linear-gradient(180deg, #c72a2a 0%, #8a1111 100%); color: #fff; }
.btn-black  { background: var(--color-critical); color: #fff; }
.btn-green  { background: var(--color-success);  color: #fff; text-transform: uppercase; }
/* Branco pra fundo escuro (E1 da v4): lá o vermelho já está no selo, nos destaques do
   título e no cronômetro, e um botão vermelho se perde no meio deles. */
.btn-white  { background: #ffffff; color: #1c1a24; }

/* pulsação sutil nos CTAs de progressão (vermelho/branco) e compra (verde) pra puxar o clique.
   Só `transform`/`opacity` animam (compositor puro) — o glow colorido é um ::after
   estático em box-shadow que só tem a opacidade animada, evitando repaint por frame. */
.btn-red, .btn-green, .btn-white { position: relative; }
.btn-red::after, .btn-green::after, .btn-white::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
}
.btn-red::after   { box-shadow: 0 6px 18px rgba(199, 42, 42, 0.38); }
.btn-green::after { box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45); }
.btn-white::after { box-shadow: 0 6px 22px rgba(255, 255, 255, 0.35); }

@keyframes cta-pulse-scale { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }
@keyframes cta-pulse-glow  { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }

.btn-red:not(:disabled),
.btn-green:not(:disabled),
.btn-white:not(:disabled) { animation: cta-pulse-scale 1.9s ease-in-out infinite; }
.btn-red:not(:disabled)::after,
.btn-green:not(:disabled)::after,
.btn-white:not(:disabled)::after { animation: cta-pulse-glow 1.9s ease-in-out infinite; }

.btn-red:hover, .btn-red:active,
.btn-green:hover, .btn-green:active,
.btn-white:hover, .btn-white:active { animation-play-state: paused; }
.btn-red:hover::after, .btn-red:active::after,
.btn-green:hover::after, .btn-green:active::after,
.btn-white:hover::after, .btn-white:active::after { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  .btn-red, .btn-green, .btn-white,
  .btn-red::after, .btn-green::after, .btn-white::after { animation: none !important; }
}

/* ---------- CTA fixo no rodapé (`cta.sticky` no JSON) ----------
   Aparece enquanto o botão de verdade ainda está abaixo da tela e some quando a pessoa
   rola até ele — a regra está em js/sticky-cta.js. */
.cta-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--color-bg) 70%, transparent);
  opacity: 0;
  transform: translateY(100%);
  pointer-events: none;
  transition: transform 0.22s ease-out, opacity 0.22s ease-out;
}
.cta-sticky.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.cta-sticky .btn { max-width: calc(var(--max-width) - 32px); margin: 0 auto; }
@media (prefers-reduced-motion: reduce) {
  .cta-sticky { transition: none; }
}

/* ---------- Gate de CTA (VSL): botão travado até o vídeo liberar ---------- */
.btn.is-locked,
.btn.is-locked::after {
  animation: none !important;
}
.btn.is-locked {
  opacity: .55;
  filter: grayscale(.2);
  cursor: not-allowed;
}
.cta-lock-toast {
  margin-top: 8px;
  font-size: 13px;
  color: #fff;
  background: #c72a2a;
  border-radius: 8px;
  padding: 8px 12px;
  text-align: center;
  animation: cta-lock-fade 3.5s ease forwards;
}
@keyframes cta-lock-fade {
  0%        { opacity: 0; transform: translateY(-4px); }
  10%, 80%  { opacity: 1; transform: translateY(0); }
  100%      { opacity: 0; }
}

/* ==========================================================================
   Opções de pergunta (cards radio)
   ========================================================================== */
.options {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: var(--space-md);
}
.option {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 16px 12px;
  background: #fff;
  border: 2px solid var(--color-accent);
  border-radius: 14px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: background 0.12s ease-out, box-shadow 0.12s ease-out, transform 0.08s ease-out;
}
.option:hover { background: #fff5f5; }
.option:active { transform: scale(0.99); }
.option.selected {
  background: #fff5f5;
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}
.option-emoji {
  grid-column: 1;
  font-size: 26px;
  line-height: 1;
  justify-self: center;
}
.option-label {
  grid-column: 2;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
}

/* ==========================================================================
   Inputs de texto / telefone
   ========================================================================== */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: var(--space-md);
}
.field-label {
  font-size: var(--fs-small);
  color: var(--color-muted);
  font-weight: 600;
}
.field-input {
  padding: 14px 16px;
  font-size: 17px;
  border: 2px solid var(--border-option);
  border-radius: var(--radius-md);
  background: #fff;
  outline: none;
  transition: border-color 0.12s;
}
.field-input:focus { border-color: var(--color-accent); }
.field-error {
  font-size: var(--fs-small);
  color: var(--color-danger);
  min-height: 18px;
}
.field-help {
  font-size: var(--fs-small);
  color: var(--color-muted);
  margin: -2px 0 0;
}

/* Campo desligado pelo opt-out — esmaece tudo menos o próprio checkbox,
   que precisa continuar legível pra ela conseguir desmarcar. */
.field.is-disabled .field-label,
.field.is-disabled .field-input,
.field.is-disabled .field-help {
  opacity: 0.4;
}
.field-input:disabled { cursor: not-allowed; }

/* Telefone internacional (funil em espanhol) — seletor de país + número na mesma
   linha. Os dois filhos carregam .field-input de propósito: herdam borda, foco e
   o tema escuro sem precisar de regra duplicada em theme-dark.css.
   O seletor não encolhe (min-width dele é o rótulo "🇲🇽 México +52") e o número
   ocupa o resto; em telas estreitas a linha quebra em duas em vez de espremer. */
.phone-intl {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.phone-intl__cc {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 48%;
  /* padding menor que o do input: o <select> já reserva espaço pra seta */
  padding-right: 8px;
  /* 16px é o piso: abaixo disso o iOS dá zoom no viewport ao focar o controle
     (ele ignora user-scalable=no desde o iOS 10). */
  font-size: 16px;
  background: #fff;
  color: var(--color-text);
}
.phone-intl__num {
  flex: 1 1 140px;
  min-width: 0;
}

.optout {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  cursor: pointer;
  /* Alvo de toque confortável no mobile sem empurrar o CTA pra fora da dobra. */
  min-height: 44px;
}
.optout__box {
  width: 20px;
  height: 20px;
  flex: none;
  accent-color: var(--color-accent);
  cursor: pointer;
}
.optout__text {
  font-size: var(--fs-small);
  color: var(--color-muted);
  line-height: 1.35;
}

/* ==========================================================================
   Player de vídeo (stub da Fase 2)
   ========================================================================== */
.video-player {
  background: #0b0b0b;
  color: #fff;
  border-radius: var(--radius-md);
  aspect-ratio: 9 / 16;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  margin: var(--space-md) 0;
  position: relative;
  overflow: hidden;
}
.video-player .placeholder {
  font-size: 14px;
  opacity: 0.8;
  max-width: 80%;
}
.video-player .stub-complete-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

/* Variante Wistia — aspect controlado pelo web component, sem bg forçado */
.video-player--wistia {
  background: transparent;
  aspect-ratio: auto;
  display: block;
  padding: 0;
  overflow: hidden;
}
.video-player--wistia wistia-player {
  display: block;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* Variante VTurb smartplayer — player controla as dimensões via style inline */
.video-player--vturb {
  background: transparent;
  aspect-ratio: auto;
  display: block;
  padding: 0;
  overflow: visible;
  margin: var(--space-md) 0;
}
.video-player--vturb vturb-smartplayer {
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* Aviso discreto acima do vídeo — some quando a pessoa ativa o som */
.video-sound-hint {
  text-align: center;
  font-size: 13px;
  font-style: italic;
  color: var(--color-accent);
  margin: 0 0 8px;
  opacity: 0.85;
  transition: opacity 0.25s ease, height 0.25s ease, margin 0.25s ease;
}
.video-sound-hint.is-hidden {
  opacity: 0;
  height: 0;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ==========================================================================
   Offer section (long-scroll)
   ========================================================================== */
.offer-section { padding-top: var(--space-md); }
.offer-section .bullet {
  margin: 10px 0;
  font-size: 16px;
  line-height: 1.45;
}
.offer-section .bullet em { color: var(--color-danger); font-style: normal; }
.offer-section hr.sep {
  border: 0;
  border-top: 1px solid #eeeeee;
  margin: var(--space-lg) 0;
}
.offer-section .quem-block { margin-bottom: var(--space-lg); }
.offer-section .quem-block h3 { margin-bottom: var(--space-sm); }
.offer-section .quem-block p { white-space: pre-line; }

/* ==========================================================================
   Loading step (ponte antes da página de oferta)
   ========================================================================== */
.loading-step {
  text-align: center;
  padding-top: 48px;
}
.loading-step .step-title { font-size: var(--fs-title); }
.loading-step .step-subtitle { text-align: center; white-space: pre-line; }
.loading-progress-wrap {
  margin: 48px auto 16px;
  max-width: 420px;
}
.loading-progress-bar {
  height: 28px;
  background: #b8b8b8;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.loading-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(180deg, #c72a2a 0%, #8a1111 100%);
  transition: width 0.1s linear;
}
.loading-progress-bar::after {
  content: attr(data-pct);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  z-index: 2;
}

/* overlay do vídeo de depoimentos com autoplay muted */
.muted-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  padding: 20px;
  cursor: pointer;
}

/* ==========================================================================
   E1 — cronômetro de urgência + caixa de escassez (abertura v2)
   ========================================================================== */
.e1-timer {
  margin: var(--space-md) 0 var(--space-sm);
  padding: 12px 10px;
  background: #fff5f5;
  border: 1px solid #f3b9b9;
  border-radius: var(--radius-md);
  text-align: center;
}
.e1-timer__label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #a32d2d;
}
.e1-timer__num {
  margin-top: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
  color: #8a1111;
}
.e1-timer.is-expired .e1-timer__num { color: var(--color-muted); }

.e1-notice {
  margin-top: var(--space-md);
  padding: 14px;
  background: #fff;
  border: 1px solid #f3b9b9;
  border-radius: var(--radius-md);
}
.e1-notice__top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.e1-notice__ic {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-danger);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}
.e1-notice h4 {
  font-size: 15px;
  font-weight: 800;
  color: #8a1111;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.e1-notice p {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--color-text);
}
.e1-notice p em { color: var(--color-danger); font-style: normal; font-weight: 600; }
.e1-notice.is-expired {
  background: #fff5f5;
  border-color: var(--color-danger);
}
