/* Wie wir sammeln · angelehnt an das Design-System der Archiver-App (DESIGN.md):
   neutrale Grautöne, Geist und Geist Mono, Karten eine Stufe vom Grund, Glas nur für Schwebendes,
   Auswahl als gestrichelter Ring. */
@font-face { font-family: "Geist"; src: url("fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: block; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: block; }

:root {
  --bg: #101010;
  --ink: #ffffff;
  --ink-rgb: 255, 255, 255;
  --ink-inverse: #0f0f0f;
  --p-text: #ededed;
  --p-dim: #8c8c8c;
  --p-faint: #5e5e5e;
  --p-rule: rgba(var(--ink-rgb), .10);
  --karte: rgba(var(--ink-rgb), .055);
  --karte-hover: rgba(var(--ink-rgb), .08);
  --karte-an: rgba(var(--ink-rgb), .12);
  --glas: rgba(40, 40, 40, .78);
  --glas-schatten: 0 14px 44px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(var(--ink-rgb), .07);
  --glas-blur: blur(24px) saturate(1.4);
  --accent: #2d5aeb;
  --danger: #e5484d;
  --r-lg: 8px;
  --r-md: 6px;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --rand: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f4f4;
    --ink: #111111;
    --ink-rgb: 17, 17, 17;
    --ink-inverse: #f4f4f4;
    --p-text: #111111;
    --p-dim: #5c5c5c;
    --p-faint: #8f8f8f;
    --karte: rgba(0, 0, 0, .045);
    --karte-hover: rgba(0, 0, 0, .07);
    --karte-an: rgba(0, 0, 0, .09);
    --glas: rgba(255, 255, 255, .78);
    --glas-schatten: 0 14px 44px rgba(0, 0, 0, .16), inset 0 0 0 .5px rgba(0, 0, 0, .08);
    --glas-blur: blur(28px) saturate(0);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--p-text);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
kbd { font: 11px var(--mono); opacity: .55; }

/* Kopf */
.kopf {
  position: sticky; top: 0; z-index: 4;
  display: flex; justify-content: space-between; align-items: center;
  height: 72px; padding: 0 var(--rand);
  background: linear-gradient(var(--bg) 60%, transparent);
}
.marke { font: 500 13.5px var(--sans); text-decoration: none; letter-spacing: -.01em; }
.pille {
  height: 30px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 999px;
  background: var(--karte);
  font: 11px var(--mono); letter-spacing: .02em; text-transform: uppercase; color: var(--p-dim);
}
.fortschritt { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 5; }
.fortschritt span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .28s var(--ease); }

/* Schirme */
main { flex: 1; display: flex; padding: 0 var(--rand); }
.schirm { display: none; width: 100%; max-width: 820px; padding: clamp(32px, 9vh, 96px) 0 160px; }
#kontext { max-width: 1120px; }
.schirm.aktiv { display: block; animation: rein .28s var(--ease) both; }
@keyframes rein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.etikett { display: block; font: 11px/1.3 var(--mono); letter-spacing: .02em; text-transform: uppercase; color: var(--p-dim); margin: 0 0 18px; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.02em; margin: 0 0 20px; text-wrap: balance; color: var(--p-text); }
h1 { font-size: clamp(36px, 6.4vw, 72px); line-height: 1; letter-spacing: -.035em; }
h2 { font-size: clamp(26px, 3.8vw, 40px); line-height: 1.08; letter-spacing: -.03em; }
h3 { font-size: 17px; font-weight: 500; letter-spacing: -.01em; margin: 0 0 8px; line-height: 1.3; }
.fliess { max-width: 34em; font-size: 17px; color: var(--p-text); }
.fliess p { margin: 0 0 1em; }
.hinweis { color: var(--p-dim); margin: -6px 0 28px; max-width: 40em; }
.hinweis:empty { display: none; }
.hinweis.klein { font-size: 14px; margin-top: 28px; }
.absender { margin-top: 72px; font: 12px var(--sans); color: var(--p-faint); }

.aktion { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 36px; }

/* Knöpfe: Pillen wie die Navigation der App */
.knopf {
  height: 40px; padding: 0 18px; border: 0; border-radius: 999px; cursor: pointer;
  display: inline-flex; gap: 10px; align-items: center;
  background: var(--karte); color: var(--p-text); font: 500 13.5px var(--sans);
  transition: background .12s ease, opacity .12s ease;
}
.knopf:hover { background: var(--karte-hover); }
.knopf.haupt { background: var(--ink); color: var(--ink-inverse); }
.knopf.haupt:hover { opacity: .88; }
.knopf:disabled { opacity: .3; cursor: default; }

/* Gestrichelter Ring: das eine Zeichen für Auswahl und Fokus */
.ring { position: relative; }
.ring::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: var(--ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Crect width='100%25' height='100%25' rx='8' ry='8' fill='none' stroke='black' stroke-width='2' stroke-dasharray='4 4'/%3E%3C/svg%3E");
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Crect width='100%25' height='100%25' rx='8' ry='8' fill='none' stroke='black' stroke-width='2' stroke-dasharray='4 4'/%3E%3C/svg%3E");
  transition: opacity .12s ease;
}
.ring.an::after, .ring:focus-visible::after, .ring:focus-within::after { opacity: 1; }
.knopf:focus-visible { outline: 1px dashed var(--ink); outline-offset: 3px; }

/* Kontext-Kacheln wie Zonenkarten */
.kacheln { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-top: 8px; }
.kachel { background: var(--karte); border-radius: var(--r-lg); padding: 20px 20px 24px; min-height: 260px; display: flex; flex-direction: column; }
.kachel .etikett { margin-bottom: auto; padding-bottom: 40px; }
.kachel p { margin: 0; color: var(--p-dim); font-size: 14.5px; line-height: 1.5; }

/* Optionen als Karten */
.optionen { display: grid; gap: 3px; }
.option {
  display: grid; grid-template-columns: 40px 1fr; align-items: baseline;
  min-height: 52px; padding: 15px 16px 15px 0; border-radius: var(--r-lg);
  background: var(--karte); cursor: pointer; transition: background .12s ease, opacity .12s ease;
}
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option .idx { font: 11px var(--mono); color: var(--p-faint); padding-left: 16px; }
.option .txt { font-size: 16px; font-weight: 500; letter-spacing: -.005em; }
.option:hover { background: var(--karte-hover); }
.option.an { background: var(--karte-an); }
.option.an .idx { color: var(--p-text); }
.option.aus { opacity: .35; pointer-events: none; }

.anderes { margin-top: 12px; }
.feld { display: block; margin-top: 24px; }
.feld .etikett { margin-bottom: 8px; }
input[type=text], input[type=email], input[type=password], textarea {
  width: 100%; font: 400 17px/1.45 var(--sans); color: var(--p-text);
  background: var(--karte); border: 0; border-radius: var(--r-lg); padding: 14px 16px; outline: none;
}
input:focus, textarea:focus { background: var(--karte-hover); }
textarea { min-height: 180px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--p-faint); }
.zeichen { font: 11px var(--mono); color: var(--p-faint); text-align: right; margin-top: 6px; }
.honig { position: absolute; left: -9999px; width: 1px; height: 1px; }

