/* ==========================================================================
   Beitreten – interaktives Tutorial
   ========================================================================== */

.join-hero {
  padding-top: calc(var(--header-h) + clamp(48px, 8vw, 88px));
  padding-bottom: clamp(24px, 4vw, 40px);
  text-align: center;
}
.join-hero-inner { max-width: 680px; margin-inline: auto; }
.join-hero .lead { margin-inline: auto; }

.join-wizard-section { padding-top: 0; }

.join-wizard { max-width: 760px; margin-inline: auto; }

/* ---------- Fortschritt ---------- */

.join-progress {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: clamp(28px, 5vw, 48px);
}
.join-progress li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  position: relative;
  text-align: center;
}
.join-progress li::after {
  content: "";
  position: absolute;
  top: 17px;
  left: calc(50% + 22px);
  width: calc(100% - 44px);
  height: 2px;
  background: var(--line);
  transition: background 0.4s ease;
  z-index: 0;
}
.join-progress li:last-child::after { display: none; }
.join-progress li.is-done::after { background: var(--accent); }

.join-progress-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--bg-alt);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
  transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.join-progress-dot svg { display: none; width: 16px; height: 16px; fill: none; stroke: var(--on-accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

.join-progress li.is-active .join-progress-dot {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.12);
  box-shadow: 0 0 0 5px rgba(24, 223, 207, 0.14);
}
.join-progress li.is-done .join-progress-dot {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
}
.join-progress li.is-done .join-progress-num { display: none; }
.join-progress li.is-done .join-progress-dot svg { display: block; }

.join-progress-label {
  font-size: 0.76rem;
  color: var(--muted);
  transition: color 0.3s ease;
}
.join-progress li.is-active .join-progress-label,
.join-progress li.is-done .join-progress-label { color: var(--text); }

/* ---------- Panel / Steps ---------- */

.join-panel {
  position: relative;
  padding: clamp(28px, 5vw, 44px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  overflow: hidden;
}

.join-step {
  display: none;
  animation: join-step-in 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
.join-step.is-active { display: block; }

@keyframes join-step-in {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: none; }
}
.join-step.is-leaving-back { animation-name: join-step-in-back; }
@keyframes join-step-in-back {
  from { opacity: 0; transform: translateX(-18px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .join-step { animation: none; }
}

.join-step-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(24, 223, 207, 0.22), rgba(24, 223, 207, 0.05));
  border: 1px solid var(--line);
}
.join-step-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.join-step-icon-done { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); }
.join-step-icon-done svg { stroke: var(--on-accent); stroke-width: 2.6; }

.join-step-kicker {
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.join-step h2 { margin-bottom: 14px; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.join-step-text { max-width: 58ch; color: var(--muted); }
.join-step-text + .join-step-text { margin-top: 10px; }
.join-step-text strong { color: var(--text); font-weight: 600; }
.join-step-text kbd {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-alt);
  font-family: inherit;
  font-size: 0.88em;
  color: var(--text);
}

.join-step-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}
.join-step-actions .btn { cursor: pointer; }
.join-step-hint { color: var(--muted); font-size: 0.86rem; }

.join-step-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(24, 223, 207, 0.06);
  color: var(--muted);
  font-size: 0.9rem;
}
.join-step-note svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }

/* ---------- Code / Copy ---------- */

.join-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--bg-alt);
}
.join-code code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.98rem;
  color: var(--accent);
  overflow-wrap: anywhere;
}
.join-copy-btn {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.join-copy-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.join-copy-btn:hover { border-color: var(--accent); background: var(--surface); }
.join-copy-btn.is-copied { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }

/* ---------- Checklist (Schritt 5) ---------- */

.join-checklist { display: grid; gap: 12px; margin-top: 20px; }
.join-checklist li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-hover);
}
.join-checklist strong { color: var(--text); }
.join-checklist span:not(.join-check) { color: var(--muted); font-size: 0.92rem; line-height: 1.6; }
.join-check {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: 2px;
  border-radius: 50%;
  background: rgba(24, 223, 207, 0.16);
}
.join-check svg { width: 14px; height: 14px; fill: none; stroke: var(--accent); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Bottom nav ---------- */

.join-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(24px, 4vw, 36px);
}
.join-nav-status { color: var(--muted); font-size: 0.88rem; font-weight: 600; }
.join-nav .btn[disabled] { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

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

@media (max-width: 640px) {
  .join-progress-label { display: none; }
  .join-progress li::after { top: 15px; left: calc(50% + 18px); width: calc(100% - 36px); }
  .join-progress-dot { width: 30px; height: 30px; }
  .join-panel { padding: 22px; border-radius: 18px; }
  .join-code { flex-direction: column; align-items: stretch; }
  .join-nav { flex-wrap: wrap; justify-content: center; text-align: center; }
  .join-nav-status { order: -1; width: 100%; }
}
