/* ===== Quiz "O casal tem conexão um com o outro?" — estilos ===== */
/* Identidade em QUIZ-CONEXAO.md §2. Nenhum vermelho em nenhuma tela. */
/* Fontes ~15% maiores que a 1a versao (pedido do cliente). */

:root {
  --petroleo: #0D2B3A;
  --dourado: #C49A4A;
  --texto: #1A2B33;
  --texto-suave: #5C6B73;
  --fundo: #FFFFFF;
  --fundo-alt: #F7F7F7;
  --borda: #E4E4E4;
  --trilho: #EFEFEF;
  /* Cores dos niveis (escala do resultado). Nunca usadas sozinhas: o texto
     da faixa acompanha sempre. */
  --nivel-a: #3F7A5E; /* 0-10  */
  --nivel-b: #C49A4A; /* 11-20 */
  --nivel-c: #A9552F; /* 21-30 */
  --nivel-b-texto: #9A7838; /* tom mais escuro do dourado, so para texto sobre branco */
  --radius-btn: 8px;
  --radius-lg: 14px;
  --max-width: 480px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--fundo);
  color: var(--texto);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.container {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* Páginas de documento corrido (resultado.html): fluxo normal, sem fold fixo. */
.container.container-doc {
  display: block;
  flex: none;
  padding-top: 14px;
  padding-bottom: 24px;
}

/* ===== Barra de progresso ===== */

.progress-track {
  flex: 0 0 auto;
  width: 100%;
  height: 6px;
  background: var(--trilho);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 16px;
}

.progress-fill {
  height: 100%;
  background: var(--dourado);
  border-radius: 999px;
  width: 0%;
  transition: width 300ms ease;
}

/* ===== Telas ===== */

.screen {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding-top: 16px;
  padding-bottom: 20px;
  opacity: 0;
  transition: opacity 250ms ease;
}

.screen.active { display: flex; }
.screen.fade-in { opacity: 1; }

/* ===== Capa ===== */

.capa-headline {
  flex: 0 0 auto;
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: 30px;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  margin: 16px 0 12px;
  color: var(--petroleo);
}

.capa-headline .hl { color: var(--dourado); }

.capa-image {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--fundo-alt);
  margin-bottom: 16px;
}

.capa-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.capa-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 43, 58, 0.72) 0%, rgba(13, 43, 58, 0.25) 32%, transparent 58%);
  pointer-events: none;
}

.capa-image-caption {
  position: absolute;
  z-index: 1;
  left: 16px;
  right: 16px;
  bottom: 16px;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.35;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.capa-nota {
  flex: 0 0 auto;
  margin: 10px 0 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
  color: var(--texto-suave);
}

/* ===== Perguntas ===== */

.back-link {
  flex: 0 0 auto;
  align-self: flex-start;
  display: inline-block;
  margin-top: 8px;
  padding: 4px 0;
  font-size: 16px;
  color: var(--texto-suave);
  text-decoration: none;
  cursor: pointer;
}

.back-link:hover { color: var(--texto); }

.q-progress-label {
  flex: 0 0 auto;
  margin: 18px 0 0;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--texto-suave);
}

.question {
  flex: 0 0 auto;
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: 31px;
  font-weight: 700;
  text-align: center;
  line-height: 1.32;
  margin: 12px 0 24px;
  color: var(--petroleo);
}

.options {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.option-card {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  min-height: 72px;
  padding: 18px 20px;
  background: var(--fundo);
  border: 2px solid var(--borda);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 18px;
  line-height: 1.4;
  color: var(--texto);
  transition: border-color 150ms ease, background 150ms ease;
}

.option-card:hover { border-color: #D8C39B; }

.option-card.selected {
  border-color: var(--dourado);
  background: #FBF6EC;
}

.radio-dot {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2.5px solid var(--borda);
  position: relative;
  transition: border-color 150ms ease;
}

.option-card.selected .radio-dot { border-color: var(--dourado); }

.option-card.selected .radio-dot::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--dourado);
}

/* ===== Botão ===== */

.btn-primary {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  background: var(--petroleo);
  color: #FFFFFF;
  font-family: inherit;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.3px;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap; /* rótulo do CTA numa linha só — mantém a altura de 52px */
  transition: filter 150ms ease, transform 150ms ease;
}

.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { transform: scale(0.99); }

/* ===== Tela de análise ===== */

.analysis-screen {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.dots {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--dourado);
  animation: dot-pulse 1.2s infinite ease-in-out;
}

.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-pulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1.1); }
}

.analysis-text {
  font-size: 18px;
  color: var(--texto-suave);
  font-weight: 500;
}

/* ===== Página de resultado ===== */

.resultado {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Tarja fixa no topo do resultado. Terracota da paleta (nível C) — chama
   atenção sem usar vermelho, que o projeto não permite em nenhuma tela. */
.resultado-tarja {
  display: block;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
  background: var(--nivel-c);
  padding: 9px 16px;
  border-radius: 6px;
  margin: 0 0 10px;
}

/* Quadro que reúne o resultado: título da faixa + pontuação + gráfico, para a
   pessoa enxergar de imediato onde ela está. */
.resultado-quadro {
  background: #FFFFFF;
  border: 2px solid var(--petroleo);
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 20px rgba(13, 43, 58, 0.14);
  padding: 15px 16px 16px;
  margin: 0 0 14px;
}

/* Título da faixa dentro do quadro. Mesma fonte (Inter) do resto do quiz. */
.resultado-faixa {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  line-height: 1.25;
  margin: 0 0 12px;
  color: var(--petroleo);
}

/* Escala 0-30 com marcador da pontuação (QUIZ-CONEXAO.md §5). */
.escala {
  margin: 4px 0 18px;
}

/* Dentro do quadro, o padding já dá o respiro — a escala não precisa da
   margem inferior. */
.resultado-quadro .escala {
  margin-bottom: 0;
}

.escala-num {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--texto);
}

