/* =========================================================================
   Christie & Co – KYC / GwG-Fragebogen
   Farbwelt: Akzent Magenta/Lila #9f00a7, viel Weiß, dezentes Grau.
   Mobile-first, serifenlose Schrift, hohe Kontraste (Barrierefreiheit).
   ========================================================================= */

:root {
  /* Markenfarbe exakt aus dem Christie-&-Co-Logo (img/logo.png) übernommen */
  --accent: #b80e80;
  --accent-dark: #8f0a63;
  --accent-light: #fbe7f2;
  --ink: #1c1c22;
  --muted: #55555f;
  --line: #d9d9e0;
  --line-strong: #b8b8c2;
  --bg: #ffffff;
  --bg-soft: #f6f6f8;
  --error: #b3001b;
  --warn: #8a5a00;
  --warn-bg: #fdf4e3;
  --ok: #1a7a3c;
  --radius: 8px;
  --shadow: 0 2px 10px rgba(28, 28, 34, 0.06);
  --focus: 0 0 0 3px rgba(184, 14, 128, 0.35);
  --font: "Segoe UI", "Helvetica Neue", Arial, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg-soft);
  line-height: 1.55;
  font-size: 16px;
}

.container {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Barrierefreiheit: nur für Screenreader */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Sichtbarer Fokus für Tastaturbedienung */
a:focus-visible,
button:focus-visible,
input:focus-visible,
label.choice-card:focus-within,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 4px;
}

/* Überschriften werden beim Schrittwechsel nur programmatisch fokussiert
   (für Screenreader) – sie sollen keinen sichtbaren Rahmen zeigen. */
.step h1:focus,
.step h1:focus-visible {
  outline: none;
  box-shadow: none;
}

/* ============================== Kopfbereich ============================== */
.site-header {
  background: #fff;
  border-bottom: 3px solid var(--accent);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-img {
  height: 40px;   /* ca. 40px hoch, Breite proportional */
  width: auto;
  display: block;
}
.header-tagline { margin: 0; color: var(--muted); font-size: 14px; }

/* ========================== Sprachumschalter ========================== */
.lang-switch {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 18px;
  /* Sicherstellen, dass der Umschalter immer oberhalb evtl. Nachbar-/Overlay-
     Stacking-Kontexte liegt und Klicks empfängt (Desktop-Bugfix). */
  position: relative;
  z-index: 100;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 6px 11px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.lang-btn:hover { border-color: var(--accent); }
.lang-btn.is-active {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent-dark);
}
.lang-btn .flag {
  display: block;
  border: 1px solid var(--line);
  border-radius: 2px;
}
.lang-code { letter-spacing: 0.5px; }
/* Kindelemente (Flaggen-SVG samt <path>, Textlabel) sind für Klicks
   transparent – so ist das Ziel eines Klicks IMMER der <button> selbst,
   unabhängig von Browser-Eigenheiten beim Hit-Test verschachtelter SVGs. */
.lang-btn > * { pointer-events: none; }

/* ========================== Fortschrittsanzeige ========================= */
.progress { background: #fff; border-bottom: 1px solid var(--line); padding: 14px 0 12px; }
.progress-steps {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0 0 10px;
  padding: 0;
}
.progress-step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
}
.progress-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 2px solid var(--line-strong);
  font-weight: 700;
  font-size: 13px;
  flex: none;
}
.progress-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.progress-step.is-active { color: var(--accent-dark); font-weight: 600; }
.progress-step.is-active .progress-badge {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.progress-step.is-done .progress-badge {
  background: #fff;
  border-color: var(--accent);
  color: var(--accent);
}
.progress-bar {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.35s ease;
}

/* ============================== Inhalt ============================== */
.main-content { padding: 28px 20px 60px; }

.step { animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

h1 { font-size: 26px; line-height: 1.25; margin: 0 0 18px; color: var(--ink); }
.branch-title { border-bottom: 2px solid var(--accent-light); padding-bottom: 10px; }
h2.block-title { font-size: 19px; margin: 0 0 14px; color: var(--accent-dark); }
h3.subsection {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
  margin: 22px 0 8px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.intro-text p { margin: 0 0 12px; }
.branch-hint { color: var(--muted); margin: 0 0 18px; }
.explain {
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  padding: 12px 14px;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
  font-size: 14.5px;
  margin: 0 0 14px;
}

/* Info-Link */
.info-link-wrap { margin: 18px 0 26px; }
.info-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-dark);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--accent);
  padding: 9px 14px;
  border-radius: var(--radius);
  background: #fff;
}
.info-link:hover { background: var(--accent-light); }
.external-icon { font-size: 14px; }

