/* Modul: Prozess-Rad (.process-orbit) — datengetriebene Variante des Leistungs-Rad-Prototyps.
 * Bis zu 7 Schritte kreisförmig um ein becKI 32×32-Display.
 * Headline/Intro stehen außerhalb der hellen Kreisfläche.
 */

/* —— Vertikale Abstände Illu-Rad (global, alle Vorkommen) —— */

/* 1) Luft über der Headline ~halbieren (Modul-Abstand + Section-Padding) */
.article-body .article-main > * + .section--process-orbit {
  margin-top: clamp(1.375rem, 3vw, 2.25rem);
}
.article-body .article-main > *:has(+ .section--process-orbit) {
  padding-bottom: clamp(1rem, 2.5vw, 1.5rem);
}

.section--process-orbit {
  padding-top: clamp(0.5rem, 1.25vw, 0.75rem);
  padding-bottom: clamp(0.5rem, 1.25vw, 0.75rem);
}

.process-orbit-wrap {
  --po-disk-size: min(96vw, 634px);
  --po-stage-size: calc(var(--po-disk-size) - 2 * clamp(0.35rem, 1vw, 0.55rem));
  margin: clamp(0.375rem, 1vw, 0.6875rem) 0;
  container-type: inline-size;
}

/* 2) Intro → Rad: +20px gegenüber vorher (~12px → ~32px) */
.process-orbit-wrap > .process-orbit__header {
  max-width: min(96vw, 52rem);
  margin: 0 auto calc(0.75rem + 20px);
  padding: 0 clamp(0.55rem, 1.4vw, 0.85rem);
  text-align: center;
  color: var(--text, #323a49);
}

.process-orbit__kicker {
  margin: 0 0 0.5rem;
  color: inherit;
}

/* 3) Luft unter dem Rad zum nächsten Modul ~halbieren */
.article-body .article-main > .section--process-orbit + * {
  margin-top: clamp(1.375rem, 3vw, 2.25rem);
}
.article-body .article-main > .section--process-orbit + .section {
  padding-top: clamp(1rem, 2.5vw, 1.5rem);
}

/* Headline/Intro wie Solo-Freitext (.section--prose) */
.process-orbit__headline {
  margin: 0 0 calc(0.75rem + 12px);
  font-size: clamp(1.55rem, 3.8vw, 2.35rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: inherit;
}

.process-orbit__subtitle {
  margin: 0 auto;
  font-size: clamp(0.9rem, 1.6vw, 1rem);
  line-height: 1.55;
  color: var(--text, #323a49);
  max-width: 78ch;
}

.process-orbit__subtitle > p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

/* Dunkler HG: Headline + Intro weiß (sonst unsichtbar auf --purple-std) */
.bec-band-dark .process-orbit-wrap > .process-orbit__header,
.bec-module-wrap.bec-band-dark .process-orbit-wrap > .process-orbit__header {
  color: var(--white, #fff);
}

.bec-band-dark .process-orbit-wrap .process-orbit__headline,
.bec-band-dark .process-orbit-wrap .process-orbit__subtitle,
.bec-band-dark .process-orbit-wrap .process-orbit__subtitle > p,
.bec-module-wrap.bec-band-dark .process-orbit-wrap .process-orbit__headline,
.bec-module-wrap.bec-band-dark .process-orbit-wrap .process-orbit__subtitle,
.bec-module-wrap.bec-band-dark .process-orbit-wrap .process-orbit__subtitle > p {
  color: var(--white, #fff);
}

.process-orbit-tile {
  box-sizing: border-box;
  width: var(--po-disk-size);
  height: var(--po-disk-size);
  margin-inline: auto;
  background: #b0bec8;
  border-radius: 50%;
  padding: 0;
  overflow: visible;
  display: grid;
  place-items: center;
  box-shadow:
    0 16px 36px rgba(32, 38, 48, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.process-orbit {
  --po-size: var(--po-stage-size);
  --po-core: calc(var(--po-size) * 0.48);
  --po-radius: calc(var(--po-size) * 0.315);
  --po-bubble: clamp(108px, 15.2vw, 128px);
  --po-bubble-wide: clamp(210px, 28vw, 280px);
  --po-accent: #007faf;
  --po-expand-dur: 0.3s;
  --po-expand-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --po-details-delay: 0.26s;
  position: relative;
  width: var(--po-size);
  height: var(--po-size);
  margin: 0 auto;
  font-family: "Raleway", system-ui, sans-serif;
  overflow: visible;
}

.process-orbit--full .process-orbit {
  --po-size: var(--po-stage-size);
}

/* Weniger Schritte → größere Bubbles (mehr Platz für vollständige Titel) */
.process-orbit--count-3 {
  --po-bubble: clamp(136px, 17.5vw, 168px);
  --po-bubble-wide: clamp(260px, 34vw, 320px);
}

.process-orbit--count-4 {
  --po-bubble: clamp(126px, 16.5vw, 156px);
  --po-bubble-wide: clamp(240px, 32vw, 300px);
}

.process-orbit--count-5 {
  --po-bubble: clamp(120px, 16vw, 150px);
  --po-bubble-wide: clamp(230px, 30vw, 290px);
}

.process-orbit--count-6 {
  --po-bubble: clamp(112px, 15.6vw, 140px);
  --po-bubble-wide: clamp(220px, 29vw, 280px);
}

.process-orbit--count-7 {
  --po-bubble: clamp(118px, 16vw, 140px);
  --po-bubble-wide: clamp(220px, 29vw, 270px);
}

.process-orbit--matrix-links .process-orbit__matrix-shell {
  opacity: 1;
}

.process-orbit--matrix-links .process-orbit__hub {
  filter: none;
}

.process-orbit__hub {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--po-core);
  height: var(--po-core);
  margin: calc(var(--po-core) * -0.5) 0 0 calc(var(--po-core) * -0.5);
  z-index: 4;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.process-orbit__matrix-shell {
  width: 100%;
  height: 100%;
  background: transparent;
}

.process-orbit__matrix {
  display: block;
  width: 100%;
  height: 100%;
}

.process-orbit__bubbles {
  position: absolute;
  inset: 0;
  z-index: 5;
}

.process-orbit__bubble {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--po-bubble);
  overflow: visible;
  --po-edge-shift: 0px;
  transform-origin: center center;
  transform:
    translate(-50%, -50%)
    rotate(calc(var(--po-angle) * 1deg))
    translateY(calc(var(--po-radius) * -1))
    rotate(calc(var(--po-angle) * -1deg))
    translateX(var(--po-edge-shift));
  transition:
    width var(--po-expand-dur) var(--po-expand-ease),
    transform var(--po-expand-dur) var(--po-expand-ease);
}

.process-orbit__bubble:hover,
.process-orbit__bubble:focus-within {
  width: var(--po-bubble-wide);
  z-index: 8;
}

.process-orbit__bubble-card {
  position: relative;
  display: block;
  width: 100%;
  min-height: var(--po-bubble);
  height: var(--po-bubble);
  padding: 0;
  border-radius: 999px;
  background: var(--po-accent);
  color: #fff;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--po-accent) 36%, transparent);
  text-align: center;
  overflow: visible;
  transition:
    border-radius var(--po-expand-dur) var(--po-expand-ease),
    min-height var(--po-expand-dur) var(--po-expand-ease),
    height var(--po-expand-dur) var(--po-expand-ease),
    box-shadow 0.28s ease;
}

.process-orbit__bubble:hover .process-orbit__bubble-card,
.process-orbit__bubble:focus-within .process-orbit__bubble-card {
  min-height: var(--po-expand-h, var(--po-bubble));
  height: var(--po-expand-h, var(--po-bubble));
  max-height: none;
  border-radius: 18px;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--po-accent) 44%, transparent);
  overflow: visible;
}

/*
 * STABILITY: Dual-Layer-Crossfade — nicht auf max-height/height:auto wechseln.
 * Idle + Expand absolut gestapelt; Idle behält feste --po-bubble-Höhe beim Expand.
 */
.process-orbit__bubble-state {
  position: absolute;
  inset: 0;
  width: 100%;
  transition: opacity 0.16s ease, visibility 0s linear;
}

.process-orbit__bubble-state--idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: var(--po-bubble);
  max-height: var(--po-bubble);
  padding: 0.5rem 0.7rem 0.42rem;
  box-sizing: border-box;
  z-index: 1;
}

.process-orbit__bubble:hover .process-orbit__bubble-state--idle,
.process-orbit__bubble:focus-within .process-orbit__bubble-state--idle {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.14s ease,
    visibility 0s linear 0.14s;
}

.process-orbit__bubble-state--expand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0.7rem 0.85rem 0.75rem;
  box-sizing: border-box;
  overflow: visible;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 2;
  transition:
    opacity 0.2s ease 0.1s,
    visibility 0s linear 0.1s;
}

.process-orbit__bubble:hover .process-orbit__bubble-state--expand,
.process-orbit__bubble:focus-within .process-orbit__bubble-state--expand {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.2s ease 0.08s,
    visibility 0s linear 0.08s;
}

.process-orbit__bubble-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  text-align: center;
}

.process-orbit__bubble-state--expand .process-orbit__bubble-head {
  justify-content: flex-start;
}

.process-orbit__bubble-num {
  display: grid;
  place-items: center;
  width: 1.95rem;
  height: 1.95rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: var(--po-accent);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.process-orbit__bubble-title {
  margin: 0;
  width: 100%;
  max-width: none;
  padding: 0 0.15rem;
  font-size: clamp(0.78rem, 1.55vw, 0.92rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #fff;
  text-align: center;
}

.process-orbit__bubble-title--idle {
  white-space: normal;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
  /* Auto-Trennung (lang=de) + Soft-Hyphens aus JS; Fallback break-word. */
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.15;
}

.process-orbit__bubble-title--expand {
  white-space: normal;
  overflow: visible;
  max-width: 100%;
  box-sizing: border-box;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.28;
}

.process-orbit__bubble-details {
  display: block;
  flex: 1 1 auto;
  align-self: stretch;
  width: 100%;
  margin: 0;
  padding: 0.4rem 0.2rem 0.2rem;
  text-decoration: none;
  color: inherit;
  opacity: 0;
  visibility: hidden;
  box-sizing: border-box;
  border-radius: 8px;
  /* Rollout: sofort hart weg — kein Fade, sonst blitzt Text über der schrumpfenden Kachel. */
  transition: none;
}

.process-orbit__bubble-details--link {
  cursor: pointer;
}

.process-orbit__bubble-details--link:hover,
.process-orbit__bubble-details--link:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.process-orbit__bubble:hover .process-orbit__bubble-details,
.process-orbit__bubble:focus-within .process-orbit__bubble-details {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.22s ease var(--po-details-delay), visibility 0s linear;
}

.process-orbit__bubble-details-empty {
  margin: 0.2rem 0 0;
  padding: 0.35rem 0.5rem;
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
}

.process-orbit__bubble-details-body {
  margin: 0;
  padding: 0.2rem 0.35rem 0.15rem;
  text-align: left;
}

.process-orbit__bubble-details-p {
  margin: 0 0 0.5em;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.96);
  text-align: left;
  white-space: normal;
  hyphens: none;
  word-break: normal;
  overflow-wrap: break-word;
}

.process-orbit__bubble-details-p:last-child {
  margin-bottom: 0;
}

/* Legacy (ältere Caches): Listen ohne Bullet-Marker wie Fließtext */
.process-orbit__bubble-details-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35em;
  margin: 0;
  padding: 0.12rem 0.45rem 0.08rem;
  list-style: none;
}

.process-orbit__bubble-details-list li {
  position: relative;
  width: 100%;
  padding: 0;
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.96);
  text-align: left;
  white-space: normal;
  overflow-wrap: break-word;
}

