/* ==========================================================================
   PixelPosts – pixelposts.nexym.de
   Eine gemeinsame Datei für alle Seiten. Kein Inline-CSS in den Seiten,
   damit die CSP ohne 'unsafe-inline' auskommt (siehe .htaccess).
   Farben und Formen nach Profilbild und YouTube-Banner (projects/pixelposts/logo/).
   Typografie in Kommentaren: Halbgeviertstrich „–“, nie den Geviertstrich.
   ========================================================================== */

/* --- Schriften (selbst gehostet, SIL Open Font License, siehe /assets/fonts/LIZENZ.txt) --- */
@font-face {
  font-family: "Press Start 2P";
  src: url("/assets/fonts/press-start-2p-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-latin-900-normal.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* --- Tokens --- */
:root {
  --pp-purple: #7c3aed;
  --pp-purple-soft: #a78bfa;
  --pp-yellow: #ffd60a;
  --pp-red: #ff2e4d;
  --pp-white: #ffffff;
  --pp-black: #000000;

  --bg: #140b29;
  --surface: #1e1139;
  --surface-line: #3a2566;
  --grid: rgba(255, 255, 255, 0.035);
  --text: #eee8fb;
  --muted: #bcaee0;

  --font-pixel: "Press Start 2P", ui-monospace, monospace;
  --font-text: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --shadow-hard: 5px 5px 0 var(--pp-black);
  --shadow-hard-lg: 7px 7px 0 var(--pp-black);
  --gutter: 16px;
  --measure: 760px;

  color-scheme: dark;
}

/* --- Grundlage --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background-color: var(--bg);
  /* Lila Glow oben mittig + feines 32-px-Pixelraster wie im Banner */
  background-image:
    radial-gradient(ellipse 900px 560px at 50% -120px, rgba(124, 58, 237, 0.5), transparent 72%),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
}

/* Verstreute Deko-Pixel wie im Banner – reine Box-Shadows, kein Markup, hinter dem Inhalt */
body::before,
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  pointer-events: none;
}
body::before {
  width: 10px;
  height: 10px;
  opacity: 0.45;
  box-shadow:
    13vw 33vh 0 var(--pp-purple),
    9vw 43vh 0 var(--pp-yellow),
    11vw 18vh 0 var(--pp-yellow),
    4vw 70vh 0 var(--pp-purple),
    12vw 84vh 0 var(--pp-purple),
    88vw 16vh 0 var(--pp-yellow),
    86vw 35vh 0 var(--pp-yellow),
    91vw 47vh 0 var(--pp-purple),
    87vw 66vh 0 var(--pp-yellow),
    95vw 82vh 0 var(--pp-purple),
    7vw 93vh 0 var(--pp-red);
}
body::after {
  width: 22px;
  height: 22px;
  opacity: 0.3;
  box-shadow:
    5vw 36vh 0 var(--pp-purple),
    12vw 53vh 0 var(--pp-red),
    6vw 58vh 0 var(--pp-yellow),
    93vw 39vh 0 var(--pp-yellow),
    86vw 54vh 0 var(--pp-red),
    92vw 59vh 0 var(--pp-purple);
}

a {
  color: var(--pp-yellow);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--pp-white);
}
:focus-visible {
  outline: 3px solid var(--pp-yellow);
  outline-offset: 3px;
}

