/* Markenschrift Archivo (variabel: Stärke 100–900, Breite 62–125 %), selbst gehostet – Lizenz: fonts/OFL.txt */
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

/* Farben aus dem RoxDouble-Logo */
:root {
  --bg: #0e0e10;
  --card: #18181c;
  --line: #2b2b31;
  --text: #f4f4f0;
  --muted: #b8b8be;
  --accent: #ff5b24;
  --accent-ink: #0e0e10;
  --ok: #3ecf8e;
  --err: #ff6b6b;
  --brand-font: "Archivo", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
.wrap { max-width: 560px; margin: 0 auto; padding: 24px 16px 48px; }
h1, h2, .btn, button { font-family: var(--brand-font); }
h1 { font-size: clamp(28px, 7vw, 40px); line-height: 1.08; margin: 12px 0 12px; font-weight: 800; font-stretch: 110%; letter-spacing: -.02em; }
.lead { color: var(--muted); margin: 0 0 20px; }
section { margin-top: 40px; }
section > h2 { font-size: 22px; margin: 0 0 16px; font-weight: 800; font-stretch: 110%; }

/* Logo: Doppelpfeil + Schriftzug */
.logo { display: inline-flex; align-items: center; gap: .45em; color: var(--text); text-decoration: none; font-family: var(--brand-font); font-size: 22px; line-height: 1; letter-spacing: -.02em; }
.logo svg { width: 1.3em; height: 1.08em; flex: none; fill: none; stroke-width: 18; }
.logo path:first-child { stroke: currentColor; }
.logo path:last-child { stroke: var(--accent); }
.logo span { display: inline-flex; align-items: baseline; font-weight: 400; }
.logo b { font-weight: 800; font-stretch: 125%; }
.hero-logo { margin: 8px 0 28px; }
.hero-logo .logo { font-size: clamp(30px, 9vw, 44px); }
.tagline { margin: 12px 0 0; font-family: var(--brand-font); font-size: clamp(11px, 3vw, 14px); letter-spacing: .38em; text-transform: uppercase; color: var(--muted); }

/* Live-Zähler */
.live { display: inline-flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 14px; margin: 0 0 20px; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(62, 207, 142, .6); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(62, 207, 142, 0); } 100% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0); } }
@media (prefers-reduced-motion: reduce) { .live::before { animation: none; } html { scroll-behavior: auto; } }

/* Drei Schritte */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; }
.steps li::before { content: counter(step); width: 36px; height: 36px; border-radius: 50%; background: var(--card); border: 1px solid var(--accent); color: var(--accent); font-weight: 800; display: grid; place-items: center; }
.steps b { display: block; }
.steps span { color: var(--muted); font-size: 14px; }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-weight: 800; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); margin: 8px 0 0; }

/* Formulare */
.card, form { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
form { display: grid; gap: 18px; }
#fields { display: contents; } /* gerenderte Profilfelder nehmen am Grid des Formulars teil */
form h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 10px 0 -6px; }
form h2:first-child { margin-top: 0; }
label, fieldset { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 6px; }
.hint { font-weight: 400; color: var(--muted); font-size: 13px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px; min-height: 48px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .row { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { display: block; font-weight: 500; position: relative; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.chips span { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; background: var(--bg); }
.chips input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.chips input:disabled + span { opacity: .3; cursor: not-allowed; text-decoration: line-through; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 13px; color: var(--muted); }
.consent input { width: 20px; height: 20px; min-height: 0; margin-top: 2px; flex: none; accent-color: var(--accent); }
.consent a { color: var(--text); }

button, .btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 800; font-size: 17px; border: 0; border-radius: 12px; min-height: 52px; padding: 0 20px;
  background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none;
}
button:disabled { opacity: .6; cursor: wait; }
.btn.secondary, button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); font-size: 15px; min-height: 44px; }
button.danger { background: transparent; color: var(--err); border: 1px solid var(--err); font-size: 15px; min-height: 44px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.msg { font-size: 14px; min-height: 1em; margin: 0; }
.msg.err { color: var(--err); }
.msg.ok { color: var(--ok); }
.done { text-align: center; padding: 28px 20px; display: grid; gap: 14px; justify-items: center; }
.done h2 { margin: 0; }
.done p { color: var(--muted); margin: 0; }
.note { color: var(--muted); font-size: 13px; margin: 0; }

.status { border-radius: 12px; padding: 12px 14px; margin: 0 0 20px; font-size: 14px; border: 1px solid var(--line); background: var(--card); }
.status.ok { border-color: var(--ok); }

/* Profil-Karte des vorgeschlagenen Partners */
.profile dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0 0; font-size: 15px; }
.profile dt { color: var(--muted); }
.profile dd { margin: 0; }
.profile h2 { margin: 0; }

.tips { text-align: left; border: 1px dashed var(--line); border-radius: 12px; padding: 14px 16px; font-size: 14px; }
.tips ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.tips li + li { margin-top: 4px; }

