/* ══════════════════════════════════════════════
   STARTSEITE PL – BEWEGUNG
   Übernommen von ki-content-partner.de (css/main.css, Abschnitt "ANIMIERTE ICONS"
   und "STARTSEITE – BEWEGUNG"), angepasst an die .pl-home-Struktur.
   Start via js/animated-icons.js (.anim-ready → .is-visible).
   Ohne JS oder bei reduced motion: alles sofort sichtbar.
   ══════════════════════════════════════════════ */

/* 1) Animierte Icons (.ai) – Einzeichnen beim Scrollen, danach dezente Dauerschleife */
.ai {
  --ai-size: 64px;
  --ai-line: #031C41;
  --ai-accent: #B51B48;
  width: var(--ai-size); height: var(--ai-size); display: block; flex-shrink: 0;
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.ai svg { width: 100%; height: 100%; overflow: visible; }
.ai .l, .ai .a { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ai .l { stroke: var(--ai-line); }
.ai .a { stroke: var(--ai-accent); }
.ai .af { fill: var(--ai-accent); }
.ai .ring { stroke-width: 2.4; transform-origin: 60px 60px; transform: rotate(-90deg); }

.ai :is(.l,.a) { stroke-dasharray: 1; stroke-dashoffset: 1; }
.ai.is-visible :is(.l,.a) { animation: ai-draw .9s cubic-bezier(.65,0,.35,1) forwards; animation-delay: calc(var(--ai-start, 0ms) + var(--d, 0) * 120ms); }
@keyframes ai-draw { to { stroke-dashoffset: 0; } }

.ai .spin, .ai .spin-r, .ai .bar, .ai .pulse { transform-box: fill-box; transform-origin: center; }
.ai .bar { transform-origin: bottom; }
.ai .lens, .ai .pen, .ai .arrow { transform-box: view-box; }
.ai .arrow, .ai .dot { opacity: 0; }

.ai.is-visible .spin   { animation: ai-spin 9s linear 1.2s infinite; }
.ai.is-visible .spin-r { animation: ai-spin-r 6s linear 1.2s infinite; }
.ai.is-visible .bar    { animation: ai-bar 3.2s ease-in-out infinite; animation-delay: calc(1s + var(--b, 0) * 180ms); }
.ai.is-visible .lens   { animation: ai-scan 4.5s ease-in-out 1.2s infinite; }
.ai.is-visible .pen    { animation: ai-write 2.4s ease-in-out 1.2s infinite; }
.ai.is-visible .arrow  { animation: ai-arrow 4s cubic-bezier(.2,.8,.2,1) 1s infinite; }
.ai.is-visible .pulse  { animation: ai-pulse 2.4s ease-out 1.2s infinite; }
.ai.is-visible .dot    { animation: ai-dot 1.4s ease-in-out infinite; animation-delay: calc(1.2s + var(--b, 0) * 200ms); }
.ai.is-visible .chk :is(.l,.a) { animation: ai-check 4s ease-in-out infinite; animation-delay: calc(1.2s + var(--b, 0) * 400ms); }

@keyframes ai-spin   { to { transform: rotate(360deg); } }
@keyframes ai-spin-r { to { transform: rotate(-360deg); } }
@keyframes ai-bar    { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(.55); } }
@keyframes ai-scan   { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-14px,4px); } }
@keyframes ai-write  { 0%,100% { transform: translate(0,0) rotate(0); } 25% { transform: translate(-6px,2px) rotate(-4deg); } 50% { transform: translate(-12px,0); } 75% { transform: translate(-6px,-2px) rotate(3deg); } }
@keyframes ai-arrow  { 0% { transform: translate(26px,-26px); opacity: 0; } 18% { opacity: 1; } 30%,80% { transform: translate(0,0); opacity: 1; } 100% { opacity: 0; } }
@keyframes ai-pulse  { 0% { transform: scale(1); opacity: .9; } 70%,100% { transform: scale(2.2); opacity: 0; } }
@keyframes ai-dot    { 0%,100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes ai-check  { 0%,8% { stroke-dashoffset: 1; } 22%,85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 1; } }

.pl-home .home-services .ai { margin-bottom: 18px; }
.pl-home .home-card { transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s, border-color .3s; }
.pl-home .home-card:hover,
.pl-home .home-card:focus-within { transform: translateY(-3px); border-color: rgba(181,27,72,.35); box-shadow: 0 10px 28px rgba(3,28,65,.08); }
.pl-home .home-card:hover .ai,
.pl-home .home-card:focus-within .ai { transform: translateY(-3px); }

/* Kleine Icons in der Fakten-Box (24er-Raster) */
.pl-home .home-facts .ai { --ai-size: 28px; }
.pl-home .home-facts .ai :is(.l,.a) { stroke-width: 1.8; }

