/* Story composition: copy, artwork and controls have separate reserved areas.
   Shared by the shipped page and its source template. */
.story:not(.static) .stage {
  top: var(--story-nav, 57px);
  height: calc(100svh - var(--story-nav, 57px) - var(--story-notice, 0px));
}
.story:not(.static) .scene {
  top: 110px; bottom: 100px; left: max(24px, calc((100% - 1200px)/2));
  right: auto; width: min(46%, 560px); display: flex; align-items: center;
  text-align: left;
}
.story:not(.static) .scene .wrap { width: 100%; padding: 0; }
.story:not(.static) .scene .wrap > div { max-width: none; }
.story:not(.static) .scene h1, .story:not(.static) .scene h2 {
  font-size: clamp(2.2rem, 3.5vw, 4.2rem);
}
.story:not(.static) .scene .sub { margin-inline: 0; font-size: clamp(1rem, 1.3vw, 1.3rem); }
.story:not(.static) .scene .actions { justify-content: flex-start; }
.story:not(.static) .orbbox {
  --orb-intro-size: min(70vw, max(0px, calc(100svh - var(--story-nav, 57px) - var(--story-notice, 0px) - var(--story-copy, 380px) - 230px)));
  --orb-split-size: min(44vw, calc(100svh - var(--story-nav, 57px) - var(--story-notice, 0px) - 240px));
  left: calc(50% + 25% * var(--story-mix, 0));
  top: calc((130px + var(--story-copy, 380px) + var(--orb-intro-size) / 2) * (1 - var(--story-mix, 0)) + (50% - 10px) * var(--story-mix, 0));
  width: var(--orb-split-size);
  /* Keep one fixed-size WebGL surface: only its composited transform changes. */
  transform: translate(-50%, -50%) scale(calc(var(--story-intro-scale, .54) * (1 - var(--story-mix, 0)) + var(--story-mix, 0)));
}
.story:not(.static) .badge { bottom: 96px; right: max(24px, 12%); padding: 10px 16px; }
.story:not(.static) .step-hint { top: 64px; bottom: auto; text-align: center; }
.story:not(.static) .step-next { bottom: 28px; }
.story:not(.static) .motion-btn { bottom: 28px; }
/* The opening is a centered headline, unlike the subsequent split scenes. */
.story:not(.static) .scene.hero {
  top: 110px; bottom: auto; left: 24px; right: 24px; width: auto;
  display: block; text-align: center;
}
.story:not(.static) .scene.hero .wrap { max-width: 1400px; margin-inline: auto; }
.story:not(.static) .scene.hero h1 { font-size: clamp(3rem, 5vw, 5.4rem); }
.story:not(.static) .scene.hero .sub { margin-inline: auto; }
.story:not(.static) .scene.hero .actions { justify-content: center; }
@media (max-width: 900px) {
  .pnav .brand, .pnav .menu-btn { flex-shrink: 0; }
  .pnav .right { flex: 1; min-width: 0; justify-content: flex-end; }
  .pnav .right .btn { min-width: 0; white-space: normal; text-align: center; line-height: 1.2; font-size: .8125rem; padding: 6px 12px; }
  .story:not(.static) .scene {
    top: 108px; bottom: auto; left: 20px; right: 20px; width: auto;
    display: block; text-align: center;
  }
  .story:not(.static) .scene h1, .story:not(.static) .scene h2 { font-size: clamp(1.65rem, 6vw, 2.7rem); }
  .story:not(.static) .scene.hero { top: 108px; left: 20px; right: 20px; }
  .story:not(.static) .scene.hero h1 { font-size: clamp(1.9rem, 7.2vw, 3rem); }
  .story:not(.static) .scene .kicker { margin-bottom: 8px; font-size: .875rem; }
  .story:not(.static) .scene .sub { font-size: 1rem; margin-top: 12px; }
  .story:not(.static) .scene .actions { justify-content: center; gap: 8px; margin-top: 16px; }
  .story:not(.static) .scene .btn { min-height: 44px; padding: 10px 16px; font-size: .875rem; }
  /* Die WebGL-Fläche hat transparenten Rand: der sichtbare Blob ist nur ca. die Hälfte der Breite.
     Daher große Fläche, mittig im freien Bereich zwischen Text und Bedienknöpfen; sie fängt keine Klicks ab. */
  .story:not(.static) .orbbox, .story.intro:not(.static) .orbbox {
    --orb-free: max(0px, calc(100svh - var(--story-nav, 57px) - var(--story-notice, 0px) - 108px - var(--story-copy-now, var(--story-copy, 300px)) - 100px));
    /* sichtbarer Blob ~55 % der Fläche: Fläche = freier Platz x 1,7, damit nichts auf Text/Knöpfe ragt */
    --orb-size: clamp(200px, calc(var(--orb-free) * 1.7), min(100vw, 430px));
    left: 50%; top: calc(108px + var(--story-copy-now, var(--story-copy, 300px)) + var(--orb-free) / 2 - var(--orb-size) / 2);
    width: var(--orb-size); pointer-events: none;
    transform: translate(-50%, calc(var(--story-mix, 0) * 8px)) scale(calc(1 + .06 * var(--story-mix, 0)));
    transition: transform .6s cubic-bezier(.22,.61,.36,1);
  }
  .story:not(.static) .badge { left: 20px; right: 20px; bottom: 82px; padding: 6px 12px; gap: 10px; }
  .story:not(.static) .badge b { width: 30px; height: 30px; }
  .story:not(.static) .badge strong { font-size: .9375rem; }
  .story:not(.static) .badge span { font-size: .8125rem; }
  .story:not(.static) .step-hint { left: 16px; right: 16px; width: auto; max-width: none; transform: none; font-size: .75rem; }
  .story:not(.static) .step-next { left: 16px; bottom: 18px; transform: none; max-width: 53%; padding: 8px 12px; font-size: .75rem; }
  .story:not(.static) .motion-btn { right: 12px; bottom: 18px; max-width: 40%; font-size: .75rem; }
}
.story.static .stage .orbbox { width: min(92vw, 420px); }
.story.static .scene .wrap { padding-top: 24px; }
.story.static .scene { text-align: center; }
.story.static .scene.left .wrap > div { max-width: 34rem; margin-inline: auto; }
.story.static .scene .sub { margin-inline: auto; }
.story.static .badge { max-width: calc(100% - 32px); }
.story.compact .motion-btn { display: none; }
/* Handy: Start-Schritt aufgeräumt - die Marke steht schon in der Kopfzeile, die Schritt-Leiste erklärt sich selbst.
   Knöpfe: Hauptknopf volle Breite, die übrigen nebeneinander (statt 2+1-Umbruch). */