footer { margin-top: 40px; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.8; }
footer a { color: var(--muted); }
.hp { position: absolute; left: -9999px; }

/* ===== Fragebogen (anmelden.html, flow.js) ===== */
.flow { min-height: 100vh; min-height: 100dvh; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; }
.flow-head {
  position: sticky; top: 0; z-index: 2; background: var(--bg);
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
}
.flow-back { background: transparent; color: var(--text); min-height: 44px; width: 44px; padding: 0; border-radius: 50%; }
.flow-back:hover { background: var(--card); }
.flow-back[hidden] { display: inline-flex !important; visibility: hidden; }
.flow-mark { justify-self: center; font-size: 20px; }
.flow-progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.flow-progress > div { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .35s ease; }
.flow-body { flex: 1; padding: 12px 16px 24px; }
.flow-step h1 { font-size: clamp(26px, 6.5vw, 32px); margin: 8px 0 8px; outline: none; }
.flow-step .lead { margin-bottom: 0; }
.flow-content { margin-top: 24px; }
.flow-foot {
  position: sticky; bottom: 0; display: grid; gap: 8px;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, transparent, var(--bg) 24px);
}
.flow-foot[hidden] { display: none; }
.flow-foot .msg:empty { display: none; }
.flow-next { width: 100%; }

.from-right { animation: fromRight .28s ease both; }
.from-left { animation: fromLeft .28s ease both; }
@keyframes fromRight { from { opacity: 0; transform: translateX(28px); } }
@keyframes fromLeft { from { opacity: 0; transform: translateX(-28px); } }
@media (prefers-reduced-motion: reduce) {
  .from-right, .from-left { animation: none; }
  .flow-progress > div { transition: none; }
}

/* Antwort-Kacheln */
.options { display: grid; gap: 10px; }
.options.cols-2 { grid-template-columns: 1fr 1fr; }
.options.cols-3 { grid-template-columns: repeat(3, 1fr); }
.option {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 14px 16px;
  background: var(--card); color: var(--text); border: 1.5px solid var(--line); border-radius: 14px;
  font-size: 17px; font-weight: 600; text-align: left; line-height: 1.3;
  transition: border-color .15s, background .15s, transform .1s;
}
.option:hover { border-color: #3d4148; }
.option:active { transform: scale(.98); }
.option[aria-checked="true"] { border-color: var(--accent); background: rgba(255, 90, 31, .12); }
.option-icon { font-size: 26px; line-height: 1; flex: none; }
.option-text { flex: 1; min-width: 0; }
.option-text small { display: block; font-size: 14px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.option-tick { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line); flex: none; display: grid; place-items: center; }
.option[aria-checked="true"] .option-tick { background: var(--accent); border-color: var(--accent); }
.option[aria-checked="true"] .option-tick::after { content: "✓"; color: var(--accent-ink); font-size: 14px; font-weight: 800; }
.cols-2 .option, .cols-3 .option { min-height: 56px; padding: 12px; font-size: 15px; }
.cols-2 .option:has(.option-icon) { flex-direction: column; justify-content: center; text-align: center; min-height: 110px; gap: 8px; font-size: 17px; }
.cols-2 .option:has(.option-icon) .option-icon { font-size: 36px; }
.cols-3 .option { justify-content: center; text-align: center; }

/* Schieberegler */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 28px; }
.segmented button { min-height: 40px; font-size: 15px; font-weight: 600; background: transparent; color: var(--muted); border-radius: 9px; }
.segmented button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }
.slider-value { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.slider-value output { text-align: center; flex: 1; }
.slider-value output b { display: block; font-size: 64px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.slider-value output small { color: var(--muted); font-size: 15px; }
.step-btn { width: 52px; min-height: 52px; padding: 0; border-radius: 50%; background: var(--card); color: var(--text); border: 1px solid var(--line); font-size: 26px; font-weight: 500; }
.flow input[type="range"] { width: 100%; margin: 28px 0 6px; padding: 0; min-height: 36px; border: 0; background: none; accent-color: var(--accent); }
.flow input[type="range"]:focus { outline: none; }
.flow input[type="range"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.slider-scale { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.slider-sub { text-align: center; color: var(--muted); margin: 20px 0 0; }

/* Texteingabe & Abschluss */
.text-fields { display: grid; gap: 18px; }
.text-fields input { font-size: 20px; min-height: 58px; padding: 14px 16px; }
.summary { font-size: 15px; line-height: 1.7; margin-bottom: 20px; }
.consents { display: grid; gap: 16px; }
.consents .consent { font-size: 14px; }

/* Fertig */
.flow-done { text-align: center; display: grid; gap: 16px; justify-items: center; padding-top: 32px; }
.flow-done h1 { margin: 0; }
.done-icon { font-size: 64px; line-height: 1; }
