:root {
  --ink: #22211f;
  --ink-2: #5a5750;
  --line: #e4e1d9;
  --paper: #ffffff;
  --soft: #f8f7f3;
  --green: #4d8a3e;
  --orange: #e0702a;
  --s1: #f0a35e;
  --s2: #8fbf5a;
  --s3: #3f7a3a;
  --radius: 14px;
  --max: 1160px;
  --hand: 'Architects Daughter', 'Comic Sans MS', cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.6 'Instrument Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 600; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 600; max-width: 20ch; }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.wrap-wide { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* ---------- Skizzen ---------- */
.ink { fill: none; stroke: var(--ink); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; filter: url(#rough); }
.ink.faint { opacity: .42; stroke-width: 1.1; }
.ink.dim { stroke-width: .9; }
.ink .posts { stroke-width: 7; stroke-dasharray: 1.4 11; stroke-linecap: butt; }
.wash { stroke: none; filter: url(#wc); opacity: .78; mix-blend-mode: multiply; }
.paper { fill: #fff; stroke: none; }
.note { font-family: var(--hand); font-weight: 600; font-size: 16px; fill: var(--ink); stroke: none; }
.note.small { font-size: 13px; }
.sketch { width: 100%; height: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.25rem; letter-spacing: -0.03em; }
.logo svg { width: 40px; height: 28px; }
.main-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.main-nav a { text-decoration: none; font-size: .95rem; color: var(--ink-2); }
.main-nav a:hover { color: var(--ink); }
.main-nav a.btn { color: #fff; }
.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink); color: #fff; border: 1.5px solid var(--ink);
  padding: 13px 22px; border-radius: 999px;
  font: 600 1rem/1.1 inherit; font-family: inherit; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, transform .15s;
}
.btn:hover { background: var(--green); border-color: var(--green); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-small { padding: 9px 16px; font-size: .9rem; }

/* ---------- Typo-Helfer ---------- */
.kicker { font-family: var(--hand); font-weight: 600; font-size: 1rem; color: var(--ink-2); margin-bottom: .6em; }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--ink-2); max-width: 40em; }
.section-lead { font-size: 1.15rem; color: var(--ink-2); max-width: 38em; }
.fineprint { font-size: .85rem; color: var(--ink-2); margin-top: 1em; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 24px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 18px; }
.hero-note { margin-top: 24px; display: flex; align-items: center; gap: 10px; font-size: .95rem; color: var(--ink-2); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(224,112,42,.18); }
.hero-sketch { margin-top: 8px; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-tight { padding: 56px 0 72px; }
.section-soft { background: var(--soft); }

/* Zielgruppen */
.audience { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 28px; }
.aud-card {
  display: flex; flex-direction: column; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  transition: border-color .15s, transform .15s;
}
.aud-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.aud-card svg { height: 90px; margin: 0 auto 10px; }
.aud-card p { font-size: .92rem; color: var(--ink-2); flex: 1; }
.aud-card .arrow { font-weight: 600; font-size: .92rem; }
.aud-card.is-soon { cursor: default; position: relative; }
.aud-card.is-soon:hover { border-color: var(--line); transform: none; }
/* Ausgegraut per Farbe statt opacity, sonst wird der Tooltip (::after) mit transparent */
.aud-card.is-soon .arrow { color: #a8a49b; position: relative; }
.aud-card.is-soon .arrow::after {
  content: attr(data-tip); position: absolute; left: 0; bottom: calc(100% + 10px); z-index: 20;
  width: max-content; max-width: 220px; padding: 9px 13px; border-radius: 10px;
  background: var(--ink); color: #fff; font-size: .82rem; font-weight: 500; line-height: 1.35;
  box-shadow: 0 6px 20px rgba(34,33,31,.22);
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
.aud-card.is-soon:hover .arrow::after, .aud-card.is-soon:focus-within .arrow::after { opacity: 1; }

/* Problem */
.three { list-style: none; padding: 0; margin: 28px 0 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: p; }
.three li { counter-increment: p; font-size: 1.1rem; padding-top: 14px; border-top: 1.5px solid var(--ink); }
.three li::before { content: counter(p, decimal-leading-zero); display: block; font-family: var(--hand); font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 36px; }
.step svg { width: 100%; max-width: 240px; margin-bottom: 8px; }
.step .num { font-family: var(--hand); font-weight: 600; display: inline-grid; place-items: center; width: 30px; height: 30px; border: 1.5px solid var(--ink); border-radius: 50%; margin-bottom: 10px; }
.step p { color: var(--ink-2); font-size: .98rem; }

/* Herzstück */
.core { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: stretch; }
.facts { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.facts li { padding-left: 26px; position: relative; color: var(--ink-2); }
.facts li strong { color: var(--ink); }
.facts li::before { content: ''; position: absolute; left: 0; top: .55em; width: 12px; height: 12px; border-radius: 50%; background: var(--s2); opacity: .8; }
.cycle-box { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.cycle { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 22px; flex: 1; align-content: space-evenly; }
.cycle li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; font-size: .98rem; }
.cycle li span { font-family: var(--hand); font-weight: 600; display: grid; place-items: center; width: 30px; height: 30px; border: 1.5px dashed var(--ink); border-radius: 50%; }

/* Karte */
.legend { list-style: none; padding: 0; margin: 20px 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: .95rem; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend .pin { width: 16px; height: 16px; }
.map-layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: stretch; }
.map-frame { position: relative; border: 1.5px solid var(--ink); border-radius: var(--radius); overflow: hidden; min-height: 520px; }
#map { position: absolute; inset: 0; background: var(--soft); }
/* Fadenkreuz immer: Klick auf die Karte setzt den Innenhof-Pin */
#map, #map.leaflet-grab { cursor: crosshair; }
#map.leaflet-dragging, #map.leaflet-dragging .leaflet-grab { cursor: grabbing; }
.leaflet-tile-pane { filter: contrast(.92) brightness(1.04); }
.tiles-soft { opacity: .62; filter: sepia(.25) saturate(1.2); }
.area-label { background: #fff; border: 1px solid var(--ink); border-radius: 6px; box-shadow: none; font: 600 .78rem/1.2 'Instrument Sans', sans-serif; padding: 3px 7px; }
.area-label::before { display: none; }
.map-search { position: absolute; z-index: 600; top: 12px; left: 12px; width: min(380px, calc(100% - 80px)); }
.map-search input { margin: 0; padding: 11px 14px; border: 1.5px solid var(--ink); border-radius: 10px; box-shadow: 2px 2px 0 rgba(34,33,31,.2); font-size: .95rem; }
.map-search ul { list-style: none; margin: 6px 0 0; padding: 4px; background: #fff; border: 1.5px solid var(--ink); border-radius: 10px; box-shadow: 2px 2px 0 rgba(34,33,31,.2); max-height: 260px; overflow-y: auto; }
.map-search li { padding: 9px 10px; border-radius: 7px; font-size: .9rem; cursor: pointer; }
.map-search li span { color: var(--ink-2); }
.map-search li[aria-selected="true"], .map-search li:hover { background: var(--soft); }
.map-search li.empty { color: var(--ink-2); cursor: default; background: none; }
.map-hint { position: absolute; z-index: 500; left: 50%; top: 66px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 9px 16px; border-radius: 999px; font-size: .9rem; white-space: nowrap; }
.pin {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--ink); font: 700 .85rem/1 'Instrument Sans', sans-serif; color: var(--ink);
  box-shadow: 2px 2px 0 rgba(34,33,31,.25);
}
.pin.s1 { background: var(--s1); }
.pin.s2 { background: var(--s2); }
.pin.s3 { background: var(--s3); color: #fff; }
.pin.temp { background: #fff; border-style: dashed; cursor: grab; }
.pin.temp.needs-move { background: var(--s1); border-style: solid; animation: pin-nudge 1.6s ease-in-out infinite; }
@keyframes pin-nudge { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(6px, -4px); } 50% { transform: translate(0, 0); } }
@media (prefers-reduced-motion: reduce) { .pin.temp.needs-move { animation: none; } }
.pin-status { font-size: .9rem; color: var(--ink-2); padding: 10px 12px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); }
.pin-status.warn { border-color: var(--orange); background: #fff4ea; color: var(--ink); }
.leaflet-div-icon { background: none; border: 0; }

.hof-panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; font-size: .95rem; background: #fff; }
.hof-panel h3 { font-size: 1.2rem; }
.hof-panel .meta { color: var(--ink-2); margin-bottom: 14px; }
.hof-panel .btn { width: 100%; margin-top: 8px; }
.hof-panel .back { background: none; border: 0; padding: 0; margin-bottom: 14px; font: inherit; color: var(--ink-2); cursor: pointer; }
.ladder { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.ladder li { display: flex; gap: 10px; align-items: center; color: var(--ink-2); }
.ladder li::before { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line); flex: none; }
.ladder li.done { color: var(--ink); }
.ladder li.done::before { background: var(--s2); border-color: var(--ink); }
.count { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.progress { height: 8px; border-radius: 99px; background: var(--soft); border: 1px solid var(--line); overflow: hidden; margin: 10px 0 6px; }
.progress span { display: block; height: 100%; background: var(--s1); }
.invite { display: flex; gap: 6px; margin-top: 10px; }
.invite input { flex: 1; min-width: 0; font-size: .8rem; }
.invite button { flex: none; width: auto !important; margin: 0 !important; padding: 9px 14px; }

/* Rollen */
.roles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; margin-top: 32px; }
.role { border-top: 1.5px solid var(--ink); padding-top: 14px; }
.role p { color: var(--ink-2); font-size: .95rem; }

/* Bern */
.bern { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.roadmap { list-style: none; padding: 0; margin: 24px 0 28px; border-left: 1.5px dashed var(--ink); }
.roadmap li { padding: 0 0 16px 22px; position: relative; color: var(--ink-2); }
.roadmap li::before { content: ''; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 1.5px solid var(--ink); }
.roadmap li:first-child::before { background: var(--orange); }
.roadmap strong { display: block; color: var(--ink); }

/* Blueprints */
.blueprints { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.bp { display: block; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: border-color .15s, transform .15s; }
.bp:hover { border-color: var(--ink); transform: translateY(-2px); }
.bp .tag { font-family: var(--hand); font-weight: 600; font-size: .9rem; color: var(--green); }
.bp h3 { margin-top: 8px; }
.bp p { color: var(--ink-2); font-size: .95rem; margin: 0; }
.bp.is-soon { background: transparent; border-style: dashed; border-color: #cfcabe; cursor: default; }
.bp.is-soon:hover { border-color: #cfcabe; transform: none; }
.soon-badge { float: right; font-size: .75rem; font-weight: 600; letter-spacing: .02em; color: var(--ink-2); border: 1px dashed var(--ink-2); border-radius: 999px; padding: 2px 9px; }

/* Formulare */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.join { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.join-report { grid-column: 1; grid-row: 1; }
.join-news { grid-column: 1; grid-row: 2; }
.join-help { grid-column: 2 / 4; grid-row: 1 / 3; }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.join-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 0; }
.join-card p { color: var(--ink-2); font-size: .95rem; }
label { display: block; font-size: .88rem; font-weight: 500; margin-bottom: 12px; }
input, textarea {
  display: block; width: 100%; margin-top: 5px;
  font: inherit; font-size: 1rem; color: var(--ink);
  padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
}
input:focus, textarea:focus { outline: none; border-color: var(--ink); }
input:invalid.touched { border-color: #c9503c; }
fieldset { border: 0; padding: 0; margin: 4px 0 14px; }
legend { font-size: .88rem; font-weight: 500; margin-bottom: 6px; }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 400; font-size: .95rem; margin-bottom: 6px; }
label.check input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--green); }
.form-done { color: var(--green) !important; font-weight: 600; margin: 12px 0 0; }
form.sent label, form.sent fieldset, form.sent button { opacity: .4; pointer-events: none; }

.kernteam {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px;
  margin-top: 40px; padding: 36px; border: 1.5px solid var(--ink); border-radius: var(--radius);
  background: linear-gradient(135deg, #fff7ee, #f3f8ec);
}
.kernteam h3 { font-size: 1.6rem; }
.kernteam p { color: var(--ink-2); }

/* Mitwirkende */
.crew { margin-top: 56px; }
.crew h3 { font-size: 1.35rem; margin-bottom: 20px; }
.crew-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 24px; }
.crew-member, .crew-member a { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; text-decoration: none; }
.crew-member .avatar {
  display: grid; place-items: center; width: 96px; height: 96px; margin-bottom: 10px; overflow: hidden;
  border-radius: 50%; border: 1.5px solid var(--ink); background: var(--s2);
  font: 600 2rem/1 var(--hand); color: var(--ink);
}
.crew-member .avatar img { width: 100%; height: 100%; object-fit: cover; }
.crew-member strong { font-size: 1rem; }
.crew-member > span:last-child { font-size: .88rem; color: var(--ink-2); }
.crew-open .avatar { background: transparent; border: 1.5px dashed var(--ink-2); color: var(--ink-2); transition: border-color .15s, color .15s; }
.crew-open a:hover .avatar { border-color: var(--ink); color: var(--ink); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; font-size: .95rem; color: var(--ink-2); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-inner .logo { color: var(--ink); margin-bottom: 8px; }

/* Toast */
.toast { position: fixed; z-index: 2000; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: .95rem; box-shadow: 0 6px 24px rgba(0,0,0,.18); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .audience { grid-template-columns: repeat(3, 1fr); }
  .roles { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  body { font-size: 17px; }
  .wrap { padding: 0 16px; }
  .section { padding: 64px 0; }
  .nav-toggle { display: block; margin-left: auto; font: 600 .9rem inherit; font-family: inherit; background: none; border: 1.5px solid var(--ink); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
  .main-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .main-nav a.btn { margin-top: 12px; border-bottom: 0; }
  .header-inner { gap: 12px; }
  .three, .core, .bern, .join, .blueprints, .kernteam, .map-layout { grid-template-columns: 1fr; }
  .audience { grid-template-columns: repeat(2, 1fr); }
  .roles { grid-template-columns: 1fr 1fr; }
  .map-frame { min-height: 420px; }
  .join-report, .join-news, .join-help { grid-column: auto; grid-row: auto; }
  .help-grid { grid-template-columns: 1fr; }
  .kernteam { padding: 24px; gap: 16px; }
}
@media (max-width: 520px) {
  .audience, .roles, .steps { grid-template-columns: 1fr; }
  .aud-card svg { height: 76px; }
  .map-hint { white-space: normal; width: 86%; text-align: center; }
}

.wash-loose .wash { filter: url(#wc-loose); }