/* 2) Hero: Inhalte blenden nacheinander ein, schwebende Kugeln im Hintergrund */
@keyframes hero-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.pl-home .home-hero-grid > div > * { animation: hero-in .6s cubic-bezier(.2,.8,.2,1) both; }
.pl-home .home-hero-grid > div > :nth-child(1) { animation-delay: .05s; }
.pl-home .home-hero-grid > div > :nth-child(2) { animation-delay: .15s; }
.pl-home .home-hero-grid > div > :nth-child(3) { animation-delay: .3s; }
.pl-home .home-hero-grid > div > :nth-child(4) { animation-delay: .4s; }
.pl-home .home-hero-grid > div > :nth-child(5) { animation-delay: .5s; }
.pl-home .home-portrait { animation: hero-in .8s cubic-bezier(.2,.8,.2,1) .25s both; }

.pl-home .home-hero { position: relative; overflow: hidden; isolation: isolate; }
.pl-orbs { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.pl-orbs span { position: absolute; border-radius: 50%; will-change: transform; }
/* große, weiche Kugeln */
.pl-orbs .o1 { width: 380px; height: 380px; top: -120px; right: 4%; background: radial-gradient(circle at 35% 35%, rgba(181,27,72,.16), rgba(181,27,72,0) 70%); animation: orb-drift-a 18s ease-in-out infinite; }
.pl-orbs .o2 { width: 300px; height: 300px; bottom: -110px; left: -60px; background: radial-gradient(circle at 60% 40%, rgba(3,28,65,.11), rgba(3,28,65,0) 70%); animation: orb-drift-b 22s ease-in-out infinite; }
.pl-orbs .o3 { width: 180px; height: 180px; top: 38%; left: 46%; background: radial-gradient(circle, rgba(181,27,72,.09), rgba(181,27,72,0) 70%); animation: orb-drift-a 26s ease-in-out -8s infinite reverse; }
/* kleine, scharfe Kügelchen */
.pl-orbs .p { width: 10px; height: 10px; background: #B51B48; opacity: .55; animation: orb-float 9s ease-in-out infinite; }
.pl-orbs .p.n { background: #031C41; opacity: .28; }
.pl-orbs .p1 { top: 14%; left: 44%; }
.pl-orbs .p2 { top: 72%; left: 52%; width: 7px; height: 7px; animation-duration: 11s; animation-delay: -3s; }
.pl-orbs .p3 { top: 22%; right: 3%; width: 8px; height: 8px; animation-duration: 12s; animation-delay: -6s; }
.pl-orbs .p4 { bottom: 12%; left: 6%; width: 6px; height: 6px; animation-duration: 10s; animation-delay: -2s; }
.pl-orbs .p5 { top: 8%; left: 8%; width: 5px; height: 5px; animation-duration: 13s; animation-delay: -5s; }
@keyframes orb-drift-a { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-40px,30px) scale(1.08); } }
@keyframes orb-drift-b { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(50px,-30px) scale(1.06); } }
@keyframes orb-float { 0%,100% { transform: translate(0,0); } 33% { transform: translate(14px,-18px); } 66% { transform: translate(-10px,-6px); } }

