/* ═══════════════════════════════════════════════════
   QUESTIONÁRIO VONAR — Estilos específicos
   ═══════════════════════════════════════════════════ */

.quiz-body {
  background:
    radial-gradient(ellipse at top, rgba(184, 153, 104, 0.08), transparent 60%),
    var(--offwhite);
  min-height: 100vh;
}

/* ── Header simplificado ── */
.quiz-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 32px;
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.quiz-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--brown-soft);
  padding: 8px 14px;
  border-radius: 999px;
  transition: all var(--t-fast);
}
.quiz-back:hover { background: rgba(58, 46, 31, 0.06); color: var(--brown-deep); }
.quiz-back:disabled { opacity: 0.3; cursor: default; }

/* ── Barra de progresso ── */
.quiz-progress {
  height: 3px;
  background: rgba(58, 46, 31, 0.08);
  overflow: hidden;
}
.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--bronze), var(--bronze-dark));
  transition: width 0.5s var(--ease);
}

/* ── Main / etapas ── */
.quiz-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 28px 100px;
}
.quiz-form { position: relative; }

.quiz-step {
  display: none;
  animation: stepIn 0.5s var(--ease) both;
}
.quiz-step.is-active { display: block; }

@keyframes stepIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-counter {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze-dark);
  margin-bottom: 14px;
}

.quiz-step h1,
.quiz-step h2 {
  font-size: clamp(28px, 3.6vw, 38px);
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: 18px;
  color: var(--brown-deep);
}
.quiz-step h1 em,
.quiz-step h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--bronze-dark);
}

.step-help {
  color: var(--text-soft);
  font-size: 15px;
  margin-bottom: 28px;
}

.quiz-intro {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-soft);
  margin: 24px 0 36px;
  max-width: 580px;
}
.quiz-intro strong { color: var(--brown-deep); font-weight: 600; }
.quiz-intro--hint {
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bronze-dark);
  margin-top: 12px;
}

/* Pergunta 1 — greeting acima da pergunta principal */
.quiz-greeting {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 26px);
  color: var(--brown-soft);
  line-height: 1.3;
  margin: 0 0 14px;
}
.quiz-greeting em {
  font-style: italic;
  color: var(--bronze-dark);
}
.step-lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--text-soft);
  margin: 0 0 12px;
}

/* ── Inputs ── */
.quiz-form textarea,
.quiz-form input[type="text"],
.quiz-form input[type="tel"],
.quiz-form input[type="email"] {
  width: 100%;
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--text);
  background: var(--offwhite);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-top: 6px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  resize: vertical;
}
.quiz-form textarea {
  min-height: 120px;
  font-family: var(--font-serif);
  line-height: 1.6;
}
.quiz-form textarea::placeholder,
.quiz-form input::placeholder {
  color: var(--muted);
  font-style: italic;
}
.quiz-form textarea:focus,
.quiz-form input:focus {
  outline: none;
  border-color: var(--bronze);
  box-shadow: 0 0 0 4px rgba(184, 153, 104, 0.14);
}

.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--brown-soft);
  text-transform: uppercase;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

