:root {
  --bg: #f7f4ee;
  --fg: #1c1a17;
  --muted: #6b655c;
  --accent: #c2410c;
  --accent-soft: #fbe6d8;
  --card: #ffffff;
  --rule: #e2dcd1;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161412;
    --fg: #ece7df;
    --muted: #a39b8f;
    --accent: #fb8a4b;
    --accent-soft: #2c1d14;
    --card: #1f1c19;
    --rule: #34302b;
  }
}

:root[data-theme="dark"] {
  --bg: #161412;
  --fg: #ece7df;
  --muted: #a39b8f;
  --accent: #fb8a4b;
  --accent-soft: #2c1d14;
  --card: #1f1c19;
  --rule: #34302b;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  font-size: clamp(1.06rem, 0.98rem + 0.4vw, 1.22rem);
  line-height: 1.65;
  hyphens: auto;
  text-rendering: optimizeLegibility;
}

.site-header, main, .site-footer {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header { padding-top: 3rem; }

.kicker {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  font-family: var(--sans);
  font-size: clamp(2rem, 1.4rem + 3vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0.4em 0 1em;
  hyphens: manual;
  text-wrap: balance;
}
h1:has(+ .subtitle) { margin-bottom: 0.25em; }

.subtitle {
  margin: 0 0 1.6em;
  font-family: var(--sans);
  font-size: clamp(1.2rem, 1rem + 1vw, 1.6rem);
  line-height: 1.25;
  font-weight: 500;
  color: var(--muted);
  hyphens: manual;
  text-wrap: balance;
}

p { margin: 0 0 1.1em; }

a { color: var(--accent); text-underline-offset: 0.18em; }

code {
  font-family: var(--sans);
  font-size: 0.95em;
}

/* Meta note about the draft status, shown above the letter */
.vorbemerkung {
  margin: 1.5rem 0 2.5rem;
  padding: 1rem 1.2rem;
  border: 1px dashed var(--rule);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted);
}
.vorbemerkung p:last-child { margin-bottom: 0; }
.vorbemerkung code { font-size: 1em; color: var(--fg); }

/* Teaser linking to the explainer video (thumbnail is self-hosted, no embed) */
.video { margin: 0 0 2.5rem; }
.video p { margin: 0; }
.video-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 34rem;
  padding: 0.6rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  color: var(--fg);
  font-family: var(--sans);
}
.video-card:hover, .video-card:focus-within { border-color: var(--accent); }
.video-thumb {
  position: relative;
  flex: none;
  width: min(15rem, 45%);
}
.video-thumb img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 6px;
}
/* play button */
.video-thumb::after {
  content: "";
  position: absolute;
  /* bottom right, so it does not cover the thumbnail text */
  right: 0.4rem;
  bottom: 0.4rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: rgba(28, 26, 23, 0.78)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6.5v11l9-5.5z' fill='white'/%3E%3C/svg%3E")
    center / 60% no-repeat;
  transition: background-color 0.15s;
}
.video-thumb:hover::after, .video-thumb:focus-visible::after { background-color: var(--accent); }
.video-text { display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; line-height: 1.3; }
.video-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.video-title { font-weight: 700; font-size: 1rem; }
.video-cta { font-size: 0.85rem; color: var(--muted); text-decoration: none; }
.video-cta:hover, .video-cta:focus-visible { color: var(--accent); text-decoration: underline; }
/* PeerTube is the preferred link */
.video-cta-main { margin-top: 0.3rem; font-weight: 700; color: var(--accent); }

/* The central thesis */
.kernthese {
  margin: 2.2rem 0;
  padding: 0.2rem 0 0.2rem 1.2rem;
  border-left: 5px solid var(--accent);
}
.kernthese p {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
  hyphens: manual;
}
.kernthese strong { font-weight: 800; }

/* Offer + contact */
.angebot {
  margin: 3rem 0 2rem;
  padding: 1.4rem 1.5rem 0.4rem;
  background: var(--accent-soft);
  border-radius: 12px;
  font-family: var(--sans);
  font-size: 0.98rem;
}
.angebot > p:first-child {
  font-weight: 700;
  margin-bottom: 0.5em;
}
.angebot ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.angebot li { margin-bottom: 0.3em; }
.angebot li::marker { color: var(--accent); font-weight: 700; }

/* Sources */
.quellen {
  margin: 3.5rem 0 2rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.5;
}
.quellen h2 {
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}
.quellen h3 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 1.8em 0 0.6em;
}
.quellen > p { color: var(--muted); }
.quellen ul { margin: 0; padding-left: 1.1em; }
.quellen li { margin-bottom: 0.55em; hyphens: manual; overflow-wrap: anywhere; }
.quellen li::marker { color: var(--muted); }

.site-footer {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
}
.site-footer p { margin: 0 0 0.3em; }
.site-footer::before {
  content: "";
  display: block;
  border-top: 1px solid var(--rule);
  margin-bottom: 1.2rem;
}
.mail { color: var(--fg); }

::selection { background: var(--accent); color: var(--bg); }
