/* ─────────────────────────────────────────────────────────────
   Onboarding-Funnel · FK-Jetzt Brand DNA
   Tokens kommen aus fkj-base.css (--color-gold, --color-teal,
   --bg, --text*, --r-*, --s-*, --t-*, --shadow-*).
   ───────────────────────────────────────────────────────────── */

/* ─── Layout-Grundgeruest ─── */

.onboarding-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  position: relative;
  overflow-x: hidden;
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  z-index: 100;
}

.progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-gold) 0%, var(--color-teal) 100%);
  transition: width var(--t-slow);
  box-shadow: 0 0 16px rgba(242, 205, 92, 0.6);
}

/* ─── Header ─── */

.onb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px clamp(20px, 4vw, 48px);
  position: relative;
  z-index: 10;
}

.onb-header__logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.onb-header__logo-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.onb-header__logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-main {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.logo-sub {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.onb-header__step {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.onb-header__step .gradient-text {
  font-weight: 700;
  font-size: 15px;
  margin: 0 2px;
}

/* ─── Main + Form-Container ─── */

.onb-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 24px);
  position: relative;
  z-index: 1;
}

.onb-form {
  width: 100%;
  max-width: 720px;
}

/* ─── Step-Card (Glass §3.4 Pattern) ─── */

.step {
  padding: clamp(28px, 4vw, 48px);
  margin-bottom: var(--s-6);
  animation: stepEnter 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

.step--done {
  text-align: center;
}

.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-teal);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--color-teal-soft);
  border: 1px solid var(--color-teal-border);
  margin: 0 0 var(--s-3);
}

.step__headline {
  font-size: clamp(28px, 3.8vw, 42px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 var(--s-3);
  color: var(--text-bright);
}

.step__sub {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 var(--s-7);
}

/* ─── Fields ─── */

.field {
  margin-bottom: var(--s-6);
}

.field-row {
  display: flex;
  gap: var(--s-4);
  flex-wrap: wrap;
  margin-bottom: var(--s-6);
}

.field-row .field {
  margin-bottom: 0;
  flex: 1 1 200px;
}

.field--narrow { flex: 0 1 140px; }
.field--grow   { flex: 2 1 280px; }

.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: var(--s-2);
  letter-spacing: -0.005em;
}

.req {
  color: var(--color-gold);
  margin-left: 2px;
}

.opt {
  font-weight: 400;
  color: var(--text-dim);
  font-size: 12.5px;
  margin-left: 4px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field textarea {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
  -webkit-appearance: none;
  appearance: none;
}

.field textarea {
  height: auto;
  min-height: 90px;
  padding: 14px 16px;
  resize: vertical;
  line-height: 1.5;
}

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

.field input:hover,
.field textarea:hover {
  border-color: var(--border-bright);
  background: rgba(255, 255, 255, 0.06);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-teal);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px var(--color-teal-soft);
}

.field input.is-invalid,
.field textarea.is-invalid {
  border-color: var(--warning);
  background: rgba(239, 120, 80, 0.05);
}

.field__hint {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.45;
}

.field__err {
  display: block;
  min-height: 0;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--warning);
  line-height: 1.4;
  opacity: 0;
  transition: opacity var(--t-fast);
}

.field__err.is-visible {
  opacity: 1;
  min-height: 18px;
}

/* ─── Radio-Group (Pill-Style) ─── */

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

.radio {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all var(--t-fast);
  user-select: none;
}

.radio:hover {
  border-color: var(--border-bright);
  background: rgba(255, 255, 255, 0.07);
}

.radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio__visual {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-bright);
  background: rgba(0, 0, 0, 0.15);
  position: relative;
  flex-shrink: 0;
  transition: border-color var(--t-fast), background var(--t-fast);
}

.radio__visual::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-teal) 100%);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity var(--t-fast), transform var(--t-fast);
}

.radio input:checked ~ .radio__visual {
  border-color: var(--color-teal);
}

.radio input:checked ~ .radio__visual::after {
  opacity: 1;
  transform: scale(1);
}

.radio:has(input:checked) {
  border-color: var(--color-teal);
  background: var(--color-teal-soft);
}

.radio__text {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-bright);
}

/* ─── Upload-Drop-Zone ─── */

.upload {
  position: relative;
}

.upload__zone {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: 24px 20px;
  background: rgba(255, 255, 255, 0.025);
  border: 1.5px dashed var(--border-bright);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-fast);
}

.upload__zone:hover,
.upload__zone.is-drag {
  border-color: var(--color-gold);
  background: rgba(242, 205, 92, 0.05);
  transform: translateY(-1px);
}

.upload.has-file .upload__zone {
  border-style: solid;
  border-color: var(--color-teal);
  background: var(--color-teal-soft);
}

.upload__icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.upload.has-file .upload__icon {
  color: var(--color-teal);
}

.upload__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.upload__text strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-bright);
}

.upload__text span {
  font-size: 12.5px;
  color: var(--text-dim);
}

.upload__status {
  margin-top: var(--s-3);
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13.5px;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 10px;
}

.upload__status.is-error {
  border-color: rgba(239, 120, 80, 0.4);
  background: rgba(239, 120, 80, 0.08);
  color: var(--warning);
}

