/* ============================================================
   LEONA NEGÓCIOS IMOBILIÁRIOS — FORMULÁRIO MULTI-ETAPAS
   Mobile First | Premium Design
   ============================================================ */

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

:root {
  --gold:        #c9a96e;
  --gold-light:  #e2c99b;
  --gold-dark:   #a07840;
  --dark:        #0f0f1a;
  --dark-2:      #1a1a2e;
  --dark-3:      #252540;
  --text:        #1a1a2e;
  --text-light:  #5a5a7a;
  --text-muted:  #9090b0;
  --white:       #ffffff;
  --surface:     #f8f8fc;
  --border:      #e4e4f0;
  --success:     #22c55e;
  --error:       #ef4444;
  --whatsapp:    #25d366;

  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-xl:   28px;

  --shadow-sm:   0 2px 8px rgba(0,0,0,.06);
  --shadow-md:   0 4px 20px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 40px rgba(0,0,0,.14);
  --shadow-gold: 0 4px 24px rgba(201,169,110,.35);

  --transition:  .22s cubic-bezier(.4,0,.2,1);
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--dark);
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  color: var(--text);
  overflow-x: hidden;
}

/* ============================================================
   WRAPPER
   ============================================================ */
.form-wrapper {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  background: var(--white);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* ============================================================
   BARRA DE PROGRESSO
   ============================================================ */
.progress-bar-container {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  padding: 12px 20px 8px;
  display: none;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.progress-bar-container.visible { display: flex; }

.progress-bar {
  flex: 1;
  height: 5px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  border-radius: 100px;
  width: var(--progress, 0%);
  transition: width .5s cubic-bezier(.4,0,.2,1);
}

.progress-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 60px;
  text-align: right;
}

/* ============================================================
   SCREENS — SISTEMA DE TRANSIÇÃO
   ============================================================ */
.screen {
  display: none;
  flex-direction: column;
  flex: 1;
  opacity: 0;
  transform: translateX(40px);
  animation: none;
}

.screen.active {
  display: flex;
  animation: slideIn var(--transition) forwards;
}

.screen.exit {
  animation: slideOut var(--transition) forwards;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-40px); }
}

.screen.slide-back.active {
  animation: slideInBack var(--transition) forwards;
}

@keyframes slideInBack {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   HEADER DAS PERGUNTAS
   ============================================================ */
.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 0;
}

.btn-back {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.btn-back:hover { background: var(--surface); border-color: var(--gold); }
.btn-back:active { transform: scale(.93); }

.screen-step {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
}

/* ============================================================
   BODY DAS TELAS
   ============================================================ */
.screen-body {
  padding: 24px 20px 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.screen-body--center {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
}

/* ============================================================
   TELA 0 — LANDING MINIMALISTA
   ============================================================ */

/* Container principal da landing */
.landing-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0 36px;
  text-align: center;
}

/* Marca no topo */
.landing-brand {
  padding-top: 28px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
}

.landing-logo {
  height: 36px;
  width: auto;
  max-width: 200px;
  display: block;
  /* O logo tem fundo branco — funde com a página */
}

.landing-logo-text {
  display: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---- FOTO RETANGULAR ---- */
.landing-photo-wrap {
  position: relative;
  width: 100%;
  padding: 0 24px;
  margin-bottom: 0;
  flex-shrink: 0;
}

/* Sombra decorativa deslocada — cria profundidade */
.landing-photo-ring {
  position: absolute;
  inset: 6px 18px -6px 30px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  opacity: .18;
  filter: blur(12px);
  z-index: 0;
}

.landing-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 260px;
  border-radius: 20px;
  overflow: hidden;
  background: #b0aaa4; /* tom neutro próximo ao fundo da foto */
  box-shadow:
    0 1px 0 0 rgba(201,169,110,.5) inset,
    0 12px 40px rgba(0,0,0,.10),
    0 4px 16px rgba(201,169,110,.15);
}

.landing-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Enquadra o casal: mostra da cabeça até aprox. a cintura */
  object-position: center 12%;
}

.landing-photo-fallback {
  display: none;
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #1a1a2e 0%, var(--gold-dark) 120%);
  color: var(--white);
  font-weight: 700;
  font-size: 48px;
  letter-spacing: .02em;
  align-items: center;
  justify-content: center;
}

/* Identidade — abaixo da foto */
.landing-identity {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 18px;
  margin-bottom: 24px;
  padding: 0 24px;
}

.landing-identity strong {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -.02em;
}

.landing-identity span {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 400;
}

.landing-identity em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-dark);
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* Divisor */
.landing-divider {
  width: 36px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  border-radius: 100px;
  margin-bottom: 24px;
}

/* Título */
.landing-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.25;
  letter-spacing: -.025em;
  margin-bottom: 10px;
  padding: 0 24px;
}

/* Microtexto de urgência */
.landing-micro {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 26px;
  padding: 0 24px;
}