.process-orbit__bubble-details-list li::before {
  content: none;
}

/* Mid-Desktop / Retina-schmal (~720–1280): Bubbles etwas größer als reiner Desktop-Clamp. */
@media (max-width: 1280px) and (min-width: 721px) {
  .process-orbit,
  .process-orbit--full .process-orbit {
    --po-radius: calc(var(--po-size) * 0.322);
  }

  .process-orbit--count-3 {
    --po-bubble: clamp(132px, 14vw, 162px);
    --po-bubble-wide: clamp(250px, 30vw, 310px);
  }

  .process-orbit--count-4 {
    --po-bubble: clamp(124px, 13.5vw, 152px);
    --po-bubble-wide: clamp(235px, 28vw, 295px);
  }

  .process-orbit--count-5 {
    --po-bubble: clamp(118px, 13vw, 146px);
    --po-bubble-wide: clamp(225px, 27vw, 285px);
  }

  .process-orbit--count-6 {
    --po-bubble: clamp(114px, 12.8vw, 138px);
    --po-bubble-wide: clamp(220px, 26vw, 275px);
  }

  .process-orbit--count-7 {
    --po-bubble: clamp(116px, 13vw, 138px);
    --po-bubble-wide: clamp(215px, 26vw, 265px);
  }

  .process-orbit__bubble-num {
    width: 1.8rem;
    height: 1.8rem;
    font-size: 0.84rem;
  }
}