strong {
  font-weight: 800;
  color: var(--pp-white);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--pp-yellow);
  color: var(--pp-black);
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow-hard);
}
.skip-link:focus {
  top: var(--gutter);
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* --- Logo: 2×2-Quadrate + Pixel-Schriftzug + NEWS-Badge --- */
.brand {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 14px;
  color: var(--pp-white);
  text-decoration: none;
}
.brand:hover {
  color: var(--pp-white);
}
.brand__mark {
  width: 34px;
  height: 34px;
  flex: none;
}
.brand__word {
  font-family: var(--font-pixel);
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-shadow: 3px 3px 0 var(--pp-black);
}
.badge {
  display: inline-block;
  padding: 5px 9px 4px;
  border-radius: 6px;
  background: var(--pp-red);
  color: var(--pp-white);
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.08em;
  box-shadow: 3px 3px 0 var(--pp-black);
}

.brand--hero {
  gap: 16px 22px;
}
.brand--hero .brand__mark {
  width: clamp(64px, 14vw, 104px);
  height: clamp(64px, 14vw, 104px);
}
.brand--hero .brand__word {
  font-size: clamp(20px, 5.6vw, 44px);
  text-shadow: 4px 4px 0 var(--pp-black);
}
.brand--hero .badge {
  padding: 8px 14px 7px;
  border-radius: 9px;
  font-size: clamp(14px, 2.4vw, 22px);
  box-shadow: 5px 5px 0 var(--pp-black);
}

/* --- Kopfzeile der Unterseiten --- */
.site-header {
  padding: 22px 0;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.lang-jump {
  font-size: 14px;
  font-weight: 800;
}

main {
  flex: 1 0 auto;
}

/* --- Buttons mit hartem Versatz-Schatten --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 20px;
  border: 2px solid var(--pp-black);
  border-radius: 6px;
  background: var(--pp-purple);
  color: var(--pp-white);
  font-family: var(--font-text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: var(--shadow-hard);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover {
  color: var(--pp-white);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hard-lg);
}
.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--pp-black);
}
.btn--yellow,
.btn--yellow:hover {
  background: var(--pp-yellow);
  color: var(--pp-black);
}
.btn--red,
.btn--red:hover {
  background: var(--pp-red);
}
.btn__px {
  width: 10px;
  height: 10px;
  flex: none;
  background: currentColor;
}

/* --- Startseite --- */
.hero {
  padding: clamp(48px, 10vw, 112px) 0 clamp(40px, 7vw, 72px);
  text-align: center;
}
.hero .brand {
  justify-content: center;
}
.claim {
  margin: clamp(28px, 5vw, 44px) auto 0;
  max-width: 18em;
  font-size: clamp(28px, 6vw, 52px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--pp-white);
}
.claim em {
  font-style: normal;
  color: var(--pp-yellow);
}
.lead {
  max-width: 36em;
  margin: 22px auto 0;
  font-size: clamp(17px, 2.2vw, 19px);
  font-weight: 500;
  color: var(--text);
}
.channels {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.section {
  padding: clamp(32px, 6vw, 56px) 0;
}
.section-title {
  margin: 0 0 24px;
  font-family: var(--font-pixel);
  font-size: clamp(13px, 2vw, 16px);
  font-weight: 400;
  line-height: 1.6;
  color: var(--pp-yellow);
  text-align: center;
}
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.card {
  padding: 22px 22px 20px;
  border: 2px solid var(--pp-black);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-hard);
}
.card__big {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-pixel);
  font-size: 18px;
  line-height: 1.4;
  color: var(--pp-white);
}
.card p {
  margin: 0;
  color: var(--text);
}
.card--purple .card__big { color: var(--pp-purple-soft); }
.card--yellow .card__big { color: var(--pp-yellow); }
.card--red .card__big { color: #ff7389; }

.about-en {
  max-width: var(--measure);
  margin: 0 auto;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}
.about-en p {
  margin: 0;
}

/* --- Rechtstexte --- */
.prose {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 24px 0 64px;
}
.prose h1 {
  margin: 8px 0 14px;
  font-family: var(--font-pixel);
  font-size: clamp(13px, 3.9vw, 26px);
  font-weight: 400;
  line-height: 1.45;
  color: var(--pp-white);
  text-shadow: 3px 3px 0 var(--pp-black);
  overflow-wrap: break-word;
  hyphens: auto;
}
.prose h2 {
  margin: 40px 0 10px;
  font-family: var(--font-pixel);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.8;
  color: var(--pp-yellow);
  scroll-margin-top: 20px;
}
.prose h1[id] {
  scroll-margin-top: 20px;
}
.prose p,
.prose ul {
  margin: 0 0 14px;
}
.prose ul {
  padding-left: 1.3em;
}
.prose li {
  margin-bottom: 8px;
}
.prose li::marker {
  color: var(--pp-yellow);
}
.prose address {
  margin: 0 0 14px;
  font-style: normal;
}
.note {
  margin: 0 0 14px;
  padding: 14px 18px;
  border-left: 4px solid var(--pp-yellow);
  border-radius: 4px;
  background: var(--surface);
}
.note p {
  margin: 0;
}
.meta {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 15px;
}
.toc {
  margin: 0 0 12px;
  padding: 18px 22px;
  border: 2px solid var(--pp-black);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-hard);
}
.toc__title {
  margin: 0 0 8px;
  font-family: var(--font-pixel);
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}
.toc ol {
  margin: 0;
  padding-left: 1.4em;
}
.toc li {
  margin: 2px 0;
}
.lang-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 64px 0 28px;
}
.lang-divider::before,
.lang-divider::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--surface-line);
}
.lang-divider span {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--muted);
}
.dl-row {
  display: grid;
  grid-template-columns: 9em 1fr;
  gap: 4px 16px;
  margin: 0 0 14px;
}
.dl-row dt {
  color: var(--muted);
}
.dl-row dd {
  margin: 0;
}

