/* ============================================
   FORM DE QUALIFICAÇÃO — ENERGIA SOLAR
   Paleta: #FFFFFF · #000000 · #7B00FF · #C8C3E8 · #3D3B4A
   ============================================ */

/* ---- RESET & BASE ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: #FFFFFF;
  color: #000000;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- PROGRESS BAR ---- */
.progress-bar-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: #F0EEF8;
  z-index: 100;
}

.progress-bar-fill {
  height: 100%;
  background: #7B00FF;
  width: 0%;
  transition: width 0.4s ease;
}

/* ---- CORTINA DE TRANSIÇÃO ---- */
.page-wipe {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  background: linear-gradient(135deg, #7B00FF 0%, #6500D6 100%);
  transform: translateX(100%);
  will-change: transform;
}

.page-wipe.cobrindo {
  transform: translateX(0);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-wipe.revelando {
  transform: translateX(-100%);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.step.entrando .step-inner {
  animation: contentUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ---- FORM WRAPPER ---- */
.form-wrapper {
  width: 100%;
  min-height: 100vh;
  position: relative;
}

/* ---- STEPS ---- */
.step {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 48px;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  transform: translateX(0);
}

.step.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(40px);
  position: absolute;
}

.step.slide-out {
  opacity: 0;
  transform: translateX(-40px);
}

.conclusion-step {
  align-items: flex-start;
}

.step-inner {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ---- CAPA ---- */
.cover-inner {
  align-items: flex-start;
  gap: 20px;
}

.cover-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(123, 0, 255, 0.10);
  color: #7B00FF;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  letter-spacing: 0.01em;
  animation: badge-in 0.5s ease both;
}

@keyframes badge-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cover-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  color: #000000;
}

.cover-title .highlight {
  color: #7B00FF;
}

.cover-subtitle {
  font-size: 18px;
  font-weight: 300;
  color: #3D3B4A;
  line-height: 1.6;
  max-width: 480px;
}

.cover-hint {
  font-size: 13px;
  color: #C8C3E8;
  font-weight: 400;
  margin-top: -8px;
}

/* ---- STEP LABELS / TITLE ---- */
.step-label {
  font-size: 13px;
  font-weight: 500;
  color: #C8C3E8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.step-title {
  font-size: 28px;
  font-weight: 700;
  color: #000000;
  line-height: 1.2;
}

.step-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: #3D3B4A;
  line-height: 1.5;
  margin-top: -8px;
}

/* ---- BACK BUTTON ---- */
.btn-back {
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: #3D3B4A;
  cursor: pointer;
  padding: 0;
  font-family: 'Inter', sans-serif;
  transition: color 0.2s;
  align-self: flex-start;
}

.btn-back:hover {
  color: #7B00FF;
}

/* ---- CAMPOS DE TEXTO ---- */
.input-field {
  width: 100%;
  border: 1px solid #C8C3E8;
  border-radius: 8px;
  padding: 16px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  color: #000000;
  outline: none;
  transition: border 0.2s;
  line-height: 1.6;
  background: #FFFFFF;
}

.input-field::placeholder {
  color: #C8C3E8;
}

.input-field:focus {
  border: 2px solid #7B00FF;
}

.contato-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field-error {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(123, 0, 255, 0.22);
  border-left: 3px solid #7B00FF;
  background: linear-gradient(180deg, rgba(123, 0, 255, 0.07), rgba(123, 0, 255, 0.03));
  color: #3D3B4A;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  box-shadow: 0 6px 18px rgba(123, 0, 255, 0.08);
  animation: field-error-in 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}

.field-error::before {
  content: "!";
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #7B00FF;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  animation: field-error-pulse 1.6s ease-in-out infinite;
}

@keyframes field-error-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes field-error-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(123, 0, 255, 0.35); }
  50%      { box-shadow: 0 0 0 5px rgba(123, 0, 255, 0); }
}