@media (max-width: 900px) {
  .story .scene.hero .kicker { display: none; }
  .story:not(.static) .scene.hero { top: 80px; }
  .story:not(.static) .step-hint { display: none; }
  .story .scene.hero .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
  .story .scene.hero .actions > .btn { width: 100%; box-sizing: border-box; justify-content: center; text-align: center; white-space: normal; line-height: 1.2; }
  .story .scene.hero .actions > .btn:first-child, .story .scene.hero .actions > .btn:last-child:nth-child(2) { grid-column: 1 / -1; }
}

/* Hero-Aktionen: Hauptknopf ist "Live ausprobieren", sobald die Demo verfuegbar ist (JS setzt .has-live);
   sonst bleibt "Unverbindlich anfragen" der Hauptknopf. "Anhoeren" ist ein ruhiger Textlink. */
.story .scene.hero .actions .btn.ghost { color: #8af3c8; border-color: #8af3c8; }
.story .scene.hero .actions .btn.quiet { border-color: transparent; text-decoration: underline; text-underline-offset: 4px; padding-inline: 14px; }
.story .scene.hero .actions .btn.quiet:hover { background: transparent; text-decoration-thickness: 2px; }
.story .scene.hero .actions.has-live #liveDemoBtn { order: -1; background: var(--btn-bg); color: var(--btn-text); border-color: transparent; }
.story .scene.hero .actions.has-live #liveDemoBtn:hover { background: var(--btn-hover); }
.story .scene.hero .actions.has-live > a[data-open-lead] { background: transparent; color: #8af3c8; border-color: #8af3c8; }
.story .scene.hero .actions.has-live > a[data-open-lead]:hover { background: color-mix(in srgb, #8af3c8 14%, transparent); }
@media (max-width: 900px) {
  .story .scene.hero .actions.has-live > .btn:first-child { grid-column: auto; }
  .story .scene.hero .actions.has-live #liveDemoBtn { grid-column: 1 / -1; }
  .story .scene.hero .actions:not(.has-live) > .btn.quiet { grid-column: 1 / -1; }
}