/* 3) Prozess: rote Linie läuft über 01 → 02 → 03, Schritte leuchten nacheinander auf */
.pl-home .home-steps { position: relative; }
.pl-home .home-steps::before,
.pl-home .home-steps::after { content: ""; position: absolute; top: 0; left: 0; pointer-events: none; }
.pl-home .home-steps::before { width: 100%; height: 2px; background: #B51B48; transform: scaleX(0); transform-origin: left; }
.pl-home .home-steps::after { width: 10px; height: 10px; margin-top: -4px; border-radius: 50%; background: #B51B48; opacity: 0; }
.pl-home .home-steps.is-visible::before { animation: proc-line 2.6s cubic-bezier(.65,0,.35,1) .2s forwards; }
.pl-home .home-steps.is-visible::after { animation: proc-dot 2.6s cubic-bezier(.65,0,.35,1) .2s forwards; }
@keyframes proc-line { to { transform: scaleX(1); } }
@keyframes proc-dot { 0% { left: 0; opacity: 1; } 90% { opacity: 1; } 100% { left: calc(100% - 10px); opacity: 0; } }

.pl-home .home-steps.anim-ready li { opacity: .35; transition: opacity .6s ease var(--step-delay, 0s); }
.pl-home .home-steps.anim-ready .home-step-number { color: #5A6070; transition: color .6s ease var(--step-delay, 0s); }
.pl-home .home-steps.is-visible li { opacity: 1; }
.pl-home .home-steps.is-visible .home-step-number { color: #B51B48; }
.pl-home .home-steps li:nth-child(1) { --step-delay: .3s; }
.pl-home .home-steps li:nth-child(2) { --step-delay: 1.15s; }
.pl-home .home-steps li:nth-child(3) { --step-delay: 2s; }
.pl-home .home-steps .step-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.pl-home .home-steps .step-head .home-step-number { margin-bottom: 0; }
.pl-home .home-steps .ai { --ai-size: 56px; --ai-start: var(--step-delay, 0s); }
/* Mobil stehen die Schritte untereinander: Linie nur auf dem Desktop */
@media (max-width: 760px) { .pl-home .home-steps::before, .pl-home .home-steps::after { display: none; } }

/* 4) Mini-Workflow in den Leistungs-Karten: Punkt wandert durch die Schritte */
.pl-home .mini-flow { --row: 30px; list-style: none; margin: 0 0 18px; padding: 0 0 0 24px; position: relative; font-size: 15px; line-height: var(--row); color: #5A6070; }
.pl-home .mini-flow li { position: relative; height: var(--row); line-height: var(--row); white-space: nowrap; transition: color .3s; }
.pl-home .mini-flow li::before { content: ""; position: absolute; left: -22px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border: 2px solid rgba(3,28,65,.25); border-radius: 50%; background: #fff; }
.pl-home .mini-flow::before { content: ""; position: absolute; left: 7px; top: calc(var(--row) / 2); bottom: calc(var(--row) / 2); width: 2px; background: rgba(3,28,65,.14); }
.pl-home .mini-flow::after { content: ""; position: absolute; left: 3px; top: calc(var(--row) / 2 - 5px); width: 10px; height: 10px; border-radius: 50%; background: #B51B48; opacity: 0; }
.pl-home .mini-flow.is-visible::after { animation: flow-dot 6s ease-in-out .4s infinite; }
.pl-home .mini-flow.is-visible li { animation: flow-step 6s ease-in-out infinite; }
.pl-home .mini-flow.is-visible li::before { animation: flow-mark 6s ease-in-out infinite; }
.pl-home .mini-flow li:nth-child(1), .pl-home .mini-flow li:nth-child(1)::before { animation-delay: .4s !important; }
.pl-home .mini-flow li:nth-child(2), .pl-home .mini-flow li:nth-child(2)::before { animation-delay: 1.9s !important; }
.pl-home .mini-flow li:nth-child(3), .pl-home .mini-flow li:nth-child(3)::before { animation-delay: 3.4s !important; }
.pl-home .mini-flow li:nth-child(4), .pl-home .mini-flow li:nth-child(4)::before { animation-delay: 4.9s !important; }
@keyframes flow-dot {
  0%   { transform: translateY(0); opacity: 0; }
  4%   { opacity: 1; }
  25%  { transform: translateY(var(--row)); }
  50%  { transform: translateY(calc(var(--row) * 2)); }
  75%, 92% { transform: translateY(calc(var(--row) * 3)); opacity: 1; }
  100% { transform: translateY(calc(var(--row) * 3)); opacity: 0; }
}
@keyframes flow-step { 0%, 24% { color: #031C41; } 32%, 100% { color: #5A6070; } }
@keyframes flow-mark { 0%, 24% { border-color: #B51B48; } 32%, 100% { border-color: rgba(3,28,65,.25); } }

/* Reduced motion: alles statisch und sofort sichtbar */
@media (prefers-reduced-motion: reduce) {
  .ai, .ai *, .ai.is-visible * { animation: none !important; transition: none !important; }
  .ai :is(.l,.a), .ai .chk :is(.l,.a) { stroke-dashoffset: 0; }
  .ai .ring { transform: none; }
  .ai .arrow, .ai .dot { opacity: 1; }
  .ai .pulse { opacity: 0; }
  .pl-home .home-hero-grid > div > *, .pl-home .home-portrait, .pl-orbs span { animation: none !important; }
  .pl-home .home-card:hover, .pl-home .home-card:focus-within { transform: none; }
  .pl-home .home-steps::before, .pl-home .home-steps::after, .pl-home .mini-flow::after { animation: none !important; display: none; }
  .pl-home .home-steps.anim-ready li { opacity: 1; }
  .pl-home .home-steps.anim-ready .home-step-number { color: #B51B48; }
  .pl-home .mini-flow li, .pl-home .mini-flow li::before { animation: none !important; }
}

/* 5) Düsseldorf-Skyline: Linienzeichnung über die ganze Breite, zeichnet sich beim Scrollen ein */
.pl-skyline { position: relative; overflow: hidden; isolation: isolate; background: #031C41; color: #fff; padding: 72px 0 64px; }
.pl-skyline .sk-wrap { overflow: hidden; }
/* Breiter Zeichenbereich + "slice": Linien laufen randlos, schmale Screens zeigen die Mitte (Rheinturm) */
.pl-skyline .sk { display: block; width: 100%; height: clamp(190px, 21vw, 330px); }
.pl-skyline .sk :is(.l,.a) { stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pl-skyline .sk .l { stroke: rgba(255,255,255,.88); }
.pl-skyline .sk .a { stroke: #D42056; }
.pl-skyline .sk .thin { stroke-width: 1.4; }
.pl-skyline .sk .lights circle { fill: #D42056; }
.pl-skyline .sk .sun, .pl-skyline .sk .waves { transform-box: fill-box; transform-origin: center; }
.pl-skyline.anim-ready .sk :is(.l,.a) { stroke-dasharray: 1; stroke-dashoffset: 1; }
.pl-skyline.anim-ready .sk .lights circle { opacity: 0; }
.pl-skyline.is-visible .sk :is(.l,.a) { animation: ai-draw 1.4s cubic-bezier(.65,0,.35,1) forwards; animation-delay: calc(var(--d, 0) * 110ms); }
.pl-skyline.is-visible .sk .lights circle { animation: sk-light 2.8s ease-in-out infinite; animation-delay: calc(1.6s + var(--b, 0) * 180ms); }
.pl-skyline.is-visible .sk .waves { animation: sk-wave 7s ease-in-out 2s infinite; }
.pl-skyline.is-visible .sk .sun { animation: ai-draw 1.4s cubic-bezier(.65,0,.35,1) .55s forwards, sk-sun 6s ease-in-out 2s infinite; }
@keyframes sk-light { 0%,100% { opacity: .2; } 40%,60% { opacity: 1; } }
@keyframes sk-wave { 0%,100% { transform: translateX(0); } 50% { transform: translateX(-24px); } }
@keyframes sk-sun { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.pl-skyline .sk-text { text-align: center; margin-top: 36px; }
.pl-home .pl-skyline .home-eyebrow { color: #fff; opacity: .75; }
.pl-home .pl-skyline .home-eyebrow strong { color: #D42056; }
.pl-skyline .sk-claim { font-family: 'Barlow Condensed', Barlow, sans-serif; font-weight: 700; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; color: #fff !important; margin: 0 0 14px !important; }
.pl-home .pl-skyline .sk-text p:last-child { color: #d7dfe8; max-width: 680px; margin: 0 auto; font-size: 17px; }
.pl-skyline .pl-orbs .p { background: #D42056; opacity: .5; }
@media (max-width: 760px) { .pl-skyline { padding: 48px 0 44px; } .pl-skyline .sk-text { margin-top: 24px; } }
@media (prefers-reduced-motion: reduce) {
  .pl-skyline .sk *, .pl-skyline .sk { animation: none !important; }
  .pl-skyline.anim-ready .sk :is(.l,.a) { stroke-dashoffset: 0; }
  .pl-skyline.anim-ready .sk .lights circle { opacity: 1; }
}

/* 6) Vertrauensleiste unter dem Hero: nur belegbare Fakten, keine fremden Logos */
.pl-trust { background: #fff; border-top: 1px solid rgba(3,28,65,.14); border-bottom: 1px solid rgba(3,28,65,.14); padding: 26px 0; }
.pl-trust-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.pl-trust-list li { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pl-trust-list li + li { border-left: 1px solid rgba(3,28,65,.14); padding-left: 20px; }
.pl-trust .ai { --ai-size: 30px; }
.pl-trust .ai :is(.l,.a) { stroke-width: 1.8; }
.pl-trust-list span { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.pl-trust-list strong { font-size: 16px; color: #031C41; }
.pl-trust-list small { font-size: 14px; color: #5A6070; }
.pl-trust-list a { color: #5A6070; text-decoration: underline; text-decoration-color: #B51B48; text-underline-offset: 3px; }
.pl-trust-list a:hover { color: #B51B48; }
.pl-trust.anim-ready li { opacity: 0; transform: translateY(8px); transition: opacity .5s ease var(--t, 0s), transform .5s cubic-bezier(.2,.8,.2,1) var(--t, 0s); }
.pl-trust.is-visible li { opacity: 1; transform: none; }
.pl-trust li:nth-child(2) { --t: .08s; } .pl-trust li:nth-child(3) { --t: .16s; } .pl-trust li:nth-child(4) { --t: .24s; } .pl-trust li:nth-child(5) { --t: .32s; }
.pl-trust .ai { --ai-start: var(--t, 0s); }
@media (max-width: 1000px) {
  .pl-trust-list { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
  .pl-trust-list li + li { border-left: 0; padding-left: 0; }
}
@media (max-width: 600px) {
  .pl-trust { padding: 20px 0; }
  .pl-trust-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
  .pl-trust-list li:last-child { grid-column: 1 / -1; }
  .pl-trust-list strong { font-size: 15px; }
  .pl-trust-list small { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .pl-trust.anim-ready li { opacity: 1; transform: none; transition: none; } }
