/* ============================================================
   OG Performance — shared styles for legal pages
   (Impressum / Datenschutz / AGB)
   Matches the main site: dark theme, red primary,
   Inter + Space Grotesk.
   ============================================================ */

:root {
  --bg: oklch(0.04 0 0);
  --fg: oklch(0.98 0 0);
  --primary: oklch(0.55 0.25 27);
  --primary-bright: oklch(0.64 0.23 27);
  --muted: oklch(0.62 0 0);
  --muted-dim: oklch(0.5 0 0);
  --line: oklch(0.16 0 0);
  --line-soft: oklch(0.12 0 0);
  --card: oklch(0.065 0 0);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; max-width: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
.font-display { font-family: 'Space Grotesk', system-ui, sans-serif; }
.wrap { max-width: 80rem; margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 1024px) { .wrap { padding: 0 2rem; } }
a { color: inherit; }

/* ---------- Header ---------- */
.lg-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}
.lg-header.scrolled {
  background: oklch(0.04 0 0 / 0.85);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}
.lg-nav { display: flex; height: 5rem; align-items: center; justify-content: space-between; }
.lg-logo {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700; font-size: 1.5rem; text-transform: uppercase;
  letter-spacing: -0.02em; text-decoration: none; white-space: nowrap;
}
.lg-logo .accent { color: var(--primary); margin-left: 0.2em; }
.lg-navlinks { display: none; align-items: center; gap: 2.5rem; }
@media (min-width: 1024px) { .lg-navlinks { display: flex; } }
.lg-navlinks a {
  font-size: 0.875rem; color: var(--muted); text-decoration: none;
  transition: color 0.25s ease;
}
.lg-navlinks a:hover { color: var(--fg); }
.lg-call {
  display: inline-flex; align-items: center; gap: 0.5rem;
  height: 2.75rem; padding: 0 1.5rem; border-radius: 999px;
  background: var(--primary); color: var(--fg);
  font-size: 0.875rem; font-weight: 500; text-decoration: none;
  transition: filter 0.25s ease;
}
.lg-call:hover { filter: brightness(1.08); }
.lg-call svg { width: 1rem; height: 1rem; }
.lg-back {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.875rem; color: var(--muted); text-decoration: none;
  transition: color 0.25s ease;
}
.lg-back:hover { color: var(--fg); }
.lg-back svg { width: 1rem; height: 1rem; }
.lg-actions { display: flex; align-items: center; gap: 1.25rem; }

/* ---------- Title band ---------- */
.lg-hero { padding: 9rem 0 3.5rem; border-bottom: 1px solid var(--line-soft); position: relative; }
.lg-hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, var(--primary), transparent 55%);
}
.lg-eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--primary-bright); margin-bottom: 1.1rem;
}
.lg-eyebrow::before {
  content: ''; width: 1.75rem; height: 1px; background: var(--primary);
}
.lg-title {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700; font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.02; letter-spacing: -0.02em; margin: 0;
}
.lg-updated {
  margin-top: 1.4rem; font-size: 0.9rem; color: var(--muted-dim);
}
.lg-updated strong { color: oklch(0.8 0 0); font-weight: 600; }

/* ---------- Layout ---------- */
.lg-layout { display: grid; gap: 3.5rem; padding-top: 3.5rem; padding-bottom: 5rem; }
@media (min-width: 1024px) {
  .lg-layout.has-toc { grid-template-columns: 16rem 1fr; gap: 4.5rem; }
}

/* table of contents */
.lg-toc { display: none; }
@media (min-width: 1024px) {
  .lg-toc { display: block; position: sticky; top: 7rem; align-self: start; }
}
.lg-toc-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted-dim); margin-bottom: 1.1rem;
}
.lg-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.lg-toc li { counter-increment: toc; }
.lg-toc a {
  display: flex; gap: 0.7rem; padding: 0.4rem 0;
  font-size: 0.9rem; color: var(--muted); text-decoration: none;
  line-height: 1.4; transition: color 0.2s ease;
}
.lg-toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 0.75rem; color: var(--muted-dim); padding-top: 0.1rem;
}
.lg-toc a:hover { color: var(--fg); }
.lg-toc a:hover::before { color: var(--primary-bright); }

