/* ==========================================================================
   legal.css: Zusatzstile für impressum.html und datenschutz.html

   Nur das, was diese beiden Textseiten zusätzlich zu assets/css/styles.css
   brauchen: Lesetypografie, Abstände, Überschriftenhierarchie im Fließtext,
   die schlanke Kopfzeile mit Zurück-Link und der Hinweiskasten auf
   datenschutz.html. Keine neuen Design-Tokens, ausschließlich die Variablen
   aus SPEC.md §2/§3 (definiert in assets/css/styles.css).

   Site-Footer und Skip-Link sind hier zusätzlich (defensiv) mitgestylt,
   falls diese Klassen in styles.css noch nicht bzw. anders benannt sind.
   Sie halten sich strikt an SPEC §5.9 und §7 und verwenden nur Tokens.
   ========================================================================== */

/* Skip-Link (A11y, SPEC §7) ------------------------------------------------ */

.skip-link {
  position: absolute;
  /* Ueber transform statt ueber einen festen Negativwert ausblenden: ein
     fester top-Wert muss die Elementhoehe raten und liess den Link vorher
     als roter Streifen oben herausragen. */
  top: 1rem;
  transform: translateY(-200%);
  left: 1rem;
  z-index: var(--z-modal);
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: var(--t-small);
  text-decoration: none;
  border-radius: var(--r-sm);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Kopfzeile ---------------------------------------------------------------- */

.legal-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1.25rem clamp(1.25rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--hairline);
}

.legal-header__logo {
  display: block;
  line-height: 0;
}

.legal-header__logo img {
  display: block;
  height: 26px;
  width: auto;
}

.legal-header__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  color: var(--ink-muted);
  font-size: var(--t-small);
  text-decoration: none;
  white-space: nowrap;
}

.legal-header__back:hover,
.legal-header__back:focus-visible {
  color: var(--ink);
}

/* Inhalt --------------------------------------------------------------- */

.legal-main {
  padding-block: clamp(3rem, 8vh, 5rem) clamp(4rem, 10vh, 6rem);
}

.legal-article {
  width: min(100% - 2.5rem, 720px);
  margin-inline: auto;
  font-variant-numeric: tabular-nums;
}

.legal-title {
  font-variation-settings: 'wdth' 120, 'wght' 800;
  font-stretch: 120%;
  font-weight: 800;
  font-size: var(--t-h2);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin: 0;
}

.legal-meta {
  display: inline-block;
  margin-top: 0.75rem;
  font-variation-settings: 'wdth' 105, 'wght' 700;
  font-stretch: 105%;
  font-weight: 700;
  font-size: var(--t-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.legal-lede {
  margin-top: 1.5rem;
  color: var(--ink-muted);
  font-size: var(--t-body);
  line-height: 1.65;
  max-width: 68ch;
  text-wrap: pretty;
}

/* Hinweiskasten (nur datenschutz.html) -------------------------------------- */

.legal-notice {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--accent);
  border-radius: var(--r-md);
}

.legal-notice p {
  margin: 0;
  color: var(--ink);
  font-size: var(--t-small);
  line-height: 1.6;
}

.legal-notice strong {
  font-variation-settings: 'wdth' 100, 'wght' 600;
  font-weight: 600;
}

/* Abschnitte im Fließtext ---------------------------------------------------- */

.legal-section {
  margin-top: clamp(2.5rem, 5vh, 3.5rem);
  padding-top: clamp(2.5rem, 5vh, 3.5rem);
  border-top: 1px solid var(--hairline);
}

.legal-article > .legal-section:first-of-type {
  margin-top: 2.5rem;
}

.legal-section h2 {
  font-variation-settings: 'wdth' 100, 'wght' 600;
  font-stretch: 100%;
  font-weight: 600;
  font-size: var(--t-h3);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0 0 1rem;
}

.legal-section h3 {
  font-variation-settings: 'wdth' 100, 'wght' 600;
  font-stretch: 100%;
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.3;
  margin: 1.75rem 0 0.5rem;
}

.legal-section p {
  color: var(--ink-muted);
  font-size: var(--t-body);
  line-height: 1.65;
  max-width: 68ch;
  text-wrap: pretty;
}

.legal-section p + p,
.legal-section address + p,
.legal-section p + address {
  margin-top: 1.1em;
}

.legal-section address {
  font-style: normal;
  color: var(--ink-muted);
  font-size: var(--t-body);
  line-height: 1.65;
}

.legal-section ul {
  margin: 1.1em 0 0;
  padding-left: 1.25rem;
  color: var(--ink-muted);
  font-size: var(--t-body);
  line-height: 1.65;
  max-width: 68ch;
}

.legal-section li + li {
  margin-top: 0.5em;
}

.legal-section strong {
  color: var(--ink);
  font-variation-settings: 'wdth' 100, 'wght' 600;
  font-weight: 600;
}

.legal-section a {
  color: var(--ink);
  text-underline-offset: 0.2em;
}

.legal-section a:hover,
.legal-section a:focus-visible {
  color: var(--accent-hot);
}
