/* CSB-DMS – Projektseite
   Schlicht gehalten: eine Schriftfamilie, ruhige Flächen, viel Luft.
   Kein Framework, keine Schrift von außen, kein Skript – die Seite soll
   auch in zehn Jahren noch so aussehen. */

:root {
    --papier: #fbfbfa;
    --flaeche: #ffffff;
    --rand: #e5e3df;
    --text: #1c1b19;
    --text-leise: #6b6862;
    --akzent: #1d63d2;
    --akzent-leise: #eef3fd;
    --schatten: 0 1px 2px rgba(28, 27, 25, .04), 0 8px 24px rgba(28, 27, 25, .06);
    --radius: 14px;
    --breite: 1080px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --papier: #16161a;
        --flaeche: #1e1e23;
        --rand: #32323a;
        --text: #eceaea;
        --text-leise: #a3a09b;
        --akzent: #7aa5f0;
        --akzent-leise: #23293a;
        --schatten: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--papier);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.huelle { max-width: var(--breite); margin: 0 auto; padding: 0 24px; }

/* ── Kopf ───────────────────────────────────────────────────────────── */

header.kopf {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--papier) 88%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--rand);
}

.kopf .huelle {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 62px;
    flex-wrap: wrap;
}

/* Das Logo trägt den Namen selbst – im Kopf steht deshalb kein Schriftzug
   daneben. Zwei Fassungen, weil der Untertitel im dunklen Modus hell sein
   muss (siehe <picture> im Kopf jeder Seite). */
.marke {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 6px 0;
}

.marke img {
    display: block;
    height: 50px;      /* darunter wird der Untertitel im Logo unleserlich */
    width: auto;
}

nav.haupt { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }

nav.haupt a {
    color: var(--text-leise);
    text-decoration: none;
    font-size: .95rem;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}

nav.haupt a:hover { color: var(--text); }
nav.haupt a[aria-current="page"] { color: var(--text); border-bottom-color: var(--akzent); }

/* ── Titelbereich ───────────────────────────────────────────────────── */

.hero { padding: 76px 0 40px; }

.hero h1 {
    font-size: clamp(2.1rem, 5vw, 3.2rem);
    line-height: 1.12;
    letter-spacing: -.03em;
    margin: 0 0 18px;
    max-width: 18ch;
}

.hero p.blei {
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    color: var(--text-leise);
    max-width: 62ch;
    margin: 0 0 28px;
}

.marken-zeile {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--akzent-leise);
    color: var(--akzent);
    border-radius: 999px;
    padding: 5px 14px;
    font-size: .85rem;
    font-weight: 550;
    margin-bottom: 22px;
}

.knopfreihe { display: flex; gap: 12px; flex-wrap: wrap; }

.knopf {
    display: inline-block;
    padding: 11px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-size: .95rem;
    font-weight: 550;
    border: 1px solid transparent;
}

.knopf.voll { background: var(--akzent); color: #fff; }
.knopf.voll:hover { filter: brightness(1.08); }
.knopf.leer { border-color: var(--rand); color: var(--text); background: var(--flaeche); }
.knopf.leer:hover { border-color: var(--text-leise); }

/* ── Abschnitte ─────────────────────────────────────────────────────── */

section { padding: 52px 0; }
section.schmal { padding: 34px 0; }

h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -.02em;
    margin: 0 0 8px;
}

h2 + p.unter {
    color: var(--text-leise);
    margin: 0 0 30px;
    max-width: 66ch;
}

h3 { font-size: 1.05rem; margin: 0 0 6px; letter-spacing: -.01em; }

.trenner { height: 1px; background: var(--rand); border: 0; margin: 0; }

/* ── Karten ─────────────────────────────────────────────────────────── */

.raster {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 18px;
}

.karte {
    background: var(--flaeche);
    border: 1px solid var(--rand);
    border-radius: var(--radius);
    padding: 22px 22px 24px;
}

.karte p { margin: 0; color: var(--text-leise); font-size: .95rem; }

/* Links im Text einer Karte oder eines Beispiels. Ohne diese Regel nimmt der
   Browser sein Standardblau – und für besuchte Links Violett, das im dunklen
   Modus kaum zu lesen ist. */