/* ---------- Content ---------- */
.lg-content { max-width: 46rem; }
.lg-content > section { scroll-margin-top: 7rem; }
.lg-content > section + section { margin-top: 3.25rem; }
.lg-h2 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700; font-size: 1.5rem; letter-spacing: -0.01em;
  margin: 0 0 1.1rem; display: flex; gap: 0.85rem; align-items: baseline;
}
.lg-h2 .num {
  font-size: 0.95rem; color: var(--primary-bright); font-weight: 600;
  font-variant-numeric: tabular-nums; flex: none;
}
.lg-h3 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 600; font-size: 1.075rem; margin: 1.9rem 0 0.7rem;
  color: oklch(0.92 0 0);
}
.lg-content p { margin: 0 0 1rem; color: var(--muted); font-size: 1rem; }
.lg-content p:last-child { margin-bottom: 0; }
.lg-content a.inline { color: var(--primary-bright); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--primary) 40%, transparent); transition: border-color 0.2s ease; }
.lg-content a.inline:hover { border-bottom-color: var(--primary-bright); }
.lg-content ul { margin: 0 0 1rem; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.lg-content ul li {
  position: relative; padding-left: 1.4rem; color: var(--muted); font-size: 1rem;
}
.lg-content ul li::before {
  content: ''; position: absolute; left: 0; top: 0.62em;
  width: 0.4rem; height: 0.4rem; border-radius: 999px; background: var(--primary);
}
.lg-content strong { color: oklch(0.9 0 0); font-weight: 600; }

/* card / address block */
.lg-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 1.1rem; padding: 1.6rem 1.75rem;
}
.lg-card + .lg-card { margin-top: 1rem; }
.lg-deflist { display: grid; gap: 0; }
.lg-deflist .row {
  display: grid; grid-template-columns: 11rem 1fr; gap: 1rem;
  padding: 0.85rem 0; border-bottom: 1px solid var(--line-soft);
  font-size: 0.95rem; align-items: baseline;
}
.lg-deflist .row:first-child { padding-top: 0; }
.lg-deflist .row:last-child { border-bottom: none; padding-bottom: 0; }
.lg-deflist .row dt { color: var(--muted-dim); font-weight: 500; }
.lg-deflist .row dd { margin: 0; color: oklch(0.9 0 0); }
.lg-deflist .row dd a { color: var(--primary-bright); text-decoration: none; }
@media (max-width: 540px) {
  .lg-deflist .row { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* placeholder — fields the operator must supply */
.ph {
  display: inline-block;
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary-bright);
  border: 1px dashed color-mix(in srgb, var(--primary) 50%, transparent);
  border-radius: 0.4rem; padding: 0.05rem 0.45rem;
  font-size: 0.85em; font-weight: 500; letter-spacing: 0.01em;
}

/* small note callout */
.lg-note {
  margin-top: 1.25rem;
  border-left: 2px solid var(--primary);
  background: color-mix(in srgb, var(--primary) 7%, transparent);
  padding: 1rem 1.25rem; border-radius: 0 0.6rem 0.6rem 0;
  font-size: 0.9rem; color: oklch(0.74 0 0);
}

/* ---------- Footer (mirrors main site) ---------- */
.lg-footer { background: oklch(0.05 0 0); }
.lg-footer-top { background: oklch(0.03 0 0); border-bottom: 1px solid var(--line-soft); }
.lg-footer-top .inner {
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
  padding: 2rem 0; text-align: center;
}
@media (min-width: 640px) { .lg-footer-top .inner { flex-direction: row; justify-content: space-between; } }
.lg-socials { display: flex; align-items: center; gap: 0.75rem; }
.lg-socials a {
  width: 2.5rem; height: 2.5rem; border-radius: 0.55rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-bright); transition: background 0.2s ease;
}
.lg-socials a:hover { background: oklch(0.09 0 0); }
.lg-socials svg { width: 1.25rem; height: 1.25rem; }