/* ---- BOTÕES ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #7B00FF;
  color: #FFFFFF;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  padding: 16px 48px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  align-self: flex-start;
  white-space: nowrap;
  animation: cta-pulse 1.8s ease-in-out infinite;
}

.btn-primary:hover {
  background: #6500d6;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  animation: none;
}

@keyframes cta-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(123, 0, 255, 0.30);
  }
  50% {
    transform: scale(1.025);
    box-shadow: 0 8px 24px 0 rgba(123, 0, 255, 0.28);
  }
}

/* ---- RESULT CARDS (erro / não aplicável) ---- */
.result-card {
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: field-error-in 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}

.result-rejected {
  border-left: 3px solid #3D3B4A;
  background: rgba(61, 59, 74, 0.04);
}

.result-icon-no {
  font-size: 20px;
  font-weight: 700;
  color: #3D3B4A;
}

.result-title {
  font-size: 18px;
  font-weight: 600;
  color: #000000;
  line-height: 1.3;
}

.result-desc {
  font-size: 14px;
  color: #3D3B4A;
  line-height: 1.6;
  margin-top: 4px;
}

.link-instagram {
  font-size: 14px;
  color: #7B00FF;
  font-weight: 500;
  text-decoration: none;
  margin-top: 4px;
}

.link-instagram:hover {
  text-decoration: underline;
}

/* ---- OPTION CARDS ---- */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-card {
  border: 1px solid #C8C3E8;
  border-radius: 8px;
  padding: 20px;
  cursor: pointer;
  transition: border 0.2s, background 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
}

.option-card-full {
  width: 100%;
  grid-column: 1 / -1;
}

.option-card:hover {
  border-color: #7B00FF;
  transform: translateY(-2px);
}

.option-card.selected {
  border: 2px solid #7B00FF;
  background: rgba(123, 0, 255, 0.04);
}

.card-label {
  font-size: 15px;
  font-weight: 500;
  color: #000000;
  line-height: 1.4;
}

/* ---- BARRA INTUITIVA (ETAPA PROJETOS) ---- */
/* Cada card mostra uma barrinha que cresce até o nível daquela faixa
   e volta, em cascata, sugerindo visualmente "de menos para mais". */
.option-card.card-bar {
  gap: 14px;
}

.card-bar-track {
  position: relative;
  flex-shrink: 0;
  width: 8px;
  height: 40px;
  border-radius: 999px;
  background: #EDE7FB;
  overflow: hidden;
}

.card-bar-fill {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: var(--nivel, 40%);
  border-radius: 999px;
  background: linear-gradient(180deg, #9B3BFF 0%, #7B00FF 100%);
  transform-origin: bottom;
  animation: card-bar-pulse 2.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* cascata: cada card começa um pouco depois do anterior */
.cards-projetos .option-card:nth-child(1) .card-bar-fill { animation-delay: 0s;    }
.cards-projetos .option-card:nth-child(2) .card-bar-fill { animation-delay: 0.14s; }
.cards-projetos .option-card:nth-child(3) .card-bar-fill { animation-delay: 0.28s; }
.cards-projetos .option-card:nth-child(4) .card-bar-fill { animation-delay: 0.42s; }
.cards-projetos .option-card:nth-child(5) .card-bar-fill { animation-delay: 0.56s; }

@keyframes card-bar-pulse {
  0%   { height: 0%; }
  35%  { height: var(--nivel, 40%); }
  65%  { height: var(--nivel, 40%); }
  100% { height: 0%; }
}

/* quando o card é selecionado, a barra fixa no nível cheio daquela faixa */
.option-card.card-bar.selected .card-bar-fill {
  animation: none;
  height: var(--nivel, 40%);
}

/* ---- SLIDER (META DE VENDAS) ---- */
.slider-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  border: 1px solid #C8C3E8;
  border-radius: 14px;
  padding: 28px 24px 24px;
  background: rgba(123, 0, 255, 0.03);
  box-shadow: 0 10px 30px rgba(123, 0, 255, 0.06);
}

.slider-value-display {
  display: flex;
  justify-content: center;
}

.slider-value-number {
  font-size: 34px;
  font-weight: 700;
  color: #7B00FF;
  line-height: 1.1;
  transition: transform 0.15s ease;
}

.slider-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(to right, #7B00FF var(--fill, 0%), #EDE7FB var(--fill, 0%));
  cursor: pointer;
  outline: none;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid #7B00FF;
  box-shadow: 0 4px 12px rgba(123, 0, 255, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.12);
}

.slider-input::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid #7B00FF;
  box-shadow: 0 4px 12px rgba(123, 0, 255, 0.35);
  cursor: pointer;
}

