/* ============================================================
   legal.css - Eigenstaendige Rechtsseiten (Impressum/Datenschutz)
   Uebernimmt Farben und Typografie aus app.css, ohne deren
   Vollbild-Buehne (body{overflow:hidden}) mitzuschleppen.
   ============================================================ */

:root {
  --brand-red:  #C90513;
  --brand-blue: #3172B6;
  --ink:        #0e1216;
  --paper:      #e9edf2;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.62;
}

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

.legal__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem 1.2rem;
  max-width: 780px;
  margin: 0 auto;
  padding: 1.6rem 1.4rem .4rem;
  font-size: .74rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: rgba(255,255,255,.62);
}

.legal__brand { font-weight: 700; letter-spacing: .12em; color: #fff; }

.legal__back {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.28);
  transition: color 160ms ease, border-color 160ms ease;
}

.legal__back:hover,
.legal__back:focus-visible { color: #fff; border-color: #fff; }

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

.legal {
  max-width: 780px;
  margin: 0 auto;
  padding: 1rem 1.4rem 4rem;
  font-size: .92rem;
}

.legal__title {
  margin: 0 0 1.6rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .01em;
}

.legal__title::after {
  content: "";
  display: block;
  width: 2.6rem; height: 2px;
  margin-top: .6rem;
  background: var(--brand-red);
}

.legal h2 {
  margin: 2rem 0 .4rem;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.62);
}

.legal h2:first-of-type { margin-top: 0; }

/* Dritte Ebene: Zwischenueberschriften innerhalb einer Gesellschaft
   ("Kontakt", "Registereintrag"). Entspricht .dlg__body h4 in app.css. */
.legal h3 {
  margin: 1.1rem 0 .3rem;
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.62);
}

.legal h3:first-child { margin-top: 0; }

.legal p  { margin: 0 0 .8rem; }
.legal ul { margin: 0 0 .8rem; padding-left: 1.15rem; }
.legal li { margin-bottom: .2rem; }
.legal a  { color: #9cc4ea; }

/* ---------- Impressum: zwei Gesellschaften ---------- */

/* Vorspann ueber beiden Spalten -- gilt fuer SAFECOR und Contecon. */
.legal__lead {
  margin: 0 0 1.2rem;
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.62);
}

/* auto-fit legt die Spalten unterhalb von rund 34rem automatisch
   untereinander, Reihenfolge bleibt SAFECOR vor Contecon. */
.legal__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.4rem 2.4rem;
}

/* Firmenname als Spaltenkopf: hebt sich bewusst von den grauen
   Zwischenueberschriften ab, damit die Zuordnung eindeutig ist.
   Gleiche Gestaltung wie .dlg__col > h3 im Popup. */
.legal__col > h2 {
  margin: 0 0 .5rem;
  padding-bottom: .3rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
  font-size: .95rem;
  text-transform: none;
  letter-spacing: .01em;
  color: var(--paper);
}

/* ---------- Fusszeile ---------- */

.legal__foot {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.1rem;
  max-width: 780px;
  margin: 0 auto;
  padding: 1.4rem 1.4rem 2.4rem;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .74rem;
  letter-spacing: .02em;
  color: rgba(255,255,255,.68);
}

.legal__foot a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.28);
  transition: color 160ms ease, border-color 160ms ease;
}

.legal__foot a:hover,
.legal__foot a:focus-visible { color: #fff; border-color: #fff; }

/* ---------- Barrierefreiheit ---------- */

:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