.lg-footer-main { padding: 4rem 0; }
.lg-footer-cols { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 640px) { .lg-footer-cols { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .lg-footer-cols { grid-template-columns: 1.2fr 1fr 1fr; } }
.lg-col h4 {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--primary-bright); margin: 0 0 1.4rem;
}
.lg-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.lg-col ul a { font-size: 1rem; color: oklch(0.82 0 0); text-decoration: none; transition: color 0.2s ease; }
.lg-col ul a:hover { color: var(--primary); }
.lg-col .name { font-size: 1rem; font-weight: 600; color: oklch(0.96 0 0); margin: 0 0 1rem; }
.lg-col address { font-style: normal; color: oklch(0.72 0 0); line-height: 1.7; margin: 0 0 1.4rem; }
.lg-contact { display: flex; flex-direction: column; gap: 0.75rem; }
.lg-contact a { display: flex; align-items: center; gap: 0.75rem; color: oklch(0.82 0 0); text-decoration: none; transition: color 0.2s ease; }
.lg-contact a:hover { color: var(--primary); }
.lg-contact svg { width: 1rem; height: 1rem; flex: none; color: var(--primary-bright); }

.lg-footer-bottom { border-top: 1px solid var(--line-soft); }
.lg-footer-bottom .inner {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  padding: 1.5rem 0;
}
@media (min-width: 640px) { .lg-footer-bottom .inner { flex-direction: row; justify-content: space-between; } }
.lg-legal-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.5rem; font-size: 0.875rem; }
.lg-legal-links a { color: var(--muted-dim); text-decoration: none; transition: color 0.2s ease; }
.lg-legal-links a:hover { color: var(--fg); }
.lg-legal-links a.active { color: var(--fg); }
.lg-copyright { font-size: 0.875rem; color: var(--muted-dim); }

/* ---------- Overflow safety (long words / URLs) ---------- */
.lg-title { overflow-wrap: break-word; hyphens: auto; }
.lg-content p, .lg-content li, .lg-deflist dd { overflow-wrap: anywhere; }
.lg-content a.inline { overflow-wrap: anywhere; word-break: break-word; }

/* ============================================================
   Mobile & tablet refinements
   ============================================================ */
@media (max-width: 1023px) {
  /* sections begin lower so the fixed header never overlaps anchors */
  .lg-content > section { scroll-margin-top: 5.5rem; }
}

@media (max-width: 640px) {
  /* compact header — drop the back-link label, keep just the arrow */
  .lg-nav { height: 4.25rem; }
  .lg-logo { font-size: 1.2rem; }
  .lg-actions { gap: 0.6rem; }
  .lg-back { gap: 0; }
  .lg-back span { display: none; }
  .lg-back svg { width: 1.4rem; height: 1.4rem; }
  .lg-call { height: 2.5rem; padding: 0 1.05rem; font-size: 0.85rem; }
  .lg-call svg { width: 0.95rem; height: 0.95rem; }

  /* title band */
  .lg-hero { padding: 6.5rem 0 2.5rem; }
  .lg-eyebrow { margin-bottom: 0.85rem; }
  .lg-updated { margin-top: 1.1rem; }

  /* layout & content rhythm */
  .lg-layout { padding: 2.5rem 0 3.5rem; gap: 2.5rem; }
  .lg-content > section + section { margin-top: 2.5rem; }
  .lg-h2 { font-size: 1.3rem; gap: 0.6rem; margin-bottom: 0.9rem; }
  .lg-h2 .num { font-size: 0.85rem; }
  .lg-h3 { font-size: 1.02rem; margin-top: 1.6rem; }
  .lg-content p, .lg-content ul li { font-size: 0.96rem; }

  /* cards & definition lists */
  .lg-card { padding: 1.25rem 1.3rem; border-radius: 0.9rem; }
  .lg-note { padding: 0.9rem 1.1rem; }

  /* footer */
  .lg-footer-main { padding: 3rem 0; }
  .lg-footer-cols { gap: 2.5rem; }
  .lg-footer-top .inner { padding: 1.75rem 0; }
  .lg-footer-bottom .inner { padding: 1.5rem 0; gap: 1.1rem; }
  .lg-legal-links { gap: 1.25rem; }
}

@media (max-width: 380px) {
  .lg-logo { font-size: 1.08rem; }
  .lg-call span { display: none; }
  .lg-call { padding: 0; width: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}
