/* Sario Demo: Bewegung der öffentlichen Seiten.
   Alles läuft von selbst, nichts hängt an einem Klick. Animiert werden nur transform und opacity.
   Wer prefers-reduced-motion eingestellt hat, sieht den ruhigen Endzustand (Block ganz unten). */

:root { --ease: cubic-bezier(0.22, 0.8, 0.3, 1); }

/* ---------- Einblenden beim Scrollen ---------- */
.js .rise { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease) var(--d, 0s), transform 0.8s var(--ease) var(--d, 0s); }
.js .rise.da { opacity: 1; transform: none; }

/* Einzelteile eines Bildes, die der Reihe nach erscheinen (Skript setzt .an) */
[data-z] { opacity: 0; transform: translateY(14px); transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); }
[data-z].an { opacity: 1; transform: none; }
[data-z].o { transform: none; }
[data-weg] { transition: opacity 0.25s ease; }
[data-weg].weg { opacity: 0; }

/* ---------- Kopfbereich ---------- */
.hero .fleck--himmel { animation: drift-a 13s ease-in-out infinite alternate; }
.hero .fleck--rosa { animation: drift-b 9s ease-in-out infinite alternate; }
.hero .fleck--gelb { animation: drift-a 11s ease-in-out infinite alternate; }
.hero .punkt { animation: wippe 7s ease-in-out infinite; }
.hero .punkt:nth-of-type(2) { animation-duration: 9s; animation-delay: -2s; }
.hero .punkt:nth-of-type(3) { animation-duration: 6s; animation-delay: -4s; }
.hero .punkt:nth-of-type(4) { animation-duration: 8s; animation-delay: -1s; }
@keyframes drift-a { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(56px, 36px, 0) scale(1.08); } }
@keyframes drift-b { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-48px, 28px, 0) scale(1.06); } }
@keyframes wippe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes schweben { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-11px); } }

.handy--schwebt { animation: schweben 6s ease-in-out infinite; will-change: transform; }
#pb-ad { transition: opacity 0.25s ease; }
#pb-ad.aus { opacity: 0; }

/* Bewerbungen, die von selbst eintrudeln */
.trudel { position: absolute; z-index: 4; opacity: 0; will-change: transform, opacity; pointer-events: none; }
.trudel .chip-schwebend { position: relative; max-width: 190px; font-size: 0.8rem; padding: 9px 14px 9px 9px; animation: schweben 8s ease-in-out infinite; }
.trudel--2 .chip-schwebend { animation-delay: -3s; animation-duration: 9s; }
.trudel--3 .chip-schwebend { animation-delay: -5s; animation-duration: 7s; }
.chip-schwebend__ini { width: 38px; height: 38px; border-radius: 50%; background: var(--blau-hell); color: var(--blau); font-weight: 800; font-size: 0.8rem; display: flex; align-items: center; justify-content: center; flex: none; }
.chip-schwebend--gelb .chip-schwebend__ini { background: var(--navy); color: #fff; }
.trudel .chip-schwebend b { font-size: 0.88rem; }
.trudel--1 { left: -26px; top: 0; animation: ein1 14s ease-out infinite; }
.trudel--2 { right: 0; top: 170px; animation: ein2 14s ease-out infinite; }
.trudel--3 { right: 0; top: 290px; animation: ein3 14s ease-out infinite; }
@keyframes ein1 { 0% { opacity: 0; transform: translateY(18px) scale(0.96); } 5%, 86% { opacity: 1; transform: none; } 93%, 100% { opacity: 0; transform: translateY(-8px); } }
@keyframes ein2 { 0%, 24% { opacity: 0; transform: translateY(18px) scale(0.96); } 29%, 86% { opacity: 1; transform: none; } 93%, 100% { opacity: 0; transform: translateY(-8px); } }
@keyframes ein3 { 0%, 48% { opacity: 0; transform: translateY(18px) scale(0.96); } 53%, 86% { opacity: 1; transform: none; } 93%, 100% { opacity: 0; transform: translateY(-8px); } }
/* Handy und schmale Fenster: ein Platz über dem Handy, die drei kommen nacheinander */
@keyframes m1 { 0% { opacity: 0; transform: translateY(14px) scale(0.96); } 5%, 28% { opacity: 1; transform: none; } 34%, 100% { opacity: 0; transform: translateY(-8px); } }
@keyframes m2 { 0%, 33% { opacity: 0; transform: translateY(14px) scale(0.96); } 38%, 61% { opacity: 1; transform: none; } 67%, 100% { opacity: 0; transform: translateY(-8px); } }
@keyframes m3 { 0%, 66% { opacity: 0; transform: translateY(14px) scale(0.96); } 71%, 94% { opacity: 1; transform: none; } 99%, 100% { opacity: 0; transform: translateY(-8px); } }
@media (max-width: 1000px) {
  .trudel--1, .trudel--2, .trudel--3 { left: 50%; right: auto; top: 14px; margin-left: -120px; }
  .trudel--1 { animation: m1 12s ease-out infinite; }
  .trudel--2 { animation: m2 12s ease-out infinite; }
  .trudel--3 { animation: m3 12s ease-out infinite; }
  .trudel .chip-schwebend { max-width: 240px; font-size: 0.85rem; }
}

/* Dino: atmet, blinzelt, winkt */
.dino-gross { transform-origin: 50% 100%; animation: atmen 5.5s ease-in-out infinite; }
.dino-gross img { display: block; width: 100%; height: 100%; filter: drop-shadow(0 14px 18px rgba(12, 19, 71, 0.18)); }
.dino-gross svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dino-gross .lid { opacity: 0; animation: blinzeln 5.7s infinite; }
.dino-gross--b { animation-duration: 6.4s; }
.dino-gross--b .lid { animation-duration: 7.3s; animation-delay: -2s; }
@keyframes atmen { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.014); } }
@keyframes blinzeln { 0%, 92%, 100% { opacity: 0; } 93%, 96% { opacity: 1; } }