@media (max-width: 720px) {
  /*
   * Schmal (~≤720 / ca. 500px): größere Bubbles + Expand-Kacheln,
   * damit Titel nicht mit Einzelbuchstaben umbrechen und Rollover Platz hat.
   */
  .section--process-orbit {
    overflow-x: clip;
  }

  .process-orbit-wrap {
    --po-disk-size: min(120vw, 540px);
    --po-stage-size: calc(var(--po-disk-size) - 2 * clamp(0.35rem, 1vw, 0.55rem));
    width: 100%;
    max-width: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .process-orbit-wrap > .process-orbit__header {
    width: 100%;
    max-width: min(96vw, 52rem);
    box-sizing: border-box;
  }

  .process-orbit-tile {
    width: var(--po-disk-size);
    height: var(--po-disk-size);
    margin-inline: 0;
    flex: 0 0 var(--po-disk-size);
  }

  .process-orbit,
  .process-orbit--full .process-orbit {
    --po-radius: calc(var(--po-size) * 0.328);
  }

  .process-orbit--count-3 {
    --po-bubble: clamp(112px, 26vw, 136px);
    --po-bubble-wide: clamp(220px, 56vw, 300px);
  }

  .process-orbit--count-4 {
    --po-bubble: clamp(104px, 24.5vw, 128px);
    --po-bubble-wide: clamp(210px, 54vw, 290px);
  }

  .process-orbit--count-5 {
    --po-bubble: clamp(100px, 23.5vw, 122px);
    --po-bubble-wide: clamp(200px, 52vw, 280px);
  }

  .process-orbit--count-6 {
    --po-bubble: clamp(96px, 22.5vw, 118px);
    --po-bubble-wide: clamp(196px, 52vw, 280px);
  }

  .process-orbit--count-7 {
    --po-bubble: clamp(98px, 23vw, 118px);
    --po-bubble-wide: clamp(190px, 50vw, 270px);
  }

  .process-orbit__bubble-num {
    width: 1.65rem;
    height: 1.65rem;
    font-size: 0.78rem;
  }

  .process-orbit__bubble-title {
    font-size: clamp(0.72rem, 2.55vw, 0.86rem);
  }

  .process-orbit__bubble-state--idle {
    padding: 0.42rem 0.55rem 0.38rem;
  }

  .process-orbit__bubble-state--expand {
    padding: 0.65rem 0.8rem 0.7rem;
  }

  .process-orbit__bubble-details-p {
    font-size: 0.76rem;
    line-height: 1.42;
  }

  /*
   * Schmal: Disk ~120vw → Seiten-Bubbles am Viewport-Rand.
   * Expanded-Kacheln der äußeren Bubbles zur Mitte schieben (nicht idle-Größe ändern).
   */
  .process-orbit__bubble[data-po-edge="left"]:hover,
  .process-orbit__bubble[data-po-edge="left"]:focus-within {
    --po-edge-shift: calc((var(--po-bubble-wide) - var(--po-bubble)) * 0.62);
  }

  .process-orbit__bubble[data-po-edge="right"]:hover,
  .process-orbit__bubble[data-po-edge="right"]:focus-within {
    --po-edge-shift: calc((var(--po-bubble-wide) - var(--po-bubble)) * -0.62);
  }
}

@media (prefers-reduced-motion: reduce) {
  .process-orbit__bubble,
  .process-orbit__bubble-card,
  .process-orbit__bubble-state,
  .process-orbit__bubble-head,
  .process-orbit__bubble-details {
    transition: none;
  }
}
