/* ------------------------------------------------------------------------- *
 * Homepage von Moritz
 *
 * Erst rohe Farben, darauf die semantischen Tokens, wie in Mosira
 * (frontend/src/index.css). Nur die Tokens werden im Rest der Datei benutzt.
 *
 * Seit 30.10.2026 leise statt bunt (Moritz: „kein Lila, ich will was
 * Subtileres", Vorbilder edisonfangworkshop.com und poulo.site): warmes
 * Off-White, Schrift fast schwarz, Grauabstufungen, feine Linien statt
 * kräftiger Schatten. Farbe nur als Tupfer: Rost für Unterstreichungen und
 * Punkte. Vorher Pflaume, Navy und Koralle aus Mosira mit schrägem Band.
 *
 * Kontrast gemessen auf dem Papier #f4f2eb: Text 16,4:1 · zweite Ebene 12,1:1 ·
 * gedämpft 4,8:1 (auf Weiß 5,4:1) · Rost 5,4:1 · Papier auf der Nacht 16,7:1.
 * Gedämpftes Grau nie auf den Stein (--bg-elevated, 4,3:1): Wer im Hover den
 * Stein setzt, setzt die Schrift auf --text-primary.
 * ------------------------------------------------------------------------- */
:root {
    /* Rohe Farben */
    --color-ink: #141414;
    --color-ink-soft: #2f2e2a;
    --color-grey: #6b6a63;
    --color-stone: #e8e5dc;
    --color-paper: #f4f2eb;
    --color-white: #ffffff;
    --color-night: #121212;
    --color-rust: #a3452a;

    /* Semantik */
    --bg-app: var(--color-paper);
    --bg-surface: var(--color-white);
    --bg-elevated: var(--color-stone);
    --bg-strong: var(--color-ink);
    --bg-dark: var(--color-night);
    --text-primary: var(--color-ink);
    --text-secondary: var(--color-ink-soft);
    --text-muted: var(--color-grey);
    --text-on-dark: var(--color-paper);
    --text-accent: var(--color-rust);
    --brand: var(--color-rust);

    --border: rgba(20, 20, 20, 0.12);
    --border-field: rgba(20, 20, 20, 0.4);

    /* Schatten nur als Hauch; die Kante macht die Linie */
    --shadow-card: 0 1px 2px rgba(20, 20, 20, 0.05);
    --shadow-panel: 0 8px 24px rgba(20, 20, 20, 0.1);
    --shadow-signature: 0 1px 2px rgba(20, 20, 20, 0.05);
    --shadow-signature-lift: 0 10px 28px rgba(20, 20, 20, 0.08);

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-btn: 999px;
    --radius-pill: 999px;

    /* Nur Systemschriften: die Seite lädt nichts von Dritten (privacy.html).
       Seit 30.10.2026 (Moritz: „ich mag die Schrift nicht, was anderes Schöneres"):
       Überschriften in einer ruhigen Buchschrift (Iowan Old Style am Mac und iPhone,
       sonst Charter oder Georgia), Text in Avenir Next (sonst Segoe UI oder die
       Systemschrift). Vorher Helvetica für beides. */
    --font-body: 'Avenir Next', Avenir, 'Segoe UI', system-ui, sans-serif;
    --font-display: 'Iowan Old Style', Charter, 'Palatino Linotype', Georgia, serif;
    --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    --gutter: clamp(16px, 5vw, 64px);
    --max: 1160px;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-app);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    /* das schräge Band darf nie seitlich scrollen lassen */
    overflow-x: clip;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

:focus-visible {
    outline: 3px solid var(--text-secondary);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.005em;
}

h2 {
    font-size: clamp(26px, 2.8vw, 36px);
    margin-bottom: 28px;
}

.skip {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 20;
    padding: 8px 14px;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-panel);
    text-decoration: none;
}

.skip:focus {
    top: 16px;
}

.card {
    border: 1px solid var(--border);
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-signature);
}

/* Kleine Beschriftungen in Monospace und Versalien, wie bei edisonfangworkshop.com */
.eyebrow {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
}

.chips li {
    padding: 3px 11px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--bg-app);
    color: var(--text-secondary);
    font-size: 14px;
}

.chips.small li {
    padding: 2px 9px;
    font-size: 13px;
}

