/* Rechtstext-Vorlage (page-rechtstext.php): Impressum, Datenschutz, AGB, Widerrufsbelehrung, Vertrag widerrufen,
   Versand und Zahlung. Gestaltung nach Entwurf-Artefakt "Abrakadabra Versand und Zahlung" (freigegeben
   17.11.2026): ruhiger Kopf mit Gold-Wort, Zier-Linie mit drehendem Stern, funkelnde Sterne und einmalige Funken
   (js/rechtstext.js), darunter eine Glas-Karte (.recht-karte, nicht .karte: die ist global belegt) mit sehr leisem, drehendem Leuchtrahmen.
   Der Inhalt bleibt, wie er ist (Blöcke und Shortcodes der IT-Recht-Kanzlei): deshalb wird hier nicht in
   Abschnitte verpackt, sondern der flache Textfluss gestaltet. H2 bekommt den Stern-Knopf und die Verlaufslinie,
   ab der zweiten eine Trennlinie darüber. H3/H4, Listen (auch verschachtelt), Tabellen, lange URLs, Adressblöcke
   sind ergänzt, im selben ruhigen Stil.
   Kein deckender Hintergrund: die globalen Wolken (.blobs) leuchten durch. Alles unter .neu-recht, Keyframes nre-. */
@property --nre-w { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

@keyframes nre-auftritt { from { opacity: 0; transform: translateY(14px); letter-spacing: .02em; } }
@keyframes nre-linie { from { transform: scaleX(0); } }
@keyframes nre-stern { to { transform: rotate(360deg); } }
@keyframes nre-glitzern { 50% { opacity: .06; transform: scale(.6) rotate(45deg); } }
@keyframes nre-drehen { to { --nre-w: 360deg; } }

@layer komponenten {
.neu-recht {
  --nacht: #140821; --ink: #F2ECFF; --ink-2: #B8A9D0; --fliess: #DCD0EE;
  --magenta: #D946EF; --magenta-hell: #F5C6FB; --violett: #B447EB; --indigo: #5C2EB8;
  --gold: #FFC61A; --gold-hell: #FFE08A;
  --glas: rgb(31 15 46 / .5); --linie: rgb(255 255 255 / .12);
  --font-head: Montserrat, system-ui, sans-serif; --font-body: 'Space Grotesk', system-ui, sans-serif;
  --gutter-l: clamp(16px, 5vw, 48px); --gutter-r: clamp(16px, 5vw, 48px);
  /* Eigene Ebene über den Hintergrund-Wolken (.blobs), ohne eigene Fläche */
  position: relative; z-index: 1;
  color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
  padding-block: clamp(56px, 8vw, 104px) clamp(72px, 10vw, 140px);
}
.neu-recht *, .neu-recht *::before, .neu-recht *::after { box-sizing: border-box; }
.neu-recht .recht-innen { width: 100%; max-width: 860px; margin-inline: auto; }
.neu-recht .gold { background: linear-gradient(100deg, var(--gold), var(--gold-hell) 40%, var(--magenta-hell)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Kopf */
.neu-recht .recht-kopf { position: relative; text-align: center; display: grid; justify-items: center; padding-bottom: clamp(36px, 5vw, 56px); }
.neu-recht .recht-kopf h1 {
  position: relative; z-index: 1; margin: 0; max-width: 100%;
  font-family: var(--font-head); font-weight: 900; letter-spacing: -.02em; text-wrap: balance; color: var(--ink);
  /* Größe nach dem längsten Wort (--zeichen aus der Vorlage), damit lange Komposita nie überstehen */
  font-size: min(clamp(38px, 6.4vw, 84px), calc(min(100vw - 2 * var(--gutter-l), 860px) / (var(--zeichen, 8) * .73)));
  line-height: .98; text-transform: uppercase; hyphens: manual; overflow-wrap: break-word;
  text-shadow: 0 4px 40px rgb(20 8 33 / .6);
  animation: nre-auftritt 1.1s cubic-bezier(.2, .8, .2, 1) both;
}
.neu-recht .recht-kopf h1 .gold { text-shadow: none; filter: drop-shadow(0 0 28px rgb(255 198 26 / .3)); }
.neu-recht .zier { position: relative; z-index: 1; margin-top: 26px; display: flex; align-items: center; gap: 14px; color: var(--gold); font-size: 16px; line-height: 1; text-shadow: 0 0 12px var(--gold), 0 0 26px var(--magenta); }
.neu-recht .zier::before, .neu-recht .zier::after { content: ""; width: clamp(60px, 12vw, 140px); height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); transform-origin: right; animation: nre-linie 1.2s .35s cubic-bezier(.2, .8, .2, 1) both; }
.neu-recht .zier::after { background: linear-gradient(270deg, transparent, var(--gold)); transform-origin: left; }
.neu-recht .zier span { display: inline-block; animation: nre-stern 9s linear infinite; }
.neu-recht .sterne { position: absolute; inset: -10% 0 0; pointer-events: none; }
.neu-recht .sterne i { position: absolute; color: var(--gold-hell); font-style: normal; font-size: var(--g, 12px); line-height: 1; opacity: .5; text-shadow: 0 0 10px var(--gold); animation: nre-glitzern 3.6s ease-in-out infinite; }
.neu-recht .recht-kopf canvas { position: absolute; left: 0; top: -20%; width: 100%; height: 140%; pointer-events: none; z-index: 2; }

/* ---------- Glas-Karte (.recht-karte, nicht .karte: die ist global belegt) mit sehr leisem, drehendem Leuchtrahmen */
.neu-recht .recht-karte { position: relative; border-radius: 28px; box-shadow: 0 60px 120px -50px rgb(0 0 0 / .9), 0 0 120px -50px rgb(217 70 239 / .45); }
.neu-recht .recht-karte::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; padding: 1.5px; border-radius: inherit;
  background: conic-gradient(from var(--nre-w), rgb(217 70 239 / .7), rgb(255 198 26 / .6), rgb(180 71 235 / .25), rgb(92 46 184 / .2), rgb(217 70 239 / .7));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: nre-drehen 18s linear infinite;
}
.neu-recht .recht-karte-innen {
  position: relative; border-radius: 28px; border: 1px solid transparent;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgb(217 70 239 / .1), transparent 70%), var(--glas);
  -webkit-backdrop-filter: blur(18px) saturate(130%); backdrop-filter: blur(18px) saturate(130%);
  padding: clamp(28px, 5vw, 64px) clamp(20px, 6vw, 80px);
}

/* ---------- Textfluss in der Karte */
.neu-recht .recht-text { color: var(--fliess); font-size: clamp(16px, 1.25vw, 17.5px); line-height: 1.7; overflow-wrap: break-word; hyphens: auto; hyphenate-limit-chars: 8 4 4; min-width: 0; }
.neu-recht .recht-text > :first-child, .neu-recht .recht-text > :first-child > :first-child { margin-top: 0; }
.neu-recht .recht-text :where(p, ul, ol, h3, h4, h5, h6, address, blockquote, .formular, .formular-erfolg) { max-width: 68ch; }
.neu-recht .recht-text :where(p, address, blockquote) { margin: 16px 0 0; }
.neu-recht .recht-text p:not(:where(.formular *, .formular-erfolg *)) { color: var(--fliess); font-size: inherit; line-height: 1.7; text-wrap: pretty; }
.neu-recht .recht-text address { font-style: normal; }
.neu-recht .recht-text blockquote { padding: 4px 0 4px 18px; border-left: 2px solid rgb(255 198 26 / .45); }
.neu-recht .recht-text strong, .neu-recht .recht-text b { color: var(--ink); font-weight: 700; }
.neu-recht .recht-text em { font-style: italic; }
/* Lange Links und URLs umbrechen statt die Karte aufzuschieben */
.neu-recht .recht-text a:not(.zurueck, .btn) { color: var(--gold-hell); text-decoration: underline; text-decoration-color: rgb(255 224 138 / .45); text-underline-offset: 3px; overflow-wrap: anywhere; transition: color .2s, text-decoration-color .2s; }
.neu-recht .recht-text a:not(.zurueck, .btn):hover { color: var(--magenta-hell); text-decoration-color: currentColor; }
.neu-recht .recht-text hr { margin: clamp(32px, 4vw, 44px) 0; border: 0; height: 1px; background: var(--linie); }

/* Überschriften: H2 mit Stern-Knopf und Verlaufslinie (Entwurf), ab der zweiten mit Trennlinie darüber.
   Eine H1 innerhalb des Inhalts (z. B. aus einem Shortcode) sieht aus wie eine H2. */
.neu-recht .recht-text :is(h1, h2) {
  display: flex; align-items: center; gap: 14px;
  margin: clamp(36px, 5vw, 52px) 0 0; padding-top: clamp(36px, 5vw, 52px); border-top: 1px solid var(--linie);
  font-family: var(--font-head); font-weight: 900; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.1;
  text-transform: uppercase; letter-spacing: .02em; color: var(--ink); text-wrap: balance;
  hyphens: auto; overflow-wrap: break-word;
}
.neu-recht .recht-text > :is(h1, h2):first-child, .neu-recht .recht-text > :first-child > :is(h1, h2):first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.neu-recht .recht-text :is(h1, h2)::before {
  content: "\2726"; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  font-size: 16px; color: var(--gold); background: rgb(20 8 33 / .55); border: 1px solid rgb(255 198 26 / .4);
  box-shadow: 0 0 24px -4px rgb(255 198 26 / .45); text-shadow: 0 0 10px var(--gold);
  letter-spacing: 0;
}
.neu-recht .recht-text :is(h1, h2)::after { content: ""; flex: 1 1 0; height: 1px; min-width: 0; background: linear-gradient(90deg, rgb(217 70 239 / .6), transparent); }
.neu-recht .recht-text :is(h1, h2) + * { margin-top: 18px; }
.neu-recht .recht-text h3 { margin: 32px 0 0; font-family: var(--font-head); font-weight: 800; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.3; letter-spacing: 0; color: var(--gold-hell); text-wrap: balance; }
.neu-recht .recht-text :is(h4, h5, h6) { margin: 24px 0 0; font-family: var(--font-head); font-weight: 800; font-size: 13px; line-height: 1.4; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.neu-recht .recht-text :is(h3, h4, h5, h6) + * { margin-top: 10px; }

/* Listen: oberste Ebene als Stern-Zeilen (Entwurf), verschachtelte ruhig mit kleinem Punkt */
.neu-recht .recht-text :is(ul, ol) { margin: 16px 0 0; padding: 0; }
.neu-recht .recht-text ul:not(:where(li *)) { list-style: none; display: grid; gap: 10px; }
.neu-recht .recht-text ul:not(:where(li *)) > li { position: relative; padding: 12px 18px 12px 46px; border-radius: 14px; background: rgb(255 255 255 / .035); border: 1px solid rgb(255 255 255 / .06); transition: border-color .3s, background .3s; }
.neu-recht .recht-text ul:not(:where(li *)) > li:hover { border-color: rgb(255 198 26 / .35); background: rgb(255 255 255 / .06); }
.neu-recht .recht-text ul:not(:where(li *)) > li::before { content: "\2726"; position: absolute; left: 18px; top: 12px; color: var(--gold); font-size: 13px; line-height: 1.7rem; text-shadow: 0 0 8px rgb(255 198 26 / .7); }
.neu-recht .recht-text ol { padding-left: 2em; }
.neu-recht .recht-text ol > li { padding-left: .3em; }
.neu-recht .recht-text ol > li::marker { color: var(--gold); font-family: var(--font-head); font-weight: 800; }
.neu-recht .recht-text ol > li + li { margin-top: 8px; }
.neu-recht .recht-text li { color: var(--fliess); line-height: 1.7; }
.neu-recht .recht-text li > :first-child { margin-top: 0; }
.neu-recht .recht-text li :is(ul, ol) { margin-top: 8px; }
.neu-recht .recht-text li ul { list-style: none; padding-left: 4px; }
.neu-recht .recht-text li ul > li { position: relative; padding-left: 20px; }
.neu-recht .recht-text li ul > li + li { margin-top: 6px; }
.neu-recht .recht-text li ul > li::before { content: ""; position: absolute; left: 4px; top: .78em; width: 6px; height: 6px; border-radius: 50%; background: var(--magenta); box-shadow: 0 0 8px rgb(217 70 239 / .7); }

/* Tabellen: schmal genug für jede Breite, Zellen brechen um */
.neu-recht .recht-text table { width: 100%; margin: 20px 0 0; border-collapse: separate; border-spacing: 0; border: 1px solid rgb(255 255 255 / .1); border-radius: 14px; overflow: clip; font-size: .92em; line-height: 1.55; }
.neu-recht .recht-text :is(th, td) { padding: 10px 14px; text-align: left; vertical-align: top; overflow-wrap: anywhere; hyphens: auto; border-bottom: 1px solid rgb(255 255 255 / .07); }
.neu-recht .recht-text tr:last-child > :is(th, td) { border-bottom: 0; }
.neu-recht .recht-text :is(th, td) + :is(th, td) { border-left: 1px solid rgb(255 255 255 / .07); }
.neu-recht .recht-text th, .neu-recht .recht-text thead td { background: rgb(255 255 255 / .05); color: var(--ink); font-family: var(--font-head); font-weight: 800; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; hyphens: manual; overflow-wrap: break-word; }
.neu-recht .recht-text tbody tr:nth-child(even) > td { background: rgb(255 255 255 / .02); }

/* Texte der IT-Recht-Kanzlei: Stand-Zeile leise */
.neu-recht .recht-text #itkanzlei_txt_copyright { color: var(--ink-2); }
.neu-recht .recht-text img { max-width: 100%; height: auto; }

/* Hinweis-Kasten und Zurück-Knopf (bestehende Klassen im Inhalt) */
.neu-recht .platzhalter-hinweis { margin: 0 0 clamp(24px, 4vw, 40px); padding: 20px 22px; border-radius: 18px; border: 1px dashed rgb(217 70 239 / .5); background: rgb(217 70 239 / .08); }
.neu-recht .platzhalter-hinweis strong { display: block; margin-bottom: 8px; font-family: var(--font-head); font-weight: 900; font-size: 13px; letter-spacing: .1em; color: var(--magenta); }
.neu-recht .platzhalter-hinweis p { margin-top: 0; color: var(--ink-akzent, #E4D8F5); }
.neu-recht .recht-text .zurueck { display: inline-block; margin-top: clamp(30px, 5vw, 50px); padding: 12px 20px; border-radius: 999px; border: 1px solid rgb(255 255 255 / .16); font-family: var(--font-head); font-weight: 800; font-size: 12px; letter-spacing: .12em; color: var(--ink); transition: border-color .25s, color .25s; }
.neu-recht .recht-text .zurueck:hover { border-color: var(--magenta); color: var(--magenta); }

/* Formular (Vertrag widerrufen): bleibt das globale, nur Abstand */
.neu-recht .recht-text .formular, .neu-recht .recht-text .formular-erfolg { margin-top: 24px; }

/* Einblenden beim Scrollen, nur wenn die Karte beim Laden unterhalb des Fensters liegt (js/rechtstext.js) */
.neu-recht .zeigen { transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.neu-recht.nre-js .zeigen.wartet { opacity: .001; transform: translateY(18px); }

@media (max-width: 560px) {
  .neu-recht .recht-text ul:not(:where(li *)) > li { padding: 11px 14px 11px 40px; }
  .neu-recht .recht-text ul:not(:where(li *)) > li::before { left: 15px; }
  .neu-recht .recht-text :is(h1, h2)::before { width: 34px; height: 34px; font-size: 14px; }
  .neu-recht .recht-text :is(h1, h2) { font-size: 19px; gap: 12px; }
  .neu-recht .recht-text :is(th, td) { padding: 8px 10px; }
  .neu-recht .recht-text table { font-size: .86em; }
  .neu-recht .recht-text th, .neu-recht .recht-text thead td { font-size: 10.5px; letter-spacing: .04em; hyphens: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .neu-recht *, .neu-recht *::before, .neu-recht *::after { animation: none !important; transition: none !important; }
  .neu-recht.nre-js .zeigen.wartet { opacity: 1; transform: none; }
}
}
