/* ============================================================
   PAGE-LEGAL.CSS (MODERN & EINHEITLICH)
   ------------------------------------------------------------
   Spezifische Stile für rechtliche Seiten (Impressum, AGB, Datenschutz).
   Fokus: ruhige Typografie, klare Abstände, dezente Flächen,
   hochwertige Kacheln und saubere Link-/Focus-States.
============================================================ */

:root {
  --legal-max-width: 980px;
  --legal-content-width: 820px;
  --legal-padding-x: 1.25rem;

  --legal-hero-padding-top: 4.25rem;
  --legal-hero-padding-bottom: 3.25rem;

  --legal-title-size: clamp(2.1rem, 3.2vw, 3rem);
  --legal-lead-size: clamp(1.02rem, 1.1vw, 1.15rem);

  --legal-grid-gap: 1.25rem;
  --legal-tile-radius: 18px;
  --legal-border: var(--border-color);

  --legal-surface: color-mix(in srgb, var(--background) 96%, #000 4%);
  --legal-surface-2: color-mix(in srgb, var(--background) 92%, #000 8%);
}

/* 1) Hero
   ------------------------------------------------------------ */
.page-hero {
  background: var(--background);
  padding: var(--legal-hero-padding-top) var(--legal-padding-x) var(--legal-hero-padding-bottom);
  text-align: center;
}

.page-hero h1 {
  font-size: var(--legal-title-size);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 auto 1rem;
  color: var(--foreground);
  max-width: 820px;
}

.page-hero p {
  font-size: var(--legal-lead-size);
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.65;
}

.page-hero .last-updated {
  margin: 0.75rem auto 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* 2) Info-Grid (Kachel-Layout)
   ------------------------------------------------------------ */
.info-grid {
  max-width: var(--legal-max-width);
  margin: 0 auto;
  padding: 0 var(--legal-padding-x) 3.5rem;

  display: grid;
  grid-template-columns: 1fr;
  gap: var(--legal-grid-gap);
}

@media (min-width: 640px) {
  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

.info-tile {
  background: var(--legal-surface);
  border: 1px solid var(--legal-border);
  border-radius: var(--legal-tile-radius);
  padding: 1.6rem;

  text-align: left;
  text-decoration: none;
  color: inherit;

  display: flex;
  flex-direction: column;
  gap: 0.85rem;

  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.04),
    0 10px 30px rgba(0, 0, 0, 0.06);

  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.info-tile:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.04),
    0 18px 42px rgba(0, 0, 0, 0.10);
  border-color: color-mix(in srgb, var(--legal-border) 70%, #000 30%);
}

.info-tile:focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: 4px;
}

.info-tile .icon-wrapper {
  background-color: color-mix(in srgb, var(--accent) 88%, #000 12%);
  color: var(--btn-text);

  width: 46px;
  height: 46px;
  border-radius: 14px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid color-mix(in srgb, var(--accent) 70%, #000 30%);
}

.info-tile .icon-wrapper svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.info-tile h3 {
  font-size: 1.1rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--foreground);
}

.info-tile span {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.info-tile a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  font-weight: 650;
}

/* 3) Inhalt (Fließtext)
   ------------------------------------------------------------ */
.content-section {
  max-width: var(--legal-content-width);
  margin: 0 auto;
  padding: 0 var(--legal-padding-x) 5rem;

  color: var(--foreground);
  line-height: 1.75;
  font-size: 1.0625rem;
}

.content-section h2 {
  font-size: clamp(1.35rem, 1.6vw, 1.75rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;

  margin: 2.25rem 0 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--legal-border);
  color: var(--foreground);
}

.content-section p,
.content-section ul {
  margin: 0 0 1.15rem;
}

.content-section ul {
  padding-left: 1.25rem;
  color: var(--text-secondary);
}

.content-section li {
  margin: 0.55rem 0;
}

.content-section a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  font-weight: 650;
  transition: text-decoration-thickness 0.15s ease;
}

.content-section a:hover {
  text-decoration-thickness: 2px;
}

.content-section a:focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: 3px;
  border-radius: 8px;
}

/* 4) Responsive
   ------------------------------------------------------------ */
@media (max-width: 480px) {
  :root {
    --legal-padding-x: 1rem;
    --legal-hero-padding-top: 3.75rem;
    --legal-hero-padding-bottom: 3rem;
    --legal-grid-gap: 1rem;
  }

  .info-tile {
    padding: 1.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .info-tile,
  .content-section a {
    transition: none;
  }
  .info-tile:hover {
    transform: none;
  }
}