/* mbr-net.de — Stylesheet der statischen Seite (WordPress-Abloesung 2026).
 *
 * Regeln, die hier bewusst gelten (siehe ../../readme.md):
 *  - KEINE externen Ressourcen (keine Web-Fonts, kein CDN, kein Tracking) —
 *    die Seite laedt ausschliesslich von sich selbst. Das ist die technische
 *    Grundlage fuer die strenge CSP im nginx-Snippet static_headers.conf und
 *    fuer die Aussage "keine Datenuebertragung an Dritte" in der
 *    Datenschutzerklaerung.
 *  - KEIN Inline-CSS in den HTML-Dateien (style="…"/<style>) — die CSP
 *    erlaubt style-src 'self' OHNE 'unsafe-inline'. Wer hier aufraeumt:
 *    Inline-Styles wuerden stillschweigend nicht angewendet.
 *  - Dark-first mit heller Variante ueber prefers-color-scheme; die Seite
 *    respektiert prefers-reduced-motion.
 */

/* ------------------------------------------------------------- Tokens */
:root {
    color-scheme: dark light;

    --bg:          #0a0e13;
    --bg-elev:     #10161e;
    --surface:     rgba(255, 255, 255, 0.035);
    --surface-2:   rgba(255, 255, 255, 0.06);
    --line:        rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.18);
    --text:        #e7eef6;
    --text-muted:  #9bacbd;
    --accent:      #0066ff;
    --accent-soft: rgba(0, 102, 255, 0.2);
    --accent-text: #5c9dff;

    --grid-line: rgba(255, 255, 255, 0.028);
    --glow-1: rgba(0, 102, 255, 0.14);
    --glow-2: rgba(56, 132, 255, 0.1);

    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
                 Arial, "Noto Sans", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
                 "Liberation Mono", monospace;

    --radius: 14px;
    --measure: 68ch;
    --pad: clamp(1.15rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: light) {
    :root {
        --bg:          #f6f8fa;
        --bg-elev:     #ffffff;
        --surface:     rgba(9, 20, 33, 0.025);
        --surface-2:   rgba(9, 20, 33, 0.05);
        --line:        rgba(9, 20, 33, 0.11);
        --line-strong: rgba(9, 20, 33, 0.2);
        --text:        #131a21;
        --text-muted:  #55636f;
        --accent:      #0066ff;
        --accent-soft: rgba(0, 102, 255, 0.12);
        --accent-text: #0052cc;

        --grid-line: rgba(9, 20, 33, 0.032);
        --glow-1: rgba(0, 102, 255, 0.1);
        --glow-2: rgba(56, 132, 255, 0.08);
    }
}

/* -------------------------------------------------------------- Basis */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
    line-height: 1.65;
    color: var(--text);
    background-color: var(--bg);
    /* Feines Raster + zwei weiche Lichtkegel — rein aus CSS-Gradienten,
     * also ohne eine einzige Bilddatei (schnell + CSP-freundlich). */
    background-image:
        radial-gradient(60rem 40rem at 12% -10%, var(--glow-1), transparent 65%),
        radial-gradient(50rem 35rem at 92% 4%, var(--glow-2), transparent 60%),
        repeating-linear-gradient(to right, var(--grid-line) 0 1px, transparent 1px 68px),
        repeating-linear-gradient(to bottom, var(--grid-line) 0 1px, transparent 1px 68px);
    background-attachment: fixed;
    text-underline-offset: 0.18em;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

a {
    color: var(--accent-text);
    text-decoration-thickness: 1px;
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

img {
    max-width: 100%;
    height: auto;
}

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 2.5rem 0;
}

code, kbd, samp {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

/* Sprunglink: sichtbar nur mit Tastatur-Fokus */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10;
    padding: 0.6rem 1rem;
    background: var(--bg-elev);
    border: 1px solid var(--line-strong);
    border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
    left: 0;
}

/* ------------------------------------------------------------ Gerueste */
.wrap {
    width: 100%;
    max-width: 72rem;
    margin-inline: auto;
    padding-inline: var(--pad);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 5;
    border-bottom: 1px solid var(--line);
    /* Erste Zeile = Fallback fuer Browser ohne color-mix(): dann eben deckend. */
    background: var(--bg);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(10px);
}

.site-header > .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1.5rem;
    padding-block: 0.9rem;
}

.brand {
    display: inline-flex;
    align-items: baseline;
    gap: 0.55rem;
    font-family: var(--font-mono);
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
    text-decoration: none;
}
.brand::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}
.brand-sub {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.85rem;
}

.site-nav {
    margin-left: auto;
}
.site-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.15rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.94rem;
}
.site-nav a {
    color: var(--text-muted);
    text-decoration: none;
    padding-block: 0.25rem;
    border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] {
    color: var(--text);
    border-bottom-color: var(--accent);
}

main { display: block; }

.site-footer {
    margin-top: 5rem;
    border-top: 1px solid var(--line);
    color: var(--text-muted);
    font-size: 0.9rem;
}
.site-footer > .wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    align-items: baseline;
    padding-block: 1.75rem 2.5rem;
}
.site-footer ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }
.footer-note { margin-left: auto; font-family: var(--font-mono); font-size: 0.8rem; }

/* --------------------------------------------------------------- Hero */
.hero {
    padding-block: clamp(3rem, 9vw, 6.5rem) clamp(2rem, 5vw, 3.5rem);
}

