/* grundriss; – Stylesheet. Keine externen Schriften oder Ressourcen. */
:root {
  --paper: #f4f2ee;
  --ink: #1a2233;
  --muted: #52596a;
  --accent: #ae4429;   /* Rostorange aus dem Logo */
  --accent2: #2c6e84;  /* Petrol: zweite Farbe, ruhiger Gegenpol */
  --line: rgba(26, 34, 51, 0.18);
  --grid: rgba(26, 34, 51, 0.10);
  --grid-major: rgba(44, 110, 132, 0.16);
  --mono: ui-monospace, "IBM Plex Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 9rem; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
}
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 20; }
.skip:focus { left: 0; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .6rem clamp(1rem, 4vw, 3rem);
  background: rgba(244, 242, 238, 0.82);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand img { display: block; height: 104px; width: auto; }
nav { display: flex; gap: 1.25rem; flex-wrap: wrap; font-family: var(--mono); font-size: .8rem; letter-spacing: .04em; }
nav a { color: var(--muted); text-decoration: none; padding: .25rem 0; border-bottom: 1px solid transparent; }
nav a:hover, nav a:focus-visible { color: var(--ink); border-bottom-color: var(--accent2); }
a:focus-visible, .button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

main { max-width: 64rem; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 3rem) 4rem; }

.hero { padding: clamp(3rem, 10vw, 7rem) 0 clamp(2rem, 6vw, 4rem); }
.label { font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 1rem; }
h1 { font-size: clamp(2rem, 6vw, 3.6rem); line-height: 1.1; font-weight: 600; letter-spacing: -.02em; margin: 0 0 1.5rem; max-width: 20ch; }
.semi { color: var(--accent); font-family: var(--mono); }
h1 .semi { animation: blink 5s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 46rem; margin: 0 0 2rem; }
.button {
  display: inline-block; font-family: var(--mono); font-size: .9rem; text-decoration: none;
  color: var(--paper); background: var(--ink); padding: .8rem 1.4rem; border: 1px solid var(--ink);
  transition: background .2s ease, color .2s ease;
}
.button:hover { background: transparent; color: var(--ink); }

.panel {
  position: relative;
  margin-top: 2rem; padding: clamp(1.25rem, 3vw, 2.25rem);
  background: rgba(244, 242, 238, 0.9);
  border: 1px solid var(--line);
}
.panel::before, .panel::after { content: ""; position: absolute; width: 14px; height: 14px; border: 1px solid var(--accent); }
.panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.2; font-weight: 600; margin: 0 0 1rem; letter-spacing: -.01em; }
h3 { font-size: 1.05rem; margin: 0 0 .4rem; font-weight: 600; }
p { margin: 0 0 1rem; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.5rem; }
.cols.fit { margin-top: 1.5rem; }
.box { border-left: 2px solid var(--accent2); padding-left: 1rem; }
.box ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.box li { margin-bottom: .4rem; }

