/* assets/css/reichtum.css */
/* Reichtum-Minisite – Schwarz-Weiß, kontrastreich, politisch */

/* ─── Reset & Base ─────────────────────────────────────────── */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ─── Variables ─────────────────────────────────────────────── */

:root {
    --r-black:      #0a0a0a;
    --r-white:      #f5f5f0;
    --r-grey-light: #d0d0cc;
    --r-grey-mid:   #888884;
    --r-grey-dark:  #2a2a28;
    --r-accent:     #0a0a0a;   /* accent = schwarz selbst */
    --r-red:        #c0392b;   /* sparsam für Warnung/Betonung */

    --r-font-serif: 'DM Serif Display', Georgia, serif;
    --r-font-mono:  'DM Mono', 'Courier New', monospace;

    --r-max-width:  720px;
    --r-gap:        clamp(1.5rem, 4vw, 3rem);
}

/* ─── Body ──────────────────────────────────────────────────── */

.reichtum-body {
    background-color: var(--r-white);
    color: var(--r-black);
    font-family: var(--r-font-mono);
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    line-height: 1.7;
    min-height: 100vh;
}

/* ─── Header ────────────────────────────────────────────────── */

.reichtum-header {
    border-bottom: 3px solid var(--r-black);
    padding: var(--r-gap) clamp(1rem, 5vw, 3rem);
    background-color: var(--r-black);
    color: var(--r-white);
    position: relative;
    overflow: hidden;
}

.reichtum-cover {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.22;
    pointer-events: none;
    z-index: 0;
}

.reichtum-header--has-cover .reichtum-home-link,
.reichtum-header--has-cover .reichtum-header-inner {
    position: relative;
    z-index: 1;
}

.reichtum-home-link {
    display: inline-block;
    font-family: var(--r-font-mono);
    font-size: 0.8rem;
    color: var(--r-grey-light);
    text-decoration: none;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    text-transform: lowercase;
    transition: color 0.15s ease;
}

.reichtum-home-link:hover {
    color: var(--r-white);
}

.reichtum-header-inner {
    max-width: var(--r-max-width);
}

.reichtum-label {
    font-family: var(--r-font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: lowercase;
    color: var(--r-grey-mid);
    margin-bottom: 0.5rem;
}

.reichtum-title {
    font-family: var(--r-font-serif);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--r-white);
    margin-bottom: 1.25rem;
}

.reichtum-intro {
    font-family: var(--r-font-mono);
    font-size: 0.95rem;
    color: var(--r-grey-light);
    max-width: 55ch;
    line-height: 1.65;
}

.reichtum-intro p { margin-bottom: 0.5rem; }

.reichtum-date {
    font-family: var(--r-font-mono);
    font-size: 0.78rem;
    color: var(--r-grey-mid);
    margin-top: 1rem;
    letter-spacing: 0.05em;
}

/* ─── Main ──────────────────────────────────────────────────── */

.reichtum-main {
    max-width: var(--r-max-width);
    margin: 0 auto;
    padding: var(--r-gap) clamp(1rem, 5vw, 3rem);
    display: flex;
    flex-direction: column;
    gap: calc(var(--r-gap) * 1.5);
}

/* ─── Fließtext ─────────────────────────────────────────────── */

.reichtum-text {
    font-family: var(--r-font-mono);
    font-size: 0.95rem;
    line-height: 1.8;
}

