/* =============================
   QIVO · Formulário de Qualificação
   ============================= */

:root {
  --bg:           #00020f;
  --bg-card:      #070b1e;
  --bg-option:    #0a0f24;
  --bg-input:     #0c1028;
  --blue:         #2934ff;
  --blue-hover:   #3d47ff;
  --blue-glow:    rgba(41, 52, 255, 0.35);
  --blue-light:   #8aa5ff;
  --blue-subtle:  rgba(41, 52, 255, 0.08);
  --green:        #22c55e;
  --green-subtle: rgba(34, 197, 94, 0.1);
  --text:         #ffffff;
  --text-muted:   #a7adbe;
  --text-faint:   #5a6177;
  --border:       rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);
  --border-focus: rgba(41, 52, 255, 0.6);
  --radius-card:  16px;
  --radius-btn:   12px;
  --radius-input: 10px;
  --font-body:    'DM Sans', sans-serif;
  --font-display: 'Instrument Sans', sans-serif;
  --transition:   0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* -------- Background atmosphere -------- */

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

.bg-glow {
  position: fixed;
  top: -30vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 140vw);
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(41, 52, 255, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* -------- Header -------- */

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
}

.logo-link {
  display: inline-flex;
  align-items: center;
}

.logo-img {
  height: 32px;
  width: auto;
  display: block;
}

/* -------- Main layout -------- */

.main {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 32px 16px 48px;
  min-height: calc(100vh - 82px - 52px);
}

/* -------- Form card -------- */

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  width: 100%;
  max-width: 640px;
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
}

.form-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(41, 52, 255, 0.5), transparent);
}

/* -------- Progress -------- */

.progress-wrap {
  margin-bottom: 36px;
}

.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 12px;
}

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  transition: var(--transition);
  position: relative;
  flex-shrink: 0;
}

.step-dot.active {
  border-color: var(--blue);
  background: var(--blue-subtle);
  box-shadow: 0 0 0 4px rgba(41, 52, 255, 0.12);
}

.step-dot.done {
  border-color: var(--blue);
  background: var(--blue);
}

.step-dot.done .dot-num {
  color: #fff;
}

.dot-num {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-body);
  transition: var(--transition);
}

.step-dot.active .dot-num {
  color: var(--blue-light);
}

.step-line {
  flex: 1;
  height: 1.5px;
  background: var(--border);
  max-width: 80px;
  transition: var(--transition);
}

.step-line.done {
  background: var(--blue);
}

.progress-bar-track {
  width: 100%;
  height: 3px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
  border-radius: 100px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* -------- Step panels -------- */

.step-panel {
  display: none;
  animation: stepIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.step-panel.active {
  display: block;
}

.step-panel.exit {
  animation: stepOut 0.25s cubic-bezier(0.4, 0, 0.2, 1) both;
}

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

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

/* -------- Step header -------- */

.step-header {
  margin-bottom: 28px;
}

.step-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: 12px;
}

.step-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 5vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.highlight {
  background: linear-gradient(135deg, var(--blue-light), #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.step-question {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* -------- Option cards -------- */

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 28px;
}

.options-grid--5 {
  grid-template-columns: 1fr;
}

.option-card {
  position: relative;
  display: block;
  cursor: pointer;
  border-radius: var(--radius-card);
  border: 1.5px solid var(--border);
  background: var(--bg-option);
  transition: var(--transition);
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.option-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 44px 16px 16px;
  height: 100%;
}

.options-grid--5 .option-inner {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 44px 14px 16px;
}

.option-icon {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
  color: var(--blue-light);
  transition: color var(--transition);
  display: flex;
  align-items: center;
}

.options-grid--5 .option-icon {
  margin-top: 1px;
}

.option-card.selected .option-icon {
  color: var(--blue-light);
}

.option-card:hover .option-icon {
  color: #fff;
}

.option-text {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.5;
  font-weight: 400;
  transition: color var(--transition);
}

.option-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border-hover);
  background: transparent;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.option-check::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  transform: scale(0);
  transition: transform var(--transition);
}

/* Hover state */
.option-card:hover {
  border-color: var(--border-hover);
  background: #0d1230;
  transform: translateY(-1px);
}

.option-card:hover .option-text {
  color: rgba(255, 255, 255, 0.8);
}

/* Selected state */
.option-card.selected {
  border-color: var(--blue);
  background: var(--blue-subtle);
  box-shadow: 0 0 0 1px rgba(41, 52, 255, 0.2), inset 0 0 20px rgba(41, 52, 255, 0.05);
}

.option-card.selected .option-text {
  color: var(--text);
}

.option-card.selected .option-check {
  border-color: var(--blue);
  background: var(--blue);
}

