/* ===================== RECHTSSEITEN (Impressum, Datenschutz) ===================== */
:root {
  --primary: #3457d5;
  --text-dark: #1A1A2E;
  --text-light: #6B7280;
  --bg-alt: #F5F6F8;
  --border: #E5E7EB;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
::selection { background: #3457d5; color: #ffffff; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-light);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.legal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(52,87,213,.08);
}
.legal-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}
.logo-link { display: flex; align-items: center; flex-shrink: 0; margin-left: -24px; border-radius: 6px; }
.logo-link img { height: 150px; width: auto; }
.logo-link:focus-visible { outline: 2px solid var(--primary); outline-offset: -20px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--primary);
  border: 1.5px solid rgba(52,87,213,.5);
  border-radius: 999px;
  padding: 6px 16px;
  transition: border-color .18s ease, background-color .18s ease;
}
.back-link span { display: inline-block; transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1); }
.back-link:hover { border-color: var(--primary); }
.back-link:hover span { transform: translateX(-3px); }
.back-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.back-link:active { background: rgba(52,87,213,.08); }

/* ---------- Seitenkopf ---------- */
.legal-hero {
  position: relative;
  padding: 72px 0 48px;
  background:
    radial-gradient(60% 120% at 0% 0%, rgba(52,87,213,.08) 0%, transparent 60%),
    radial-gradient(40% 90% at 100% 0%, rgba(124,82,232,.06) 0%, transparent 60%);
  border-bottom: 1px solid rgba(52,87,213,.07);
}
.legal-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}
.legal-hero h1 {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-dark);
}
.legal-hero p { margin-top: 16px; max-width: 620px; font-size: 17px; }

/* ---------- Inhalt ---------- */
.legal-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 720px);
  gap: 72px;
  padding: 64px 0 96px;
}
.legal-layout--single { grid-template-columns: minmax(0, 720px); }

.legal-toc { position: sticky; top: 96px; align-self: start; }
.legal-toc h2 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dark);
  margin-bottom: 12px;
}
.legal-toc ol { list-style: none; border-left: 1px solid var(--border); }
.legal-toc a {
  display: block;
  font-size: 14px;
  line-height: 1.45;
  padding: 6px 0 6px 16px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--text-light);
  transition: color .18s ease, border-color .18s ease;
}
.legal-toc a:hover { color: var(--primary); }
.legal-toc a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 2px; }
.legal-toc a:active { color: var(--text-dark); }
.legal-toc a.is-active { color: var(--primary); border-left-color: var(--primary); font-weight: 500; }

.legal-content section + section {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}
.legal-content h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-dark);
  margin-bottom: 16px;
}
.legal-content h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-dark);
  margin: 28px 0 8px;
}
.legal-content p + p,
.legal-content p + ul,
.legal-content ul + p { margin-top: 12px; }
.legal-content ul { padding-left: 20px; }
.legal-content li + li { margin-top: 6px; }
.legal-content strong { color: var(--text-dark); font-weight: 600; }
.legal-content a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(52,87,213,.35);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  transition: text-decoration-color .18s ease, color .18s ease;
}
.legal-content a:hover { text-decoration-color: var(--primary); }
.legal-content a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 2px; }
.legal-content a:active { color: var(--text-dark); }

/* Adress-/Kontaktblock */
.legal-card {
  background: var(--bg-alt);
  border: 1px solid rgba(52,87,213,.08);
  border-radius: 16px;
  padding: 24px 28px;
  color: var(--text-dark);
  font-style: normal;
  line-height: 1.75;
}
.legal-card dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 20px; }
.legal-card dt { color: var(--text-light); }
.legal-card dd { color: var(--text-dark); }

.legal-meta { margin-top: 48px; font-size: 14px; }

/* Button im Fließtext (Cookie-Einstellungen) */
.legal-btn {
  display: inline-block;
  margin-top: 16px;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding: 13px 20px;
  border-radius: 10px;
  border: 1.5px solid var(--primary);
  background: #ffffff;
  color: var(--primary);
  cursor: pointer;
  transition: transform .2s cubic-bezier(0.16, 1, 0.3, 1), background-color .18s ease;
}
.legal-btn:hover { background: rgba(52,87,213,.06); transform: translateY(-1px); }
.legal-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.legal-btn:active { transform: scale(0.97); }

/* ---------- Footer ---------- */
.legal-footer {
  background: #0D1117;
  color: rgba(255,255,255,0.5);
  font-size: 13px;
}
.legal-footer .footer-bottom {
  padding: 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.legal-footer a { color: rgba(255,255,255,0.5); transition: color .2s ease; }
.legal-footer a:hover { color: #ffffff; }
.legal-footer a:focus-visible { outline: 2px solid rgba(255,255,255,.7); outline-offset: 3px; border-radius: 2px; }
.legal-footer a:active { color: rgba(255,255,255,.8); }
.legal-footer a[aria-current="page"] { color: #ffffff; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; padding: 48px 0 72px; }
  .legal-toc { position: static; }
  .legal-hero h1 { font-size: 36px; }
}
@media (max-width: 640px) {
  .logo-link { margin-left: -20px; height: 64px; overflow: hidden; }
  .logo-link img { height: 120px; width: auto; max-width: none; }
  .legal-hero { padding: 48px 0 32px; }
  .legal-hero h1 { font-size: 30px; }
  .legal-content h2 { font-size: 21px; }
  .legal-card { padding: 20px; }
  .legal-card dl { grid-template-columns: 1fr; gap: 0; }
  .legal-card dd + dt { margin-top: 8px; }
  .legal-footer .footer-bottom { flex-direction: column; align-items: flex-start; }
  .back-link { min-height: 40px; }
}
