:root {
  --bg: #060807;
  --bg-alt: #0d130f;
  --card: #10160f;
  --border: rgba(255, 255, 255, 0.10);
  --border-hover: rgba(1, 255, 106, 0.55);
  --accent: #01ff6a;
  --accent-dim: rgba(1, 255, 106, 0.15);
  --text: #ffffff;
  --text-dim: #9aa39c;
  --danger: #ff5c5c;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
}

body {
  background-image:
    linear-gradient(rgba(1, 255, 106, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(1, 255, 106, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 24px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.brand-logo {
  height: 36px;
  width: 36px;
  object-fit: cover;
  border-radius: 8px;
}
.brand-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.brand-name em { color: var(--accent); font-style: normal; font-weight: 600; }
.topbar-tag {
  font-size: 11px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Progress */
.progress-wrap {
  max-width: 720px;
  width: 100%;
  margin: 6px auto 0;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.progress-track {
  position: relative;
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.35s ease;
}
.progress-count {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}
.progress-count span#stepTotal { color: var(--text-dim); font-weight: 500; }

.reassurance {
  max-width: 720px;
  width: 100%;
  margin: 10px auto 0;
  padding: 0 24px;
  font-size: 12px;
  color: var(--text-dim);
}

/* Wizard area */
.wizard {
  flex: 1;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 140px;
}

.step { display: none; animation: fadeUp 0.35s ease; }
.step.active { display: block; }

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

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  margin: 0 0 16px;
  text-transform: uppercase;
}
.eyebrow .dash { width: 22px; height: 1px; background: var(--accent); }

.section-tag {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.title {
  font-size: clamp(24px, 4.5vw, 34px);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 22px;
}

.lead {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.7;
  max-width: 55ch;
  margin: 0 0 28px;
}

.field { margin-bottom: 20px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 8px;
}
.req { color: var(--accent); }

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="url"],
textarea {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  padding: 14px 16px;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s;
}
input:focus, textarea:focus { border-color: var(--accent); }
input.invalid, textarea.invalid { border-color: var(--danger); }
input::placeholder, textarea::placeholder { color: var(--text-dim); }
textarea { resize: vertical; min-height: 44px; line-height: 1.5; }

.outro-input { margin-top: 12px; }

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chk {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.2s, background 0.2s;
}
.chk:hover { border-color: var(--border-hover); }
.chk input { accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }
.chk:has(input:checked) { border-color: var(--accent); background: var(--accent-dim); }

.note-box {
  font-size: 12px;
  color: var(--text-dim);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  line-height: 1.6;
  margin-top: 4px;
}

.next-btn, .submit-btn {
  margin-top: 12px;
  background: var(--accent);
  color: #06170e;
  border: none;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  padding: 16px 26px;
  border-radius: 14px;
  cursor: pointer;
  transition: filter 0.2s, transform 0.15s;
  display: inline-block;
}
.next-btn:hover, .submit-btn:hover { filter: brightness(1.08); }
.next-btn:active, .submit-btn:active { transform: scale(0.99); }
.next-btn:disabled { opacity: 0.5; cursor: not-allowed; filter: none; }
.next-btn.is-sent { opacity: 0.6; pointer-events: none; filter: none; }

.wa-hint {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-dim);
}

/* Review */
.review-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 26px;
  max-height: 40vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: var(--card);
}
.review-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.review-row:last-child { border-bottom: none; }
.review-key { color: var(--text-dim); flex: 0 0 45%; }
.review-val { color: var(--text); text-align: right; flex: 1; word-break: break-word; }
.review-empty { color: var(--text-dim); font-size: 13px; text-align: center; padding: 20px 0; }

/* Loading */
.loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 60px 0;
  width: 100%;
  text-align: center;
}
.spinner {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: var(--text-dim); font-size: 15px; }

/* Done */
.done-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  width: 100%;
  padding: 20px 0;
}
.done-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 26px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.done-text {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.6;
  max-width: 40ch;
  margin: 0 0 28px;
}
.ghost-btn-solid {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  padding: 14px 22px;
  border-radius: 14px;
  cursor: pointer;
  width: 100%;
  max-width: 320px;
  margin-bottom: 12px;
  transition: border-color 0.2s, background 0.2s;
}
.ghost-btn-solid:hover { border-color: var(--border-hover); background: var(--accent-dim); }
.whatsapp-btn {
  display: block;
  width: 100%;
  max-width: 320px;
  background: var(--accent);
  color: #06170e;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  padding: 14px 22px;
  border-radius: 14px;
  transition: filter 0.2s;
}
.whatsapp-btn:hover { filter: brightness(1.08); }

/* Back button */
.back-btn {
  position: fixed;
  left: 24px;
  bottom: 24px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  padding: 10px 16px;
  border-radius: 999px;
  transition: color 0.2s, border-color 0.2s;
  z-index: 10;
}
.back-btn:hover { color: var(--text); border-color: var(--border-hover); }
.back-btn.hidden { display: none; }

.next-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--accent);
  color: #06170e;
  border: none;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  padding: 14px 22px;
  border-radius: 999px;
  transition: filter 0.2s, transform 0.15s;
  z-index: 10;
  box-shadow: 0 6px 24px rgba(1, 255, 106, 0.25);
}
.next-fab:hover { filter: brightness(1.08); }
.next-fab:active { transform: scale(0.98); }
.next-fab.hidden { display: none; }

@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .checkbox-grid { grid-template-columns: 1fr; }
  .wizard { padding-top: 28px; }
  .brand-name { display: none; }
}
