/* CO30 – neues Design (Entwurf)
   Keine externen Schriften, keine Cookies, kein Tracking. */

:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-2: #f3eee6;
  --text: #2a2a2a;
  --muted: #606060;         /* Logo-Grau */
  --line: #e6dfd4;
  --accent: #d40000;        /* CO30-Rot (Logo: #ee0000, für Text etwas dunkler) */
  --accent-strong: #a30000;
  --accent-soft: #fdeaea;
  --shadow: 0 1px 2px rgba(43, 39, 48, .06), 0 6px 24px rgba(43, 39, 48, .06);
  --radius: 14px;
  --max: 1080px;
  --rainbow: linear-gradient(90deg, #e40303 0 16.66%, #ff8c00 0 33.33%, #ffd800 0 50%, #008026 0 66.66%, #004dff 0 83.33%, #750787 0 100%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #18161b;
    --surface: #221f26;
    --surface-2: #2a2630;
    --text: #ececec;
    --muted: #a8a8a8;
    --line: #37323d;
    --accent: #ff7070;
    --accent-strong: #ffa3a3;
    --accent-soft: #3a2224;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 24px rgba(0,0,0,.25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- Kopf ---------- */
.rainbow { height: 5px; background: var(--rainbow); }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); }
.brand-logo { display: block; height: 40px; width: auto; }
@media (prefers-color-scheme: dark) {
  /* Logo-Grau ist auf dunklem Grund kaum lesbar: helle Plakette */
  .brand-logo { background: #fff; padding: 4px 8px; border-radius: 8px; box-sizing: content-box; height: 34px; }
}
.brand-tag { font-family: var(--font-serif); font-style: italic; color: var(--muted); font-size: 1rem; }

.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a {
  text-decoration: none; color: var(--text); font-size: .95rem;
  padding: 8px 12px; border-radius: 999px;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }

/* ---------- Bausteine ---------- */
main { padding: 40px 0 64px; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin: 0 0 16px; }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 48px 0 16px; }
h3 { font-size: 1.15rem; margin: 0 0 6px; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 46em; }
.muted { color: var(--muted); }
.prose { max-width: 46em; }
.prose h2 { margin-top: 36px; }

.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  padding: 12px 22px; border-radius: 999px; border: 2px solid var(--accent);
  background: var(--accent); color: #fff;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
@media (prefers-color-scheme: dark) { .btn, .btn:hover { color: #2a0a0a; } }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-soft); color: var(--accent-strong); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px;
}
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Hero */
.hero { padding: 24px 0 8px; }
.hero h1 { max-width: 16em; }
.hero-note { font-family: var(--font-serif); font-style: italic; color: var(--muted); margin-top: 20px; }

/* Einstiegskarten */
.entry { display: flex; flex-direction: column; text-decoration: none; color: var(--text); transition: transform .15s ease; }
.entry:hover { transform: translateY(-2px); color: var(--text); }
.entry .icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 14px;
}
.entry p { margin: 0 0 12px; color: var(--muted); }
.badge {
  display: inline-block; vertical-align: middle; margin-left: 6px;
  font-size: .72rem; font-weight: 600; letter-spacing: .02em;
  padding: 2px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-strong);
}
.entry .more { margin-top: auto; color: var(--accent); font-weight: 600; }

/* Themen-Liste */
.topics { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; }
.topics a {
  display: inline-block; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px;
}
.topics a:hover { border-color: var(--accent); color: var(--accent-strong); }

/* Stimmen aus dem Forum */
.voices { columns: 3 280px; column-gap: 18px; }
.voice {
  break-inside: avoid; margin: 0 0 18px; position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 18px;
}
.voice::before {
  content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px;
  border-radius: 0 4px 4px 0; background: var(--rainbow); background-size: 100% 600%;
}
.voice:nth-child(6n+1)::before { background: #e40303; }
.voice:nth-child(6n+2)::before { background: #ff8c00; }
.voice:nth-child(6n+3)::before { background: #e0b800; }
.voice:nth-child(6n+4)::before { background: #008026; }
.voice:nth-child(6n+5)::before { background: #004dff; }
.voice:nth-child(6n+6)::before { background: #750787; }
.voice blockquote { margin: 0; font-family: var(--font-serif); font-size: 1.02rem; }
.voice figcaption { margin-top: 10px; font-size: .9rem; color: var(--muted); }

/* Hinweisbox */
.note {
  border-left: 4px solid var(--accent); background: var(--accent-soft);
  padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0;
}
.note.warn { border-color: #c07a00; background: #fff4dc; color: #4a3500; }
@media (prefers-color-scheme: dark) { .note.warn { background: #3a2e14; color: #f3dfb0; } }

/* Mediathek */
.media-item audio { width: 100%; margin-top: 12px; }

/* Linkliste */
.links { list-style: none; padding: 0; display: grid; gap: 14px; }
.links li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.links a { font-weight: 600; }
.links p { margin: 4px 0 0; color: var(--muted); }

/* Gästebuch */
.gb-entry header { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.gb-entry .reply { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); color: var(--muted); font-style: italic; }
.stack { display: grid; gap: 18px; }

/* ---------- Fuß ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 28px 0; font-size: .95rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .wrap { padding: 0 16px; }
  .brand-tag { display: none; }
  .nav { width: 100%; }
  .nav a { padding: 6px 10px; font-size: .9rem; }
  main { padding-top: 28px; }
  .card { padding: 20px; }
}
