/* ==========================================================================
   kyb-sk-continuity — Baustein „Business and Service Continuity"
   (Sicherheitskonzept). Kopf mit zweistufiger Überschrift, daneben ein ruhiger
   Kreislauf aus drei Phasen um einen durchgehenden Betriebs-Puls. Darunter die
   Phasen: ab 1100 px nebeneinander an einer gemeinsamen Leitung, sonst als
   senkrechte Kette.

   Icons wie im Profil: helle Kontur + versetzte Neon-Fläche.
   Bewegung nur mit .kyb-skc--anim (setzt kyb-sk-continuity.js, wenn Bewegung
   erlaubt ist). Dauerbewegung (Läufer, Puls, Signal) langsam und nur ohne
   reduzierte Bewegung. Ohne JS ist alles sofort sichtbar.
   ========================================================================== */

.kyb-skc {
  --kyb-skc-line: rgba(238, 240, 244, .92);
  --kyb-skc-grund: var(--kyb-stage);
  --kyb-skc-icon: 64px;
  --kyb-skc-takt: 24s;              /* ein Umlauf im Kreislauf */
  position: relative;
}
.kyb-skc.k-set--stage_2 { --kyb-skc-grund: var(--kyb-stage-2); }
.kyb-skc.k-set--surface { --kyb-skc-grund: var(--kyb-surface); }

/* --- Kopf --------------------------------------------------------------- */
.kyb-skc__kopf {
  display: grid;
  gap: var(--s5);
  align-items: center;
  margin-bottom: clamp(var(--s5), 4vw, var(--s7));
}
@media (min-width: 760px) {
  .kyb-skc__kopf {
    grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
    column-gap: clamp(var(--s5), 5vw, var(--s9));
  }
}
@media (min-width: 1100px) {
  .kyb-skc__kopf { grid-template-columns: minmax(0, 1fr) 380px; }
}
.kyb-skc__titel .kyb-kicker { margin-bottom: var(--s2); }