.kicker {
    display: inline-block;
    margin: 0 0 1.1rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.hero h1 {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0;
    font-size: clamp(2.4rem, 1.2rem + 6vw, 5rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
    font-weight: 650;
    text-wrap: balance;
}

.hero-sub {
    font-size: clamp(1.05rem, 0.5rem + 2vw, 1.6rem);
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--text-muted);
}

.hero .lead {
    max-width: 48ch;
    margin: 1.25rem 0 0;
    font-size: clamp(1.06rem, 1rem + 0.5vw, 1.3rem);
    color: var(--text-muted);
    text-wrap: pretty;
}

/* -------------------------------------------------------------- Karten */
.section {
    padding-block: clamp(1.5rem, 4vw, 2.75rem);
}

.section-head {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.section-head h2 {
    margin: 0;
    font-size: 1.05rem;
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    text-transform: uppercase;
}
.section-head::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.cards {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
}

.card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.4rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    text-decoration: none;
    color: inherit;
}
a.card:hover {
    border-color: var(--line-strong);
    background: var(--surface-2);
}
.card h3 {
    margin: 0;
    font-size: 1.12rem;
    letter-spacing: -0.01em;
}
.card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}
.card-meta {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.card-cta {
    margin-top: auto;
    color: var(--accent-text);
    font-size: 0.92rem;
}

.card-media {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.card-media img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    border: 1px solid var(--line);
}

/* ------------------------------------------------------------ Textseite */
.page {
    padding-block: clamp(2.25rem, 6vw, 4rem);
}

.page-title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.9rem, 1.2rem + 3vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.page-subtitle {
    margin: 0 0 2.5rem;
    color: var(--text-muted);
    max-width: var(--measure);
}

.prose {
    max-width: var(--measure);
}
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
    margin-top: 2.75em;
    margin-bottom: 0.6em;
    font-size: 1.45rem;
    letter-spacing: -0.02em;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--line);
}
.prose h3 {
    margin-top: 2em;
    margin-bottom: 0.4em;
    font-size: 1.13rem;
    letter-spacing: -0.01em;
}
.prose h4 {
    margin-top: 1.6em;
    margin-bottom: 0.3em;
    font-size: 1rem;
}
.prose ul,
.prose ol { padding-left: 1.35rem; }
.prose li + li { margin-top: 0.4em; }
.prose dl { margin: 0; }
.prose dt {
    margin-top: 1.1em;
    font-weight: 600;
}
.prose dd { margin: 0.15em 0 0; color: var(--text-muted); }
.prose a { overflow-wrap: anywhere; }

/* Sekundaersprache (englischer Disclaimer) leicht zurueckgenommen */
.prose[lang="en"] { color: var(--text-muted); }
.prose[lang="en"] h2,
.prose[lang="en"] h3 { color: var(--text); }

.note {
    margin: 0;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 0.95rem;
}
.note strong { color: var(--text); }

/* Kontaktdaten-Grafik: das Bild hat einen weissen Eigenhintergrund
 * (uebernommen aus dem WordPress-Bestand) — deshalb bewusst auf einer
 * hellen Flaeche, damit es im Dark Mode nicht als Fremdkoerper wirkt. */
.contact-card {
    margin: 1.5rem 0 0;
    padding: 1rem;
    width: fit-content;
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
}
.contact-card img {
    display: block;
    border-radius: 6px;
    /* Halbe intrinsische Breite (900 px), damit die Schrift IN der Grafik
     * ungefaehr so gross wirkt wie der Fliesstext daneben. Das globale
     * img { max-width: 100%; height: auto } haelt sie auf schmalen Displays
     * weiter responsiv; die Originalgroesse ist ein Klick entfernt (der
     * Link auf die Datei + Hinweis in der figcaption). */
    width: 450px;
}
.contact-card figcaption {
    margin-top: 0.75rem;
    color: #55636f;
    font-size: 0.85rem;
}

/* Artikel-Kopf (Running Labyrinth) */
.article-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}
.article-head img {
    width: clamp(88px, 18vw, 128px);
    height: auto;
    border-radius: 20px;
    border: 1px solid var(--line);
}
.article-meta {
    margin: 2.75rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
    color: var(--text-muted);
    font-size: 0.88rem;
}
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
}
.tags li {
    padding: 0.15rem 0.55rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.linklist {
    margin: 0;
    padding: 0;
    list-style: none;
}
.linklist li + li { margin-top: 0.55rem; }
.linklist a { font-weight: 500; }

/* ---------------------------------------------------------------- 404 */
.center-page {
    display: grid;
    place-items: center;
    text-align: center;
    padding-block: clamp(4rem, 14vw, 9rem);
}
.center-page .code {
    font-family: var(--font-mono);
    font-size: clamp(3.5rem, 12vw, 7rem);
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--accent);
}

/* -------------------------------------------------------------- Print */
@media print {
    :root {
        --text: #000;
        --text-muted: #333;
        --line: #bbb;
    }
    body {
        background: #fff;
        color: #000;
        font-size: 11pt;
    }
    .site-header,
    .site-nav,
    .skip-link,
    .site-footer .footer-note { display: none; }
    .prose { max-width: none; }
    a { color: #000; text-decoration: underline; }
    a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
}
