/* =====================================================================
   Tobias Nase – Rechtsseiten (Impressum, Datenschutz, AGB)
   Einheitliches Marken-Design; Tokens/Buttons kommen aus site.css.
   ===================================================================== */

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem 1.5rem;
}
.legal-header img { height: 34px; width: auto; display: block; }

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: all .2s ease;
}
.legal-back:hover { background: rgba(168, 85, 247, 0.16); }
.legal-back svg { width: 16px; height: 16px; }

.legal-content {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

.legal-content .eyebrow { margin-bottom: 1rem; }

.legal-content h1 {
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: 0;
  font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0;
  background: var(--grad-head);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  margin-bottom: 0.75rem;
}

.legal-meta {
  font-size: 0.95rem;
  color: var(--text-mut);
  line-height: 1.8;
  margin-bottom: 0.5rem;
}
.legal-meta strong { color: var(--text); font-weight: 600; }

.legal-subtitle {
  font-style: italic;
  color: var(--text-mut);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.legal-divider {
  height: 1px;
  background: var(--border);
  margin: 2rem 0 2.5rem;
}

.legal-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin: 2.6rem 0 0.9rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
  line-height: 1.35;
}
.legal-content h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.8rem 0 0.4rem;
}

.legal-content h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.1rem 0 0.3rem;
}

.legal-content p {
  margin-bottom: 1rem;
  color: var(--text-soft);
  font-size: 0.97rem;
  line-height: 1.75;
}

.legal-content a { color: var(--violet-3); word-break: break-word; }
.legal-content a:hover { text-decoration: underline; text-underline-offset: 2px; }

.legal-content ul {
  margin: 0 0 1rem 1.25rem;
  color: var(--text-soft);
  font-size: 0.97rem;
  line-height: 1.75;
}
.legal-content ul li { margin-bottom: 0.5rem; }
.legal-content ul li::marker { color: var(--violet-3); }

/* Nummerierte Absätze im Vertragsstil: (1), (2), … */
.legal-list {
  list-style: none;
  counter-reset: legal-counter;
  padding: 0;
  margin: 0 0 1rem;
}
.legal-list li {
  counter-increment: legal-counter;
  position: relative;
  padding-left: 48px;
  margin-bottom: 1.1rem;
  color: var(--text-soft);
  font-size: 0.97rem;
  line-height: 1.75;
}
.legal-list li:last-child { margin-bottom: 0; }
.legal-list li::before {
  content: "(" counter(legal-counter) ")";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--violet-3);
  font-weight: 500;
  font-size: 0.9rem;
}

/* Hervorgehobener Block (z. B. Widerspruchsrecht in Großbuchstaben) */
.legal-important {
  background: rgba(168, 85, 247, 0.07);
  border: 1px solid var(--border);
  border-left: 3px solid var(--violet-2);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}
.legal-important p { margin-bottom: 1rem; font-size: 0.9rem; }
.legal-important p:last-child { margin-bottom: 0; }

/* Abschluss-Block (AGB-Fußzeile im Inhalt) */
.legal-sign {
  margin-top: 4.5rem;
  padding-top: 2.2rem;
  border-top: 1px solid var(--border-2);
  text-align: center;
}
.legal-sign .name {
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0;
  font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0;
  background: var(--grad-head);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  margin-bottom: 0.6rem;
}
.legal-sign p { font-size: 0.85rem; color: var(--text-mut); line-height: 1.8; margin-bottom: 0; }
.legal-sign a { color: var(--violet-3); }
.legal-version {
  margin-top: 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mut);
}

/* Seiten-Footer */
.legal-foot {
  border-top: 1px solid var(--border);
  padding: 1.4rem 1.5rem 2rem;
}
.legal-foot p {
  max-width: var(--maxw);
  margin: 0 auto;
  font-size: 0.8rem;
  color: var(--text-mut);
}
.legal-foot a { color: var(--violet-3); }
.legal-foot a:hover { text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 640px) {
  .legal-header { padding: 1.1rem 1.25rem; }
  .legal-header img { height: 28px; }
  .legal-content { padding: 1.8rem 1.25rem 3.5rem; }
  .legal-list li { padding-left: 38px; }
  /* Kompakter Zurück-Button: nur "Zurück", einzeilig */
  .legal-back-long { display: none; }
  .legal-back { padding: 9px 14px; font-size: 13.5px; }
}

@media print {
  body { background: #fff !important; color: #000 !important; }
  .legal-content h1, .legal-sign .name { -webkit-text-fill-color: #18052D; color: #18052D; background: none; }
  .legal-content p, .legal-content li, .legal-content ul { color: #222; }
  .legal-content h2, .legal-content h3 { color: #18052D; page-break-after: avoid; }
  .legal-back, .legal-foot { display: none; }
}
