/* ==========================================================================
   Animationen – dezent, reines CSS
   - Hover: überall (alle Browser)
   - Einstieg Hero: beim Laden (alle Browser)
   - Scroll: über CSS Scroll-Driven Animations (Chrome/Edge/Safari 26+).
     Ohne Unterstützung bleibt alles statisch sichtbar.
   - prefers-reduced-motion: alles aus
   ========================================================================== */

:root {
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --lift-shadow: 0 24px 48px -24px rgba(10, 34, 56, .28), 0 8px 16px -12px rgba(10, 34, 56, .16);
  --lift-shadow-dark: 0 24px 48px -20px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .04);
}

/* ---------- Keyframes ---------- */
@keyframes fade-up {
  from { opacity: 0; translate: 0 24px; }
  to   { opacity: 1; translate: 0 0; }
}
@keyframes fade-down {
  from { opacity: 0; translate: 0 -12px; }
  to   { opacity: 1; translate: 0 0; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes grow-up { from { scale: 1 .35; opacity: 0; } to { scale: 1 1; opacity: 1; } }
@keyframes breathe {
  0%, 100% { opacity: 1; scale: 1; }
  50%      { opacity: .75; scale: 1.06; }
}
@keyframes float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -8px; }
}
@keyframes sheen {
  from { transform: translateX(-120%) skewX(-20deg); }
  to   { transform: translateX(320%) skewX(-20deg); }
}
@keyframes signet-bounce {
  0%, 100% { scale: 1 1; }
  40%      { scale: 1 .7; }
  70%      { scale: 1 1.08; }
}

/* ==========================================================================
   1. Hover & Interaktion (alle Browser)
   ========================================================================== */

/* Buttons: leichtes Anheben, Pfeil-Chip wandert diagonal, Glanz-Sweep */
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: background-color .25s var(--ease-soft), border-color .25s var(--ease-soft),
              transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); transition-duration: .1s; }
.btn--primary:hover { box-shadow: 0 14px 28px -12px rgba(14, 56, 91, .55); }
.btn--primary-on-dark:hover { box-shadow: 0 14px 32px -12px rgba(255, 159, 36, .45); }
.btn--secondary:hover { box-shadow: 0 10px 22px -14px rgba(10, 34, 56, .35); }

.btn__chip { transition: transform .35s var(--ease-out); }
.btn:hover .btn__chip { transform: translate(2px, -2px) scale(1.06); }

.btn--primary::after,
.btn--primary-on-dark::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 40%;
  z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent);
  transform: translateX(-120%) skewX(-20deg);
  pointer-events: none;
}
.btn--primary-on-dark::after { background: linear-gradient(90deg, transparent, rgba(255, 159, 36, .16), transparent); }
.btn--primary:hover::after,
.btn--primary-on-dark:hover::after { animation: sheen .9s var(--ease-soft); }

.btn:focus-visible,
.nav__links a:focus-visible,
.tabs a:focus-visible,
.faq__item summary:focus-visible {
  outline: 2px solid var(--color-action-default);
  outline-offset: 3px;
}

/* Text-Links: wachsende Unterstreichung statt harter Linie */
.nav__login,
.footer__links a {
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  transition: background-size .35s var(--ease-out);
}
.nav__login:hover,
.footer__links a:hover { text-decoration: none; background-size: 100% 1px; }

/* Logo-Signet: kleiner Wipp-Effekt */
.logo__signet span { transform-origin: bottom; }
.logo:hover .logo__signet span { animation: signet-bounce .6s var(--ease-out); }
.logo:hover .logo__signet span:nth-child(2) { animation-delay: .06s; }
.logo:hover .logo__signet span:nth-child(3) { animation-delay: .12s; }

/* Nav-Pills */
.nav__links a { transition: background-color .25s var(--ease-soft), color .25s var(--ease-soft); }

