/* =========================================
   ZAPPI — Blueprint Design System v2.0
   Dark Mode · Glassmorphism · Neon Cyan
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Tokens ─────────────────────────────── */
:root {
  --bg: #0F172A;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --accent: #00D2B4;
  --accent-dim: rgba(0, 210, 180, 0.15);
  --accent-glow: rgba(0, 210, 180, 0.35);
  --text-primary: #F1F5F9;
  --text-muted: #94A3B8;
  --text-label: #CBD5E1;
  --danger: #F87171;
  --radius: 14px;
  --radius-sm: 8px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(0, 210, 180, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(56, 189, 248, 0.06) 0%, transparent 55%);
  background-attachment: fixed;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  min-height: 100vh;
  padding: 32px 16px 60px;
}

/* ── Layout ─────────────────────────────── */
.form-wrapper {
  max-width: 660px;
  margin: 0 auto;
}

/* ── Logo Banner ────────────────────────── */
.logo-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 28px 0 22px;
}

.logo-banner img {
  max-height: 52px;
  opacity: 0.95;
}

.logo-wordmark {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.logo-wordmark span {
  color: var(--accent);
}

/* ── Progress Bar ────────────────────────── */
.progress-container {
  margin-bottom: 32px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.progress-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.progress-step-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.progress-track {
  height: 3px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), #38BDF8);
  transition: width var(--transition);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  right: -1px;
  top: -3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow), 0 0 22px var(--accent-glow);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.7;
    transform: scale(1.3);
  }
}

/* ── Glass Card ─────────────────────────── */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 16px;
  overflow: hidden;
  transition: border-color var(--transition);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

/* Header card accent stripe */
.glass-card.header-card {
  border-top: 2px solid var(--accent);
  padding: 28px 30px 24px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 99px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

.section-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.section-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 400;
}

/* ── Card Body / Footer ─────────────────── */
.card-body {
  padding: 26px 30px;
}

.card-footer-actions {
  padding: 16px 30px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
}

.card-footer-actions.end {
  justify-content: flex-end;
}

/* ── Question ────────────────────────────── */
.question-label {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-label);
  line-height: 1.6;
  margin-bottom: 18px;
}

.required-star {
  color: var(--accent);
  margin-left: 3px;
}

/* ── Radio / Checkbox Options ────────────── */
.option-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  position: relative;
}

.option-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 210, 180, 0.25);
}

.option-item input[type="radio"],
.option-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
}

/* Radio custom */
.option-item input[type="radio"] {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
}

.option-item input[type="radio"]:checked {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.option-item input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--bg);
}

/* Checkbox custom */
.option-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
}

.option-item input[type="checkbox"]:checked {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.option-item input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0px;
  width: 6px;
  height: 11px;
  border-right: 2.5px solid var(--bg);
  border-bottom: 2.5px solid var(--bg);
  transform: rotate(45deg);
}

/* Highlight selected item */
.option-item:has(input:checked) {
  background: var(--accent-dim);
  border-color: rgba(0, 210, 180, 0.4);
}

.option-label {
  font-size: 14px;
  color: var(--text-label);
  font-weight: 400;
  line-height: 1.5;
  flex: 1;
}

/* ── Text Inputs ─────────────────────────── */
.input-wrapper {
  margin-top: 6px;
}

input[type="text"],
textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 12px 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  resize: vertical;
}

input[type="text"]::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input[type="text"]:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* Inline "Otro" combo */
.other-combo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-top: 8px;
  transition: border-color var(--transition);
}

.other-combo:focus-within {
  border-color: rgba(0, 210, 180, 0.3);
}

.other-combo input[type="radio"],
.other-combo input[type="text"] {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.other-combo input[type="radio"] {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  /* contains ::after */
}

.other-combo input[type="radio"]:checked {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.other-combo input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--bg);
}

.other-combo .other-label {
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
}

.other-combo input[type="text"] {
  flex: 1;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 2px 0;
  font-size: 14px;
  background: transparent;
  box-shadow: none;
}

/* highlight other-combo when its radio is selected */
.other-combo:has(input[type="radio"]:checked) {
  background: var(--accent-dim);
  border-color: rgba(0, 210, 180, 0.4);
}

/* ── Buttons ─────────────────────────────── */
.btn-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #0F172A;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  letter-spacing: 0.01em;
}

.btn-next:hover {
  background: #00e8c8;
  box-shadow: 0 0 22px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-next:active {
  transform: translateY(0);
}

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

.btn-next:hover svg {
  transform: translateX(3px);
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), #38BDF8);
  color: #0F172A;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-submit:hover {
  box-shadow: 0 6px 32px rgba(0, 210, 180, 0.5);
  transform: translateY(-2px);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition);
}

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

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

.btn-back:hover svg {
  transform: translateX(-3px);
}

/* ── Step Slides ─────────────────────────── */
.step {
  display: none;
  animation: slideIn var(--transition) forwards;
}

.step.active {
  display: block;
}

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(28px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(-28px);
  }
}

/* ── Success Screen ──────────────────────── */
.success-screen {
  display: none;
  text-align: center;
  padding: 60px 30px;
}

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

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 0 32px var(--accent-glow);
}

.success-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.success-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 400px;
  margin: 0 auto;
}

/* ── Footer ──────────────────────────────── */
footer {
  text-align: center;
  padding: 40px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ── Validation Error ─────────────────────── */
.error-toast {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
  margin-top: 16px;
  animation: slideIn 0.25s ease forwards;
}

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

/* ── Responsive ──────────────────────────── */
@media (max-width: 500px) {
  body {
    padding: 16px 12px 48px;
  }

  .glass-card.header-card {
    padding: 22px 20px 18px;
  }

  .card-body {
    padding: 20px;
  }

  .card-footer-actions {
    padding: 14px 20px 18px;
  }

  .section-title {
    font-size: 18px;
  }

  .btn-next {
    padding: 10px 20px;
  }
}