.kyb-skc__h {
  color: var(--kyb-white);
  font-weight: 300;
  font-size: clamp(1.6rem, 2.6vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -.01em;
}
.kyb-skc__anfang { display: block; }
.kyb-skc__gross {
  display: block;
  margin-top: .06em;
  font-weight: 600;
  font-size: clamp(2.3rem, 4vw, 3.3rem);
  line-height: 1;
  letter-spacing: -.032em;
  text-wrap: balance;
}
.kyb-skc__intro {
  margin-top: var(--s4);
  max-width: 34em;
  color: var(--kyb-text-2);
  font-size: clamp(1.06rem, 1.3vw, 1.2rem);
  line-height: 1.55;
  text-wrap: pretty;
}
.kyb-skc__intro .kyb-neon { color: var(--kyb-white); }

/* --- Kreislauf ---------------------------------------------------------- */
.kyb-skc__kreis {
  width: min(100%, 380px);
  justify-self: end;
}
@media (max-width: 759px) {
  .kyb-skc__kreis { width: min(78%, 300px); justify-self: center; }
}
.kyb-skc__svg { display: block; width: 100%; height: auto; overflow: visible; }

.kyb-skc__bahn {
  fill: none;
  stroke: #fff;
  stroke-width: 1;
  stroke-dasharray: 1 7;
  stroke-linecap: round;
  opacity: .22;
}
.kyb-skc__nabe {
  fill: rgba(255, 255, 255, .025);
  stroke: rgba(255, 255, 255, .12);
  stroke-width: 1;
}
.kyb-skc__boegen path {
  fill: none;
  stroke: rgba(255, 255, 255, .34);
  stroke-width: 1.4;
  stroke-linecap: round;
}
.kyb-skc__pfeil path {
  fill: none;
  stroke: rgba(255, 255, 255, .55);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Betriebs-Puls in der Mitte */
.kyb-skc__betrieb path {
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.kyb-skc__puls-grund { stroke: rgba(15, 255, 155, .55); }
.kyb-skc__puls-licht {
  stroke: var(--kyb-neon);
  stroke-width: 2.2 !important;
  stroke-dasharray: .16 .84;
  stroke-dashoffset: 1.16;
  opacity: 0;
  filter: drop-shadow(0 0 4px rgba(15, 255, 155, .7));
}
.kyb-skc__mitte {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-anchor: middle;
  fill: var(--kyb-text-3);
}

/* Knoten */
.kyb-skc__punkt {
  fill: var(--kyb-skc-grund);
  stroke: rgba(238, 240, 244, .55);
  stroke-width: 1.4;
}
.kyb-skc__halo {
  fill: none;
  stroke: var(--kyb-neon);
  stroke-width: 1;
  opacity: 0;
}
.kyb-skc__knr {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
  text-anchor: middle;
  fill: var(--kyb-text-2);
}
.kyb-skc__kname {
  font-family: var(--font);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.005em;
  fill: var(--kyb-white);
}

/* Läufer: ein Punkt, der einmal in --kyb-skc-takt umläuft */
.kyb-skc__laeufer {
  transform-box: view-box;
  transform-origin: 160px 160px;
  opacity: 0;
}
.kyb-skc__laeufer circle {
  fill: var(--kyb-neon);
  filter: drop-shadow(0 0 5px rgba(15, 255, 155, .8));
}

@media (prefers-reduced-motion: no-preference) {
  .kyb-skc__laeufer {
    opacity: 1;
    animation: kybSkcUmlauf var(--kyb-skc-takt) linear infinite;
  }
  /* Der Knoten leuchtet kurz, wenn der Läufer ihn erreicht (0°, 120°, 240°). */
  .kyb-skc__k .kyb-skc__punkt { animation: kybSkcKnoten var(--kyb-skc-takt) ease-in-out infinite; }
  .kyb-skc__k .kyb-skc__halo  { animation: kybSkcHalo var(--kyb-skc-takt) ease-in-out infinite; }
  .kyb-skc__k .kyb-skc__knr   { animation: kybSkcNr var(--kyb-skc-takt) ease-in-out infinite; }
  .kyb-skc__k:nth-of-type(1) * { animation-delay: 0s; }
  .kyb-skc__k[data-i="1"] * { animation-delay: calc(var(--kyb-skc-takt) / -3 * 2); }
  .kyb-skc__k[data-i="2"] * { animation-delay: calc(var(--kyb-skc-takt) / -3); }
  /* Puls: ein Lichtfleck zieht ruhig über die Betriebslinie */
  .kyb-skc__puls-licht { opacity: 1; animation: kybSkcPuls 6s cubic-bezier(.45, 0, .55, 1) infinite; }
}
@keyframes kybSkcUmlauf { to { transform: rotate(360deg); } }
@keyframes kybSkcKnoten {
  0%, 100% { fill: var(--kyb-neon); stroke: var(--kyb-neon); }
  9%, 91%  { fill: var(--kyb-skc-grund); stroke: rgba(238, 240, 244, .55); }
}
@keyframes kybSkcHalo {
  0%, 100% { opacity: .45; }
  9%, 91%  { opacity: 0; }
}
@keyframes kybSkcNr {
  0%, 100% { fill: var(--kyb-stage); }
  9%, 91%  { fill: var(--kyb-text-2); }
}
@keyframes kybSkcPuls {
  0%   { stroke-dashoffset: 1.16; }
  70%, 100% { stroke-dashoffset: 0; }
}

/* --- Phasen ------------------------------------------------------------- */
.kyb-skc__phasen {
  --kyb-skc-abstand: var(--s6);
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--kyb-skc-abstand);
  counter-reset: none;
}
.kyb-skc__p {
  position: relative;
  display: grid;
  grid-template-columns: var(--kyb-skc-icon) minmax(0, 1fr);
  column-gap: var(--s4);
  align-items: start;
  align-content: start;
}
.kyb-skc__marke {
  position: relative;
  z-index: 1;
  width: var(--kyb-skc-icon);
  height: var(--kyb-skc-icon);
}

/* Senkrechte Kette (unter 1100 px): Leitung zum nächsten Icon */
.kyb-skc__p:not(:last-child)::before,
.kyb-skc__p:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(var(--kyb-skc-icon) / 2 - .5px);
  top: calc(var(--kyb-skc-icon) + 14px);
  bottom: calc(-1 * var(--kyb-skc-abstand) + 14px);
  width: 1px;
  pointer-events: none;
}
.kyb-skc__p:not(:last-child)::before {
  background: var(--kyb-line-strong);
  transform-origin: top;
  transition: transform 1.2s cubic-bezier(.45, 0, .2, 1) .5s;
}
.kyb-skc__p:not(:last-child)::after {
  width: 3px;
  left: calc(var(--kyb-skc-icon) / 2 - 1.5px);
  background: linear-gradient(to bottom, transparent, var(--kyb-neon), transparent) no-repeat;
  background-size: 100% 56px;
  background-position: 0 -56px;
  opacity: 0;
}

.kyb-skc__koerper { min-width: 0; }
.kyb-skc__nr {
  display: flex;
  align-items: baseline;
  gap: .9em;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .22em;
  line-height: 1;
  color: var(--kyb-neon);
}
.kyb-skc__phase {
  color: var(--kyb-text-3);
  text-transform: uppercase;
  letter-spacing: .18em;
}
.kyb-skc__phase::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  margin-right: .9em;
  vertical-align: .3em;
  background: var(--kyb-line-strong);
}
.kyb-skc__t {
  margin-top: var(--s2);
  color: var(--kyb-white);
  font-weight: 600;
  font-size: clamp(1.25rem, 1.8vw, 1.45rem);
  line-height: 1.2;
  letter-spacing: -.014em;
  text-wrap: balance;
}
.kyb-skc__x {
  margin-top: var(--s2);
  max-width: 36em;
  color: var(--kyb-text-2);
  font-size: 1.06rem;
  line-height: 1.62;
  text-wrap: pretty;
  hyphens: auto;
  -webkit-hyphens: auto;
  hyphenate-limit-chars: 12 5 5;
}
.kyb-skc__x .kyb-neon { color: var(--kyb-white); font-weight: 500; hyphens: manual; -webkit-hyphens: manual; }