/* --- Callback und 404: eine Karte mittig --- */
.solo {
  display: grid;
  place-items: center;
  padding: 48px var(--gutter) 64px;
}
.solo__card {
  width: 100%;
  max-width: 520px;
  padding: 32px 26px;
  border: 2px solid var(--pp-black);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-hard-lg);
  text-align: center;
}
.solo__card h1 {
  margin: 22px 0 14px;
  font-family: var(--font-pixel);
  font-size: clamp(15px, 4vw, 20px);
  font-weight: 400;
  line-height: 1.6;
  color: var(--pp-white);
}
.solo__card p {
  margin: 0 0 10px;
}
.solo__card .en {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 2px solid var(--surface-line);
  color: var(--muted);
  font-size: 15px;
}
.solo__card .btn {
  margin-top: 18px;
}
.status-px {
  display: inline-grid;
  grid-template-columns: repeat(2, 18px);
  gap: 5px;
}
.status-px i {
  display: block;
  width: 18px;
  height: 18px;
  box-shadow: 3px 3px 0 var(--pp-black);
}
.status-px i:nth-child(1),
.status-px i:nth-child(4) { background: var(--pp-purple); }
.status-px i:nth-child(2),
.status-px i:nth-child(3) { background: var(--pp-yellow); }
.status-px--error i:nth-child(2),
.status-px--error i:nth-child(3) { background: var(--pp-red); }

/* --- Fußzeile --- */
.site-footer {
  flex-shrink: 0;
  padding: 26px 0 32px;
  border-top: 2px solid var(--surface-line);
  background: rgba(10, 5, 22, 0.55);
  font-size: 14px;
  color: var(--muted);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-nav li + li::before {
  content: "·";
  margin: 0 10px;
  color: var(--muted);
}
.footer-nav a {
  font-weight: 800;
}
.footer-nav a[aria-current="page"] {
  color: var(--pp-white);
  text-decoration: none;
}
.copy {
  margin: 0;
}

/* --- Schmale Bildschirme --- */
@media (max-width: 520px) {
  body {
    font-size: 16px;
  }
  .channels .btn {
    width: 100%;
  }
  .channels li {
    width: calc(100% - 6px);
  }
  /* Deko-Pixel würden auf schmalen Schirmen im Fließtext liegen */
  body::before {
    opacity: 0.2;
  }
  body::after {
    display: none;
  }
  .footer-nav ul {
    gap: 6px 20px;
  }
  .footer-nav li + li::before {
    content: none;
  }
  .dl-row {
    grid-template-columns: 1fr;
  }
  .dl-row dd {
    margin-bottom: 8px;
  }
  .brand__word {
    font-size: 13px;
  }
}

/* --- Bewegung nur, wenn erwünscht --- */
@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
  .btn:hover,
  .btn:active {
    transform: none;
  }
}

/* --- Druck: Rechtstexte schwarz auf weiß --- */
@media print {
  html {
    background: #fff;
  }
  body {
    color: #000;
  }
  body::before,
  body::after,
  .site-header,
  .site-footer,
  .toc,
  .skip-link {
    display: none;
  }
  .prose h1,
  .prose h2,
  strong,
  a {
    color: #000;
    text-shadow: none;
  }
}