.slider-input::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: #EDE7FB;
}

.slider-scale {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
  color: #C8C3E8;
}

/* ---- CONCLUSÃO ---- */
.conclusion-inner {
  align-items: flex-start;
  padding-bottom: 0;
}

.check-icon-wrap {
  margin-bottom: 4px;
  animation: check-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4) both;
}

@keyframes check-pop {
  0%   { transform: scale(0.4); opacity: 0; }
  60%  { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}

.conclusion-title {
  font-size: 30px;
  font-weight: 700;
  color: #000000;
  line-height: 1.2;
  max-width: 520px;
}

.conclusion-sub {
  font-size: 16px;
  font-weight: 400;
  color: #3D3B4A;
  line-height: 1.5;
  max-width: 520px;
  margin-top: -8px;
}

/* ---- SUMMARY CARD ---- */
.summary-card {
  background: #000000;
  border-radius: 12px;
  padding: 28px 24px;
  width: 100%;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 0;
}

.summary-item:first-child {
  padding-top: 0;
}

.summary-item:last-child {
  padding-bottom: 0;
}

.summary-label {
  font-size: 11px;
  font-weight: 500;
  color: #C8C3E8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-value {
  font-size: 16px;
  font-weight: 500;
  color: #FFFFFF;
  line-height: 1.4;
}

.summary-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

/* ---- SELO "ENVIADO" ---- */
.sent-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  background: rgba(123, 0, 255, 0.10);
  color: #7B00FF;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: 0.01em;
  animation: badge-in 0.5s ease both 0.15s;
}

/* ---- CTA STICKY (acompanha a rolagem) ---- */
.cta-sticky {
  position: sticky;
  bottom: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 0 14px;
  margin-top: 8px;
  background: linear-gradient(to top, #FFFFFF 55%, rgba(255, 255, 255, 0));
  z-index: 20;
}

/* ---- CTA BUTTON (WhatsApp) + BARRA DE CARREGAMENTO ---- */
.btn-cta {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #7B00FF;
  color: #FFFFFF;
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 600;
  padding: 0;
  height: 62px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.btn-cta:hover {
  background: #6500d6;
}

.btn-cta:disabled {
  cursor: not-allowed;
}

.cta-content {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 100%;
}

/* barra de carregamento de 2s, sobe por baixo do texto do botão */
.cta-loading-bar {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: rgba(255, 255, 255, 0.22);
}

.cta-loading-bar.animando {
  transition: width 2s linear;
  width: 100%;
}

.cta-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.cta-hint {
  font-size: 13px;
  color: #C8C3E8;
  text-align: center;
  width: 100%;
}

/* ---- UTILITY ---- */
.hidden {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary,
  .btn-cta,
  .sent-badge,
  .check-icon-wrap,
  .field-error,
  .field-error::before,
  .result-card,
  .cover-badge {
    animation: none;
  }

  .page-wipe,
  .page-wipe.cobrindo,
  .page-wipe.revelando {
    transition: none;
    transform: translateX(100%);
  }

  .step.entrando .step-inner {
    animation: none;
  }

  .step {
    transition: none;
  }

  .cta-loading-bar.animando {
    transition: none;
  }

  .card-bar-fill {
    animation: none;
    height: var(--nivel, 40%);
  }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
  .cover-title {
    font-size: 32px;
  }

  .cover-subtitle {
    font-size: 16px;
  }

  .step-title {
    font-size: 24px;
  }

  .conclusion-title {
    font-size: 24px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .btn-primary {
    width: 100%;
    text-align: center;
  }

  .step {
    padding: 72px 20px 48px;
  }

  .slider-value-number {
    font-size: 28px;
  }
}

@media (max-width: 380px) {
  .cover-title {
    font-size: 28px;
  }
}