@media (prefers-reduced-motion: no-preference) {
  .kyb-skc__p:not(:last-child)::after {
    opacity: .75;
    animation: kybSkcSignalY 10s cubic-bezier(.45, 0, .55, 1) infinite;
    animation-delay: calc(var(--i, 0) * 2s);
  }
}
@keyframes kybSkcSignalY {
  0%   { background-position: 0 -56px; }
  18%, 100% { background-position: 0 calc(100% + 56px); }
}

/* Nebeneinander (ab 1100 px): gemeinsame Leitung durch die Icons */
@media (min-width: 1100px) {
  .kyb-skc--n3 .kyb-skc__phasen,
  .kyb-skc--n2 .kyb-skc__phasen {
    grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr));
    column-gap: clamp(var(--s5), 4vw, var(--s8));
  }
  .kyb-skc--n2 .kyb-skc__phasen { --n: 2; }
  .kyb-skc--n3 .kyb-skc__p,
  .kyb-skc--n2 .kyb-skc__p {
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--s4);
  }
  .kyb-skc--n3 .kyb-skc__p:not(:last-child)::before,
  .kyb-skc--n3 .kyb-skc__p:not(:last-child)::after,
  .kyb-skc--n2 .kyb-skc__p:not(:last-child)::before,
  .kyb-skc--n2 .kyb-skc__p:not(:last-child)::after {
    top: calc(var(--kyb-skc-icon) / 2 - .5px);
    bottom: auto;
    left: calc(var(--kyb-skc-icon) + 18px);
    right: calc(-1 * clamp(var(--s5), 4vw, var(--s8)) + 18px);
    width: auto;
    height: 1px;
  }
  .kyb-skc--n3 .kyb-skc__p:not(:last-child)::before,
  .kyb-skc--n2 .kyb-skc__p:not(:last-child)::before { transform-origin: left; }
  .kyb-skc--n3 .kyb-skc__p:not(:last-child)::after,
  .kyb-skc--n2 .kyb-skc__p:not(:last-child)::after {
    top: calc(var(--kyb-skc-icon) / 2 - 1.5px);
    height: 3px;
    background: linear-gradient(to right, transparent, var(--kyb-neon), transparent) no-repeat;
    background-size: 90px 100%;
    background-position: -90px 0;
  }
  /* Pfeilspitze am Ende der Leitung */
  .kyb-skc__marke::after { content: none; }
  .kyb-skc--n3 .kyb-skc__p:not(:first-child) .kyb-skc__marke::before,
  .kyb-skc--n2 .kyb-skc__p:not(:first-child) .kyb-skc__marke::before {
    content: "";
    position: absolute;
    left: -16px;
    top: calc(50% - 4px);
    width: 8px;
    height: 8px;
    border-top: 1.4px solid rgba(255, 255, 255, .45);
    border-right: 1.4px solid rgba(255, 255, 255, .45);
    transform: rotate(45deg);
  }
  .kyb-skc--n3 .kyb-skc__x,
  .kyb-skc--n2 .kyb-skc__x { max-width: none; }
}
@media (min-width: 1100px) and (prefers-reduced-motion: no-preference) {
  .kyb-skc--n3 .kyb-skc__p:not(:last-child)::after,
  .kyb-skc--n2 .kyb-skc__p:not(:last-child)::after {
    animation-name: kybSkcSignalX;
  }
}
@keyframes kybSkcSignalX {
  0%   { background-position: -90px 0; }
  18%, 100% { background-position: calc(100% + 90px) 0; }
}

