/* Rechtliches (Datenschutz, AGB) – 07.10.2026. Text wortgleich von mdjamo.com, Gestaltung im start-v2-Look.
   Ruhiger Hero, lesefreundliche Spalte (~68 Zeichen), Inhaltsverzeichnis als feste Seitenleiste mit Scroll-Spy
   und einem Funken, der zum aktiven Abschnitt gleitet. Mobil klappt das Verzeichnis auf. Druckansicht hell. */

.recht { --spalte: 68ch; --kopf-h: 76px; }
.recht h1 em { font-style: italic; color: var(--orange); }

/* ---------- Hero ---------- */
.recht-hero { position: relative; overflow: hidden; min-height: 64svh; display: flex; align-items: end;
  padding: calc(var(--kopf-h) + clamp(4rem, 9vw, 7rem)) 0 clamp(3.5rem, 7vw, 5.5rem); }
.recht-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--abschnitt-grund); pointer-events: none; }
.recht-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%; z-index: -2;
  background: linear-gradient(180deg, transparent, var(--nacht)); pointer-events: none; }
.recht-hero__innen { position: relative; }
.recht-hero h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); max-width: 18ch; }
.recht-hero__lead { margin: 1.8rem 0 0; max-width: 40rem; font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--creme-2); }
/* großes Paragraphenzeichen als Wasserzeichen, glimmt ganz langsam */
.recht-hero__zeichen { position: absolute; right: clamp(-2rem, 4vw, 6rem); top: 50%; transform: translateY(-46%);
  font: italic 300 clamp(16rem, 34vw, 32rem)/1 var(--serif); color: transparent; -webkit-text-stroke: 1px rgba(242, 180, 52, .22);
  text-shadow: 0 0 80px rgba(238, 123, 45, .12); pointer-events: none; user-select: none; animation: recht-glimmen 9s ease-in-out infinite; }
@keyframes recht-glimmen { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

.recht__meta { list-style: none; margin: 2.4rem 0 0; padding: 1.2rem 0 0; display: flex; flex-wrap: wrap; gap: .7rem 2.2rem;
  border-top: 1px solid rgba(246, 241, 231, .08); max-width: 62rem; font-size: .86rem; color: var(--creme-2); }
.recht__meta li { display: flex; gap: .45rem; align-items: baseline; }
.meta__k { font: 600 .66rem/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.meta__w { color: var(--creme); }

/* ---------- Körper: Seitenleiste + Spalte ---------- */
.recht-koerper { position: relative; padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(5rem, 10vw, 8rem); }
.recht-koerper::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--abschnitt-grund); pointer-events: none; }
.recht-raster { display: grid; grid-template-columns: minmax(15rem, 19rem) minmax(0, 1fr); gap: clamp(2.5rem, 6vw, 6.5rem); align-items: start; }

