/* ============================================================
   Funil Lista de Fornecedores da Mah — design modelado no funil
   ativo de bordados (fundo creme, terracota, serifa de display)
   ============================================================ */
:root {
  --bg: #faf6ef;
  --card: #ffffff;
  --card-soft: #fdf3ef;
  --ink: #2b2320;
  --ink-soft: #6b5f58;
  --terra: #c4705a;
  --terra-dark: #a85843;
  --terra-deep: #8e4634;
  --red: #cf2e2e;
  --gold: #b98a2f;
  --green: #2e7d4f;
  --green-bright: #1fa257;
  --border: #f0e2d8;
  --shadow: 0 10px 30px rgba(72, 44, 30, .08);
  --radius: 18px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.font-display { font-family: "Playfair Display", Georgia, serif; }
.font-script  { font-family: "Dancing Script", cursive; }

/* ---------- Barra de aviso fixa ---------- */
.warn-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--red);
  color: #fff;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 14px;
}
.warn-bar.salmon { background: #cd7460; }

/* ---------- Layout ---------- */
main { flex: 1; width: 100%; }
.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 34px 20px 60px;
}

footer {
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--ink-soft);
  font-size: 12px;
  padding: 16px;
}

/* ---------- Tipografia ---------- */
h1, h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  line-height: 1.22;
}
h1 { font-size: clamp(26px, 5vw, 34px); }
h2 { font-size: clamp(22px, 4.4vw, 28px); }
.center { text-align: center; }
.accent { color: var(--terra); }
.gold { color: var(--gold); }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }

.kicker {
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
  margin-bottom: 10px;
}

/* ---------- Botões / opções do quiz ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--terra);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  padding: 16px 34px;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease;
  text-decoration: none;
}
.btn.green { background: var(--green-bright); }
/* hover só em aparelho com mouse (corrige o "pré-selecionado" no celular:
   o navegador mobile aplicava o hover no último ponto tocado da tela) */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--terra-dark); transform: translateY(-1px); }
  .btn.green:hover { background: var(--green); }
}
.btn.block { display: flex; width: 100%; }
.btn.big { font-size: 17px; padding: 18px 38px; }

.options { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }
.options.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
/* Formato dos botões copiado do quizz validado (cores em terracota) */
.opt {
  border-radius: 16px;
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
  transition: border-color .14s ease, transform .14s ease, background .14s ease;
}

/* opção em LISTA: card claro, borda nítida, emoji à esquerda, bolinha à direita */
.opt:not(.pill):not(.card-lg) {
  background: #fdf1ec;
  border: 2px solid #efd6cd;
}
@media (hover: hover) and (pointer: fine) {
  .opt:not(.pill):not(.card-lg):hover {
    background: #fbe7de;
    border-color: var(--terra);
    transform: translateY(-2px);
  }
}
.opt:not(.pill):not(.card-lg) > span:first-child { font-size: 26px; line-height: 1; flex-shrink: 0; }
.opt:not(.pill):not(.card-lg)::after {
  content: "";
  margin-left: auto;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid #e0b7a9;
  flex-shrink: 0;
  transition: border-color .14s ease;
}
@media (hover: hover) and (pointer: fine) {
  .opt:not(.pill):not(.card-lg):hover::after { border-color: var(--terra); }
}

/* botão de idade (pill): sólido, cantos 16px, bolinha à esquerda (formato do quizz) */
.opt.pill {
  background: var(--terra);
  color: #fff;
  justify-content: center;
  border: 2px solid transparent;
  border-radius: 16px;
  gap: 8px;
}
@media (hover: hover) and (pointer: fine) {
  .opt.pill:hover { background: var(--terra-dark); transform: translateY(-2px); }
}
.opt.pill .dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .7);
  flex-shrink: 0;
}

/* opção em GRADE: card branco, emoji grande centralizado (formato do quizz) */
.opt.card-lg {
  background: var(--card);
  flex-direction: column;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 20px 14px;
  border: 2px solid var(--border);
}
@media (hover: hover) and (pointer: fine) {
  .opt.card-lg:hover { border-color: var(--terra); transform: translateY(-2px); }
}
.opt .emoji-lg { font-size: 42px; line-height: 1; }

