/* ── Wizard Section ── */
.wizard-section {
  padding: 32px 0 40px;
  background: #fff;
}

/* ── Mesh Background ── */
.mesh-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.mesh-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.6;
}

.mesh-1 {
  width: 500px;
  height: 500px;
  background: rgba(13,148,136,0.15);
  top: -15%;
  left: 20%;
  animation: meshFloat 15s ease-in-out infinite;
}

.mesh-2 {
  width: 400px;
  height: 400px;
  background: rgba(14,165,233,0.12);
  top: 5%;
  right: 15%;
  animation: meshFloat 18s ease-in-out infinite reverse;
}

.mesh-3 {
  width: 350px;
  height: 350px;
  background: rgba(45,212,191,0.1);
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  animation: meshFloat 20s ease-in-out infinite;
  animation-delay: -5s;
}

@keyframes meshFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.08); }
  66% { transform: translate(-30px, 20px) scale(0.92); }
}

/* ── Stats Counters ── */
.hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}

.hero-stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.hero-stat-prefix,
.hero-stat-suffix {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}

.hero-stat-label {
  width: 100%;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

@media (max-width: 576px) {
  .hero-stats {
    gap: 0;
    background: rgba(255,255,255,0.7);
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 16px 8px;
    backdrop-filter: blur(8px);
  }
  .hero-stat {
    flex: 1;
    min-width: 0;
  }
  .hero-stat-number { font-size: 1.7rem; }
  .hero-stat-divider {
    height: 36px;
    background: var(--border);
  }
  .hero-stat-label { font-size: 0.7rem; }
  .hero-stat-prefix,
  .hero-stat-suffix { font-size: 1rem; }
}

/* ── Hero Form Stage ── */
.hero-form-stage {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 22px 22px;
  border-radius: 32px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  background-size: 200% 200%;
  animation: darkShift 10s ease-in-out infinite;
  box-shadow:
    0 0 60px rgba(13,148,136,0.2),
    0 0 120px rgba(14,165,233,0.1),
    0 32px 80px rgba(0,0,0,0.4);
  overflow: hidden;
}

@keyframes darkShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-form-stage-inner-bg {
  display: none;
}

.hero-form-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 32px;
  background:
    radial-gradient(ellipse 300px 250px at 10% 20%, rgba(13,148,136,0.18), transparent),
    radial-gradient(ellipse 250px 200px at 90% 80%, rgba(14,165,233,0.14), transparent),
    radial-gradient(ellipse 200px 200px at 50% 50%, rgba(45,212,191,0.06), transparent);
  pointer-events: none;
  z-index: 0;
}

.hero-form-stage::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(45,212,191,0.5), rgba(14,165,233,0.5), transparent);
  pointer-events: none;
  z-index: 1;
}

/* Animated floating orbs inside form */
.form-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0;
  z-index: 0;
  animation: orbPulse 8s ease-in-out infinite;
}

.form-orb-1 {
  width: 240px;
  height: 240px;
  background: rgba(13,148,136,0.22);
  top: -60px;
  left: -60px;
  animation-delay: 0s;
}

.form-orb-2 {
  width: 180px;
  height: 180px;
  background: rgba(14,165,233,0.18);
  top: 20%;
  right: -50px;
  animation-delay: -3s;
}

.form-orb-3 {
  width: 200px;
  height: 200px;
  background: rgba(45,212,191,0.14);
  bottom: -50px;
  left: 30%;
  animation-delay: -5s;
}

@keyframes orbPulse {
  0%, 100% { opacity: 0.3; transform: scale(1) translate(0, 0); }
  25% { opacity: 0.5; transform: scale(1.08) translate(8px, -8px); }
  50% { opacity: 0.35; transform: scale(0.96) translate(-4px, 4px); }
  75% { opacity: 0.55; transform: scale(1.04) translate(4px, 8px); }
}

.hero-form-shell {
  position: relative;
  z-index: 2;
  padding: 6px;
}

.hero-form-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 6px 8px;
  text-align: left;
}

.hero-form-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.3rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--primary-light);
  background: rgba(13,148,136,0.15);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(45,212,191,0.25);
}

.hero-form-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  box-shadow: 0 0 0 4px rgba(45,212,191,0.2);
  flex-shrink: 0;
}