/* Inhaltsverzeichnis */
.ivz { position: sticky; top: calc(var(--kopf-h) + 1.6rem); }
.ivz__klapp { display: flex; flex-direction: column; min-height: 0; }
.ivz__kopf { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font: 600 .74rem/1 var(--mono); letter-spacing: .28em; text-transform: uppercase; color: var(--gold); padding: 0 0 1.1rem; cursor: default; }
.ivz__kopf::-webkit-details-marker { display: none; }
.ivz__zahl { font-size: .62rem; letter-spacing: .18em; color: rgba(207, 198, 182, .55); }
.ivz__liste { position: relative; max-height: calc(100svh - var(--kopf-h) - 6.4rem); overflow-y: auto; overscroll-behavior: contain; padding: 0 .4rem 0 6px; scrollbar-width: thin; scrollbar-color: rgba(246, 241, 231, .15) transparent;
  mask-image: linear-gradient(180deg, transparent 0, #000 .8rem, #000 calc(100% - 1.6rem), transparent); }
.ivz ol { list-style: none; margin: 0; padding: .8rem 0 1.6rem; position: relative; }
.ivz ol::before { content: ""; position: absolute; left: 0; top: .8rem; bottom: 1.6rem; width: 1px; background: rgba(246, 241, 231, .1); }
.ivz a { display: grid; grid-template-columns: 2.6rem 1fr; gap: .2rem; padding: .42rem 0 .42rem 1.1rem; text-decoration: none; font-size: .86rem; line-height: 1.35;
  color: rgba(207, 198, 182, .72); transition: color .4s var(--weich), transform .5s var(--weich); }
.ivz a:hover { color: var(--creme); }
.ivz__nr { font: 600 .68rem/1.9 var(--mono); letter-spacing: .08em; color: rgba(242, 180, 52, .55); transition: color .4s; }
.ivz a.aktiv { color: var(--creme); transform: translateX(4px); }
.ivz a.aktiv .ivz__nr { color: var(--gold); }
/* Funke gleitet auf der Linie zum aktiven Eintrag */
.ivz__funke { position: absolute; left: 2px; top: 0; z-index: 2; width: 9px; height: 9px; border-radius: 50%; background: #fff4dc; opacity: 0; pointer-events: none;
  box-shadow: 0 0 6px 2px #fff1c9, 0 0 14px 4px var(--gold), 0 0 30px 10px rgba(238, 123, 45, .45);
  transition: transform .75s cubic-bezier(.6, .05, .25, 1), opacity .5s; }
.ivz__funke.an { opacity: 1; }

/* Textspalte */
.recht__text { max-width: var(--spalte); font-size: 1.02rem; line-height: 1.75; color: var(--creme-2); }
.recht__text strong { color: var(--creme); font-weight: 600; }
.recht__text a { color: var(--creme); text-decoration: none; border-bottom: 1px solid rgba(238, 123, 45, .5); transition: color .3s, border-color .3s; }
.recht__text a:hover { color: var(--gold); border-color: var(--gold); }
.recht__text code { font: .86em var(--mono); color: var(--gold); background: rgba(242, 180, 52, .08); padding: .1em .4em; border-radius: 5px; }
.recht__vorspann { font-family: var(--serif); font-weight: 300; font-size: clamp(1.2rem, 1.7vw, 1.42rem); line-height: 1.5; color: var(--creme);
  margin: 0 0 clamp(2.5rem, 5vw, 3.5rem); padding-left: 1.4rem; border-left: 2px solid; border-image: linear-gradient(var(--orange), var(--rot)) 1; }

.recht__abschnitt { scroll-margin-top: calc(var(--kopf-h) + 1.4rem); padding: clamp(2rem, 4vw, 2.8rem) 0 .4rem; border-top: 1px solid rgba(246, 241, 231, .07); }
.recht__abschnitt:first-of-type { border-top: 0; padding-top: 0; }
.recht__abschnitt h2 { font-size: clamp(1.6rem, 2.6vw, 2.15rem); line-height: 1.15; color: var(--creme); margin: 0 0 1.3rem; display: flex; gap: .9rem; align-items: baseline; }
.recht__abschnitt h2 em { font-style: italic; color: var(--orange); }
.abschnitt-nr { flex: none; min-width: 2.2rem; font: 600 .78rem/1 var(--mono); letter-spacing: .14em; color: var(--gold); transform: translateY(-.35em); }
.recht__abschnitt--anlage h2 { flex-direction: column; gap: .7rem; }
.recht__abschnitt--anlage .abschnitt-nr { transform: none; text-transform: uppercase; letter-spacing: .26em; }
.recht__abschnitt h3 { font-size: 1.3rem; color: var(--creme); margin: 1.8rem 0 .8rem; }
.recht__abschnitt p { margin: 0 0 1.05em; }

/* nummerierte Ziffern (AGB) */
.ziffer { display: grid; grid-template-columns: 3.1rem 1fr; gap: 0 .6rem; }
.ziffer__nr { font: 600 .74rem/2.4 var(--mono); letter-spacing: .06em; color: rgba(242, 180, 52, .75); }

/* Listen */
.recht__abschnitt ul { list-style: none; margin: 0 0 1.3rem; padding: 0; display: grid; gap: .5rem; }
.recht__abschnitt ul li { position: relative; padding-left: 1.5rem; }
.recht__abschnitt ul li::before { content: ""; position: absolute; left: .1rem; top: .78em; width: 7px; height: 7px; border-radius: 50%;
  border: 1.5px solid var(--orange); box-shadow: 0 0 0 4px rgba(238, 123, 45, .08); }

/* Anschriften als ruhige Karte */
.recht__abschnitt address { font-style: normal; margin: .4rem 0 1.4rem; padding: 1.2rem 1.4rem; border-radius: 16px;
  background: rgba(246, 241, 231, .04); border: 1px solid rgba(246, 241, 231, .08); color: var(--creme); line-height: 1.7; }

/* Tabellen */
.recht__tabelle { margin: 1.2rem 0 1.8rem; overflow-x: auto; border-radius: 16px; border: 1px solid rgba(246, 241, 231, .09); background: rgba(246, 241, 231, .03); }
.recht__tabelle:focus-visible { outline-offset: 2px; }
.recht__tabelle table { width: 100%; border-collapse: collapse; font-size: .88rem; line-height: 1.5; }
.recht__tabelle th, .recht__tabelle td { text-align: left; vertical-align: top; padding: .8rem 1rem; border-bottom: 1px solid rgba(246, 241, 231, .07); }
.recht__tabelle tr:last-child > * { border-bottom: 0; }
.recht__tabelle thead th { font: 600 .64rem/1.3 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); background: rgba(246, 241, 231, .03); white-space: nowrap; }
.recht__tabelle tbody th { font-family: var(--serif); font-weight: 400; font-size: 1.05rem; color: var(--orange); white-space: nowrap; }
.recht__tabelle td { color: var(--creme-2); }
.recht__tabelle tbody tr { transition: background .3s; }
.recht__tabelle tbody tr:hover { background: rgba(238, 123, 45, .05); }

.recht__stand { margin-top: clamp(3rem, 6vw, 4.5rem) !important; padding-top: 1.2rem; border-top: 1px solid rgba(246, 241, 231, .07);
  font: 500 .72rem/1.6 var(--mono); letter-spacing: .08em; color: rgba(207, 198, 182, .5); }
.recht__stand a { color: inherit; border-bottom-color: rgba(207, 198, 182, .25); }

/* Abschnitte gleiten weniger weit als auf der Startseite (lange Texte) */
.recht__abschnitt.zeigen { transform: translateY(22px); filter: blur(3px); }
.recht__abschnitt.zeigen.sichtbar { transform: none; filter: none; }

/* ---------- Mobil: Verzeichnis als Klappliste ---------- */
@media (max-width: 1000px) {
  .recht-raster { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .ivz, .recht__text { min-width: 0; }
  .ivz { position: relative; top: 0; max-height: none; }
  .ivz__klapp { border-radius: 16px; border: 1px solid rgba(246, 241, 231, .1); background: rgba(15, 30, 46, .7); }
  .ivz__kopf { padding: 1rem 1.2rem; cursor: pointer; }
  .ivz__kopf::after { content: ""; width: 9px; height: 9px; border-right: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold); transform: rotate(45deg) translateY(-3px); transition: transform .4s var(--weich); margin-left: .4rem; }
  .ivz__klapp[open] .ivz__kopf::after { transform: rotate(-135deg) translateY(-3px); }
  .ivz__zahl { margin-left: auto; }
  .ivz__liste { max-height: 60svh; padding: 0 1.2rem 0 1.3rem; }
  .ivz__funke { display: none; }
  .recht-hero__zeichen { right: -3rem; opacity: .5; }
}
@media (max-width: 560px) {
  .ziffer { grid-template-columns: 2.6rem 1fr; gap: 0 .4rem; }
  .recht__abschnitt h2 { flex-direction: column; gap: .5rem; }
  .abschnitt-nr { transform: none; }
  .recht__meta { flex-direction: column; gap: .8rem; }
  .recht__meta li { flex-direction: column; gap: .3rem; }
  .recht-hero--lang h1 { font-size: clamp(1.6rem, 6.8vw, 2.6rem); }
}
/* Handy (07.10.2026): „Automatisierungsleistungen“ passt als ganzes Wort in die Zeile (keine Trennung, kein Überstand);
   Verzeichnis-Einträge als 44-px-Tippflächen */
@media (max-width: 1000px) {
  .recht-hero--lang h1 { max-width: none; font-size: min(clamp(1.5rem, 7.1vw, 3.4rem), calc((100vw - 2 * var(--rand)) / 12.4)); }
  .ivz a { min-height: 44px; align-items: center; padding-block: .3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .recht__abschnitt.zeigen { transform: none; filter: none; opacity: 1; }
  .ivz__funke { transition: none; }
}

/* ---------- Druck: hell, ohne Kopf, Verzeichnis, Atmosphäre ---------- */
@media print {
  @page { margin: 18mm 16mm; }
  body.recht { background: #fff; color: #111; font-size: 10.5pt; }
  .kopf, .ivz, .glut, .recht-hero__zeichen, .fuss, .chat, .chat-knopf, .atmo-nebel, .atmo-nachtlicht { display: none !important; }
  .recht-hero, .recht-koerper { display: block; min-height: 0; padding: 0; }
  .recht .huelle { width: auto; margin: 0; }
  .recht-hero { margin-bottom: 8mm; }
  .recht-hero::before, .recht-hero::after, .recht-koerper::before { display: none; }
  .recht-raster { display: block; width: auto; }
  .recht-hero__innen { width: auto; }
  .zeigen, .recht__abschnitt.zeigen { opacity: 1 !important; transform: none !important; filter: none !important; }
  .eyebrow, .meta__k, .abschnitt-nr, .ziffer__nr, .ivz__nr { color: #8a5a00 !important; }
  .recht-hero h1 { font-size: 26pt; max-width: none; color: #111; }
  .recht h1 em, .recht__abschnitt h2 em { color: #b5521a; }
  .recht-hero__lead, .recht__meta, .meta__w, .recht__text, .recht__text strong, .recht__abschnitt h2, .recht__abschnitt h3, .recht__vorspann, .recht__tabelle td { color: #111 !important; }
  .recht__text { max-width: none; font-size: 10.5pt; line-height: 1.55; }
  .recht__text a { color: #111; border: 0; text-decoration: underline; }
  .recht__abschnitt { border-color: #ddd; break-inside: auto; }
  .recht__abschnitt h2 { break-after: avoid; font-size: 15pt; }
  .recht__text code { background: none; color: #111; }
  .recht__abschnitt address, .recht__tabelle { background: none; border-color: #ccc; color: #111; }
  .recht__tabelle { overflow: visible; }
  .recht__tabelle th, .recht__tabelle td { border-color: #ddd; }
  .recht__tabelle tbody th { color: #b5521a; }
  .recht__tabelle tr { break-inside: avoid; }
  .recht__stand { color: #666; }
}