.karte a, .praxis a { color: var(--akzent); }
.karte a:visited, .praxis a:visited { color: var(--akzent); }

.karte ul { margin: 10px 0 0; padding-left: 18px; color: var(--text-leise); font-size: .95rem; }
.karte li { margin: 3px 0; }

/* Beispiel aus der Praxis – steht am Ende eines Abschnitts und erzählt in
   zwei Sätzen, wozu die Aufzählung darüber gut ist. */
.praxis {
    margin-top: 26px;
    padding: 16px 20px;
    background: var(--akzent-leise);
    border-left: 3px solid var(--akzent);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-leise);
    font-size: .97rem;
}

.praxis b {
    display: block;
    margin-bottom: 4px;
    font-size: .8rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--akzent);
}

.karte .zeichen {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 9px;
    background: var(--akzent-leise);
    color: var(--akzent);
    font-size: 1rem;
    margin-bottom: 14px;
}

/* ── Zahlen ─────────────────────────────────────────────────────────── */

.zahlen {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 18px;
    border: 1px solid var(--rand);
    border-radius: var(--radius);
    background: var(--flaeche);
    padding: 26px;
}

.zahl b { display: block; font-size: 1.7rem; letter-spacing: -.02em; line-height: 1.2; }
.zahl span { color: var(--text-leise); font-size: .9rem; }

/* ── Bilder ─────────────────────────────────────────────────────────── */

figure { margin: 0; }

figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--rand);
    background: var(--flaeche);
}

/* Hochformat: Ein Handybild auf volle Spaltenbreite gezogen erschlägt alles
   daneben – deshalb gedeckelt und mittig. */
figure.geraet img {
    border-radius: 22px;
    max-width: 300px;
    margin: 0 auto;
}

figure.geraet figcaption { max-width: 300px; margin-left: auto; margin-right: auto; }

figcaption {
    color: var(--text-leise);
    font-size: .88rem;
    margin-top: 10px;
}

.bild-gross { margin-top: 36px; }

.galerie {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 26px;
}

.galerie.handy { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* ── Listen mit Beschreibung ────────────────────────────────────────── */

dl.merkmale { margin: 0; }

dl.merkmale > div {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    padding: 16px 0;
    border-top: 1px solid var(--rand);
}

dl.merkmale > div:first-child { border-top: 0; }
dl.merkmale dt { font-weight: 550; }
dl.merkmale dd { margin: 0; color: var(--text-leise); }

@media (max-width: 680px) {
    dl.merkmale > div { grid-template-columns: 1fr; gap: 4px; }
}

/* ── Sprungmarken ───────────────────────────────────────────────────── */

.sprungmarken {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 26px 0 4px;
}

.sprungmarken a {
    text-decoration: none;
    font-size: .88rem;
    color: var(--text-leise);
    border: 1px solid var(--rand);
    background: var(--flaeche);
    border-radius: 999px;
    padding: 6px 13px;
}

.sprungmarken a:hover { color: var(--text); border-color: var(--text-leise); }

/* Der Kopf klebt oben – ohne diesen Abstand verschwindet die Überschrift
   beim Anspringen darunter. */
section[id] { scroll-margin-top: 80px; }

/* ── Textblock neben Karten ─────────────────────────────────────────── */

.einleitung {
    color: var(--text-leise);
    max-width: 68ch;
    margin: 0 0 26px;
}

.karte h3 + p { margin-bottom: 4px; }

/* Bild als Beleg mitten im Text, nicht zu groß */
figure.beleg { margin: 30px 0 0; max-width: 760px; }

/* Kleine Randnotiz unter einer Gruppe */
p.notiz {
    color: var(--text-leise);
    font-size: .9rem;
    border-left: 2px solid var(--rand);
    padding-left: 14px;
    margin: 22px 0 0;
    max-width: 70ch;
}

/* ── Fuß ────────────────────────────────────────────────────────────── */

footer {
    border-top: 1px solid var(--rand);
    margin-top: 40px;
    padding: 34px 0 54px;
    color: var(--text-leise);
    font-size: .9rem;
}

footer a { color: var(--text-leise); }

.fuss-reihe { display: flex; gap: 22px; flex-wrap: wrap; justify-content: space-between; }