.hero-form-heading {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.25rem;
  background: linear-gradient(135deg, #fff 60%, var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-form-caption {
  margin: 0;
  max-width: 470px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(148,163,184,1);
}

.hero-form-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.hero-form-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  color: rgba(226,232,240,1);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.hero-form-badge i {
  color: var(--primary-light);
}

@media (max-width: 768px) {
  .hero-form-stage {
    border-radius: 26px;
    padding: 18px 16px 22px;
  }

  .hero-form-shell {
    padding: 6px;
  }

  .hero-form-stage::before {
    border-radius: 26px;
  }

  .hero-form-stage::after {
    border-radius: 0;
  }

  .hero-form-intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 2px 6px 8px;
  }

  .hero-form-heading {
    font-size: 1.2rem;
  }

  .hero-form-badges {
    justify-content: flex-start;
  }
}

/* ── Wizard Card ── */
.wizard-card {
  background: #fff;
  border-radius: 24px;
  border: 1.5px solid rgba(13,148,136,0.25);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.15),
    0 0 0 1px rgba(13,148,136,0.08);
  overflow: hidden;
  position: relative;
}

.wizard-card::before {
  display: none;
}

.wizard-progress {
  height: 3px;
  background: #e2e8f0;
}

.wizard-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 12px rgba(13,148,136,0.4);
}

.wizard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px 0;
}

.wizard-steps-indicator { display: flex; gap: 6px; }

.wizard-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-step-dot.active {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  width: 28px;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(13,148,136,0.3);
}

.wizard-step-dot.done {
  background: var(--primary);
  opacity: 0.35;
}

.wizard-step-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.3px;
}

.wizard-step {
  display: none;
  padding: 14px 22px 18px;
}

.wizard-step.active {
  display: block;
  animation: wizardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes wizardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.wizard-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 2px;
  letter-spacing: -0.02em;
}

.wizard-sub {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 10px;
  line-height: 1.4;
}

/* ── Step 1: Settore Grid ── */
.settore-select-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.settore-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 6px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.settore-option::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(45,212,191,0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}

.settore-option:hover::before { opacity: 1; }

.settore-option input { display: none; }

.settore-option i {
  font-size: 1.2rem;
  color: #64748b;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.settore-option span {
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  transition: color 0.4s;
}

.settore-option:hover {
  border-color: var(--primary);
  background: #f0fdfa;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.settore-option.selected {
  border-color: var(--primary);
  background: #f0fdfa;
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 0 2px rgba(13,148,136,0.15),
    0 8px 20px rgba(13,148,136,0.1);
}

.settore-option.selected i {
  color: var(--primary);
  transform: scale(1.2);
}

.settore-option.selected span {
  color: #0f172a;
}

/* ── Step 2: Textarea ── */
.wizard-textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: none;
  margin-bottom: 14px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  color: #0f172a;
  background: #f8fafc;
}

.wizard-textarea::placeholder { color: #94a3b8; }

.wizard-textarea:focus {
  border-color: var(--primary);
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(13,148,136,0.1), 0 4px 12px rgba(0,0,0,0.05);
  transform: translateY(-1px);
}

/* ── Step 3: Analyzing ── */
.wizard-analyzing {
  text-align: center;
  padding: 16px 20px;
  position: relative;
}

.analyzing-spinner-wrap {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  position: relative;
}

.analyzing-spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid rgba(13,148,136,0.1);
  border-top-color: var(--primary);
  border-right-color: var(--accent);
  animation: spin 0.9s linear infinite;
  position: absolute;
  inset: 0;
}

.analyzing-spinner-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--primary);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 0.6; transform: scale(1); } 50% { opacity: 1; transform: scale(1.1); } }

.analyzing-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}

.analyzing-sub {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 14px;
}

.analyzing-checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 280px;
  margin: 0 auto;
  text-align: left;
}

.analyzing-check {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #94a3b8;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.4;
  transform: translateX(-8px);
}

.analyzing-check i {
  font-size: 1.1rem;
  color: #cbd5e1;
  transition: all 0.5s;
  flex-shrink: 0;
}

.analyzing-check.done {
  color: #0f172a;
  opacity: 1;
  transform: translateX(0);
}