/* ── Opções (radio / checkbox visuais) ── */
.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 28px;
  align-items: stretch;
}
@media (min-width: 640px) {
  .options-grid { grid-template-columns: 1fr 1fr; }
  .options-grid.single-col { grid-template-columns: 1fr; }
}
.option {
  position: relative;
  display: flex;
  align-items: center;
  padding: 18px 22px 18px 56px;
  background: var(--offwhite);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.4;
  color: var(--brown-deep);
  user-select: none;
  min-height: 56px;
}
@media (hover: hover) and (pointer: fine) {
  .option:hover { border-color: var(--bronze); background: var(--beige-warm); }
}
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option::before {
  content: '';
  position: absolute;
  left: 20px; top: 50%;
  transform: translateY(-50%);
  width: 22px; height: 22px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  background: var(--offwhite);
  transition: all var(--t-fast);
}
.options-grid[data-multi] .option::before { border-radius: 6px; }
.options-grid:not([data-multi]) .option:has(input:checked) {
  border-color: var(--bronze-dark);
  background: var(--beige-warm);
}
.options-grid:not([data-multi]) .option:has(input:checked)::before {
  background: var(--bronze-dark);
  border-color: var(--bronze-dark);
}
.options-grid:not([data-multi]) .option:has(input:checked)::after {
  content: '';
  position: absolute;
  left: 28px; top: 50%;
  width: 6px; height: 10px;
  border-right: 1.5px solid var(--offwhite);
  border-bottom: 1.5px solid var(--offwhite);
  transform: translateY(-65%) rotate(45deg);
}
.options-grid[data-multi] .option.is-selected,
.options-grid:not([data-multi]) .option.is-selected {
  border-color: var(--bronze-dark);
  background: var(--beige-warm);
}
.options-grid[data-multi] .option.is-selected::before,
.options-grid:not([data-multi]) .option.is-selected::before {
  background: var(--bronze-dark);
  border-color: var(--bronze-dark);
}
.options-grid:not([data-multi]) .option.is-selected::after {
  content: '';
  position: absolute;
  left: 28px; top: 50%;
  width: 6px; height: 10px;
  border-right: 1.5px solid var(--offwhite);
  border-bottom: 1.5px solid var(--offwhite);
  transform: translateY(-65%) rotate(45deg);
}

/* Opções letradas (A, B, C…) — estilo do Tally antigo */
.option.lettered {
  padding-left: 64px;
}
.option.lettered::before {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--brown-deep);
  border-color: var(--brown-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  content: attr(data-letter);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  color: var(--offwhite);
  letter-spacing: 0;
}
.options-grid:not([data-multi]) .option.lettered:has(input:checked)::before {
  background: var(--bronze-dark);
  border-color: var(--bronze-dark);
}
.options-grid:not([data-multi]) .option.lettered:has(input:checked)::after { display: none; }
.option.lettered.is-selected::before {
  background: var(--bronze-dark);
  border-color: var(--bronze-dark);
}
.option.lettered.is-selected::after { display: none; }

/* Info card (mentoria de avaliação) */
.info-card {
  background: var(--beige);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin: 24px 0 30px;
}
.info-card p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-soft);
  margin-bottom: 14px;
}
.info-card p:last-child { margin-bottom: 0; }
.info-card .value-line {
  font-size: 16px;
  color: var(--brown-deep);
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 18px 0;
}
.info-card .value-line strong { color: var(--bronze-dark); font-weight: 700; }
.info-list {
  list-style: none;
  margin: 6px 0 14px;
  padding-left: 0;
}
.info-list li {
  position: relative;
  padding: 6px 0 6px 20px;
  font-size: 15px;
  color: var(--text);
}
.info-list li::before {
  content: '•';
  position: absolute;
  left: 4px;
  color: var(--bronze);
  font-weight: bold;
}

.final-question {
  font-family: var(--font-sans);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 500;
  color: var(--brown-deep);
  margin: 8px 0 20px;
  line-height: 1.4;
}

/* ═══════════════════════════════════════════════════
   ESTADOS DE ERRO (validação inline)
   ═══════════════════════════════════════════════════ */
.quiz-form input.is-invalid,
.quiz-form textarea.is-invalid {
  border-color: #b04545 !important;
  background: rgba(176, 69, 69, 0.04);
  box-shadow: 0 0 0 4px rgba(176, 69, 69, 0.1);
}

.field-error {
  font-family: var(--font-sans);
  font-size: 13px;
  color: #b04545;
  margin-top: 8px;
  margin-bottom: 0;
  padding-left: 4px;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}

.options-grid.is-invalid .option {
  border-color: rgba(176, 69, 69, 0.45);
  background: rgba(176, 69, 69, 0.03);
}
.options-grid.is-invalid::after {
  content: 'Seleciona pelo menos uma opção para continuar.';
  display: block;
  font-family: var(--font-sans);
  font-size: 13px;
  color: #b04545;
  grid-column: 1 / -1;
  margin-top: 8px;
  padding-left: 4px;
}

