/* =================================================================
   AGB – seitenspezifische Styles
   Basis: /includes/global.css (nur dort definierte Tokens verwenden)

   Der Block ist bewusst als wiederverwendbare .legal-Komponente
   aufgebaut, damit impressum.inc.css / datenschutz.inc.css später
   darauf umziehen können.
   ================================================================= */

/* -----------------------------------------------------------------
   1. Seitenkopf
   global.css setzt "section h1, section h2" hart auf Hey Lovely /
   3.5rem. Für Rechtstexte wird das auf die Display-Schrift
   zurückgesetzt (Spezifität 0-1-1 schlaegt 0-0-2, kein !important).
   ----------------------------------------------------------------- */

.pagehead--legal h1 {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.012em;
  margin: 0;
}

.pagehead--legal .divider {
  margin-block: var(--sp-s) var(--sp-m);
}

.legal__address {
  font-family: var(--font-display);
  font-style: normal;
  font-size: var(--fs-lead);
  line-height: 1.65;
  color: var(--c-ink-soft);
  margin: 0;
}

/* -----------------------------------------------------------------
   2. Textkörper
   ----------------------------------------------------------------- */

.legal {
  counter-reset: legal-item;
}

.legal__item {
  counter-increment: legal-item;
  padding-block: var(--sp-l);
  border-top: 1px solid var(--c-sand);
  scroll-margin-top: calc(var(--nav-h) + var(--sp-s));
}

.legal__item:first-child {
  border-top: 0;
  padding-top: 0;
}

/* Automatische Nummerierung: 01, 02, 03 … */
.legal__num {
  font-size: 0.625rem;
  color: var(--c-olive);
  margin: 0 0 var(--sp-2xs);
}

.legal__num::before {
  content: counter(legal-item, decimal-leading-zero);
}

.legal__item h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.008em;
  color: var(--c-ink);
  margin: 0 0 var(--sp-s);
}

.legal__item p {
  max-width: none;
}

.legal__item p:last-child {
  margin-bottom: 0;
}

.legal__item .list-clean {
  margin-block: var(--sp-s);
  max-width: none;
}

.legal__item .aside-note {
  margin-block: var(--sp-m) 0;
  max-width: none;
}

/* -----------------------------------------------------------------
   3. Fußzeile des Textes
   ----------------------------------------------------------------- */

.legal__meta {
  margin: var(--sp-l) 0 0;
  padding-top: var(--sp-m);
  border-top: 1px solid var(--c-sand);
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  color: var(--c-olive);
}

.legal__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-s);
  margin: var(--sp-xs) 0 0;
  font-size: var(--fs-small);
}

.legal__links a {
  color: var(--c-brown);
  text-decoration: none;
  border-bottom: 1px solid var(--c-taupe);
  padding-bottom: 2px;
  transition: color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease);
}

.legal__links a:hover {
  color: var(--c-ink);
  border-bottom-color: var(--c-brown);
}

/* -----------------------------------------------------------------
   4. Print
   ----------------------------------------------------------------- */

@media print {
  .pagehead--legal {
    padding-block: 0 var(--sp-m);
    background: none;
  }

  .legal__item {
    break-inside: avoid;
    padding-block: var(--sp-m);
  }

  .legal__links {
    display: none;
  }
}