.analyzing-check.done i {
  color: var(--primary);
  animation: checkPop 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes checkPop {
  0% { transform: scale(0.5); }
  60% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ── Step 4: Contatti ── */
.wizard-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.wizard-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  color: #0f172a;
  background: #f8fafc;
}

.wizard-input::placeholder { color: #94a3b8; }

.wizard-input:focus {
  border-color: var(--primary);
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(13,148,136,0.1), 0 4px 12px rgba(0,0,0,0.05);
  transform: translateY(-1px);
}

.wizard-phone-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Buttons ── */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wizard-back {
  background: none;
  border: none;
  color: #64748b;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  font-family: inherit;
  transition: all 0.2s;
}

.wizard-back:hover { color: #0f172a; gap: 6px; }

.wizard-next {
  padding: 11px 26px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  margin-left: auto;
  box-shadow: 0 4px 14px rgba(13,148,136,0.25);
}

.wizard-next:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 24px rgba(13,148,136,0.35);
}

.wizard-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.wizard-submit {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(13,148,136,0.3);
  position: relative;
  overflow: hidden;
}

.wizard-submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease-in-out;
}

.wizard-submit:hover::after { transform: translateX(100%); }

.wizard-submit:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 10px 28px rgba(13,148,136,0.4);
}

.wizard-privacy {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.wizard-privacy input {
  margin-top: 2px;
  accent-color: var(--primary);
}

.wizard-privacy a { color: var(--primary); }

.wizard-note {
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 8px;
}

/* ── Step 5: Success ── */
.wizard-success {
  text-align: center;
  padding: 16px 20px;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(13,148,136,0.08));
  color: #10b981;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  animation: successPop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes successPop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.success-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.success-sub {
  font-size: 0.88rem;
  color: #64748b;
  max-width: 340px;
  margin: 0 auto;
  line-height: 1.6;
}

@media (max-width: 576px) {
  .settore-select-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .settore-option { padding: 12px 4px; }
  .settore-option i { font-size: 1.1rem; }
  .settore-option span { font-size: 0.65rem; }
  .wizard-step { padding: 12px 16px 16px; }
  .wizard-phone-row { grid-template-columns: 1fr; }
  .wizard-card { border-radius: 16px; }
  .wizard-section {
    padding: 24px 0 32px;
  }
  .hero-form-stage {
    padding: 14px 14px 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    box-shadow:
      0 0 40px rgba(13,148,136,0.18),
      0 16px 48px rgba(0,0,0,0.35);
  }
  .hero-form-stage-inner-bg {
    display: none;
  }
  .hero-form-stage::before {
    inset: 0;
    border-radius: 20px;
    background:
      radial-gradient(ellipse 200px 180px at 10% 20%, rgba(13,148,136,0.18), transparent),
      radial-gradient(ellipse 160px 140px at 90% 80%, rgba(14,165,233,0.14), transparent);
  }
  .hero-form-stage::after {
    top: 0;
    left: 0;
    right: 0;
    border-radius: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(45,212,191,0.5), rgba(14,165,233,0.5), transparent);
  }
  .hero-form-shell {
    padding: 6px;
  }
  .form-orb { display: none; }
  .hero-form-intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 2px 4px 8px;
  }
  .hero-form-heading { font-size: 1.15rem; }
  .hero-form-caption { font-size: 0.82rem; }
  .hero-form-badges {
    justify-content: flex-start;
    gap: 6px;
  }
  .hero-form-badge {
    padding: 8px 10px;
    font-size: 0.72rem;
  }
}

/* Trust Banner Team Avatars & Badges */
.avatar-group {
  display: inline-flex;
  vertical-align: middle;
}
.avatar-group img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid #081a1a;
  margin-left: -16px;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.avatar-group img:hover {
  transform: translateY(-4px) scale(1.1);
  z-index: 10;
  position: relative;
}
.avatar-group img:first-child {
  margin-left: 0;
}

.trust-badge-gc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 16px;
  border-radius: 50px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.3s ease;
  white-space: nowrap;
}
.trust-badge-gc:hover {
  background: rgba(255, 255, 255, 0.08);
}
.trust-badge-gc i {
  font-size: 1.05rem;
  color: var(--primary);
}

.avatar-group .avatar-more {
  display: inline-flex;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid #051515;
  margin-left: -16px;
  background: #113333;
  color: #fff;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  transition: transform 0.3s ease;
}
.avatar-group .avatar-more:hover {
  transform: translateY(-4px) scale(1.1);
  z-index: 10;
  position: relative;
}