/* Benefícios */
.benefits-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 32px;
  width: 100%;
  max-width: 320px;
  text-align: left;
}

.benefits-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.check {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(201,169,110,.35);
}

/* Botão e nota de privacidade dentro da landing */
.landing-body .benefits-list {
  padding: 0 24px;
  max-width: 100%;
}

.landing-body .btn-primary {
  width: calc(100% - 48px);
  max-width: 100%;
}

.landing-body .privacy-note {
  margin-top: 16px;
}

/* ============================================================
   QUESTÕES
   ============================================================ */
.question-hint {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}

.question-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
  margin-bottom: 28px;
  letter-spacing: -.02em;
}

.question-desc {
  font-size: 14px;
  color: var(--text-light);
  margin-top: -20px;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ============================================================
   OPÇÕES — GRID (2 colunas)
   ============================================================ */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 14px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
  text-align: center;
  user-select: none;
}

.option-card.option-wide {
  flex-direction: row;
  justify-content: flex-start;
  padding: 16px 18px;
  gap: 14px;
  text-align: left;
}

.option-icon {
  font-size: 28px;
  line-height: 1;
}

.option-wide .option-icon {
  font-size: 22px;
}

.option-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.option-card:hover {
  border-color: var(--gold);
  background: rgba(201,169,110,.06);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.option-card:active {
  transform: scale(.96);
}

.option-card.selected {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(201,169,110,.12) 0%, rgba(201,169,110,.06) 100%);
  box-shadow: 0 0 0 3px rgba(201,169,110,.18), var(--shadow-sm);
}

.option-card.selected .option-label {
  color: var(--gold-dark);
}

/* Animação de seleção */
.option-card.selecting {
  animation: selectPulse .3s ease-out;
}

@keyframes selectPulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(.95); }
  100% { transform: scale(1); }
}

/* ============================================================
   INPUTS
   ============================================================ */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}

.text-input {
  width: 100%;
  padding: 16px 18px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 500;
  color: var(--dark);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: var(--transition);
  -webkit-appearance: none;
}

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

.text-input:focus {
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(201,169,110,.15);
}

.text-input.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}

.input-error {
  font-size: 12px;
  font-weight: 500;
  color: var(--error);
  display: none;
  align-items: center;
  gap: 4px;
}

.input-error.visible { display: flex; }

/* ============================================================
   BOTÕES
   ============================================================ */
.btn-primary {
  width: 100%;
  padding: 17px 24px;
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 100%);
  color: var(--white);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--shadow-gold);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.15) 0%, transparent 60%);
  opacity: 0;
  transition: var(--transition);
}

.btn-primary:hover::before { opacity: 1; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(201,169,110,.45); }
.btn-primary:active { transform: scale(.97); }

.btn-primary:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

/* Spinner */
.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,.35);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* WhatsApp button */
.btn-whatsapp {
  width: 100%;
  max-width: 300px;
  padding: 17px 24px;
  background: var(--whatsapp);
  color: var(--white);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .03em;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(37,211,102,.35);
  -webkit-tap-highlight-color: transparent;
}

.btn-whatsapp:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-whatsapp:active { transform: scale(.97); }

/* Nota de privacidade */
.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 14px;
  text-align: center;
}

/* ============================================================
   TELA DE SUCESSO
   ============================================================ */
.success-animation {
  margin-bottom: 8px;
}

.success-circle {
  width: 80px;
  height: 80px;
  margin: 0 auto;
}

.checkmark {
  width: 80px;
  height: 80px;
}

.checkmark-circle {
  stroke: var(--success);
  stroke-width: 2;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-miterlimit: 10;
  animation: stroke .6s cubic-bezier(.65,0,.45,1) forwards;
}

.checkmark-check {
  stroke: var(--success);
  stroke-width: 2;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: stroke .3s cubic-bezier(.65,0,.45,1) .5s forwards;
}

@keyframes stroke {
  100% { stroke-dashoffset: 0; }
}

.success-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -.02em;
}

.success-text {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.6;
  max-width: 280px;
}

.redirect-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 0;
}

.loader-dots {
  display: flex;
  gap: 6px;
}

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

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

@keyframes bounce {
  0%, 80%, 100% { transform: scale(.8); opacity: .4; }
  40% { transform: scale(1.1); opacity: 1; }
}

.redirect-text {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================================
   RESPONSIVO — Desktop suave
   ============================================================ */
@media (min-width: 480px) {
  body { align-items: center; padding: 32px 16px; background: var(--dark-2); }

  .form-wrapper {
    min-height: auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
  }

  .landing-photo { height: 300px; }
}

@media (min-width: 768px) {
  .landing-title { font-size: 26px; }
  .question-title { font-size: 24px; }
}

/* ============================================================
   UTILS
   ============================================================ */
.mt-auto { margin-top: auto; }
.hidden  { display: none !important; }