.option-card.selected .option-check::after {
  transform: scale(1);
  background: #fff;
}

/* Featured variant */
.option-card.featured {
  border-color: rgba(41, 52, 255, 0.25);
  background: rgba(41, 52, 255, 0.06);
}

.option-card.featured .option-text {
  color: rgba(255, 255, 255, 0.75);
}

/* Cold/Nurture subtle hints */
.option-card.cold-lead .option-text,
.option-card.nurture-lead .option-text {
  color: var(--text-faint);
}

/* -------- Buttons -------- */

.btn-next,
.btn-submit {
  width: 100%;
  padding: 18px 24px;
  background: var(--blue);
  color: #fff;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
}

.btn-next:disabled,
.btn-submit:disabled {
  background: #1a1f3a;
  color: var(--text-faint);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-next:not(:disabled):hover,
.btn-submit:not(:disabled):hover {
  background: var(--blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--blue-glow);
}

.btn-next:not(:disabled):active,
.btn-submit:not(:disabled):active {
  transform: translateY(0);
}

.btn-arrow {
  transition: transform var(--transition);
}

.btn-next:not(:disabled):hover .btn-arrow {
  transform: translateX(3px);
}

.submit-icon {
  display: flex;
  align-items: center;
}

.btn-submit {
  padding: 20px 24px;
  font-size: 19px;
  background: linear-gradient(135deg, #2934ff, #1f3bff);
  box-shadow: 0 4px 20px rgba(41, 52, 255, 0.25);
}

.btn-submit:not(:disabled):hover {
  background: linear-gradient(135deg, #3d47ff, #2934ff);
  box-shadow: 0 8px 32px var(--blue-glow);
}

.step-nav {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-back {
  background: transparent;
  border: 1.5px solid var(--border-hover);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  padding: 16px 18px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-back:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
}

.step-nav .btn-next {
  flex: 1;
}

/* -------- Contact form -------- */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 24px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 5px;
}

.field-required {
  color: var(--blue-light);
}

.field-optional {
  color: var(--text-faint);
  font-weight: 400;
  font-size: 14px;
}

.field-input {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-input);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  padding: 16px 18px;
  transition: var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

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

.field-input:hover {
  border-color: var(--border-hover);
}

.field-input:focus {
  border-color: var(--blue);
  background: rgba(41, 52, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(41, 52, 255, 0.1);
}

.field-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field-prefix {
  position: absolute;
  left: 16px;
  font-size: 16px;
  color: var(--text-muted);
  pointer-events: none;
  white-space: nowrap;
  z-index: 1;
}

.field-input--with-prefix {
  padding-left: 68px;
}

.privacy-note {
  text-align: center;
  font-size: 14px;
  color: var(--text-faint);
  line-height: 1.5;
  margin-top: 14px;
}

/* -------- Result screens -------- */

.result-panel {
  text-align: center;
  padding: 12px 8px;
}

.result-icon {
  margin-bottom: 20px;
  animation: iconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 0.1s;
  display: flex;
  justify-content: center;
}

.result-icon i {
  font-size: 68px;
  line-height: 1;
}

@keyframes iconPop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.result-icon--blue i {
  color: var(--blue-light);
  filter: drop-shadow(0 0 16px rgba(41, 52, 255, 0.5));
}

.result-icon--green i {
  color: #4ade80;
  filter: drop-shadow(0 0 16px rgba(34, 197, 94, 0.5));
}

.result-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.result-text {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 12px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.btn-result-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 28px;
  background: var(--blue);
  color: #fff;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(41, 52, 255, 0.25);
}

.btn-result-primary:hover {
  background: var(--blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 28px var(--blue-glow);
}

.btn-result-secondary {
  background: transparent;
  border: 1.5px solid var(--border-hover);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  padding: 16px 24px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: var(--transition);
}

.btn-result-secondary:hover {
  border-color: rgba(255,255,255,0.2);
  color: var(--text);
}

/* -------- Footer -------- */

.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.site-footer p {
  font-size: 14px;
  color: var(--text-faint);
}

/* -------- Responsive -------- */

@media (max-width: 520px) {
  .main {
    padding: 20px 12px 40px;
  }

  .form-card {
    padding: 24px 20px;
    border-radius: 20px;
  }

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

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

  .option-inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 44px 14px 14px;
  }

  .option-icon {
    margin-top: 1px;
  }

  .option-check {
    top: 12px;
    right: 12px;
  }

  .step-nav {
    flex-direction: column-reverse;
  }

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

  .progress-steps {
    gap: 0;
  }
}

@media (max-width: 360px) {
  .form-card {
    padding: 20px 16px;
  }

  .step-label {
    font-size: 13px;
  }

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