/* Shared styles for legal pages (Impressum, Datenschutz, AGB) —
   reuses the homepage's warm-cream system in an article-focused layout. */

:root {
  --bg: #F2EBDD;
  --bg-alt: #EAE0CC;
  --surface: #FBF7EF;
  --surface-soft: #F6EFE0;
  --ink: #221C12;
  --ink-soft: #4A4032;
  --ink-mute: #8B7E6A;
  --line: #DCD1B8;
  --line-soft: #E8DEC7;
  --accent: #B8694A;
  --accent-soft: #E8C9B7;
  --accent-ink: #4A1F0E;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Geist", -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: "Instrument Serif", "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--ink);
}

a { color: var(--ink); }
a:hover { color: var(--accent); }
.mono { font-family: "Geist Mono", monospace; font-feature-settings: "tnum"; }

/* ---------- Top nav ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid color-mix(in oklab, var(--line) 60%, transparent);
}
.topnav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Instrument Serif", serif;
  font-size: 24px;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  min-width: 36px;
  height: 28px;
  padding: 0 6px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-family: "Instrument Serif", serif;
  font-size: 18px;
  font-style: italic;
  letter-spacing: -0.04em;
  line-height: 1;
}
.brand-mark .flip { display: inline-block; transform: rotate(180deg); transform-origin: center; }
.brand-icon { width: 36px; height: 36px; display: block; flex-shrink: 0; object-fit: contain; }
.nav-cta-row { display: flex; gap: 10px; align-items: center; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  transition: all 0.18s ease;
  min-height: 40px;
}
.btn-primary:hover { background: var(--accent); color: #fff; }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: none;
  border: 1px solid var(--line);
  transition: all 0.15s ease;
  min-height: 40px;
}
.btn-ghost:hover { background: var(--surface); color: var(--ink); }

/* ---------- Masthead ---------- */
header.masthead {
  border-bottom: 1px solid var(--line);
  padding: 56px 0 36px;
  text-align: left;
}
.masthead-inner { max-width: 760px; margin: 0 auto; padding: 0 32px; }
.masthead .kicker {
  font-family: "Geist", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
}
.masthead h1 {
  font-size: clamp(36px, 5vw, 56px);
  margin: 12px 0 12px;
}
.masthead h1 em { font-style: italic; color: var(--accent); }
.masthead .standfirst {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 620px;
  line-height: 1.55;
}
.masthead .dateline {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 20px;
}

/* ---------- TOC ---------- */
nav.toc {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  margin: 40px 0;
  padding: 24px 28px;
}
nav.toc h2 {
  font-family: "Geist", sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 14px;
  font-weight: 500;
}
nav.toc ol { list-style: none; counter-reset: toc; }
nav.toc li { counter-increment: toc; border-top: 1px solid var(--line-soft); }
nav.toc li:first-child { border-top: none; }
nav.toc a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 12px 0;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
}
nav.toc a::before {
  content: "§" counter(toc);
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  min-width: 32px;
}
nav.toc a:hover { color: var(--accent); }

/* ---------- Article body ---------- */
.legal-wrap { max-width: 760px; margin: 0 auto; padding: 0 32px 80px; }
section.legal-section { margin: 56px 0; scroll-margin-top: 88px; }
section.legal-section h2 {
  font-size: clamp(26px, 3vw, 32px);
  margin-bottom: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}
section.legal-section h2 .num {
  font-family: "Geist Mono", monospace;
  font-size: 13px;
  color: var(--accent);
  font-style: normal;
  letter-spacing: 0.04em;
  margin-right: 10px;
  vertical-align: middle;
}
section.legal-section h3 {
  font-family: "Instrument Serif", serif;
  font-size: 22px;
  font-weight: 400;
  margin: 28px 0 10px;
  color: var(--ink);
}
section.legal-section p {
  margin: 0 0 16px;
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.7;
}
section.legal-section ul, section.legal-section ol {
  margin: 0 0 18px 24px;
  color: var(--ink-soft);
}
section.legal-section li { margin-bottom: 8px; line-height: 1.65; }
section.legal-section strong { color: var(--ink); font-weight: 600; }
section.legal-section a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
section.legal-section a:hover { color: var(--accent-ink); }

.contact-block {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 24px 28px;
  margin: 24px 0;
  font-family: "Geist Mono", monospace;
  font-size: 14px;
  line-height: 1.85;
}
.contact-block strong { font-family: "Geist", sans-serif; font-weight: 600; }

.todo {
  background: rgba(184, 105, 74, 0.08);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  margin: 16px 0;
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  color: var(--accent-ink);
  font-family: "Geist Mono", monospace;
}
.todo strong { font-family: "Geist", sans-serif; font-weight: 600; }

.disclaimer-box {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 24px 0;
  font-size: 14px;
  color: var(--ink-soft);
}

a.backtop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Geist", sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  margin-top: 32px;
  border: 1px solid var(--line);
  padding: 9px 18px;
  border-radius: 999px;
  transition: all 0.15s;
}
a.backtop:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--bg-alt);
  margin-top: 60px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}
footer.site-footer .legal-wrap { padding-bottom: 0; }
footer.site-footer p {
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.7;
  margin-bottom: 8px;
}
footer.site-footer .footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
}
footer.site-footer .made-in { color: var(--ink-soft); }
footer.site-footer .made-in .heart { color: var(--accent); }
footer.site-footer .legal-links { display: flex; gap: 20px; font-size: 13px; flex-wrap: wrap; }
footer.site-footer .legal-links a { color: var(--ink-soft); text-decoration: none; }
footer.site-footer .legal-links a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  .topnav-inner { padding: 0 20px; }
  .masthead-inner { padding: 0 20px; }
  .legal-wrap { padding: 0 20px 56px; }
  .masthead { padding: 40px 0 28px; }
  nav.toc { margin: 32px 0; padding: 20px 22px; }
  section.legal-section { margin: 40px 0; }
  section.legal-section h2 { font-size: 24px; }
  section.legal-section h3 { font-size: 19px; }
  .contact-block { padding: 18px 20px; font-size: 13px; }
  footer.site-footer .footer-row { flex-direction: column; }
}

@media (max-width: 480px) {
  .topnav-inner .btn-ghost { display: none; }
}