.escala-num strong {
  font-size: 18px;
  font-weight: 700;
}

.escala-track {
  position: relative;
  padding-top: 34px; /* espaço para o balão do número */
}

.escala-bar {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
}

.escala-seg { flex: 1; }
.escala-seg.seg-a { background: var(--nivel-a); }
.escala-seg.seg-b { background: var(--nivel-b); }
.escala-seg.seg-c { background: var(--nivel-c); }

.escala-marcador {
  position: absolute;
  top: 27px;
  width: 3px;
  height: 28px;
  background: var(--petroleo);
  border-radius: 2px;
  transform: translateX(-1.5px);
}

.escala-marcador-num {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--petroleo);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.escala-labels {
  display: flex;
  margin-top: 10px;
}

.escala-label {
  flex: 1;
  text-align: center;
  padding: 0 4px;
  font-size: 13px;
  line-height: 1.3;
  color: var(--texto-suave);
}

.escala-label b {
  display: block;
  font-weight: 600;
}

.escala-label span {
  font-size: 12px;
}

.escala-label.is-active { color: var(--texto); }
.escala-label.is-active b { font-weight: 700; }
.escala-label.is-active.escala-label--a { color: var(--nivel-a); }
.escala-label.is-active.escala-label--b { color: var(--nivel-b-texto); }
.escala-label.is-active.escala-label--c { color: var(--nivel-c); }

/* Texto abaixo do quadro. Fonte maior que a do quadro para leitura confortável. */
.resultado-texto {
  font-size: 18.5px;
  line-height: 1.5;
  margin: 0 0 14px;
  color: var(--texto);
}

.resultado-chamada {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  margin: 0 0 12px;
  color: var(--texto);
}

/* Mãozinha apontando para o botão logo abaixo. Leve balanço para chamar
   o olhar — respeita quem prefere menos movimento. */
.resultado-chamada-mao {
  display: inline-block;
  font-size: 20px;
  line-height: 1;
  animation: mao-bounce 1.2s ease-in-out infinite;
}

@keyframes mao-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

@media (prefers-reduced-motion: reduce) {
  .resultado-chamada-mao { animation: none; }
}

/* Botão do resultado em terracota (o tom da tarja) para dar urgência sem
   usar vermelho. Só este botão: capa e melhorar.html seguem petróleo. */
#rBotao {
  background: var(--nivel-c);
}

.aviso {
  font-size: 12px;
  line-height: 1.5;
  color: var(--texto-suave);
  margin: 16px 0 0;
}

/* ===== Página de venda (melhorar.html) ===== */
/* Mesma paleta, fontes e tamanhos das outras telas — nada de "mudou de lugar". */

.venda-headline {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: 31px;
  font-weight: 700;
  text-align: center;
  line-height: 1.32;
  margin: 0 0 24px;
  color: var(--petroleo);
}

.venda-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--fundo-alt);
  border: 1px solid var(--borda);
  margin: 0 0 24px;
}

.venda-video iframe,
.venda-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Placeholder neutro enquanto não há vídeo — nunca um player quebrado. */
.venda-video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--texto-suave);
}

.venda-nota {
  margin: 14px 0 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.55;
  color: var(--texto-suave);
}

/* Imagem hero no topo da página de vídeo. Largura limitada e centralizada
   para o botão de ação subir sem precisar cortar a imagem. */
.venda-hero {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 14px;
}

.venda-hero img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

/* ===== Página de vídeo: fundo preto (só melhorar.html) ===== */

body.page-video {
  background: #000;
  color: #FFFFFF;
}

body.page-video .venda-video {
  background: #0A0A0A;
  border-color: #2A2A2A;
  margin-bottom: 16px;
}

body.page-video .venda-video-placeholder {
  color: #8A9296;
}

/* CTA desta página: vermelho, texto branco, maior e sempre numa linha só. */
body.page-video .btn-primary {
  background: #D32F2F;
  color: #FFFFFF;
  font-size: 20px;
  text-transform: uppercase;
  white-space: nowrap;
}

body.page-video .venda-nota {
  color: #9AA0A3;
}

/* CTA liberado só após 1 min de vídeo assistido — escondido até lá. */
#ctaArea[hidden] {
  display: none;
}

/* ===== Responsivo ===== */

@media (max-width: 375px) {
  .capa-headline { font-size: 26px; }
  .question { font-size: 26px; }
  .option-card { font-size: 17px; }
  .resultado-faixa { font-size: 20px; }
  .resultado-texto { font-size: 17.5px; }
  .escala-label { font-size: 12px; padding: 0 2px; }
  .escala-label span { font-size: 11px; }
  .venda-headline { font-size: 26px; }
}

@media (max-height: 700px) {
  .capa-headline { font-size: 25px; margin: 10px 0 8px; }
  .capa-image { margin-bottom: 10px; }
  .capa-image-caption { font-size: 17px; }
  .btn-primary { min-height: 48px; }
}
