/* michael-gelbhaar.de – Stylesheet
   Keine Inline-Styles im HTML, damit die Content-Security-Policy streng bleiben kann. */

/* ---------- Schriften (selbst gehostet, siehe assets/fonts/LIESMICH.txt) ---------- */
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-latin-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-latin-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-latin-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-latin-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-latin-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #F4F1EA;
  --surface: #FBF9F4;
  --bubble: #EDE7DA;
  --ink: #1B1B1A;
  --text: #2E2D2A;
  --muted: #4A4843;
  --line: #D9D2C3;
  --accent: #C8771E;
  --accent-text: #8A4F0F;
  --accent-soft: #F2DCC0;
  --screen: #1B1B1A;
  --face: #E39A3B;
  --shadow: #E4DED2;
  --bulb: #FBE7C6;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161514;
    --surface: #1E1C1A;
    --bubble: #2A2723;
    --ink: #EFEBE3;
    --text: #DCD7CD;
    --muted: #ABA598;
    --line: #36332E;
    --accent: #E39A3B;
    --accent-text: #E8A65A;
    --accent-soft: #4A3418;
    --screen: #0E0D0C;
    --shadow: #24221F;
    --bulb: #F7D9A2;
  }
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--ink); text-underline-offset: 4px; }
a:hover { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p, ol, ul, blockquote, figure { margin: 0; }

.skip-link {
  position: absolute; left: 16px; top: -48px;
  padding: 10px 14px; background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 14px; z-index: 10;
}
.skip-link:focus { top: 16px; color: var(--paper); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px); }

.mono { font-family: var(--mono); }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; color: var(--accent-text); }
.note { font-family: var(--mono); font-size: 12px; color: var(--muted); line-height: 1.6; }
.small { font-size: 15px; color: var(--muted); line-height: 1.6; }
.lead-text { font-size: 17px; line-height: 1.65; color: var(--text); max-width: 42em; }

/* ---------- Kopf ---------- */
.site-header {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 16px; padding: 24px 0;
}
.wordmark {
  font-family: var(--mono); font-size: 14px; letter-spacing: 0.08em;
  text-decoration: none; padding: 12px 0;
}
.lang { display: flex; gap: 4px; font-family: var(--mono); font-size: 14px; }
.lang a { padding: 12px 10px; text-decoration: none; color: var(--muted); }
.lang a[aria-current="page"] { color: var(--ink); border-bottom: 2px solid var(--accent); }