.consent.is-invalid span {
  color: #b04545;
}
.consent.is-invalid input {
  outline: 2px solid rgba(176, 69, 69, 0.5);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ── Consentimento ── */
.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 14px 0 28px;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.55;
  cursor: pointer;
}
.consent input {
  margin-top: 3px;
  width: 18px; height: 18px;
  accent-color: var(--bronze-dark);
}

/* ── Ações ── */
.quiz-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 32px;
}

/* ═══════════════════════════════════════════════════════════
   MOSAICO DE INTRO — mulheres VONAR sob o botão
   ═══════════════════════════════════════════════════════════ */
.intro-step .quiz-actions {
  justify-content: center;
  margin-top: 28px;
}

.intro-mosaic {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-top: 36px;
  /* Quebra do container estreito do quiz-main para usar a largura do viewport */
  width: min(1180px, calc(100vw - 48px));
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.intro-mosaic figure {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 6px;
  background: var(--beige-warm);
  position: relative;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.intro-mosaic figure::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(58, 46, 31, 0.05);
  pointer-events: none;
}
.intro-mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease);
}
.intro-mosaic figure:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(58, 46, 31, 0.18);
  z-index: 2;
}
.intro-mosaic figure:hover img {
  transform: scale(1.06);
}

/* Animação entrada subtil (escalonada) */
.intro-mosaic figure {
  opacity: 0;
  animation: mosaicFadeIn 0.6s var(--ease) forwards;
}
.intro-mosaic figure:nth-child(1) { animation-delay: 0.05s; }
.intro-mosaic figure:nth-child(2) { animation-delay: 0.10s; }
.intro-mosaic figure:nth-child(3) { animation-delay: 0.15s; }
.intro-mosaic figure:nth-child(4) { animation-delay: 0.20s; }
.intro-mosaic figure:nth-child(5) { animation-delay: 0.25s; }
.intro-mosaic figure:nth-child(6) { animation-delay: 0.30s; }
.intro-mosaic figure:nth-child(7) { animation-delay: 0.35s; }
.intro-mosaic figure:nth-child(8) { animation-delay: 0.40s; }
.intro-mosaic figure:nth-child(9) { animation-delay: 0.45s; }
.intro-mosaic figure:nth-child(10) { animation-delay: 0.50s; }
.intro-mosaic figure:nth-child(11) { animation-delay: 0.55s; }
.intro-mosaic figure:nth-child(12) { animation-delay: 0.60s; }
.intro-mosaic figure:nth-child(13) { animation-delay: 0.65s; }
.intro-mosaic figure:nth-child(14) { animation-delay: 0.70s; }
.intro-mosaic figure:nth-child(15) { animation-delay: 0.75s; }
.intro-mosaic figure:nth-child(16) { animation-delay: 0.80s; }
.intro-mosaic figure:nth-child(17) { animation-delay: 0.85s; }
.intro-mosaic figure:nth-child(18) { animation-delay: 0.90s; }
.intro-mosaic figure:nth-child(19) { animation-delay: 0.95s; }
.intro-mosaic figure:nth-child(20) { animation-delay: 1.00s; }
.intro-mosaic figure:nth-child(21) { animation-delay: 1.05s; }
@keyframes mosaicFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .intro-mosaic {
    grid-template-columns: repeat(3, 1fr);
    width: min(620px, calc(100vw - 32px));
    gap: 5px;
  }
}
@media (max-width: 480px) {
  .intro-mosaic {
    width: calc(100vw - 24px);
    gap: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .intro-mosaic figure { animation: none; opacity: 1; }
  .intro-mosaic figure:hover { transform: none; }
  .intro-mosaic figure:hover img { transform: none; }
}

/* 2º botão CTA após mosaico — apenas em mobile/tablet, escondido no desktop */
.intro-mosaic-cta {
  display: none;
  margin-top: 28px;
  justify-content: center;
}
@media (max-width: 900px) {
  .intro-mosaic-cta { display: flex; }
}

.quiz-error {
  color: #b04545;
  font-size: 14px;
  margin-top: 14px;
  text-align: right;
}

/* ── Página de sucesso ── */
.success-card {
  max-width: 600px;
  margin: 80px auto;
  padding: 60px 40px;
  background: var(--offwhite);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.success-card .check-circle {
  width: 72px; height: 72px;
  margin: 0 auto 28px;
  border-radius: 50%;
  background: var(--bronze);
  display: flex; align-items: center; justify-content: center;
  animation: popIn 0.6s var(--ease) both;
}
.success-card .check-circle svg { width: 32px; height: 32px; }
@keyframes popIn {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
.success-card h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(30px, 3.6vw, 42px);
  line-height: 1.18;
  margin-bottom: 20px;
}
.success-card h1 em {
  font-style: italic;
  color: var(--bronze-dark);
}
.success-card p {
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 22px;
}
.success-card .phone-note {
  background: rgba(106, 138, 94, 0.08);
  border-left: 3px solid #6A8A5E;
  padding: 14px 18px;
  text-align: left;
  font-size: 15.5px;
  line-height: 1.6;
  border-radius: 4px;
  margin: 26px 0 30px;
}
.success-card .phone-note a {
  color: #6A8A5E;
  text-decoration: none;
  font-weight: 500;
}
.success-card .phone-note a:hover { text-decoration: underline; }

.success-card .ty-rule {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 153, 104, 0.4), transparent);
  margin: 36px auto;
  max-width: 220px;
}
.success-card .ty-meantime {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(18px, 2vw, 22px);
  color: var(--brown-deep);
  margin-bottom: 14px;
}
.success-card .ty-meantime em {
  color: var(--bronze-dark);
}