/* ============================ Auswahlkarten ============================ */
.entity-choice { border: 0; padding: 0; margin: 0 0 24px; }
.entity-choice legend {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 14px;
  padding: 0;
}
.choice-cards { display: grid; gap: 14px; }
.choice-card {
  display: block;
  position: relative;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  padding: 18px 18px 18px 52px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.choice-card:hover { border-color: var(--accent); }
.choice-card input {
  position: absolute;
  left: 18px; top: 20px;
  width: 20px; height: 20px;
  accent-color: var(--accent);
}
.choice-card-title { display: block; font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.choice-card-desc { display: block; color: var(--muted); font-size: 14.5px; }
.choice-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-light);
}

/* ============================== Blöcke ============================== */
.block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin: 0 0 18px;
}
.person-block { border-left: 4px solid var(--accent); }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.blocks { margin-bottom: 8px; }

/* ============================== Felder ============================== */
.grid-2 { display: grid; gap: 14px 16px; grid-template-columns: 1fr; }
.field { margin: 0 0 14px; }
.field-full { grid-column: 1 / -1; }

label {
  display: block;
  font-weight: 600;
  font-size: 14.5px;
  margin-bottom: 5px;
}
.req { color: var(--accent-dark); }

input[type="text"],
input[type="date"],
input[type="file"] {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 11px 12px;
}
input[type="text"]:hover,
input[type="date"]:hover { border-color: var(--accent); }
input.invalid { border-color: var(--error); background: #fff6f6; }

.checkbox, .radio {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  cursor: pointer;
}
.checkbox input, .radio input {
  margin-top: 3px;
  width: 18px; height: 18px;
  accent-color: var(--accent);
  flex: none;
}

/* Datei-Felder */
.file-hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.file-selected {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--ok);
  font-weight: 600;
}
.file-selected::before { content: "✓ "; }
.info-note {
  margin: 8px 0 0;
  background: var(--accent-light);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 14px;
}

/* PeP */
.pep-question {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin: 0 0 14px;
}
.pep-question legend { font-weight: 600; font-size: 14.5px; padding: 0 6px; }
.radio-row { display: flex; gap: 22px; margin-top: 8px; }
.pep-detail { margin-top: 12px; }

/* Meldungen */
.field-error { color: var(--error); font-size: 13.5px; margin: 6px 0 0; font-weight: 600; }
.field-warn {
  color: var(--warn);
  background: var(--warn-bg);
  border-radius: var(--radius);
  padding: 9px 11px;
  font-size: 13.5px;
  margin: 8px 0 0;
}

/* ============================== Buttons ============================== */
.btn {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius);
  padding: 12px 22px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-secondary { background: #fff; color: var(--accent-dark); border-color: var(--accent); }
.btn-secondary:hover { background: var(--accent-light); }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--muted); color: var(--ink); }
.btn-add { margin-top: 4px; }
.btn-remove {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--error);
  font-size: 13.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius);
  cursor: pointer;
}
.btn-remove:hover { border-color: var(--error); background: #fff6f6; }

.step-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

/* ============================ Zusammenfassung ============================ */
.summary {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 20px;
  margin-bottom: 22px;
}
.summary-group { border-bottom: 1px solid var(--line); padding: 16px 0; }
.summary-group:last-child { border-bottom: 0; }
.summary-group h3 { margin: 0 0 10px; font-size: 16px; color: var(--accent-dark); }
.summary-row { display: flex; gap: 12px; padding: 3px 0; font-size: 14.5px; }
.summary-row dt { flex: 0 0 42%; color: var(--muted); margin: 0; }
.summary-row dd { flex: 1; margin: 0; font-weight: 600; word-break: break-word; }
.summary-file { color: var(--accent-dark); }
.summary-missing { color: var(--error); font-weight: 600; }

.confirm-field {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

/* ============================ Bestätigung ============================ */
.done-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  padding: 48px 24px;
  margin-top: 20px;
}
.done-icon {
  width: 68px; height: 68px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 34px;
}
.done-card h1 { margin-bottom: 10px; }
.done-card p { color: var(--muted); max-width: 460px; margin: 0 auto; }

/* ============================== Fußzeile ============================== */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  padding: 24px 0 40px;
  margin-top: auto;
}
.footer-inner { display: grid; gap: 18px; }
.footer-legal p { margin: 0 0 8px; }

/* ============================== Ab Tablet ============================== */
@media (min-width: 620px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1.4fr; }
  .choice-cards { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 30px; }
}