.upload__status .spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-bright);
  border-top-color: var(--color-gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

.upload__remove {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: var(--r-xs);
  transition: color var(--t-fast), background var(--t-fast);
}

.upload__remove:hover {
  color: var(--warning);
  background: rgba(239, 120, 80, 0.1);
}

/* ─── Step-Nav (Buttons unten) ─── */

.step__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid var(--border);
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
  letter-spacing: -0.01em;
  white-space: nowrap;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-teal) 100%);
  color: #0B1D2A;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 20px rgba(242, 205, 92, 0.35),
    0 0 50px rgba(242, 205, 92, 0.18),
    0 0 80px rgba(111, 191, 177, 0.12);
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
  animation: shine 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shine {
  0%, 100% { left: -100%; }
  50%      { left: 150%; }
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow:
    0 8px 28px rgba(242, 205, 92, 0.45),
    0 0 70px rgba(242, 205, 92, 0.28),
    0 0 100px rgba(111, 191, 177, 0.18);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--border-bright);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-teal);
  transform: translateY(-1px);
}

/* ─── Review-Liste (Step 7) ─── */

.review {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  margin-bottom: var(--s-6);
}

.review__item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s-4);
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}

.review__label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  flex-shrink: 0;
  width: 40%;
  min-width: 140px;
}

.review__value {
  font-size: 14.5px;
  color: var(--text-bright);
  word-break: break-word;
  flex: 1;
  text-align: right;
}

.review__value--empty {
  color: var(--text-faint);
  font-style: italic;
}

/* ─── Consent-Checkbox ─── */

.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: var(--s-6);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
}

.consent:hover {
  border-color: var(--border-bright);
}

.consent input {
  position: absolute;
  opacity: 0;
}

.consent__visual {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-bright);
  border-radius: 5px;
  flex-shrink: 0;
  margin-top: 1px;
  position: relative;
  transition: all var(--t-fast);
}

.consent__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B1D2A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='4 12 10 18 20 6'/></svg>");
  background-size: 70%;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity var(--t-fast), transform var(--t-fast);
}

.consent input:checked ~ .consent__visual {
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-teal) 100%);
  border-color: transparent;
}

.consent input:checked ~ .consent__visual::after {
  opacity: 1;
  transform: scale(1);
}

.consent__text {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-muted);
}

.consent__text a {
  color: var(--color-teal);
  text-decoration: underline;
  text-decoration-color: var(--color-teal-border);
  text-underline-offset: 2px;
}

.consent__text a:hover { color: var(--color-teal-light); }

/* ─── Done-Step ─── */

.done-icon {
  display: flex;
  justify-content: center;
  margin-bottom: var(--s-4);
}

.step--done .btn-secondary {
  margin-top: var(--s-5);
}

/* ─── Submit-Status ─── */

.submit__status {
  margin: var(--s-4) 0 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
  min-height: 18px;
}

.submit__status.is-error {
  color: var(--warning);
}

/* ─── Footer ─── */

.onb-footer {
  margin-top: auto;
  padding: 24px clamp(20px, 4vw, 48px) 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.onb-footer__links {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.onb-footer__links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--t-fast);
}

.onb-footer__links a:hover { color: var(--color-teal); }

.onb-footer__brand {
  font-size: 11.5px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

/* ─── Ambient Blobs ─── */

.blobs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  animation: blobFloat 22s ease-in-out infinite alternate;
}

.blob--gold {
  width: 58vmin; height: 58vmin;
  top: -10vmin; right: -14vmin;
  background: radial-gradient(circle, var(--color-gold) 0%, transparent 65%);
  opacity: 0.18;
}

.blob--petrol {
  width: 78vmin; height: 78vmin;
  top: 30vh; left: -22vmin;
  background: radial-gradient(circle, var(--color-petrol) 0%, transparent 68%);
  opacity: 0.4;
}

.blob--teal {
  width: 60vmin; height: 60vmin;
  bottom: -14vmin; right: 12vmin;
  background: radial-gradient(circle, var(--color-teal) 0%, transparent 65%);
  opacity: 0.18;
}

@keyframes blobFloat {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(3%, -4%, 0) scale(1.04); }
  100% { transform: translate3d(-3%, 3%, 0) scale(0.98); }
}

/* ─── Gradient-Text ─── */

.gradient-text {
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-teal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ─── Glass-Card Override (mit Backdrop-Blur) ─── */

.glass-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-card);
}

/* ─── Mobile-Anpassungen ─── */

@media (max-width: 640px) {
  .onb-header {
    padding: 16px 20px;
  }

  .onb-header__step {
    font-size: 12px;
  }

  .logo-sub {
    display: none;
  }

  .step {
    padding: 24px 20px;
    border-radius: var(--r-md);
  }

  .step__headline {
    font-size: 26px;
  }

  .step__nav {
    flex-direction: column-reverse;
    gap: var(--s-3);
  }

  .step__nav .btn-primary,
  .step__nav .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .field-row {
    flex-direction: column;
    gap: 0;
  }

  .field-row .field {
    margin-bottom: var(--s-6);
  }

  .field-row .field:last-child {
    margin-bottom: 0;
  }

  .review__item {
    flex-direction: column;
    gap: 4px;
  }

  .review__label {
    width: auto;
  }

  .review__value {
    text-align: left;
  }
}

/* ─── Reduced Motion ─── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