/* ---------- Einstieg ---------- */
.hero {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  gap: 48px 64px;
  padding: clamp(32px, 6vw, 88px) 0 clamp(64px, 8vw, 120px);
}
.hero__text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(36px, 5.2vw, 68px); line-height: 1.08; letter-spacing: -0.01em;
  text-wrap: balance;
}
.hero__sub { font-size: clamp(18px, 1.8vw, 22px); line-height: 1.55; color: var(--text); max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.hero__place { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.hero__portrait { flex: 1 1 280px; max-width: 420px; }
.hero__portrait img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; object-position: 50% 20%; }

.filament { width: 280px; height: 18px; }
.filament path {
  fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 320; stroke-dashoffset: 320;
  animation: glow-draw 1.6s ease-out 0.3s forwards;
}
@keyframes glow-draw { to { stroke-dashoffset: 0; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  background: var(--ink); color: var(--paper);
  font-family: var(--sans); font-size: 16px; font-weight: 500;
  text-decoration: none; border: 1px solid var(--ink); border-radius: 2px; cursor: pointer;
}
.btn:hover { color: var(--paper); background: var(--accent-text); border-color: var(--accent-text); }
.btn--ghost { background: transparent; color: var(--ink); min-height: 44px; padding: 0 18px; font-size: 15px; font-weight: 400; }
.btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: #1B1B1A; }
.btn--accent:hover { background: var(--accent-text); border-color: var(--accent-text); color: #FFFFFF; }
.textlink { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; }

/* ---------- Abschnitte ---------- */
.section {
  display: flex; flex-wrap: wrap; gap: 16px 48px;
  padding: clamp(56px, 7vw, 104px) 0;
  border-top: 1px solid var(--line);
}
.section__label { flex: 1 1 180px; max-width: 220px; }
.section__label p { font-family: var(--mono); font-size: 13px; color: var(--accent-text); }
.section__body { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }

.section-title { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3vw, 36px); line-height: 1.2; }
.intro-serif { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 30px); line-height: 1.35; }

/* Themen */
.topics { display: flex; flex-direction: column; }
.topic { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.topic:first-child { padding-top: 0; }
.topic:last-child { border-bottom: 0; padding-bottom: 0; }
.topic h2 { flex: 1 1 220px; font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.2; }
.topic p { flex: 2 1 320px; color: var(--text); line-height: 1.65; }

/* Arbeitsweise */
.principles {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px 48px;
}
.principles li { display: flex; flex-direction: column; gap: 8px; }
.principles .num { font-family: var(--mono); font-size: 13px; color: var(--accent-text); }
.principles .txt { font-family: var(--serif); font-size: 24px; line-height: 1.3; }

/* These & Landkarte */
.quote {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(26px, 3.2vw, 40px); line-height: 1.25; text-wrap: balance;
}
.map { width: 100%; height: auto; }
.map .spoke { stroke: var(--accent); stroke-width: 1.5; opacity: 0.75; }
.map .node { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
.map .hub { fill: var(--ink); }
.map .hub-label { fill: var(--paper); font-family: var(--serif); font-size: 24px; }
.map .area-label { fill: var(--ink); font-family: var(--sans); font-size: 20px; }
.map .post { fill: var(--muted); }
.map a:hover .post, .map a:focus .post { fill: var(--accent-text); }
.map .post--new { fill: var(--accent); }
.map .post-ring { fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: 0.45; }

.map-list { display: none; list-style: none; padding: 0; border-top: 1px solid var(--line); }
.map-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.dots { display: flex; gap: 6px; align-items: center; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.dot--new { width: 12px; height: 12px; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

@media (max-width: 640px) {
  .map { display: none; }
  .map-list { display: flex; flex-direction: column; }
}

/* Wochenbriefing */
.briefing-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; }
.briefing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.brief { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 2px solid var(--ink); }
.brief h3 { font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1.25; }
.brief p { font-size: 16px; line-height: 1.6; color: var(--text); }
.brief strong { font-weight: 500; }
.brief a { font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; }

/* Sporchi */
.bot { display: flex; flex-wrap: wrap; gap: 32px 48px; align-items: flex-start; }
.sporchi { flex: 1 1 200px; max-width: 280px; height: auto; }
.sporchi .s-fill { fill: var(--paper); }
.sporchi .s-white { fill: var(--surface); }
.sporchi .s-line { stroke: var(--ink); }
.sporchi .s-fill-stroke { stroke: var(--paper); }
.sporchi .s-acc { stroke: var(--accent); fill: none; }
.sporchi .s-face { stroke: var(--face); fill: none; }
.sporchi .s-face-fill { fill: var(--face); }
.sporchi .s-screen { fill: var(--screen); }
.sporchi .s-shadow { fill: var(--shadow); }
.sporchi .s-bulb { fill: var(--bulb); }
.sporchi .s-socket { fill: var(--line); }
.sporchi .s-coffee { fill: #6B4423; }
.sporchi .s-text { fill: #1B1B1A; font-family: var(--mono); font-size: 9px; font-weight: 500; }
.sporchi .s-name { fill: #FFFFFF; }
.sporchi .face { display: none; }
.sporchi[data-mood="1"] .face--1,
.sporchi[data-mood="2"] .face--2,
.sporchi[data-mood="3"] .face--3 { display: inline; }

.bot__panel { flex: 999 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.stages { display: flex; flex-wrap: wrap; gap: 8px; }
.stages button {
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  font-family: var(--mono); font-size: 13px; border-radius: 2px; cursor: pointer;
}
.stages button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.chat { border: 1px solid var(--ink); border-radius: 4px; background: var(--surface); padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.chat__log { display: flex; flex-direction: column; gap: 14px; max-height: 360px; overflow-y: auto; }
.msg { display: flex; flex-direction: column; gap: 6px; max-width: 85%; }
.msg__who { font-family: var(--mono); font-size: 12px; color: var(--accent-text); }
.msg__text { padding: 12px 16px; background: var(--bubble); border-radius: 4px; font-size: 16px; line-height: 1.5; }
.msg--user { align-self: flex-end; text-align: right; }
.msg--user .msg__who { color: var(--muted); }
.msg--user .msg__text { background: transparent; border: 1px solid var(--line); text-align: left; }
.chat__form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.chat__form label { flex: 1 1 220px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.chat__form input {
  min-height: 44px; padding: 0 12px;
  border: 1px solid var(--muted); border-radius: 2px;
  background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 16px;
}
.chat__form .btn { min-height: 46px; }

/* Werdegang & Kontakt */
.cv-contact { display: flex; flex-wrap: wrap; gap: 56px 64px; }
.cv { flex: 1 1 320px; min-width: 0; list-style: none; padding: 0; }
.cv li { display: flex; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cv li:last-child { border-bottom: 0; }
.cv .when { flex: 0 0 96px; font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 2px; }
.cv .what { font-size: 16px; line-height: 1.5; }
.contact { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.contact__mail {
  font-family: var(--serif); font-size: clamp(22px, 2.4vw, 28px);
  text-underline-offset: 6px; text-decoration-color: var(--accent); text-decoration-thickness: 2px;
  overflow-wrap: anywhere;
}
.contact__links { display: flex; flex-wrap: wrap; gap: 12px; }
.qr { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.qr img { width: 96px; height: 96px; background: #FFFFFF; padding: 6px; }

/* ---------- Fuß ---------- */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px;
  padding: 32px 0 48px; border-top: 1px solid var(--ink);
  font-family: var(--mono); font-size: 12px; line-height: 1.7; color: var(--muted);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent-text); }

/* ---------- Rechtliche Unterseiten ---------- */
.legal { max-width: 46em; padding: clamp(32px, 6vw, 72px) 0 96px; display: flex; flex-direction: column; gap: 20px; }
.legal h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4vw, 48px); line-height: 1.15; }
.legal h2 { font-family: var(--serif); font-weight: 400; font-size: 24px; margin-top: 16px; }
.legal p, .legal li { color: var(--text); }

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  .filament path { animation: none; stroke-dashoffset: 0; }
  * { scroll-behavior: auto !important; }
}

/* ---------- Druck ---------- */
@media print {
  .lang, .bot, .skip-link { display: none; }
  .section { break-inside: avoid; }
}