/* Skala */
.skala { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.skala button {
  height: 72px; border: 0; border-radius: var(--r-lg); background: var(--karte);
  font: 15px var(--mono); color: var(--p-text); cursor: pointer; transition: background .12s ease;
}
.skala button:hover { background: var(--karte-hover); }
.skala button.an { background: var(--karte-an); }
.pole { display: flex; justify-content: space-between; gap: 24px; margin-top: 12px; color: var(--p-dim); font-size: 14px; }
.pole span:last-child { text-align: right; }

.einwilligung { color: var(--p-dim); font-size: 13.5px; margin-top: 28px; max-width: 36em; }
.fehler { color: var(--danger); font-size: 14px; }

/* Untere Leiste als Glas-Pille */
.leiste { position: fixed; inset: auto 0 0 0; z-index: 4; display: flex; justify-content: center; padding: 0 var(--rand) calc(20px + env(safe-area-inset-bottom)); pointer-events: none; }
.leiste .glas {
  pointer-events: auto; display: flex; gap: 3px; padding: 5px; border-radius: 999px;
  background: var(--glas); -webkit-backdrop-filter: var(--glas-blur); backdrop-filter: var(--glas-blur); box-shadow: var(--glas-schatten);
}
.leiste .knopf { background: transparent; height: 36px; }
.leiste .knopf:hover { background: var(--karte-hover); }
.leiste .knopf.haupt { background: var(--ink); min-width: 120px; justify-content: center; }

.fuss { display: flex; gap: 20px; padding: 0 var(--rand) 24px; font: 11px var(--mono); text-transform: uppercase; letter-spacing: .02em; color: var(--p-faint); }
.fuss a { text-decoration: none; }
.fuss a:hover { color: var(--p-dim); }
body.laeuft .fuss { display: none; }

/* Textseiten (Impressum, Datenschutz) */
.text-seite .schirm { display: block; }
.text-seite h3 { margin-top: 2em; }
.text-seite p { color: var(--p-dim); max-width: 38em; }

@media (max-width: 760px) {
  .kacheln { grid-template-columns: 1fr; }
  .kachel { min-height: 0; }
  .kachel .etikett { padding-bottom: 24px; }
}
@media (max-width: 560px) {
  .option { grid-template-columns: 34px 1fr; padding-right: 12px; }
  .option .idx { padding-left: 12px; }
  .skala button { height: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  .schirm.aktiv { animation: none; }
  .fortschritt span, .knopf, .option { transition: none; }
}