.steps { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.25rem; }
.steps li { display: grid; grid-template-columns: 3.2rem 1fr; gap: 1rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.steps p { margin: 0; color: var(--muted); }
.num { font-family: var(--mono); color: var(--accent2); font-size: 1.1rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.cards article { border: 1px solid var(--line); border-top: 2px solid var(--accent2); padding: 1.1rem; background: rgba(255, 255, 255, 0.45); }
.cards p { margin: 0; color: var(--muted); font-size: .95rem; }
.todo { font-family: var(--mono); color: var(--muted); border: 1px dashed var(--line); padding: 1rem; }

.site-footer { border-top: 1px solid var(--line); padding: 1.5rem clamp(1rem, 4vw, 3rem); font-family: var(--mono); font-size: .8rem; color: var(--muted); text-align: center; }
.site-footer p { margin: 0; }

/* ---- Akzente ---- */
::selection { background: var(--accent2); color: #fff; }

/* Farbverlauf-Linie unter Kopfzeile und über Fußzeile */
.site-header { border-bottom: 0; background-image: linear-gradient(90deg, var(--accent) 0, var(--accent) 64px, var(--accent2) 64px, var(--accent2) 168px, var(--line) 168px, var(--line) 100%); background-repeat: no-repeat; background-size: 100% 1px; background-position: bottom; }
.site-footer { border-top: 0; position: relative; }
.site-footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, var(--accent) 0, var(--accent) 64px, var(--accent2) 64px, var(--accent2) 168px, var(--line) 168px); }

/* Markierung im Titel: wie eine Anzeichnung im Bauplan */
.mark { position: relative; white-space: nowrap; }
.mark::after { content: ""; position: absolute; left: -.05em; right: -.05em; bottom: .02em; height: .14em; background: var(--accent); opacity: .85; transform-origin: left; }
.js .mark::after { transform: scaleX(0); animation: draw 1.1s .4s ease-out forwards; }
@keyframes draw { to { transform: scaleX(1); } }

/* Beschriftungen mit Quadrat in Zweitfarbe */
.label { display: flex; align-items: center; gap: .6rem; }
.label::before { content: ""; width: .55rem; height: .55rem; background: var(--accent2); flex: none; }
.panel .label { color: var(--accent2); }
.panel .label .state { color: var(--muted); }

/* Ablauf als Zeitleiste */
.steps { position: relative; }
.steps::before { content: ""; position: absolute; left: 1.55rem; top: 1.8rem; bottom: 1rem; width: 1px; background: var(--accent2); opacity: .45; }
.steps li { position: relative; border-top: 0; padding-top: 0; }
.num { position: relative; z-index: 1; display: inline-grid; place-items: center; width: 3.1rem; height: 3.1rem; background: var(--paper); border: 1px solid var(--accent2); border-radius: 50%; }
.steps h3 { margin-top: .6rem; }

/* Karten */
.cards article { transition: transform .2s ease, box-shadow .2s ease, border-top-color .2s ease; }
.cards article:hover { transform: translateY(-3px); border-top-color: var(--accent); box-shadow: 0 8px 22px rgba(26, 34, 51, 0.10); }
.cards h3::before { content: "/"; color: var(--accent); font-family: var(--mono); margin-right: .45rem; }
.box h3 { color: var(--accent2); }

/* Button mit Pfeil */
.button { display: inline-flex; align-items: center; gap: .6rem; position: relative; }
.button::after { content: "\2192"; display: inline-block; transition: transform .2s ease; }
.button:hover { border-color: var(--accent); color: var(--accent); }
.button:hover::after { transform: translateX(4px); }

/* Lead-Satz mit Zitatlinie */
.lead { border-left: 2px solid var(--accent); padding-left: 1.1rem; }

/* Eckmarken wechseln die Farbe beim Klarwerden */
.js .reveal::before, .js .reveal::after { border-color: var(--accent2); transition: border-color .8s ease; }
.js .reveal.is-clear::before, .js .reveal.is-clear::after { border-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .js .mark::after { animation: none; transform: none; }
  .cards article, .button::after { transition: none; }
  .cards article:hover { transform: none; }
}
@media (max-width: 40rem) {
  .steps::before { left: 1.4rem; }
  .num { width: 2.8rem; height: 2.8rem; }
  .steps li { grid-template-columns: 2.8rem 1fr; }
}

/* Verschwommen -> klar: wie Milchglas, nur umgekehrt. Nur mit JavaScript, sonst ist alles sofort lesbar. */
.js .reveal {
  filter: blur(14px);
  opacity: .35;
  transform: translateY(14px);
  transition: filter 1s ease, opacity 1s ease, transform 1s ease;
  will-change: filter, opacity;
}
.js .reveal.is-clear { filter: none; opacity: 1; transform: none; }
.js .reveal .state::after { content: "  · lädt"; color: var(--muted); }
.js .reveal.is-clear .state::after { content: "  · bereit"; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  h1 .semi { animation: none; }
  .js .reveal { filter: none; opacity: 1; transform: none; transition: none; }
  .js .reveal .state::after, .js .reveal.is-clear .state::after { content: ""; }
}
@media (max-width: 40rem) {
  nav { gap: .9rem; }
  .brand img { height: 76px; }
}

/* Footer-Links */
.site-footer nav { justify-content: center; margin-top: .75rem; }
.site-footer nav a { color: var(--muted); }

/* Kontaktformular */
.contact { display: grid; gap: 1.1rem; margin-top: 1.25rem; max-width: 40rem; }
.field { display: grid; gap: .35rem; }
.field label { font-family: var(--mono); font-size: .8rem; letter-spacing: .06em; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line); border-radius: 0; padding: .7rem .8rem; width: 100%;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent2); outline-offset: 1px; border-color: var(--accent2); }
.check { display: grid; grid-template-columns: 1.4rem 1fr; gap: .6rem; align-items: start; font-size: .95rem; color: var(--muted); }
.check input { width: 1.1rem; height: 1.1rem; margin-top: .25rem; accent-color: var(--accent2); }
.check a, .legal a, .notice a { color: var(--accent2); }
.hint { font-size: .9rem; color: var(--muted); margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
button.button { cursor: pointer; font-family: var(--mono); }

/* Hinweis- und Ergebnisseiten, Rechtstexte */
.page { max-width: 46rem; margin: 0 auto; padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 2rem) 4rem; }
.legal h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); max-width: none; }
.legal h2 { font-size: 1.2rem; margin: 2rem 0 .5rem; }
.legal p, .legal li { color: var(--muted); }
.legal ul { padding-left: 1.2rem; }
.ph { background: rgba(174, 68, 41, 0.12); border: 1px dashed var(--accent); padding: 0 .3rem; color: var(--ink); }
.notice { border: 1px solid var(--line); border-left: 3px solid var(--accent2); background: rgba(255, 255, 255, 0.6); padding: 1rem 1.25rem; margin: 1.5rem 0; }
.notice.error { border-left-color: var(--accent); }
.notice h2 { margin: 0 0 .5rem; font-size: 1.2rem; }
.notice p:last-child, .notice ul:last-child { margin-bottom: 0; }
.ref { font-family: var(--mono); color: var(--ink); }