/* ---------- Kopf: Navigation, Karte, Vorstellung ---------- */
/* Seit 30.10.2026 ohne das schräge Band: eine feine Linie unter der Navigation trennt genug.
   Die Leiste bleibt oben stehen, halb durchsichtig wie bei poulo.site; was darunter
   durchscrollt, verschwimmt. */
.site-head {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 0 var(--gutter);
    background: rgba(244, 242, 235, 0.86);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

/* Sprungziele landen unter der Leiste, nicht hinter ihr */
[id] {
    scroll-margin-top: 96px;
}

.hero {
    position: relative;
    padding: 0 var(--gutter) 24px;
}

.topnav {
    max-width: var(--max);
    margin: 0 auto;
    padding: 14px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.topnav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 2px;
    list-style: none;
}

.topnav a {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-pill);
    color: var(--text-secondary);
    font-size: 15px;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: background 0.2s;
}

.topnav a:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.topnav .brand {
    width: 42px;
    height: 42px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-field);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 20px;
    letter-spacing: 0;
    flex: none;
}

.hero-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding-top: clamp(32px, 6vw, 72px);
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: end;
    gap: clamp(24px, 5vw, 72px);
}

/* Drehkarte: vorn Foto oder Monogramm, hinten die drei Felder */
.portrait {
    position: relative;
    width: clamp(220px, 24vw, 300px);
    aspect-ratio: 2 / 3;
    perspective: 900px;
    border-radius: var(--radius-md);
}

.portrait-face {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-signature);
    backface-visibility: hidden;
    transition: transform 0.7s var(--ease);
}

/* Ohne Foto: fast schwarz mit einem leisen Lichtschein, ohne Farbe */
.portrait-front {
    display: grid;
    place-items: center;
    background:
        radial-gradient(120% 80% at 30% 20%, rgba(255, 255, 255, 0.1), transparent 60%),
        var(--bg-strong);
}

.portrait-front img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.05);
}

/* mit Foto kein Monogramm; fehlt das Foto, entfernt index.html das <img> */
.portrait-front img ~ .monogram {
    display: none;
}

.monogram {
    color: var(--color-stone);
    font-family: var(--font-display);
    font-size: clamp(88px, 9vw, 128px);
    font-weight: 400;
    line-height: 1;
}

.portrait-front::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 38%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.portrait-name {
    position: absolute;
    z-index: 1;
    bottom: 18px;
    left: 0;
    right: 0;
    color: var(--color-white);
    font-size: clamp(26px, 2.6vw, 34px);
    font-weight: 300;
    letter-spacing: 0.04em;
    text-align: center;
}

.portrait-back {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 28px;
    background: var(--bg-elevated);
    transform: rotateY(180deg);
}

.back-line {
    font-family: var(--font-display);
    font-size: clamp(24px, 2.2vw, 30px);
    line-height: 1.15;
}

.back-line::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 12px 6px 0;
    border-radius: 50%;
    background: var(--brand);
}

.portrait.is-flipped .portrait-front,
.portrait:focus-visible .portrait-front {
    transform: rotateY(-180deg);
}

.portrait.is-flipped .portrait-back,
.portrait:focus-visible .portrait-back {
    transform: rotateY(0deg);
}

@media (hover: hover) {
    .portrait {
        cursor: pointer;
    }

    .portrait:hover .portrait-front {
        transform: rotateY(-180deg);
    }

    .portrait:hover .portrait-back {
        transform: rotateY(0deg);
    }
}

.intro {
    max-width: 660px;
    padding: clamp(24px, 4vw, 48px);
}

.intro h1 {
    margin: 10px 0 16px;
    font-size: clamp(32px, 4vw, 48px);
    letter-spacing: -0.01em;
}

.lead {
    color: var(--text-secondary);
    font-size: clamp(18px, 1.6vw, 21px);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-btn);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition:
        transform 0.2s var(--ease),
        box-shadow 0.2s var(--ease),
        background 0.2s;
}

.btn.primary {
    background: var(--bg-strong);
    color: var(--color-white);
    box-shadow: var(--shadow-card);
}

.btn.primary:hover {
    background: var(--color-ink-soft);
    color: var(--color-white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-panel);
}

.btn.ghost {
    border: 1.5px solid var(--border-field);
    color: var(--text-primary);
}

.btn.ghost:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