.ty-social {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin: 26px 0 36px;
  flex-wrap: wrap;
}
.ty-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1.5px solid #6A8A5E;
  border-radius: 10px;
  color: #6A8A5E;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: all var(--t-fast);
}
.ty-link:hover {
  background: #6A8A5E;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(106, 138, 94, 0.25);
}

.success-card .ty-podcast {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--text-soft);
  margin: 20px 0 12px;
}
.success-card .ty-podcast em {
  font-style: italic;
  color: var(--bronze-dark);
}
.success-card .ty-podcast-cta {
  margin-top: 8px;
  margin-bottom: 0;
}
.podcast-link {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  color: #6A8A5E;
  text-decoration: none;
  margin-top: 6px;
}
.podcast-link:hover { color: #789B6B; text-decoration: underline; }

/* ── Página obrigado: variantes positivo + não-disponível ── */
.success-card p {
  font-size: 17.5px;
  line-height: 1.72;
}
.success-card .check-circle.ty-soft {
  background: var(--bronze);
  opacity: 0.85;
}
.ty-yt-cta {
  margin: 32px 0 28px;
  display: flex;
  justify-content: center;
}
.ty-yt-cta .btn { display: inline-flex; align-items: center; }
.ty-yt-cta .btn::after { display: none; }
.success-card .ty-tagline {
  margin-top: 22px;
  margin-bottom: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(17px, 1.9vw, 21px);
  line-height: 1.45;
  color: var(--brown-deep);
  letter-spacing: -0.005em;
}
.success-card .ty-tagline em {
  font-style: italic;
  color: var(--bronze-dark);
}

/* ── Mobile ── */
@media (max-width: 600px) {
  .quiz-header { padding: 16px 20px; }
  .quiz-main { padding: 40px 20px 80px; }
  .quiz-step h1, .quiz-step h2 { font-size: 26px; }
  .field-row { grid-template-columns: 1fr; }
  .options-grid { grid-template-columns: 1fr !important; }
  .quiz-actions { justify-content: stretch; }
  .quiz-actions .btn { width: 100%; }
}