/* Karten: anheben + weicher Schatten */
.benefit,
.card,
.plan,
.calc__card,
.outcome {
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), border-color .3s var(--ease-soft);
}
.benefit:hover,
.card:hover,
.plan:hover { transform: translateY(-6px); box-shadow: var(--lift-shadow); }
.benefit--dark:hover,
.card--dark:hover { box-shadow: var(--lift-shadow-dark); }
.card--outline:hover,
.plan:not(.plan--featured):not(.is-selected):hover { border-color: #c5d1dd; }

/* Lizenz-Auswahl (js/plans.js): gewählte Karte hebt sich leicht an */
.plan.is-selected {
  transform: translateY(-6px);
  box-shadow: 0 0 0 1px var(--color-brand-primary), var(--lift-shadow);
}
.plan { transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .35s var(--ease-soft); }
.plan .btn { transition: background-color .35s var(--ease-soft), border-color .35s var(--ease-soft), color .35s var(--ease-soft), transform .2s ease; }

.ability {
  transition: transform .45s var(--ease-out), border-color .3s var(--ease-soft),
              background-color .3s var(--ease-soft), box-shadow .45s var(--ease-out);
}
.ability:hover { transform: translateY(-4px); box-shadow: var(--lift-shadow-dark); }

/* --------------------------------------------------------------------------
   KI-Karten: Einblenden, sobald sie in den View kommen (js/ki-cards.js setzt
   .is-inview + .is-playing). Danach spielt die Themen-Illustration einmal ab;
   Hover spielt sie erneut ab. Ohne JS sind Karten und Illustrationen statisch.
   -------------------------------------------------------------------------- */
.js-reveal .ability:not(.is-inview) { opacity: 0; }
.ability.is-inview { animation: ability-reveal .9s var(--ease-out) both; }
.abilities__row > .ability.is-inview:nth-child(2) { animation-delay: .15s; }
@keyframes ability-reveal {
  from { opacity: 0; translate: 0 32px; }
  to   { opacity: 1; translate: 0 0; }
}
/* Illustration startet kurz nach dem Einblenden.
   Hinweis: nth-of-type zählt alle Geschwister gleichen Typs (rect/circle/path) im SVG. */
.ability { --v: .6s; }
.abilities__row > .ability:nth-child(2) { --v: .75s; }

/* 01 Software bedienen: Cursor fährt zum Button, klickt, Button füllt sich */
.is-playing .v1-cursor { animation: v1-cursor 1.6s var(--ease-soft) var(--v) both; }
.is-playing .v1-ripple { animation: v1-ripple .7s ease-out calc(var(--v) + 1.05s) both; }
.is-playing .v1-btn    { animation: v1-btn .5s ease-out calc(var(--v) + 1s) both; }
@keyframes v1-cursor {
  0%       { translate: 64px 30px; scale: 1; }
  60%      { translate: 126px 46px; scale: 1; }
  68%      { scale: .8; }
  78%,100% { translate: 126px 46px; scale: 1; }
}
@keyframes v1-ripple {
  from { opacity: .9; scale: .4; }
  to   { opacity: 0;  scale: 1.6; }
}
@keyframes v1-btn { from { fill: rgba(255, 159, 36, 0); } to { fill: var(--color-action-default); } }
.v1-btn { stroke: var(--color-action-default); stroke-width: 1.5; }

/* 02 Text oder Sprache: Text wird getippt (Cursor blinkt), danach spricht man */
.is-playing .v2-type  { animation: v2-type 1s steps(8, end) var(--v) both; }
.is-playing .v2-caret { animation: v2-caret 1.6s linear var(--v) both; }
.is-playing .v2-bar   { animation: v2-bar 1.4s ease-in-out calc(var(--v) + 1.3s) both; }
.is-playing .v2-bar:nth-of-type(2n) { animation-duration: 1.1s; }
.is-playing .v2-bar:nth-of-type(3n) { animation-duration: 1.6s; }
@keyframes v2-type  { from { scale: 0 1; } to { scale: 1 1; } }
@keyframes v2-caret {
  0%, 12%, 37%, 62%, 87% { opacity: 1; }
  25%, 50%, 75%, 100%    { opacity: 0; }
}
@keyframes v2-bar {
  0%, 100% { scale: 1 1; }
  20%      { scale: 1 .3; }
  45%      { scale: 1 1.1; }
  70%      { scale: 1 .4; }
}

/* 03 Dokumente lesen: Scanlinie fährt zweimal über die Seite, dann füllen sich die Felder */
.is-playing .v3-scan  { animation: v3-scan 1.4s linear var(--v) both; }
.is-playing .v3-arrow { animation: v3-arrow .4s ease-out calc(var(--v) + 1.3s) both; }
.is-playing .v3-field { animation: v3-field .5s var(--ease-out) both; }
.is-playing .v3-field:nth-of-type(9) { animation-delay: calc(var(--v) + 1.5s); }
.is-playing .v3-field:nth-of-type(10) { animation-delay: calc(var(--v) + 1.7s); }
.is-playing .v3-field:nth-of-type(11) { animation-delay: calc(var(--v) + 1.9s); }
@keyframes v3-scan {
  0%   { opacity: 1; translate: 0 0; }
  45%  { translate: 0 50px; }
  50%  { translate: 0 50px; }
  95%  { opacity: 1; translate: 0 0; }
  100% { opacity: 0; translate: 0 0; }
}
@keyframes v3-arrow { from { opacity: 0; translate: -6px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes v3-field { from { scale: 0 1; } to { scale: 1 1; } }

/* 04 Analysieren: Balken wachsen nacheinander, Trendlinie zeichnet sich, Punkt erscheint */
.is-playing .v4-bar   { animation: v4-bar .6s var(--ease-out) both; }
.is-playing .v4-bar:nth-of-type(1) { animation-delay: var(--v); }
.is-playing .v4-bar:nth-of-type(2) { animation-delay: calc(var(--v) + .08s); }
.is-playing .v4-bar:nth-of-type(3) { animation-delay: calc(var(--v) + .16s); }
.is-playing .v4-bar:nth-of-type(4) { animation-delay: calc(var(--v) + .24s); }
.is-playing .v4-bar:nth-of-type(5) { animation-delay: calc(var(--v) + .32s); }
.is-playing .v4-bar:nth-of-type(6) { animation-delay: calc(var(--v) + .4s); }
.is-playing .v4-trend { animation: draw-path .9s var(--ease-soft) calc(var(--v) + .7s) both; }
.is-playing .v4-dot   { animation: pop-in .45s var(--ease-out) calc(var(--v) + 1.55s) both; }
@keyframes v4-bar { from { scale: 1 0; } to { scale: 1 1; } }

/* 05 Aktiv arbeiten: Aufgaben werden nacheinander abgehakt, Zeile wird ruhiger */
.is-playing .v5-check { animation: draw-path .4s var(--ease-out) both; }
.is-playing .v5-task  { animation: v5-task .4s ease-out both; }
.is-playing .v5-check:nth-of-type(1), .is-playing .v5-task:nth-of-type(4) { animation-delay: var(--v); }
.is-playing .v5-check:nth-of-type(2), .is-playing .v5-task:nth-of-type(5) { animation-delay: calc(var(--v) + .5s); }
.is-playing .v5-check:nth-of-type(3), .is-playing .v5-task:nth-of-type(6) { animation-delay: calc(var(--v) + 1s); }
@keyframes v5-task { from { fill: rgba(255, 255, 255, .45); } to { fill: rgba(255, 255, 255, .2); } }

/* 06 Expertenwissen: Verbindungen wachsen aus dem Kern, Wissenspunkte leuchten auf */
.is-playing .v6-core { animation: pop-in .5s var(--ease-out) var(--v) both; }
.is-playing .v6-link { animation: draw-path .6s var(--ease-soft) both; }
.is-playing .v6-node { animation: pop-in .4s var(--ease-out) both; }
.is-playing .v6-link:nth-of-type(1) { animation-delay: calc(var(--v) + .3s); }
.is-playing .v6-link:nth-of-type(2) { animation-delay: calc(var(--v) + .4s); }
.is-playing .v6-link:nth-of-type(3) { animation-delay: calc(var(--v) + .5s); }
.is-playing .v6-link:nth-of-type(4) { animation-delay: calc(var(--v) + .6s); }
.is-playing .v6-link:nth-of-type(5) { animation-delay: calc(var(--v) + .7s); }
.is-playing .v6-link:nth-of-type(6) { animation-delay: calc(var(--v) + 1.1s); }
.is-playing .v6-link:nth-of-type(7) { animation-delay: calc(var(--v) + 1.2s); }
.is-playing .v6-node:nth-of-type(1)  { animation-delay: calc(var(--v) + .8s); }
.is-playing .v6-node:nth-of-type(2)  { animation-delay: calc(var(--v) + .9s); }
.is-playing .v6-node:nth-of-type(3) { animation-delay: calc(var(--v) + 1s); }
.is-playing .v6-node:nth-of-type(4) { animation-delay: calc(var(--v) + 1.1s); }
.is-playing .v6-node:nth-of-type(5) { animation-delay: calc(var(--v) + 1.2s); }
.is-playing .v6-ring { animation: v6-ring 1s ease-out calc(var(--v) + 1.4s) both; }
@keyframes v6-ring {
  from { opacity: .9; scale: 1; }
  to   { opacity: 0;  scale: 2.4; }
}

/* gemeinsam */
@keyframes draw-path { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes pop-in {
  0%   { opacity: 0; scale: 0; }
  70%  { opacity: 1; scale: 1.25; }
  100% { opacity: 1; scale: 1; }
}

/* KI-Sektion: weicher Lichtschein im Hintergrund */
#ki-assistent { overflow: hidden; isolation: isolate; }
#ki-assistent::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 10%;
  right: -10%;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(88, 155, 215, .14), transparent);
  pointer-events: none;
}
.ability .label { transition: letter-spacing .35s var(--ease-out); }
.ability:hover .label { letter-spacing: .08em; }

/* Signet in Vorteil-Karte wippt beim Hover */
.signet-lg span { transform-origin: bottom; }
.benefit:hover .signet-lg span { animation: signet-bounce .7s var(--ease-out); }
.benefit:hover .signet-lg span:nth-child(2) { animation-delay: .07s; }
.benefit:hover .signet-lg span:nth-child(3) { animation-delay: .14s; }

/* Icons und große Ziffern in Bento-Karten */
.card__icon { transition: transform .5s var(--ease-out); }
.card:hover .card__icon { transform: translate(-4px, -4px) rotate(-6deg) scale(1.06); }
.card__num { transition: transform .6s var(--ease-out); }
.card:hover .card__num { transform: translateY(-10px); }

/* Fotos: sanfter Zoom */
.photo img,
.trust__photo img { transition: transform 1.2s var(--ease-out); }
.photo:hover img,
.trust__photo:hover img { transform: scale(1.03); }

/* Zielgruppen- und Vertrauens-Punkte: Linie füllt sich */
.audiences > button,
.points > li { position: relative; }
.audiences > button::before,
.points > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  height: 2px;
  width: 100%;
  background: var(--color-action-default);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .6s var(--ease-out);
}
.audiences > button:hover::before,
.audiences > button.is-active::before,
.points > li:hover::before { transform: scaleX(1); }
.audiences > button .h3 { transition: color .3s var(--ease-soft); }
.audiences > button.is-active .h3 { color: var(--color-action-default); }
.audiences > button:focus-visible { outline: 2px solid var(--color-action-default); outline-offset: 6px; }

/* Einsatzfälle: Panel-Wechsel
   Das alte Panel blendet kurz aus, das neue baut sich gestaffelt auf. */
.panels.is-enhanced > .panel {
  transition: opacity .3s var(--ease-soft), visibility 0s linear .3s;
}
.panels.is-enhanced > .panel.is-active {
  transition: opacity .3s var(--ease-soft) .15s, visibility 0s;
}
.panel.is-entering .panel__text > *,
.panel.is-entering .panel__media > * {
  animation: panel-in .7s var(--ease-out) backwards;
  animation-delay: calc(.2s + var(--d, 0) * 70ms);
}
.panel.is-entering .photo img { animation: panel-photo 1.1s var(--ease-out) .15s backwards; }
.panel__text > :nth-child(2) { --d: 1; }
.panel__text > :nth-child(3) { --d: 2; }
.panel__text > :nth-child(4) { --d: 3; }
.panel__media > :nth-child(1) { --d: .5; }
.panel__media > :nth-child(2) { --d: 2.5; }
@keyframes panel-in { from { opacity: 0; transform: translateY(16px); } }
@keyframes panel-photo { from { transform: scale(1.06); } }

/* Tabs */
.tabs a { transition: border-color .25s var(--ease-soft), background-color .25s var(--ease-soft), transform .35s var(--ease-out); }
.tabs a:not(.is-active):hover { transform: translateY(-1px); }

/* Häkchen-Listen: Häkchen ploppt beim Hover */
.checks li img,
.steps li img,
.plan__features li img { transition: transform .35s var(--ease-out); }
.checks li:hover img,
.steps li:hover img,
.plan__features li:hover img { transform: scale(1.25); }

/* FAQ: Auf-/Zuklappen (js/faq.js setzt .is-open bzw. .is-closing).
   Höhe, Text und Icon laufen mit derselben Kurve, damit nichts ruckelt. */
.faq-js .faq__item .faq__answer {
  grid-template-rows: 0fr;
  transition: grid-template-rows .45s var(--ease-soft);
}
.faq-js .faq__item.is-open .faq__answer { grid-template-rows: 1fr; }
.faq-js .faq__item .faq__answer .body {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .25s var(--ease-soft), transform .45s var(--ease-soft);
}
.faq-js .faq__item.is-open .faq__answer .body {
  opacity: 1;
  transform: none;
  transition: opacity .35s var(--ease-soft) .1s, transform .45s var(--ease-soft);
}
.faq__icon { transition: color .25s var(--ease-soft); }
.faq__icon i { transition: transform .45s var(--ease-soft); }
.faq-js .faq__item .faq__icon i + i { transform: rotate(90deg); }
.faq-js .faq__item.is-open .faq__icon i + i { transform: rotate(0deg); }
.faq__item summary:hover .faq__icon,
.faq__item.is-open .faq__icon { color: var(--color-brand-primary); }
.faq__item summary span:first-child { transition: color .25s var(--ease-soft); }

/* FAQ: Fragen blenden nacheinander ein, sobald die Liste ins Bild kommt */
.faq__list.is-waiting .faq__item { opacity: 0; }
.faq__list.is-inview .faq__item {
  animation: faq-in .7s var(--ease-out) backwards;
  animation-delay: calc(var(--i, 0) * 90ms);
}
@keyframes faq-in { from { opacity: 0; transform: translateY(16px); } }

/* ==========================================================================
   2. Einstieg Hero (beim Laden, alle Browser)
   ========================================================================== */
.nav { animation: fade-down .7s var(--ease-out) both; }

.hero__heading .tag   { animation: fade-up .8s var(--ease-out) .10s both; }
.hero__heading .h1    { animation: fade-up .9s var(--ease-out) .20s both; }
.hero__lead           { animation: fade-up .9s var(--ease-out) .35s both; }
.hero__buttons        { animation: fade-up .9s var(--ease-out) .45s both; }
.hero .checks li      { animation: fade-up .8s var(--ease-out) both; }
.hero .checks li:nth-child(1) { animation-delay: .55s; }
.hero .checks li:nth-child(2) { animation-delay: .62s; }
.hero .checks li:nth-child(3) { animation-delay: .69s; }
.hero .checks li:nth-child(4) { animation-delay: .76s; }
.stage__window        { animation: fade-up 1.1s var(--ease-out) .6s both; }

/* Hero C (zweispaltig) */
.hero__eyebrow        { animation: fade-up .8s var(--ease-out) .10s both; }
/* Häkchen im Schild zeichnet sich einmal selbst */
.hero__eyebrow-check { animation: draw-check .6s var(--ease-out) .6s both; }
@keyframes draw-check { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.hero__title          { animation: fade-up .9s var(--ease-out) .20s both; }
/* --------------------------------------------------------------------------
   Chips: einmaliger, nacheinander ablaufender Einstieg
   1,1 s  Sprach-Chip gleitet von links rein
   2,2 s  Sprach-Animation (4 s): Text → Wellenform + Aufnahme-Kreis → Text
   6,4 s  Dokumente-Chip gleitet von rechts rein
   7,5 s  Dokument-Animation (6 s): Text → Upload mit Fortschritt → Text wird "gelesen"
   Hover startet die Animation des Chips erneut (js/hero-chips.js).
   Grundzustand ohne Animation = normaler Text (auch bei reduzierter Bewegung).
   -------------------------------------------------------------------------- */
@keyframes slide-in-left  { from { opacity: 0; translate: -32px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes slide-in-right { from { opacity: 0; translate: 32px 0; }  to { opacity: 1; translate: 0 0; } }
.hero__chip--voice    { animation: slide-in-left  .9s var(--ease-out) 1.1s both; }
.hero__chip--docs     { animation: slide-in-right .9s var(--ease-out) 6.4s both; }

.hero__chip--voice { --chip-duration: 4s; --chip-delay: 2.2s; }
.hero__chip--docs  { --chip-duration: 6s; --chip-delay: 7.5s; }
.hero__chip .chip__label,
.hero__chip .chip__wave,
.hero__chip .chip__rec,
.hero__chip .chip__upload,
.hero__chip .chip__progress i,
.hero__chip .chip__scan,
.hero__chip--docs .chip__icon img {
  animation-duration: var(--chip-duration);
  animation-delay: var(--chip-delay);
  animation-iteration-count: 1;
  animation-timing-function: var(--ease-soft);
}

/* Hover-Replay (js/hero-chips.js) */
.hero__chip.is-replay { --chip-delay: 0s; }
.hero__chip.is-reset :is(.chip__label, .chip__wave, .chip__rec, .chip__upload, .chip__progress i, .chip__scan, .chip__icon img) {
  animation: none !important;
}

/* Sprache */
.hero__chip--voice .chip__label { animation-name: voice-label; }
.hero__chip--voice .chip__wave  { animation-name: voice-layer; }
.hero__chip--voice .chip__rec   { animation-name: voice-layer; }
@keyframes voice-label {
  0%        { opacity: 1; }
  10%, 85%  { opacity: 0; }
  95%, 100% { opacity: 1; }
}
@keyframes voice-layer {
  0%        { opacity: 0; }
  10%, 85%  { opacity: 1; }
  95%, 100% { opacity: 0; }
}
/* laufen dauerhaft, sichtbar nur während der Aufnahme-Phase */
.chip__rec::before { animation: rec-ring 1.4s ease-out infinite; }
@keyframes rec-ring {
  from { opacity: .9; scale: .7; }
  to   { opacity: 0;  scale: 1.35; }
}
.chip__wave i {
  animation: wave-bar .9s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * -.17s);
}
.chip__wave i:nth-child(2n)   { animation-duration: .7s; }
.chip__wave i:nth-child(3n)   { animation-duration: 1.1s; }
.chip__wave i:nth-child(5n+1) { animation-duration: .55s; }
@keyframes wave-bar {
  from { scale: 1 .18; }
  to   { scale: 1 1; }
}

/* Dokument */
.hero__chip--docs .chip__upload     { animation-name: docs-upload; }
.hero__chip--docs .chip__progress i { animation-name: docs-progress; animation-timing-function: linear; }
.hero__chip--docs .chip__label      { animation-name: docs-read; animation-timing-function: linear; }
.hero__chip--docs .chip__scan       { animation-name: docs-scan; animation-timing-function: linear; }
.hero__chip--docs .chip__icon img   { animation-name: docs-icon; }

@keyframes docs-upload {
  0%        { opacity: 0; }
  8%, 45%   { opacity: 1; }
  52%, 100% { opacity: 0; }
}
@keyframes docs-progress {
  0%, 10%   { scale: 0 1; }
  25%       { scale: .45 1; }
  30%       { scale: .55 1; }
  44%, 100% { scale: 1 1; }
}
/* Icon "wird hochgeladen": hüpft dreimal nach oben */
@keyframes docs-icon {
  0%, 12%, 20%, 28%, 36%, 100% { translate: 0 0; }
  16%, 24%, 32%                { translate: 0 -3px; }
}
/* Label erscheint wieder und ein orangenes Leuchtband läuft lesend über den Text */
@keyframes docs-read {
  0% {
    opacity: 1;
    background-position: 100% 0;
  }
  8%, 45% {
    opacity: 0;
    background-position: 100% 0;
  }
  52% {
    opacity: 1;
    background-position: 100% 0;
  }
  92%, 100% {
    opacity: 1;
    background-position: 0% 0;
  }
}
.hero__chip--docs .chip__label {
  background: linear-gradient(90deg,
    var(--color-text-primary) 0 42%,
    var(--color-action-default) 50%,
    var(--color-text-primary) 58% 100%);
  background-size: 300% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Scanlinie fährt zweimal über das Dokument, während gelesen wird */
@keyframes docs-scan {
  0%, 52%   { opacity: 0; translate: 0 0; }
  55%       { opacity: 1; translate: 0 0; }
  64%       { translate: 0 12px; }
  73%       { translate: 0 0; }
  82%       { translate: 0 12px; opacity: 1; }
  88%, 100% { opacity: 0; translate: 0 12px; }
}

/* Bühne: rotierender Verlauf im Rahmen */
@property --border-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
@keyframes border-spin { to { --border-angle: 360deg; } }
.hero__device {
  animation: fade-up 1.1s var(--ease-out) .4s both, border-spin 6s linear infinite;
}

/* Scroll-Hinweis: erscheint spät, Pfeil wippt sanft */
.hero__scroll         { animation: appear 1s var(--ease-soft) 1.4s backwards; }
@keyframes appear { from { opacity: 0; } } /* endet bei der eigenen Deckkraft (dezent) */
.hero__scroll svg     { animation: nudge-down 2.4s ease-in-out 2.4s infinite; }
@keyframes nudge-down {
  0%, 60%, 100% { translate: 0 0; }
  30%           { translate: 0 4px; }
}

.hero__bars span { transform-origin: bottom; animation: grow-up 1.2s var(--ease-out) both; }
.hero__bars--left  span:nth-child(1) { animation-delay: .30s; }
.hero__bars--left  span:nth-child(2) { animation-delay: .40s; }
.hero__bars--left  span:nth-child(3) { animation-delay: .50s; }
.hero__bars--right span:nth-child(1) { animation-delay: .30s; }
.hero__bars--right span:nth-child(2) { animation-delay: .40s; }
.hero__bars--right span:nth-child(3) { animation-delay: .50s; }

.hero__glow { animation: fade-in 1.6s var(--ease-soft) both, breathe 9s ease-in-out 1.6s infinite; }


/* ==========================================================================
   3. Scroll-Animationen (nur mit Scroll-Timeline-Unterstützung)
   ========================================================================== */
@supports (animation-timeline: view()) {

  /* Lesefortschritt oben */
  body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto 0;
    height: 3px;
    z-index: 100;
    background: var(--color-action-default);
    transform-origin: left;
    animation: progress linear both;
    animation-timeline: scroll(root);
  }
  @keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

  /* Hero: Screenshot gleitet beim Scrollen nach oben, Balken parallax */
  .stage__content img {
    animation: stage-pan linear both;
    animation-timeline: scroll(root);
    animation-range: 0 900px;
  }
  @keyframes stage-pan { to { transform: translateY(-14%); } }

  .hero__bars {
    animation: bars-drift linear both;
    animation-timeline: scroll(root);
    animation-range: 0 1200px;
  }
  @keyframes bars-drift { to { transform: translateY(-80px); } }

  .hero__text,
  .hero__copy {
    animation: hero-out linear both;
    animation-timeline: scroll(root);
    animation-range: 0 700px;
  }
  @keyframes hero-out { to { opacity: .35; transform: translateY(-40px); } }

  /* Einblenden beim Reinscrollen */
  :where(
    main .section-header,
    .flow-header,
    .ki-head,
    .tabs,
    .benefit,
    .calc__text > *,
    .calc__card,
    .bento .card,
    .panels,
    .audiences > button,
    .trust__photo,
    .points > li,
    .plan,
    .plans-note,
    .faq__head,
    .final__text > *,
    .container > .small
  ) {
    animation: fade-up linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 55%;
  }

  /* Versatz innerhalb einer Reihe (zweites/drittes Element etwas später) */
  :where(.benefit, .bento__row > .card, .audiences > button, .plan, .final__text > *, .calc__text > *, .points > li):nth-child(2) {
    animation-range: entry 10% entry 65%;
  }
  :where(.benefit, .bento__row > .card, .audiences > button, .plan, .final__text > *, .calc__text > *, .points > li):nth-child(3) {
    animation-range: entry 20% entry 75%;
  }

  /* ---------- KI-Sektion ---------- */
  /* Hintergrund-Schein driftet langsam durch die Sektion */
  #ki-assistent::before {
    animation: ki-glow-drift linear both;
    animation-timeline: view();
    animation-range: cover 0% cover 100%;
  }
  @keyframes ki-glow-drift {
    from { translate: 0 -25%; }
    to   { translate: -55% 35%; }
  }

  /* Fotos: leichter Ken-Burns beim Durchscrollen */
  .photo img,
  .trust__photo img {
    animation: photo-zoom linear both;
    animation-timeline: view();
    animation-range: cover 0% cover 100%;
  }
  @keyframes photo-zoom {
    from { scale: 1.1; }
    to   { scale: 1; }
  }

  /* Große Ziffern in den Schritt-Karten: Parallax */
  .card__num {
    animation: num-drift linear both;
    animation-timeline: view();
    animation-range: cover 0% cover 100%;
  }
  @keyframes num-drift {
    from { translate: 0 60px; }
    to   { translate: 0 -30px; }
  }

  /* Bento-Icons erscheinen mit kleinem Dreh */
  .card__icon {
    animation: icon-in linear both;
    animation-timeline: view();
    animation-range: entry 30% cover 40%;
  }
  @keyframes icon-in {
    from { opacity: 0; rotate: -12deg; scale: .8; }
    to   { opacity: 1; rotate: 0deg;   scale: 1; }
  }

  /* Signet in der Vorteil-Karte wächst */
  .signet-lg span {
    animation: grow-up linear both;
    animation-timeline: view();
    animation-range: entry 40% cover 35%;
  }

  /* Rechner: Regler und Balken füllen sich */
  .slider__fill,
  .compare__fill {
    animation: fill-in linear both;
    animation-timeline: view();
    animation-range: entry 60% cover 45%;
  }
  @keyframes fill-in { from { width: 0; } }
  .slider__handle {
    animation: handle-in linear both;
    animation-timeline: view();
    animation-range: entry 60% cover 45%;
  }
  @keyframes handle-in { from { left: -12px; } }

  /* Zahlen zählen hoch (80 %, 90 %) */
  @property --num {
    syntax: "<integer>";
    inherits: false;
    initial-value: 0;
  }
  .count {
    --num: var(--to);
    counter-reset: num var(--num);
    animation: count-up linear both;
    animation-timeline: view();
    animation-range: entry 40% cover 45%;
  }
  @keyframes count-up { from { --num: 0; } }
  .count::before { content: counter(num) "\00a0%" / ""; }
  .count__text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* ==========================================================================
   4. Reduzierte Bewegung respektieren
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .count::before { content: none !important; }
  .count__text { position: static !important; width: auto !important; height: auto !important; clip-path: none !important; }
}
