/* Öffentliche Seiten der Anmeldung. Die Verwaltung nutzt weiter style.css.
   Schrift: Barlow und Barlow Semi Condensed (SIL Open Font License 1.1, siehe fonts/LICENSE-OFL.txt), vom eigenen Server. */
@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
  --navy: #14213d;
  --navy-hi: #1e2f55;
  --amber: #f2a900;
  --amber-hi: #ffbb1f;
  --ground: #edf0f5;
  --sheet: #ffffff;
  --field: #f6f8fb;
  --ink: #17203a;
  --muted: #4a5873;
  --line: #c4cdda;
  --edge: #7d8ba5;
  --err: #a4262c;
  --ok: #1b6b3e;
  --on-navy: #eef2f9;
  --on-navy-muted: #b9c5da;
  --head: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --text: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0b111d; --sheet: #121a2b; --field: #0d1424; --ink: #e9eef7; --muted: #aab6cc;
    --line: #2a364d; --edge: #6f7e99; --err: #ff9094; --ok: #6fd39a; --navy: #0f1a31; --navy-hi: #182848;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 1.0625rem/1.55 var(--text); caret-color: var(--navy); }
@media (prefers-color-scheme: dark) { body { caret-color: var(--amber); } }
::selection { background: var(--amber); color: var(--navy); }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; box-shadow: 0 0 0 6px var(--amber); }
@media (prefers-color-scheme: dark) { :focus-visible { outline-color: var(--amber); box-shadow: none; } }
.kopf :focus-visible, .erklaer :focus-visible, .kopfleiste :focus-visible { outline-color: var(--amber); box-shadow: none; }
* { scrollbar-color: var(--edge) transparent; }

h1, h2 { font-family: var(--head); font-weight: 700; line-height: 1.04; letter-spacing: -.005em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.3rem, 1.1rem + 2.8vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 1.4rem + 1vw, 2.2rem); }
p { margin: 0 0 1em; }

/* ---- Aufbau mit Nutzenfläche (Anmeldung) ---- */
.teilt { display: grid; min-height: 100dvh; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto 1fr; grid-template-areas: "kopf form" "erklaer form"; background: linear-gradient(to right, var(--navy) 0 41.6667%, transparent 41.6667%); }
.kopf, .erklaer { color: var(--on-navy); padding-inline: clamp(24px, 4.2vw, 64px); }
.kopf { grid-area: kopf; padding-top: clamp(24px, 3.4vw, 44px); padding-bottom: clamp(16px, 2vw, 24px); }
.erklaer { grid-area: erklaer; padding-top: clamp(4px, 1vw, 12px); padding-bottom: clamp(24px, 3vw, 40px); background-image: linear-gradient(to right, var(--navy) 0 58%, transparent 92%), url("/haus.svg"); background-repeat: no-repeat; background-position: 0 0, right -170px bottom -150px; background-size: 100% 100%, 600px; }
.form-seite { grid-area: form; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: clamp(24px, 5vw, 72px) clamp(16px, 4vw, 56px); gap: 20px; }
.form-seite > * { width: 100%; max-width: 34rem; }

.marke { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font: 700 1.5rem/1 var(--head); letter-spacing: .01em; }
.marke img { width: 38px; height: 38px; display: block; }
.kopf h1 { margin-top: clamp(24px, 3.2vw, 44px); }
.lead { font-size: 1.1875rem; line-height: 1.45; max-width: 34ch; margin: 14px 0 0; color: var(--on-navy-muted); }