/* ---------- Abschnitte ---------- */
.section {
    max-width: calc(var(--max) + 2 * var(--gutter));
    margin: 0 auto;
    padding: clamp(56px, 8vw, 104px) var(--gutter) 0;
}

.areas,
.projects {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(20px, 3vw, 40px);
}

.area {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px;
}

/* Seit 30.10.2026 alle drei Felder in Schwarz; vorher je Feld eine Farbe wie die Modi in Mosira */
.area-icon {
    width: 44px;
    height: 44px;
    padding: 9px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg-app);
    fill: none;
    stroke: var(--text-primary);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.area h3 {
    font-size: 28px;
}

.area > p {
    color: var(--text-secondary);
}

.learning {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 16px;
}

.learning span {
    display: block;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.section-head h2 {
    margin: 0;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pill {
    padding: 7px 15px;
    border: 1px solid var(--border-field);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.pill:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.pill[aria-pressed='true']:hover {
    background: var(--color-ink-soft);
    color: var(--color-white);
}

.pill[aria-pressed='true'] {
    border-color: var(--bg-strong);
    background: var(--bg-strong);
    color: var(--color-white);
}

/* Projektkarten: das Bild bleibt grau, beim Zeigen wird es klarer (seit 30.10.2026 ohne Farbe) */
.project {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition:
        transform 0.25s var(--ease),
        box-shadow 0.25s var(--ease);
}

.project[hidden] {
    display: none;
}

.project:hover,
.project:focus-within {
    transform: translateY(-4px);
    box-shadow: var(--shadow-signature-lift);
}

.cover {
    aspect-ratio: 400 / 220;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    filter: grayscale(1) contrast(0.9);
    opacity: 0.7;
    transition: opacity 0.3s ease-out;
}

.cover svg {
    width: 100%;
    height: 100%;
}

.project:hover .cover,
.project:focus-within .cover {
    opacity: 1;
}

/* ohne Maus gibt es kein Zeigen, also gleich klar */
@media (hover: none) {
    .cover {
        opacity: 1;
    }
}

.project-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 22px 22px;
}

.project-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.project h3 {
    font-size: 28px;
}

.project-body > p {
    color: var(--text-secondary);
}

.project-body > p.facts {
    color: var(--text-muted);
    font-size: 15px;
}

/* Status mit denselben Wörtern wie die Projektübersicht in devloop; Farbe nur im Punkt */
.status {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status.online::before {
    background: var(--brand);
}

.links {
    margin-top: auto;
    padding-top: 6px;
}

.links a {
    color: var(--text-secondary);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--brand);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.links a:hover {
    text-decoration-color: var(--text-secondary);
}

/* Links in einer Karte von „What I do“: nebeneinander, direkt unter den Chips */
.area-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin-top: 0;
    padding-top: 0;
}

/* ---------- Background: drei Listen, nur Titel, feine Linien dazwischen ---------- */
.path-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(20px, 3vw, 40px);
}

.path {
    padding: 24px 28px 12px;
}

.path ul {
    margin-top: 12px;
    list-style: none;
}

.path li {
    padding: 12px 0;
    border-top: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 17px;
    line-height: 1.35;
}

.path small {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ---------- Vision ---------- */
.vision {
    position: relative;
    overflow: hidden;
    padding: clamp(32px, 6vw, 72px);
    background: var(--bg-strong);
    color: var(--color-white);
}

.vision .eyebrow {
    margin-bottom: 18px;
    color: rgba(244, 242, 235, 0.7);
}

.vision blockquote p {
    max-width: 30ch;
    font-family: var(--font-display);
    font-size: clamp(22px, 2.4vw, 32px);
    font-style: italic;
    line-height: 1.3;
}

/* ruhige Kreise wie im Mijou-Cover, nur Linien; füllen die rechte Seite, ohne zu sprechen */
.vision-motif {
    position: absolute;
    top: 50%;
    right: clamp(-120px, -6vw, -40px);
    width: min(380px, 46%);
    transform: translateY(-50%);
    fill: none;
    stroke: rgba(255, 255, 255, 0.14);
    stroke-width: 1.5;
}

.vision-motif .core {
    fill: var(--brand);
    stroke: none;
}

.vision figcaption {
    margin-top: 22px;
    color: rgba(244, 242, 235, 0.7);
    font-size: 16px;
}

/* ---------- Unterstützen: Text links, Knöpfe rechts; schmal untereinander ---------- */
.support {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
    gap: 24px clamp(24px, 5vw, 64px);
    padding: clamp(24px, 4vw, 48px);
}

.support h2 {
    margin-bottom: 12px;
}

.support p {
    color: var(--text-secondary);
}

.support-action .actions {
    margin-top: 0;
}

.support-action .support-note {
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 15px;
}

/* ---------- Kontakt: dunkler Abschluss mit gerader Kante (seit 30.10.2026, vorher das schräge Band) ---------- */
.contact {
    margin-top: clamp(56px, 8vw, 104px);
    padding: clamp(56px, 8vw, 96px) var(--gutter) 32px;
    background: var(--bg-dark);
    color: var(--text-on-dark);
}

.contact-inner {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr minmax(0, 440px);
    align-items: start;
    gap: 40px 64px;
}

/* „Now“: weiße Karte auf dem Band, wie das Foto im Kopf mit Signatur-Schatten */
.now {
    padding: 28px;
    color: var(--text-primary);
}

.now ul {
    display: grid;
    gap: 12px;
    margin-top: 12px;
    list-style: none;
}

.now li {
    color: var(--text-secondary);
    font-size: 17px;
}

.now b {
    color: var(--text-primary);
    font-weight: 600;
}

.now-date {
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 14px;
}

.contact h2 {
    margin-bottom: 12px;
    font-size: clamp(28px, 3.2vw, 40px);
}

.contact p {
    max-width: 52ch;
}

.contact .mail {
    display: inline-block;
    margin-top: 14px;
    font-size: clamp(18px, 1.8vw, 22px);
    text-decoration-color: var(--brand);
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
}

.contact :focus-visible {
    outline-color: var(--text-on-dark);
}

.social {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    list-style: none;
}

.social a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(244, 242, 235, 0.4);
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: background 0.2s;
}

.social a:hover {
    background: rgba(244, 242, 235, 0.12);
    color: var(--text-on-dark);
}

.social svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact .small-print {
    grid-column: 1 / -1;
    max-width: none;
    padding-top: 20px;
    border-top: 1px solid rgba(244, 242, 235, 0.14);
    color: rgba(244, 242, 235, 0.75);
    font-size: 14px;
}

.small-print a {
    text-underline-offset: 3px;
}

/* ---------- Impressum und Datenschutz: eine ruhige Textspalte auf dem Papier ---------- */
.legal {
    max-width: calc(720px + 2 * var(--gutter));
    margin: 0 auto;
    padding: 32px var(--gutter) 72px;
}

.legal .back {
    display: inline-block;
    margin-bottom: 32px;
    color: var(--text-secondary);
    font-weight: 600;
    text-decoration-color: var(--brand);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.legal h1 {
    margin-bottom: 8px;
    font-size: clamp(32px, 4vw, 44px);
}

.legal h2 {
    margin: 36px 0 10px;
    font-size: clamp(22px, 2.2vw, 26px);
}

.legal p,
.legal li {
    color: var(--text-secondary);
}

.legal p + p {
    margin-top: 10px;
}

.legal ul {
    display: grid;
    gap: 8px;
    padding-left: 22px;
}

.legal .updated {
    color: var(--text-muted);
    font-size: 15px;
}

.legal a {
    text-underline-offset: 3px;
}

/* ---------- Einblenden beim Scrollen (nur mit JavaScript, siehe main.js) ---------- */
.js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition:
        opacity 0.6s var(--ease),
        transform 0.6s var(--ease);
}

.js .reveal.is-in {
    opacity: 1;
    transform: none;
}

/* ---------- Breiten ---------- */
@media (max-width: 1024px) {
    .areas,
    .projects,
    .path-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 760px) {
    .hero-inner {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .areas,
    .projects,
    .path-grid,
    .support,
    .contact-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    body {
        font-size: 17px;
    }

    /* Die Leiste klebt oben, also nur eine Zeile: die Abschnitte seitlich wischbar statt umgebrochen */
    .topnav {
        padding: 10px 0;
    }

    .topnav ul {
        min-width: 0;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .topnav ul::-webkit-scrollbar {
        display: none;
    }

    .topnav li {
        flex: none;
    }

    .topnav a {
        padding: 6px 8px;
        font-size: 15px;
    }

    .topnav .brand {
        width: 36px;
        height: 36px;
        font-size: 19px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
    }
}