.wink { position: relative; display: block; aspect-ratio: 178 / 241; height: var(--h, 190px); transform-origin: 50% 94%; animation: winke 8s ease-in-out infinite; }
.wink img { position: absolute; left: 0; bottom: 0; width: 100%; height: auto; }
.wink__a { animation: wink-a 8s infinite; }
.wink__b { opacity: 0; animation: wink-b 8s infinite; }
@keyframes wink-a { 0%, 66%, 96%, 100% { opacity: 1; } 68%, 94% { opacity: 0; } }
@keyframes wink-b { 0%, 66%, 96%, 100% { opacity: 0; } 68%, 94% { opacity: 1; } }
@keyframes winke { 0%, 68%, 92%, 100% { transform: none; } 72% { transform: rotate(-5deg); } 77% { transform: rotate(4deg); } 82% { transform: rotate(-5deg); } 87% { transform: rotate(3deg); } }
.dino-mini.wink { --h: 64px; display: none; }
@media (max-width: 1000px) { .dino-mini.wink { display: block; } }

/* ---------- Fakten und Laufband ---------- */
.fakten3 .karte .gross { transition: none; }
.laufband { overflow: hidden; margin-top: 34px; padding: 4px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.laufband__bahn { display: flex; width: max-content; }
.js .laufband__bahn { animation: lauf 38s linear infinite; will-change: transform; }
.laufband__spur { display: flex; flex: none; list-style: none; margin: 0; padding: 0 0 0 0; }
.laufband__spur li { flex: none; margin-right: 10px; background: #fff; border-radius: 999px; padding: 10px 20px; font-weight: 600; color: var(--navy); box-shadow: 0 2px 8px rgba(24, 36, 110, 0.07); white-space: nowrap; }
.laufband__spur li:nth-child(5n+1) { background: var(--himmel); box-shadow: none; }
.laufband__spur li:nth-child(5n+3) { background: var(--marke-hell); box-shadow: none; }
.laufband__spur li:nth-child(5n+4) { background: var(--rosa); box-shadow: none; }
.laufband:hover .laufband__bahn { animation-play-state: paused; }
@keyframes lauf { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- So läuft es: spielt sich selbst ab ---------- */
.ablauf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.ablauf__liste { list-style: none; margin: 0; padding: 0; }
.schritt3 { position: relative; display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 16px; align-items: start; padding: 22px 26px 26px; margin-bottom: 12px; }
.schritt3::before { content: ""; position: absolute; inset: 0; background: #fff; border-radius: 26px; box-shadow: var(--schatten); opacity: 0; transition: opacity 0.5s ease; }
.schritt3 > * { position: relative; }
.schritt3__nr { font-size: 2.8rem; font-weight: 800; color: #6C759F; letter-spacing: -0.04em; line-height: 1; }
.schritt3__nr::after { content: attr(data-nr); position: absolute; left: 0; top: 0; color: var(--navy); opacity: 0; transition: opacity 0.5s ease; }
.schritt3 b { display: block; font-size: 1.35rem; color: var(--navy); margin-bottom: 4px; letter-spacing: -0.02em; }
.schritt3 p { margin: 0; }
.schritt3__balken { position: absolute !important; left: 26px; right: 26px; bottom: 10px; height: 4px; border-radius: 4px; background: var(--marke); transform-origin: 0 50%; transform: scaleX(0); opacity: 0; }
.ablauf.sz1 .schritt3:nth-child(1)::before, .ablauf.sz2 .schritt3:nth-child(2)::before, .ablauf.sz3 .schritt3:nth-child(3)::before { opacity: 1; }
.ablauf.sz1 .schritt3:nth-child(1) .schritt3__nr::after, .ablauf.sz2 .schritt3:nth-child(2) .schritt3__nr::after, .ablauf.sz3 .schritt3:nth-child(3) .schritt3__nr::after { opacity: 1; }
.ablauf.sz1 .schritt3:nth-child(1) .schritt3__balken, .ablauf.sz2 .schritt3:nth-child(2) .schritt3__balken, .ablauf.sz3 .schritt3:nth-child(3) .schritt3__balken { opacity: 1; animation: balken var(--dauer, 6s) linear forwards; }
@keyframes balken { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.ablauf__handy { position: relative; }
.ablauf .handy__schirm { height: 612px; min-height: 0; }
.szene { position: absolute; left: 0; right: 0; top: 44px; bottom: 0; padding: 12px 14px 16px; opacity: 0; transition: opacity 0.5s ease; font-family: var(--schrift); overflow: hidden; }
.ablauf.sz1 .szene--1, .ablauf.sz2 .szene--2, .ablauf.sz3 .szene--3 { opacity: 1; }
.ablauf.aus .szene { opacity: 0 !important; }
.ablauf.neu, .ablauf.neu * { transition: none !important; }
/* Ruhebild (steht, solange der Ablauf nicht im Bild ist, und im ruhigen Modus): Szene 2 fertig */
.ablauf.statisch [data-z] { opacity: 1; transform: none; }
.ablauf.statisch [data-weg] { display: none; }
.ablauf.statisch .szene { opacity: 0; }
.ablauf.statisch .szene--2 { opacity: 1; }
.ablauf.statisch .ring { display: none; }
.szene--1 { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; }
.szene .blase { position: relative; width: fit-content; max-width: 92%; }
.szene .blase--du { align-self: flex-end; }
.szene .blase .txt { display: block; }
.szene .blase .txt[data-z] { transform: none; transition: opacity 0.3s ease; }
.punkte { position: absolute; left: 16px; top: 50%; margin-top: -4px; display: flex; gap: 5px; }
.punkte i { width: 8px; height: 8px; border-radius: 50%; background: var(--grau); display: block; opacity: 0.35; }
.ablauf.laeuft .punkte i { animation: tipp 1.1s ease-in-out infinite; }
.ablauf.laeuft .punkte i:nth-child(2) { animation-delay: 0.15s; }
.ablauf.laeuft .punkte i:nth-child(3) { animation-delay: 0.3s; }
@keyframes tipp { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.szene .chips { margin-top: 2px; }
.szene .chip { position: relative; cursor: default; background: var(--flaeche); box-shadow: none; }
.chip__an { position: absolute; inset: -2px; border-radius: 999px; background: var(--blau); color: #fff; display: flex; align-items: center; justify-content: center; white-space: nowrap; }

.freigabe { position: relative; margin: 14px 2px 0; border-radius: 999px; background: var(--blau); color: #fff; font-weight: 700; text-align: center; padding: 13px 16px; }
.freigabe.druck { transform: scale(0.95); transition-duration: 0.15s; }
.freigabe__ok { position: absolute; inset: 0; border-radius: 999px; background: var(--status-laeuft); display: flex; align-items: center; justify-content: center; gap: 8px; }
.freigabe__ok svg { width: 18px; height: 18px; }
.ring { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; border: 3px solid var(--marke); pointer-events: none; }
.ring.an { animation: ring 0.8s ease-out forwards; }
@keyframes ring { from { opacity: 0.9; transform: scale(0.3); } to { opacity: 0; transform: scale(1.7); } }

.szene--3 .kennzahlen-handy > div { transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.szene--3 .kennzahlen-handy > div:nth-child(2) { transition-delay: 0.12s; }
.szene--3 .kennzahlen-handy > div:nth-child(3) { transition-delay: 0.24s; }
.szene--3 .kennzahlen-handy > div:nth-child(4) { transition-delay: 0.36s; }
.szene .mini { position: relative; }
.mini__ok { position: absolute; inset: 0; border-radius: 999px; background: var(--status-laeuft); color: #fff; display: flex; align-items: center; justify-content: center; white-space: nowrap; }

/* ---------- Ehrlich gesagt ---------- */
.ehrlich__raster { display: grid; grid-template-columns: minmax(0, 0.55fr) minmax(0, 1.45fr); gap: clamp(24px, 5vw, 80px); align-items: center; }
.ehrlich__dino { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 260px; }
.ehrlich__dino .fleck { width: 320px; height: 320px; left: 50%; top: 50%; margin: -160px 0 0 -160px; }
.ehrlich__dino .wink { --h: 250px; position: relative; z-index: 2; }
.ehrlich__liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ehrlich__liste li { border-radius: 30px; padding: 20px 28px; max-width: 34em; }
.ehrlich__liste li:nth-child(1) { background: var(--pfirsich); }
.ehrlich__liste li:nth-child(2) { background: var(--himmel); margin-left: clamp(0px, 5vw, 64px); }
.ehrlich__liste li:nth-child(3) { background: var(--rosa); margin-left: clamp(0px, 2vw, 24px); }
.ehrlich__liste b { display: block; font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: -0.03em; line-height: 1.1; color: var(--navy); margin-bottom: 4px; }
.ehrlich__liste span { color: var(--text); }
@media (max-width: 1000px) {
  .ablauf { grid-template-columns: minmax(0, 1fr); }
  .ablauf__handy { order: -1; }
  .ehrlich__raster { grid-template-columns: minmax(0, 1fr); }
  .ehrlich__dino { min-height: 0; justify-content: flex-start; }
  .ehrlich__dino .wink { --h: 170px; }
  .ehrlich__dino .fleck { left: 80px; }
}
@media (max-width: 600px) {
  .schritt3 { grid-template-columns: 52px minmax(0, 1fr); padding: 18px 18px 24px; gap: 10px; }
  .schritt3__nr { font-size: 2.1rem; }
  .schritt3__balken { left: 18px; right: 18px; }
  .ehrlich__liste li { padding: 16px 20px; }
  .ehrlich__liste li:nth-child(2), .ehrlich__liste li:nth-child(3) { margin-left: 0; }
}

/* ---------- Unterseiten ---------- */
.js .nach { opacity: 0; transform: translateY(10px); }
.js .da .nach { animation: einlauf 0.55s var(--ease) both; animation-delay: calc(var(--i, 0) * 0.5s + 0.35s); }
@keyframes einlauf { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.schweb { animation: schweben 7s ease-in-out infinite; }

/* ---------- Ruhig: prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .rise, .js .nach, [data-z] { opacity: 1 !important; transform: none !important; }
  [data-weg] { display: none; }
  .trudel { opacity: 1; }
  .trudel--1 { left: -26px; top: 0; }
  .trudel--2 { right: 0; top: 170px; margin-left: 0; }
  .trudel--3 { right: 0; top: 290px; margin-left: 0; }
  .dino-gross .lid { opacity: 0; }
  .wink__b { opacity: 0; }
  .laufband { -webkit-mask-image: none; mask-image: none; }
  .laufband__bahn { width: auto; }
  .laufband__spur { flex-wrap: wrap; row-gap: 10px; }
  .laufband__spur[aria-hidden="true"] { display: none; }
  .szene { opacity: 0; }
  .szene--2 { opacity: 1; }
  .ring { display: none; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 1000px) {
  .trudel--2, .trudel--3 { display: none; }
  .trudel--1 { left: 50%; right: auto; top: 14px; margin-left: -120px; }
}
