/* Projekt Doku /v2 – Logo im Kopf mit Animation «Blaupause» (gewählt von Nicolas, 12.11.2026)
   Ablauf, etwa alle 60 s (marke.js): Ein feines Planraster mit Masslinien blendet auf, darin zeichnen sich die Umrisse von Sockel und Dach,
   die Flächen setzen sich hinein, dann verschwindet der Plan wieder. Am Ende steht genau das bisherige Logo.
   Aufbau: Das Logo-PNG bleibt (gleiche Grösse, gleiches Layout). Sein Symbol wird weggeschnitten und durch dasselbe Symbol als SVG
   ersetzt (Logo_ProjektDoku_Icon.svg, gleiche Koordinaten wie im PNG). In Ruhe pixelgleich mit dem PNG (geprüft hell und dunkel).
   Hell: logo-cellus.png 1043×200, Symbol x 33–161 = SVG-Koordinaten 1:1 (viewBox 0 0 194 200).
   Dunkel: projektdoku-logo-hell.png 945×150, Symbol x 0–128, y 1–150 (viewBox auf die Formen zugeschnitten).
   «Weniger Bewegung» im System: nur Überblendungen (Raster und Umrisse blenden ein, Flächen aus und wieder ein), nichts zeichnet oder bewegt sich. */

.pd-marke { --basis: #373735; --dach: #dfe46f; --dach-linie: #b3b92c; }
:root[data-thema="dunkel"] .pd-marke { --basis: #f5f7f6; --dach-linie: var(--dach); }

.pd-marke-rahmen { position: relative; display: block; line-height: 0; }
.pd-marke-rahmen > img { clip-path: inset(0 0 0 17.45%); }
.pd-marke-rahmen > img.pd-logo-dunkel { clip-path: inset(0 0 0 15.77%); }

.pd-marke-icon { position: absolute; left: 0; top: 0; width: 18.6%; height: 100%; overflow: visible; pointer-events: none; }
.pd-marke-icon.pd-logo-dunkel { top: .667%; width: 13.545%; height: 99.33%; }
.pd-marke-basis { fill: var(--basis); transform-box: fill-box; transform-origin: 50% 50%; }
.pd-marke-dach { fill: var(--dach); transform-box: fill-box; transform-origin: 50% 50%; }
.pd-linie { fill: none; stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.pd-linie-b { stroke: var(--basis); }
.pd-linie-d { stroke: var(--dach-linie); }   /* auf hellem Grund ein kräftigeres Gelb, sonst ist die Linie kaum zu sehen */
.pd-raster { opacity: 0; stroke: var(--pd-primary, #899883); stroke-width: 1; vector-effect: non-scaling-stroke; fill: none; }
.pd-raster .pd-mass { stroke: var(--dach-linie); stroke-width: 1.5; }

/* Ablauf 2,7 s: Raster 0–2,7 s, Sockel zeichnet 0,55–1,45 s, Dach 0,85–1,75 s, Flächen ab 1,75 s, Umrisse weg ab 2,05 s */
.pd-marke.spielt .pd-raster { animation: pd-raster 2.7s ease-in-out both; }
.pd-marke.spielt .pd-marke-basis, .pd-marke.spielt .pd-marke-dach { animation: pd-flaeche-aus .3s ease-out forwards, pd-flaeche-ein .6s cubic-bezier(.2, .8, .2, 1) 1.75s forwards; }
.pd-marke.spielt .pd-marke-dach { animation-delay: 0s, 1.9s; }
.pd-marke.spielt .pd-linie-b { animation: pd-zeichnen .9s cubic-bezier(.6, 0, .3, 1) .55s both, pd-weg .5s ease-in 2.05s forwards; }
.pd-marke.spielt .pd-linie-d { animation: pd-zeichnen .9s cubic-bezier(.6, 0, .3, 1) .85s both, pd-weg .5s ease-in 2.2s forwards; }
@keyframes pd-raster { 0% { opacity: 0; } 25%, 70% { opacity: .55; } 100% { opacity: 0; } }
@keyframes pd-zeichnen { 0% { stroke-dashoffset: 1; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 1; } }
@keyframes pd-weg { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes pd-flaeche-aus { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes pd-flaeche-ein { 0% { opacity: 0; transform: scale(.96); } 70% { opacity: 1; transform: scale(1.015); } 100% { opacity: 1; transform: none; } }

/* Weniger Bewegung: dieselbe Geschichte nur mit Überblendungen */
@media (prefers-reduced-motion: reduce) {
  .pd-marke.spielt .pd-linie { stroke-dashoffset: 0; }
  .pd-marke.spielt .pd-linie-b, .pd-marke.spielt .pd-linie-d { animation: pd-ruhig-linie 2.7s ease-in-out both; }
  .pd-marke.spielt .pd-marke-basis, .pd-marke.spielt .pd-marke-dach { animation: pd-ruhig-flaeche 2.7s ease-in-out both; }
}
@keyframes pd-ruhig-linie { 0%, 15% { opacity: 0; } 35%, 70% { opacity: 1; } 90%, 100% { opacity: 0; } }
@keyframes pd-ruhig-flaeche { 0% { opacity: 1; } 25%, 60% { opacity: 0; } 85%, 100% { opacity: 1; } }