/* ---------- Imagens do funil ---------- */
.qimg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.qimg.portrait { max-width: 340px; margin-left: auto; margin-right: auto; }
.qimg.phone    { max-width: 280px; margin-left: auto; margin-right: auto; }

/* ---------- Carrossel do topo ---------- */
.carousel {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--card-soft);
}
.carousel .cslide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .6s ease;
}
.carousel .cslide.active { opacity: 1; }
.carousel .cdots {
  position: absolute;
  bottom: 10px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.carousel .cdot {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  transition: width .3s ease, background .3s ease;
}
.carousel .cdot.active { width: 18px; background: #fff; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.card.soft { background: var(--card-soft); }
.notice {
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  font-style: italic;
  font-size: 14px;
  text-align: center;
  color: var(--ink-soft);
}
.quote {
  border-left: 4px solid var(--terra);
  background: var(--card-soft);
  padding: 16px 18px;
  border-radius: 0 14px 14px 0;
  font-size: 15px;
}

/* ---------- Barra de progresso do quiz ---------- */
.progress {
  height: 5px;
  border-radius: 999px;
  background: #efe4d9;
  overflow: hidden;
  margin-bottom: 30px;
}
.progress > div {
  height: 100%;
  background: linear-gradient(90deg, var(--terra), var(--terra-deep));
  border-radius: 999px;
  transition: width .35s ease;
}

/* ---------- Loading ---------- */
.loading-screen { text-align: center; padding-top: 40px; }
.loading-bar {
  height: 10px;
  background: #f1e7dc;
  border-radius: 999px;
  overflow: hidden;
  margin: 22px 0 10px;
}
.loading-bar > div {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #e0917c, var(--terra-deep));
  border-radius: 999px;
  transition: width .3s ease;
}

/* ---------- Resultado ---------- */
.score-ring {
  width: 150px; height: 150px;
  border-radius: 50%;
  margin: 26px auto;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(closest-side, var(--card) 82%, transparent 83% 100%),
    conic-gradient(#2ba05c 0deg 338deg, #eee3d7 338deg 360deg);
}
.score-ring span {
  font-family: "Playfair Display", serif;
  font-size: 40px; font-weight: 700; color: #1e7a45;
}
.tag-green {
  background: #dff3e5; color: #1e7a45;
  font-weight: 700; padding: 2px 8px; border-radius: 6px;
}
.diagnostico {
  background: #fdeeea;
  border: 1px solid #f3d5cb;
  border-radius: 14px;
  padding: 18px;
  font-size: 15px;
  text-align: left;
}
.diagnostico b { color: var(--terra-deep); }

/* ---------- VSL ----------
   Igual ao player do bordados: moldura preta que abraça um player de
   no maximo 400px de largura e se ajusta sozinha a altura do video
   (sem aspect-ratio/max-height forcados, que deixavam a VSL gigante). */
.video-box {
  background: #000;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  max-width: 400px;
  margin: 22px auto;
}
.watch-warning {
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  padding: 22px;
  margin-top: 22px;
}
.watch-warning .alert { color: var(--red); font-weight: 700; font-size: 14px; }
.badge-scarcity {
  border: 1px solid #f3d5cb;
  background: var(--card-soft);
  color: var(--gold);
  border-radius: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  padding: 12px;
  margin-bottom: 26px;
}

/* ---------- Oferta ---------- */
.product-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.product-card .icon { font-size: 30px; }
.product-card .plabel {
  font-size: 11px; letter-spacing: .14em; font-weight: 700; color: var(--gold);
}
.product-card .pprice { float: right; font-weight: 800; color: var(--terra-deep); }
.stack { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }

.bonus-box {
  border: 1px solid #ecd9ae;
  background: #fdf8ec;
  border-radius: var(--radius);
  padding: 20px;
}
.bonus-box li { list-style: none; padding: 5px 0 5px 26px; position: relative; font-size: 15px; }
.bonus-box li::before { content: "✅"; position: absolute; left: 0; font-size: 13px; }

.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare-table th, .compare-table td {
  padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--border);
}
.compare-table th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.price-old { color: var(--red); text-decoration: line-through; white-space: nowrap; }
.price-new { color: var(--green); font-weight: 800; white-space: nowrap; }

.total-box {
  background: var(--card-soft);
  border-radius: var(--radius);
  text-align: center;
  padding: 18px;
}
.total-box .risco { text-decoration: line-through; font-family: "Playfair Display", serif; font-size: 26px; }

.offer-cta {
  background: linear-gradient(150deg, #b06a55, #8e4634);
  color: #fff;
  border-radius: 24px;
  text-align: center;
  padding: 34px 24px;
}
.offer-cta .de { text-decoration: line-through; opacity: .75; }
.offer-cta .preco { font-family: "Playfair Display", serif; font-size: 58px; font-weight: 700; line-height: 1.05; }
.offer-cta .btn { background: #fff; color: var(--terra-deep); width: 100%; margin-top: 18px; }
@media (hover: hover) and (pointer: fine) {
  .offer-cta .btn:hover { background: #f7ede8; }
}
.offer-cta .subnote { font-style: italic; font-size: 13px; opacity: .9; margin-top: 14px; }
.trust-row { display: flex; justify-content: center; gap: 16px; font-size: 12px; opacity: .9; margin-top: 14px; flex-wrap: wrap; }

.green-box {
  background: #ecf7ef;
  border: 1px solid #cfe8d6;
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 15px;
}
.green-box li { list-style: none; padding: 4px 0; }

/* ---------- Modal de planos ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .6);          /* mais escuro, igual ao quizz (bg-black/60) */
  backdrop-filter: blur(4px);             /* desfoca o fundo, igual ao quizz */
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;                  /* CELULAR: bottom sheet colado embaixo */
  justify-content: center;
  z-index: 100;
  padding: 0;                             /* sem margem no celular = nao aparece o site nas laterais */
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--card);
  border-radius: 22px 22px 0 0;           /* CELULAR: arredondado so em cima (bottom sheet) */
  max-width: none;
  width: 100%;
  max-height: 92vh;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* borda arredondada corta a area rolavel e o rodape */
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .25);
}
/* DESKTOP: volta a ser um cartao centralizado, todo arredondado, com margem */
@media (min-width: 640px) {
  .modal-backdrop { align-items: center; padding: 16px; }
  .modal { border-radius: 22px; max-width: 460px; }
}
/* area que rola (planos); o botao finalizar fica FORA dela, num rodape fixo */
.modal-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 22px;
}
/* rodape fixo do popup — o CTA fica SEMPRE visivel, igual ao quizz */
.modal-footer {
  flex-shrink: 0;
  padding: 14px 22px 16px;
  background: var(--card);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 20px -10px rgba(0, 0, 0, .18);
}
.modal-footer .btn { margin: 0; }
/* Botao FINALIZAR igual ao popup do quizz: cantos arredondados (rounded-2xl,
   NAO pilula), estatico (sem pulso) e maiusculo. Alvo por ID pra ganhar de
   .btn (999px) e de .btn.block.big (softPulse) sem precisar de !important. */
#btn-finalizar {
  border-radius: 16px;
  animation: none;
  text-transform: uppercase;
  letter-spacing: .02em;
  font-size: 15px;
  padding: 16px 22px;
  line-height: 1.3;
  white-space: nowrap;
}
.modal .close {
  position: absolute; top: 12px; right: 14px; z-index: 2;
  background: #eee; border: none; border-radius: 50%;
  width: 28px; height: 28px; cursor: pointer; font-size: 14px;
}
.modal .mini-progress { font-size: 12px; text-align: center; color: var(--ink-soft); margin-bottom: 14px; }
.plan {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  margin-top: 14px;
  cursor: pointer;
  position: relative;
}
.plan.selected { border: 2px solid var(--gold); background: #fffdf6; }
.plan .badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #fff;
  font-size: 10px; font-weight: 800; letter-spacing: .1em;
  padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
.plan h3 { font-family: "Playfair Display", serif; font-size: 18px; }
.plan ul { margin-top: 10px; }
.plan li { list-style: none; font-size: 13.5px; padding: 3px 0 3px 22px; position: relative; }
/* check verde e X cinza em SVG, iguais aos do popup do quizz */
.plan li.yes::before {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
  position: absolute; left: 0; top: 4px; line-height: 0;
}
.plan li.no { color: #b5a9a2; text-decoration: line-through; }
.plan li.no::before {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b5a9a2' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M6 18L18 6'/%3E%3C/svg%3E");
  position: absolute; left: 0; top: 4px; line-height: 0;
}
.plan .plan-price { font-family: "Playfair Display", serif; font-size: 24px; font-weight: 700; margin-top: 10px; }
.plan .plan-price .was { font-size: 13px; color: var(--ink-soft); text-decoration: line-through; font-family: Inter, sans-serif; font-weight: 400; }
.plan .plan-price .off { background: #dff3e5; color: #1e7a45; font-size: 12px; border-radius: 6px; padding: 2px 6px; font-family: Inter, sans-serif; }
.radio {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #cbb9ae; display: inline-block; vertical-align: -3px; margin-right: 6px;
}
.plan.selected .radio { border-color: var(--gold); background: radial-gradient(var(--gold) 45%, transparent 50%); }

/* ---------- Upsell / Downsell ---------- */
.timer-bar {
  position: sticky; top: 0; z-index: 50;
  background: #cd7460; color: #fff;
  display: flex; justify-content: center; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700; padding: 9px;
}
.timer-bar .clock { background: #472018; border-radius: 6px; padding: 2px 8px; font-family: monospace; font-size: 14px; }
.confirm-strip {
  background: #e8f6ec; color: #1e6b3d;
  text-align: center; font-size: 14px; padding: 14px 18px;
  border-bottom: 1px solid #d2ecd9;
}
.folders { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.folder {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); text-align: center; padding: 18px 10px;
}
.folder .f-emoji { font-size: 26px; }
.folder .f-name { font-weight: 700; font-size: 14px; margin-top: 6px; }
.folder .f-count { color: var(--ink-soft); font-size: 12px; }
.decline {
  display: block; text-align: center;
  color: var(--ink-soft); font-size: 13px;
  text-decoration: underline; margin-top: 18px; cursor: pointer;
}

/* ---------- Obrigado ---------- */
.thanks-card { text-align: center; padding: 28px 22px; }
.thanks-card h1 { font-size: 26px; }
.info-block { margin-top: 16px; text-align: left; }
.info-block h3 { font-size: 16px; margin-bottom: 6px; }

/* ============================================================
   Mecânica / animações — idênticas ao quizz validado
   (fadeUp: translateY 20px, .5s ease-out)
   ============================================================ */
@keyframes fadeUp   { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes appFade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes softPulse{ 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02); } }
@keyframes ringPop  { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: scale(1); } }

/* passada de etapa: a tela inteira entra só com FADE (opacity), sem transform.
   CRÍTICO: se o #app tivesse transform (translateY), ele viraria o "containing
   block" do modal de planos (position:fixed) e o popup abriria fora da tela.
   O movimento de "subir" fica nas opções (que não são ancestrais do modal). */
#app { animation: appFade .5s ease-out both; }

/* opções entram em cascata com fade + subida (delay setado inline no funnel.js) */
.opt { animation: fadeUp .5s ease-out backwards; }

/* feedback de toque (aperta de leve ao clicar) */
.opt:active { transform: scale(.98); }
.btn:active { transform: translateY(0) scale(.98); }

/* pulso suave nos CTAs principais (igual ao quizz), pausa no hover (só desktop) */
.btn.block.big, .offer-cta .btn { animation: softPulse 2s ease-in-out infinite; }
@media (hover: hover) and (pointer: fine) {
  .btn.block.big:hover, .offer-cta .btn:hover { animation-play-state: paused; }
}

/* ring de resultado entra com um pop (a contagem 0→94 é feita no funnel.js) */
.score-ring { animation: ringPop .5s ease both; }

@media (prefers-reduced-motion: reduce) {
  #app, .opt, .score-ring, .btn.block.big, .offer-cta .btn { animation: none !important; }
}

@media (max-width: 480px) {
  .wrap { padding: 26px 16px 50px; }
  .options.grid2 { grid-template-columns: 1fr 1fr; }
  .offer-cta .preco { font-size: 46px; }
}