/* --- Icons -------------------------------------------------------------- */
.kyb-skc__icon {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  color: var(--kyb-skc-line);
}
.kyb-skc__fill {
  fill: var(--kyb-neon);
  transform-box: view-box;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.kyb-skc__line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.kyb-skc__ink { color: var(--kyb-skc-grund); }
.kyb-skc__p:hover .kyb-skc__fill { transform: translate(-3px, -3px); }

/* --- Schmal ------------------------------------------------------------- */
@media (max-width: 759px) {
  .kyb-skc { --kyb-skc-icon: 44px; }
  .kyb-skc__phasen { --kyb-skc-abstand: var(--s5); }
  .kyb-skc__kopf { gap: var(--s4); }
  .kyb-skc__p { column-gap: var(--s2); }
  .kyb-skc__t { font-size: 1.2rem; margin-top: var(--s1); }
  .kyb-skc__x { font-size: 1rem; line-height: 1.58; }
  .kyb-skc__gross { font-size: clamp(2.3rem, 11vw, 3rem); }
  .kyb-skc__intro { font-size: 1.04rem; }
}
@media (min-width: 760px) and (max-width: 1099px) {
  .kyb-skc__phasen { max-width: 760px; }
}

/* --- Einblenden (nur mit JS) ------------------------------------------- */
.kyb-skc--anim [data-skc-reveal] { opacity: 0; }
.kyb-skc--anim [data-skc-reveal].is-in {
  opacity: 1;
  animation: kybSkcRein 1.1s cubic-bezier(.2, .7, .2, 1) backwards;
  animation-delay: calc(var(--d, var(--i, 0)) * 220ms);
}
.kyb-skc--anim .kyb-skc__p.is-in .kyb-skc__line > * {
  stroke-dasharray: 1;
  animation: kybSkcZug 1.6s cubic-bezier(.45, 0, .2, 1) backwards;
  animation-delay: calc(var(--i, 0) * 220ms + 200ms);
}
.kyb-skc--anim .kyb-skc__p.is-in .kyb-skc__fill {
  animation: kybSkcFlaeche 1s cubic-bezier(.2, .7, .2, 1) backwards;
  animation-delay: calc(var(--i, 0) * 220ms + 1.1s);
}
.kyb-skc--anim .kyb-skc__p.is-in .kyb-skc__ink {
  animation: kybSkcTinte 1s ease backwards;
  animation-delay: calc(var(--i, 0) * 220ms + 1.3s);
}
.kyb-skc--anim .kyb-skc__p:not(.is-in)::before { transform: scale(0); }

.kyb-skc--anim .kyb-skc__kreis.is-in .kyb-skc__boegen path {
  stroke-dasharray: 1;
  animation: kybSkcZug 1.1s cubic-bezier(.45, 0, .2, 1) backwards;
  animation-delay: calc(500ms + var(--k) * 300ms);
}
.kyb-skc--anim .kyb-skc__kreis.is-in .kyb-skc__bahn,
.kyb-skc--anim .kyb-skc__kreis.is-in .kyb-skc__nabe,
.kyb-skc--anim .kyb-skc__kreis.is-in .kyb-skc__betrieb { animation: kybSkcTinte 1.4s ease 1.2s backwards; }
.kyb-skc--anim .kyb-skc__kreis:not(.is-in) .kyb-skc__laeufer { opacity: 0; }

@keyframes kybSkcRein    { from { opacity: 0; transform: translateY(18px); } }
@keyframes kybSkcZug     { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes kybSkcFlaeche { from { opacity: 0; transform: translate(-6px, -6px); } }
@keyframes kybSkcTinte   { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .kyb-skc--anim [data-skc-reveal] { opacity: 1; }
  .kyb-skc *, .kyb-skc *::before, .kyb-skc *::after { animation: none !important; transition: none !important; }
}
@media print {
  .kyb-skc [data-skc-reveal] { opacity: 1 !important; }
}
