/* === Shared typography polish for Impressum / Datenschutz === */

/* Grundlegende Lesbarkeit */
body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

main,
article,
section {
  word-wrap: break-word;
}

/* Hero-/Seitentitel */
.page-hero-title,
.legal-hero-title,
.hero-title-static,
.hero-title,
main h1:first-of-type,
article h1:first-of-type {
  line-height: 0.96;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* Einleitungs- und Fließtext */
.page-copy,
.legal-copy,
.legal-intro,
main p,
article p,
section p,
main li,
article li,
section li {
  line-height: 1.72;
}

/* Lesebreite für juristische Inhalte */
.legal-content,
.legal-wrapper,
.legal-text,
main .content,
article .content,
main article,
main section>.max-w-4xl,
main section>.max-w-5xl {
  max-width: 52rem;
}

/* Überschriften-Hierarchie */
.legal-content h2,
.legal-wrapper h2,
.legal-text h2,
main h2,
article h2,
section h2 {
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.legal-content h3,
.legal-wrapper h3,
.legal-text h3,
main h3,
article h3,
section h3 {
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-content h4,
.legal-wrapper h4,
.legal-text h4,
main h4,
article h4,
section h4 {
  line-height: 1.25;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Absätze und Listen rhythmischer */
.legal-content p,
.legal-wrapper p,
.legal-text p,
main p,
article p,
section p,
main ul,
main ol,
article ul,
article ol,
section ul,
section ol {
  margin-bottom: 1rem;
}

main ul,
main ol,
article ul,
article ol,
section ul,
section ol {
  padding-left: 1.25rem;
}

main li,
article li,
section li {
  margin-bottom: 0.4rem;
}

/* Links lesbarer */
main a,
article a,
section a {
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

/* Tabellen, falls vorhanden */
main table,
article table,
section table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

main th,
main td,
article th,
article td,
section th,
section td {
  padding: 0.85rem 0.75rem;
  vertical-align: top;
  text-align: left;
}

/* Kleinere Geräte */
@media (max-width: 767px) {

  .legal-content,
  .legal-wrapper,
  .legal-text,
  main .content,
  article .content,
  main article,
  main section>.max-w-4xl,
  main section>.max-w-5xl {
    max-width: 100%;
  }

  .legal-content h2,
  .legal-wrapper h2,
  .legal-text h2,
  main h2,
  article h2,
  section h2 {
    margin-top: 2.25rem;
    margin-bottom: 0.85rem;
  }

  .legal-content h3,
  .legal-wrapper h3,
  .legal-text h3,
  main h3,
  article h3,
  section h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.65rem;
  }

  .page-copy,
  .legal-copy,
  .legal-intro,
  main p,
  article p,
  section p,
  main li,
  article li,
  section li {
    line-height: 1.65;
  }
}

/* =========================
   Legal pages: centering fix
   ========================= */

.legal-content-shell {
  width: 100%;
  max-width: 70rem;
  margin-inline: auto;
}

.legal-card {
  width: 100%;
  margin-inline: auto;
}

/* =========================
   Legal pages: premium hero
   ========================= */

.legal-hero {
  position: relative;
  margin-top: 80px;
  min-height: clamp(24rem, 60vh, 38rem);
  overflow: hidden;
}

.legal-hero .hero-image-container {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.legal-hero .hero-picture,
.legal-hero .hero-image-responsive {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.legal-hero .hero-picture {
  display: block;
}

.legal-hero .hero-image-responsive {
  object-fit: cover;
  object-position: center center;
  display: block;
}

html.dark .legal-hero .hero-image-responsive {
  object-position: center 32%;
}

html.light .legal-hero .hero-image-responsive {
  object-position: center 30%;
}

.legal-hero-content {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: 1rem;
  pointer-events: none;
}

.legal-hero-panel {
  width: min(100%, 34rem);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border-radius: 1.5rem;
  text-align: center;
  pointer-events: auto;
  transition:
    background 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    transform 0.35s ease;
}

.legal-hero-title {
  font-size: clamp(1.875rem, 4vw, 3rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 0.15rem;
}

.legal-hero-line {
  width: 4rem;
  height: 1px;
  margin: 1rem auto 0;
}

/* Dark legal hero */
html.dark .legal-hero {
  background: #050914;
}

html.dark .legal-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(5, 9, 20, 0.12) 0%,
      rgba(5, 9, 20, 0.03) 45%,
      rgba(5, 9, 20, 0.86) 100%);
}

html.dark .legal-hero-panel {
  background: rgba(10, 16, 28, 0.34);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.24),
    0 8px 18px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

html.dark .legal-hero-panel:hover {
  background: rgba(10, 16, 28, 0.44);
}

html.dark .legal-hero-title {
  color: #ffffff;
}

html.dark .legal-hero-line {
  background: rgba(212, 175, 55, 0.82);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.18);
}

/* Light legal hero */
html.light .legal-hero {
  background: linear-gradient(180deg, #f8fafc 0%, #eef3f9 100%);
}

html.light .legal-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(255, 255, 255, 0.10) 0%,
      rgba(255, 255, 255, 0.03) 38%,
      rgba(248, 250, 252, 0.86) 100%);
}

html.light .legal-hero-panel {
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow:
    0 22px 50px rgba(15, 23, 42, 0.10),
    0 8px 18px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.40);
}

html.light .legal-hero-panel:hover {
  background: rgba(255, 255, 255, 0.52);
}

html.light .legal-hero-title {
  color: #0f172a;
}

html.light .legal-hero-line {
  background: rgba(212, 175, 55, 0.88);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.15);
}

@media (max-width: 767px) {
  .legal-hero {
    min-height: 22rem;
  }

  .legal-hero-panel {
    padding: 1.75rem 1.25rem;
    border-radius: 1.25rem;
  }

  .legal-hero-line {
    width: 3rem;
    margin-top: 0.85rem;
  }
}