.reichtum-text p { margin-bottom: 1em; }
.reichtum-text h2 {
    font-family: var(--r-font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    margin: 2em 0 0.75em;
}
.reichtum-text h3 {
    font-family: var(--r-font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 1.5em 0 0.5em;
}
.reichtum-text a {
    color: var(--r-black);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.reichtum-text ul,
.reichtum-text ol {
    padding-left: 1.5em;
    margin-bottom: 1em;
}
.reichtum-text li { margin-bottom: 0.3em; }
.reichtum-text hr {
    border: none;
    border-top: 1px solid var(--r-grey-light);
    margin: 2em 0;
}
.reichtum-text strong { font-weight: 500; }
.reichtum-text em { font-style: italic; }

/* ─── Wiki: Wachstum, Marginalien, Backlinks, Wikilinks ────── */

.wiki-meta { font-family: var(--r-font-mono); font-size: 0.75rem; color: var(--r-grey-mid); display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 1.5rem; letter-spacing: 0.05em; text-transform: lowercase; }

aside.marginal-note {
    font-family: var(--r-font-mono);
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--r-grey-dark);
    margin: 0.5rem 0 1.5rem;
    padding: 0.75rem 1rem;
    border-left: 2px solid var(--r-black);
    background: var(--r-grey-light);
}
aside.marginal-note strong { font-weight: 500; }
aside.marginal-note a { color: var(--r-black); }

.backlinks { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--r-grey-light); font-size: 0.85rem; font-family: var(--r-font-mono); }
.backlinks p { margin-bottom: 0.75rem; color: var(--r-grey-mid); text-transform: lowercase; letter-spacing: 0.1em; font-size: 0.75rem; }
.backlinks ul { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.backlinks a { color: var(--r-black); }

a.wikilink-broken, span.wikilink-broken { color: var(--r-grey-mid); text-decoration: underline dotted; cursor: help; }

.wiki-bild { margin: 1.5rem 0; }
.wiki-bild img { width: 100%; display: block; }
.wiki-bild figcaption { margin-top: 0.5rem; font-family: var(--r-font-mono); font-size: 0.78rem; color: var(--r-grey-mid); }

/* ─── Section Headings ──────────────────────────────────────── */

.reichtum-section-heading {
    font-family: var(--r-font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--r-grey-mid);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--r-grey-light);
}

/* ─── Snippets ──────────────────────────────────────────────── */

.reichtum-snippet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.reichtum-snippet {
    border: 1px solid var(--r-grey-light);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.reichtum-snippet-title {
    font-family: var(--r-font-serif);
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--r-black);
}

.reichtum-snippet-text {
    font-family: var(--r-font-mono);
    font-size: 0.85rem;
    color: var(--r-grey-dark);
    line-height: 1.65;
    flex: 1;
}

.reichtum-snippet-text p { margin-bottom: 0.5em; }

.reichtum-snippet-link {
    font-family: var(--r-font-mono);
    font-size: 0.78rem;
    color: var(--r-grey-mid);
    text-decoration: none;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
    transition: color 0.15s ease;
}

.reichtum-snippet-link:hover {
    color: var(--r-black);
}

/* ─── Themen-Liste (Index) ──────────────────────────────────── */

.reichtum-topic-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.reichtum-topic-item {
    border-bottom: 1px solid var(--r-grey-light);
}

.reichtum-topic-item:first-child {
    border-top: 1px solid var(--r-grey-light);
}

.reichtum-topic-link {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding: 1rem 0;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.1s ease;
}

.reichtum-topic-link:hover .reichtum-topic-title {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.reichtum-topic-title {
    font-family: var(--r-font-serif);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--r-black);
}

.reichtum-topic-excerpt {
    font-family: var(--r-font-mono);
    font-size: 0.82rem;
    color: var(--r-grey-mid);
    line-height: 1.5;
}

/* ─── Zitate ────────────────────────────────────────────────── */

.reichtum-quotes {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.reichtum-quote {
    border-left: 3px solid var(--r-black);
    padding: 0.75rem 0 0.75rem 1.5rem;
    margin: 0;
}

.reichtum-quote p {
    font-family: var(--r-font-serif);
    font-size: 1.15rem;
    font-weight: 400;
    font-style: italic;
    line-height: 1.55;
    color: var(--r-black);
    margin-bottom: 0.5rem;
}

.reichtum-quote footer {
    font-family: var(--r-font-mono);
    font-size: 0.78rem;
    color: var(--r-grey-mid);
    font-style: normal;
}

.reichtum-quote-year {
    color: var(--r-grey-mid);
}

/* ─── Notizen / Fragmente ───────────────────────────────────── */

.reichtum-notes {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.reichtum-note {
    background-color: var(--r-black);
    color: var(--r-white);
    padding: 1rem 1.25rem;
    position: relative;
}

.reichtum-note-tag {
    display: inline-block;
    font-family: var(--r-font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--r-grey-mid);
    margin-top: 0.5rem;
}

.reichtum-note footer {
    font-style: normal;
}

/* Tag-spezifische Akzente */
.reichtum-note[data-tag="kritisch"] {
    border-left: 3px solid var(--r-red);
}
.reichtum-note[data-tag="philosophisch"] {
    border-left: 3px solid var(--r-grey-mid);
}
.reichtum-note[data-tag="persönlich"] {
    background-color: var(--r-grey-dark);
    border-left: 3px solid var(--r-white);
}
.reichtum-note[data-tag="dokumentarisch"] {
    border-left: 3px solid var(--r-grey-light);
}

.reichtum-note-text {
    font-family: var(--r-font-mono);
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--r-white);
}

.reichtum-note-text p { margin-bottom: 0.5em; }
.reichtum-note-text a {
    color: var(--r-grey-light);
    text-decoration: underline;
}

/* ─── Tags ──────────────────────────────────────────────────── */

.reichtum-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--r-grey-light);
}

