/* Styling für die Rechtstexte (Impressum, Datenschutz) und die Fehlerseite
   (404.html) im Revita-Design.
   Schriften kommen lokal aus /fonts/fonts.css – kein Google Fonts, keine
   Verbindung zu Dritt-Servern. Farben aus src/index.css.
   Barrierefreiheit (M17): Alle Text-Hintergrund-Paare erreichen mindestens
   4,5:1 (WCAG 2.2 AA), Fokusrahmen mindestens 3:1 gegen ihre Umgebung. */

:root {
  --sage: #8faf9d;        /* nur dekorativ (Flächen, Rahmen) – nie für Text */
  --sage-deep: #4f6f5d;   /* Links, Akzenttexte, Buttons: 5,58:1 mit Weiß, 5,03:1 auf Creme */
  --sage-deeper: #3f5e4c; /* Hover/aktiv und Fokusrahmen: 7,20:1 mit Weiß */
  --cream: #f5f3ef;
  --cream-dark: #ebe8e2;
  --charcoal: #3a3a3a;
  --charcoal-light: #5a5a5a;
  --focus-light: #c8d9e8;                  /* Fokusrahmen auf dunklem Grund: 7,88:1 */
  --footer-text: rgba(255, 255, 255, 0.75); /* 7,23:1 auf charcoal */
  --footer-link: rgba(255, 255, 255, 0.9);  /* 9,54:1 auf charcoal */
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Mindestens bildschirmhoch als Spalte: Auf kurzen Seiten (404) wächst
   main.legal, der Footer schließt am unteren Rand ab statt mitten im Bild
   zu enden. Header und Footer bleiben volle Breite (align-items: stretch),
   der Sprunglink ist absolut positioniert und nicht betroffen. */
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Sichtbarer Tastaturfokus für alle Bedienelemente */
:focus-visible {
  outline: 2px solid var(--sage-deeper);
  outline-offset: 3px;
}

/* Sprunglink: erst bei Tastaturfokus sichtbar, führt zu <main id="inhalt"> */
.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 1rem;
  z-index: 10;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: var(--sage-deeper);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Kopfbereich */
.legal-header {
  background: #fff;
  border-bottom: 1px solid var(--cream-dark);
}
.legal-header__inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand svg { width: 40px; height: 40px; flex: none; }
.brand__name { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; color: var(--charcoal); line-height: 1.1; }
.brand__sub { font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--sage-deep); font-weight: 600; }
.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  font-size: 0.9rem;
  color: var(--sage-deep);
  text-decoration: none;
  white-space: nowrap;
}
.back-link:hover { color: var(--sage-deeper); text-decoration: underline; }

/* Inhalt */
main.legal {
  flex: 1 0 auto;  /* füllt die Höhe bis zum Footer (body als Spalte) */
  width: 100%;     /* als Flex-Element sonst nur so breit wie der Inhalt */
  max-width: 820px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}
.legal h1 {
  font-family: var(--serif);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--charcoal);
  margin: 0 0 0.35rem;
}
.legal h2 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--charcoal);
  margin: 2.4rem 0 0.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--cream-dark);
}
.legal h3 { font-size: 1.02rem; font-weight: 600; color: var(--charcoal); margin: 1.4rem 0 0.3rem; }
.legal p, .legal li { color: var(--charcoal-light); }
/* Links im Fließtext bleiben unterstrichen – Farbe allein genügt nicht (SC 1.4.1) */
.legal a { color: var(--sage-deep); text-underline-offset: 0.15em; }
.legal a:hover { color: var(--sage-deeper); }
.legal address { font-style: normal; }
/* Wörtlich zitierte Texte, z. B. die Einwilligung am Kontaktformular */
.legal blockquote {
  margin: 0.8rem 0 1rem;
  padding: 0.15rem 0 0.15rem 1rem;
  border-left: 3px solid var(--sage);
  color: var(--charcoal-light);
}
.lead { font-size: 0.95rem; color: var(--charcoal-light); margin-top: 0.25rem; }
.updated { font-size: 0.85rem; color: var(--charcoal-light); margin-top: 2.5rem; }

/* Hinweisbox */
.notice {
  background: color-mix(in srgb, var(--sage) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--sage) 35%, #fff);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0 0.5rem;
  font-size: 0.9rem;
  color: var(--charcoal);
}
.notice strong { color: var(--sage-deeper); }

/* Fußbereich */
.legal-footer {
  background: var(--charcoal);
  color: var(--footer-text);
  font-size: 0.85rem;
}
.legal-footer__inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
}
.legal-footer nav { display: flex; gap: 0.25rem 1.25rem; flex-wrap: wrap; }
/* Tap-Target mindestens 24 px hoch (SC 2.5.8) */
.legal-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.25rem 0;
  color: var(--footer-link);
  text-decoration: none;
}
.legal-footer a:hover { color: #fff; text-decoration: underline; }
/* Auf dunklem Grund ist der dunkelgrüne Fokusrahmen kaum sichtbar */
.legal-footer :focus-visible { outline-color: var(--focus-light); }

/* Fehlerseite (404.html) */
.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage-deep);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin: 2rem 0 0.5rem;
}
.legal a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.6rem;
  border: 2px solid var(--sage-deep);
  border-radius: 999px;
  background: var(--sage-deep);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.legal a.button:hover { background: var(--sage-deeper); border-color: var(--sage-deeper); color: #fff; }
.legal a.button--outline { background: transparent; color: var(--sage-deep); }
.legal a.button--outline:hover { background: #fff; color: var(--sage-deeper); }
.link-list { padding-left: 1.2rem; }
.link-list li { margin: 0.45rem 0; }
.link-list a { font-weight: 500; }

/* Keine Bewegung für Menschen, die das im System abgeschaltet haben */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .legal a.button { transition: none; }
}

@media (max-width: 560px) {
  .legal h1 { font-size: 1.7rem; }
  main.legal { padding: 2rem 1.25rem 3rem; }
}
