/* =====================================================
   QUIZ DE QUALIFICAÇÃO — gonzagaweb
   Visual dark editorial inspirado em studionamma.com
   ===================================================== */

/* ---------- Variáveis de design (paleta invertida — light) ---------- */
:root {
  --bg-primary: #f5f5f0;
  --bg-secondary: #ebebe5;
  --text-primary: #0a0a0a;
  --text-secondary: #6b6b6b;
  --text-muted: #a0a0a0;
  --border-subtle: rgba(10, 10, 10, 0.1);
  --border-active: #0a0a0a;
  --color-erro: #c0392b;
  --transition: 250ms ease-out;
}

/* ---------- Reset básico ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.4;
  overflow-x: hidden;
  min-height: 100vh;
}

button {
  font-family: inherit;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
}

input {
  font-family: inherit;
}

/* ---------- Seleção custom ---------- */
::selection {
  background: var(--text-primary);
  color: var(--bg-primary);
}

/* ---------- Foco acessível ---------- */
:focus {
  outline: none;
}

:focus-visible {
  outline: 1px solid var(--text-primary);
  outline-offset: 4px;
}

/* ---------- Acessibilidade: leitor de tela ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =====================================================
   BARRA DE PROGRESSO (topo fixo)
   ===================================================== */
.progresso {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 100;
}

.progresso__fundo {
  position: absolute;
  inset: 0;
  background: var(--border-subtle);
}

.progresso__preenchimento {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 16.66%; /* 1/6 inicial */
  background: var(--text-primary);
  transition: width 400ms ease-out;
}

.progresso__indicador {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  z-index: 101;
}

/* =====================================================
   BOTÃO VOLTAR
   ===================================================== */
.btn-voltar {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--text-secondary);
  z-index: 101;
  transition: color var(--transition);
}

.btn-voltar:hover {
  color: var(--text-primary);
}

.btn-voltar[hidden] {
  display: none;
}

/* =====================================================
   CONTAINER PRINCIPAL
   ===================================================== */
.container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 6rem 1.5rem 3rem;
  position: relative;
}

/* =====================================================
   ETAPA (section)
   ===================================================== */
.etapa {
  opacity: 0;
  transform: translateX(20px);
  transition:
    opacity 300ms ease-out,
    transform 300ms ease-out;
}

.etapa[hidden] {
  display: none;
}

.etapa--ativa {
  opacity: 1;
  transform: translateX(0);
}

.etapa--saindo {
  opacity: 0;
  transform: translateX(-20px);
  transition:
    opacity 200ms ease-out,
    transform 200ms ease-out;
}

/* =====================================================
   PERGUNTA (tipografia display)
   ===================================================== */
.pergunta {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 0.95;
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: var(--text-primary);
  margin-bottom: 2.5rem;
}

.subtitulo {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: -1.5rem;
  margin-bottom: 2rem;
  line-height: 1.4;
}

.subtitulo--final {
  margin-top: -1.5rem;
  margin-bottom: 3rem;
}

/* =====================================================
   CARDS (respostas das etapas 1, 3, 4, 5)
   ===================================================== */
.cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  padding: 1.75rem 2rem;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1.125rem;
  color: var(--text-primary);
  transition: all var(--transition);
}

.card:hover {
  border-color: var(--border-active);
  background: rgba(26, 26, 26, 0.03);
  transform: translateX(8px);
}

.card:active {
  transform: translateX(8px) scale(0.99);
}

/* Variante com sublabel (etapa 4 — prazo) */
.card-com-sublabel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.card-titulo {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 1.125rem;
  color: var(--text-primary);
}

.card-sublabel {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* =====================================================
   CHIPS (etapa 2)
   ===================================================== */
.chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.chip {
  display: inline-block;
  border: 1px solid var(--border-subtle);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: transparent;
  transition: all 200ms ease-out;
}

.chip:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

/* =====================================================
   INPUTS
   ===================================================== */
.input {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 0;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--text-primary);
  border-radius: 0;
  transition: border-color var(--transition);
}

.input::placeholder {
  color: var(--text-muted);
}

.input:focus {
  border-bottom-color: var(--text-primary);
}

/* =====================================================
   FORM CONTATO (etapa 6)
   ===================================================== */
.form-contato {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.campo {
  display: flex;
  flex-direction: column;
}

/* =====================================================
   ERRO (mensagens de validação)
   ===================================================== */
.erro {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--color-erro);
  margin-top: 0.5rem;
  animation: fadeIn 200ms ease-out;
}

.erro[hidden] {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* =====================================================
   BOTÃO CONTINUAR (etapas 2 e 6)
   ===================================================== */
.btn-continuar {
  background: transparent;
  border: 1px solid var(--text-primary);
  padding: 1rem 2rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin-top: 2rem;
  align-self: flex-start;
  transition: all var(--transition);
}

.btn-continuar:hover:not(:disabled) {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.btn-continuar:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* =====================================================
   TELA FINAL — RESUMO + CTA
   ===================================================== */
.resumo {
  list-style: none;
  margin-bottom: 0;
}

.resumo__item {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 0;
}

.resumo__label {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
}

.resumo__valor {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-top: 0.25rem;
  line-height: 1.4;
}

.btn-cta {
  display: block;
  width: 100%;
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 1.25rem 2rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 3rem;
  border-radius: 0;
  transition: opacity var(--transition);
}

.btn-cta:hover {
  opacity: 0.85;
}

.btn-cta:active {
  transform: scale(0.99);
}

/* =====================================================
   RESPONSIVIDADE
   ===================================================== */

/* Tablet */
@media (min-width: 768px) {
  .container {
    max-width: 600px;
    padding: 7rem 2rem 4rem;
  }

  .progresso__indicador {
    top: 2rem;
    right: 2rem;
  }

  .btn-voltar {
    top: 2rem;
    left: 2rem;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .container {
    max-width: 720px;
    padding: 8rem 2rem 6rem;
  }

  .pergunta {
    margin-bottom: 3rem;
  }

  .card {
    font-size: 1.25rem;
    padding: 2rem 2.25rem;
  }

  .input {
    font-size: 1.375rem;
  }
}