.schritte { list-style: none; counter-reset: s; margin: 0 0 clamp(20px, 2.4vw, 32px); padding: 0; display: grid; gap: 14px; max-width: 30rem; }
.schritte li { counter-increment: s; display: grid; grid-template-columns: 2.6rem 1fr; gap: 6px 14px; align-items: baseline; }
.schritte li::before { content: counter(s); grid-row: span 2; font: 700 2.6rem/1 var(--head); color: var(--amber); }
.schritte strong { font-weight: 600; font-size: 1.1875rem; line-height: 1.25; }
.schritte span { color: var(--on-navy-muted); font-size: 1rem; line-height: 1.4; }
.erklaer h2 { font-size: 1.35rem; margin-bottom: 14px; color: var(--on-navy); letter-spacing: .01em; }
.aussagen { list-style: none; margin: 0; padding: 16px 0 0; border-top: 1px solid rgba(255, 255, 255, .22); display: grid; gap: 8px; max-width: 30rem; }
.aussagen li { position: relative; padding-left: 26px; color: var(--on-navy); font-size: 1rem; line-height: 1.4; }
.aussagen li::before { content: ""; position: absolute; left: 0; top: .3em; width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.5l3.5 3.5 7-8' fill='none' stroke='%23f2a900' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain; }

/* ---- Blatt (Formular und Rückmeldungen) ---- */
.blatt { background: var(--sheet); border: 1px solid var(--line); border-radius: 6px; padding: clamp(22px, 3.2vw, 36px); box-shadow: 0 1px 0 rgba(20, 33, 61, .04), 0 18px 36px -18px rgba(20, 33, 61, .28); }
.blatt h2 { margin-bottom: 6px; }
.blatt .unter { color: var(--muted); margin: 0 0 18px; }
.blatt[hidden], [hidden] { display: none !important; }
.blatt.neu { animation: erscheint .28s var(--ease) both; }
@keyframes erscheint { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

label { display: block; font-weight: 600; margin: 16px 0 6px; line-height: 1.25; }
input[type=text], input[type=email], input[type=password], textarea { display: block; width: 100%; min-height: 3rem; padding: 10px 14px; font: inherit; color: var(--ink); background: var(--field); border: 2px solid var(--edge); border-radius: 6px; }
textarea { min-height: 6.5rem; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:hover, textarea:hover { border-color: var(--navy); }
@media (prefers-color-scheme: dark) { input:hover, textarea:hover { border-color: var(--amber); } }
input[aria-invalid=true] { border-color: var(--err); }
.reihe { display: grid; gap: 0 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 36rem) { .reihe { grid-template-columns: 1fr; } }

.hint { color: var(--muted); font-size: .9375rem; line-height: 1.4; margin: 6px 0 0; font-weight: 400; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; margin: 2px 0 0; padding-block: 9px; cursor: pointer; }
.check input { flex: none; width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--navy); cursor: pointer; }
@media (prefers-color-scheme: dark) { .check input { accent-color: var(--amber); } }
.beschriftung { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 16px; }
.beschriftung label { margin: 0 0 6px; }
.beschriftung .pw-anzeigen { margin: 0 0 2px; padding-block: 4px; font-size: .9375rem; font-weight: 500; color: var(--muted); }
.pw-anzeigen { margin-top: 2px; font-size: .9375rem; color: var(--muted); }
.pw-anzeigen input { width: 20px; height: 20px; }
.zustimmungen { margin-top: 22px; padding-top: 4px; border-top: 1px solid var(--line); }
.zustimmungen:empty { display: none; }
details { margin: 4px 0 0 36px; font-size: .9375rem; color: var(--muted); }
summary { cursor: pointer; padding: 10px 0; width: fit-content; }
details p { white-space: pre-line; margin: 6px 0 4px; }

.knopf, button.primary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 3.25rem; margin-top: 24px; padding: 12px 20px; font: 600 1.125rem/1.2 var(--text); letter-spacing: .01em; text-align: center; text-decoration: none; color: var(--navy); background: var(--amber); border: 0; border-radius: 6px; cursor: pointer; transition: background-color .18s var(--ease), transform .12s var(--ease); }
.knopf:hover, button.primary:hover { background: var(--amber-hi); text-decoration: none; }
.knopf:active, button.primary:active { transform: translateY(1px); }
button.primary[disabled] { opacity: .55; cursor: progress; transform: none; }
:is(.knopf, button.primary):focus-visible { outline-color: var(--navy); box-shadow: 0 0 0 6px #fff; }
@media (prefers-color-scheme: dark) { :is(.knopf, button.primary):focus-visible { outline-color: #fff; box-shadow: none; } }

.fehler, .error { color: var(--err); margin: 14px 0 0; font-weight: 500; }
.ok { color: var(--ok); font-weight: 600; }
.nebenbei { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9375rem; line-height: 1.45; }
.trap { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.fuss { font-size: .9375rem; color: var(--muted); text-align: center; }
.fuss a { color: inherit; display: inline-block; padding: 8px 4px; }
.erklaer .fuss { margin: 26px 0 0; text-align: left; color: var(--on-navy-muted); }

/* ---- Haus-Symbol mit Haken, der sich einmal zeichnet ---- */
.haus { display: block; width: 76px; height: 76px; margin: 0 0 18px; }
.haus .dach { fill: var(--amber); }
.haus .haken { fill: none; stroke: var(--navy); stroke-width: 30; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 170; stroke-dashoffset: 170; }
.haus.fertig .haken { animation: zeichnen .75s var(--ease) .12s forwards; }
@keyframes zeichnen { to { stroke-dashoffset: 0; } }
@media (prefers-color-scheme: dark) { .haus .haken { stroke: var(--sheet); } }

/* ---- Statusseite ---- */
.einseitig { min-height: 100dvh; display: flex; flex-direction: column; }
.kopfleiste { background: var(--navy); color: var(--on-navy); padding: 18px clamp(16px, 4vw, 48px); }
.einseitig main { flex: 1; width: 100%; max-width: 38rem; margin: 0 auto; padding: clamp(24px, 6vw, 64px) 16px 24px; }
.einseitig h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem); margin-bottom: 18px; color: var(--ink); }
.einseitig .fuss { padding: 8px 16px 32px; }
.fortschritt { list-style: none; margin: 4px 0 22px; padding: 0; display: grid; gap: 0; }
.fortschritt li { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: 14px; align-items: start; padding: 0 0 20px; color: var(--muted); }
.fortschritt li:last-child { padding-bottom: 0; }
.fortschritt li::before { content: ""; width: 24px; height: 24px; margin: 2px 0 0 4px; border-radius: 50%; border: 2px solid var(--edge); background: var(--sheet); }
.fortschritt li::after { content: ""; position: absolute; left: 15px; top: 30px; bottom: 2px; width: 2px; background: var(--line); }
.fortschritt li:last-child::after { display: none; }
.fortschritt .tat { font-weight: 600; color: var(--ink); display: block; line-height: 1.3; }
.fortschritt .zeit { font-size: .9375rem; display: block; }
.fortschritt li.fertig::before { background: var(--amber); border-color: var(--amber); }
.fortschritt li.fertig::after { background: var(--amber); }
.fortschritt li.jetzt::before { border-color: var(--navy); background: var(--sheet); box-shadow: inset 0 0 0 5px var(--sheet), inset 0 0 0 12px var(--navy); animation: puls 1.6s ease-in-out infinite; }
@media (prefers-color-scheme: dark) { .fortschritt li.jetzt::before { border-color: var(--amber); box-shadow: inset 0 0 0 5px var(--sheet), inset 0 0 0 12px var(--amber); } }
@keyframes puls { 50% { transform: scale(1.12); } }
.adresse { display: block; font: 600 1.375rem/1.3 var(--head); letter-spacing: .01em; word-break: break-all; margin: 4px 0 4px; }

/* ---- Flache Desktop-Fenster: Spalte und Blatt enger, damit Knopf und Aussagen sichtbar bleiben ---- */
@media (min-width: 62.01rem) and (max-height: 960px) {
  .kopf { padding-top: 24px; padding-bottom: 12px; }
  .kopf h1 { margin-top: 20px; font-size: clamp(2.2rem, 1rem + 2.4vw, 3rem); }
  .lead { margin-top: 10px; font-size: 1.125rem; }
  .schritte { gap: 10px; margin-bottom: 18px; }
  .schritte li::before { font-size: 2.2rem; }
  .schritte span { font-size: .9375rem; }
  .erklaer { padding-bottom: 20px; }
  .erklaer h2 { margin-bottom: 10px; }
  .aussagen { padding-top: 12px; gap: 6px; }
  .aussagen li { font-size: .9375rem; }
  .erklaer .fuss { margin-top: 14px; }
  .form-seite { padding-block: 12px; }
  .blatt { padding-block: 20px; }
  .blatt .unter { margin-bottom: 8px; }
  .blatt h2 { font-size: 1.6rem; }
  label { margin-top: 8px; }
  .beschriftung { margin-top: 10px; }
  .zustimmungen { margin-top: 10px; }
  .zustimmungen .check { padding-block: 6px; }
  .zustimmungen summary { padding-block: 4px; }
  .knopf, button.primary { margin-top: 16px; }
}

/* ---- Textseiten (Datenschutz, Impressum) ---- */
.einseitig main.recht { max-width: 46rem; }
.recht h1 { margin-bottom: 20px; }
.recht h2 { font-size: 1.6rem; margin: 1.8em 0 .5em; }
.recht h3 { font-family: var(--head); font-size: 1.25rem; margin: 1.4em 0 .4em; }
.recht p, .recht li { max-width: 70ch; }
.recht ul { padding-left: 1.2em; }
.recht .scroll { overflow-x: auto; margin: 1em 0; }
.recht table { width: 100%; border-collapse: collapse; font-size: .9375rem; background: var(--sheet); }
.recht th, .recht td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.recht th { font-weight: 600; background: var(--field); }

/* ---- Bewegung zurücknehmen ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .haus .haken { stroke-dashoffset: 0; }
}

/* ---- Handy und schmale Fenster: untereinander ---- */
@media (max-width: 62rem) {
  .teilt { display: block; min-height: 0; background: none; }
  .kopf, .erklaer { background-color: var(--navy); }
  .kopf h1 { margin-top: 28px; }
  .form-seite { padding-top: 28px; }
  .form-seite > * { max-width: 40rem; }
  .erklaer { padding-top: 34px; background-position: 0 0, right -220px bottom -200px; background-size: 100% 100%, 520px; }
  .schritte, .aussagen { max-width: 40rem; }
}