.reichtum-tag {
    font-family: var(--r-font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: lowercase;
    color: var(--r-grey-mid);
    border: 1px solid var(--r-grey-light);
    padding: 0.2rem 0.6rem;
}

/* ─── Footer ────────────────────────────────────────────────── */

.reichtum-footer {
    border-top: 1px solid var(--r-grey-light);
    padding: 1.5rem clamp(1rem, 5vw, 3rem);
    max-width: var(--r-max-width);
    margin: 0 auto;
}

.reichtum-footer a {
    font-family: var(--r-font-mono);
    font-size: 0.8rem;
    color: var(--r-grey-mid);
    text-decoration: none;
    letter-spacing: 0.05em;
    text-transform: lowercase;
    transition: color 0.15s ease;
}

.reichtum-footer a:hover {
    color: var(--r-black);
}

/* ─── Responsive ────────────────────────────────────────────── */

@media (max-width: 600px) {
    .reichtum-title {
        font-size: 2.2rem;
    }
    .reichtum-quote p {
        font-size: 1rem;
    }
}

/* ─── View Transitions ─────────────────────────────────────── */

@view-transition {
    navigation: auto;
}

.reichtum-header {
    view-transition-name: reichtum-header;
}

/* ─── Generatives Halbton-/Streifenmuster ──────────────────── */

.reichtum-pattern {
    position: absolute;
    inset: -10%;
    background-image:
        repeating-linear-gradient(135deg, var(--r-white) 0, var(--r-white) 1px, transparent 1px, transparent 14px),
        radial-gradient(circle, var(--r-white) 1px, transparent 1.5px);
    background-size: auto, 10px 10px;
    opacity: 0.05;
    pointer-events: none;
    z-index: -1;
}

@media (prefers-reduced-motion: no-preference) {
    .reichtum-pattern {
        animation: reichtum-pattern-drift 80s linear infinite;
    }
}

@keyframes reichtum-pattern-drift {
    from { background-position: 0 0, 0 0; }
    to   { background-position: 280px 280px, 200px 200px; }
}

/* ─── Scroll-driven Reveal ──────────────────────────────────── */

@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .reichtum-snippet, .reichtum-topic-item, .reichtum-quote, .reichtum-note {
            animation: reichtum-reveal linear both;
            animation-timeline: view();
            animation-range: entry 0% entry 40%;
        }
    }
}

@keyframes reichtum-reveal {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
