/* ==========================================================================
   kyb-sk-zonen — Baustein „5-Zonen-Sicherheit" (Sicherheitskonzept, Einstieg)
   Ein abgesetztes Band mit feiner Kontur: links Überschrift, darunter die
   drei Säulen als zweite Zeile (gezeichnete Icons, helle Kontur + versetzte
   Neon-Fläche) und der Text; rechts das Foto, dunkel und kühl getönt, mit
   Sucherecken und der Zonen-Leiter, die von außen nach innen einrückt.

   Bewegung nur, wenn kyb-sk-zonen.js die Klasse .kyb-skz--anim setzt
   (Observer vorhanden, keine reduzierte Bewegung). Ohne JS ist alles sofort
   sichtbar, nichts läuft.
   ========================================================================== */

.kyb-skz {
  --kyb-skz-grund: var(--kyb-stage);
  --kyb-skz-line: rgba(238, 240, 244, .92);
  --kyb-skz-icon: 60px;
  --kyb-skz-rand: var(--r-4, 22px);
  position: relative;
}
.kyb-skz.k-set--stage_2 { --kyb-skz-grund: var(--kyb-stage-2); }
.kyb-skz.k-set--surface { --kyb-skz-grund: var(--kyb-surface); }

/* --- Band --------------------------------------------------------------- */
.kyb-skz__band {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border: 1px solid var(--kyb-line);
  border-radius: var(--kyb-skz-rand);
  background-color: var(--kyb-skz-grund);
  background-image: var(--g-flaeche);
  overflow: hidden;
}
/* Feine Neon-Kante oben links, läuft aus */
.kyb-skz__band::before {
  content: "";
  position: absolute;
  top: 0; left: var(--s6);
  width: min(280px, 40%);
  height: 1px;
  z-index: 2;
  background: linear-gradient(90deg, var(--kyb-neon), rgba(15, 255, 155, 0));
  pointer-events: none;
}

@media (min-width: 1000px) {
  .kyb-skz__band {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    min-height: 560px;
  }
  .kyb-skz__band--ohne-bild { grid-template-columns: minmax(0, 1fr); min-height: 0; }
}

/* --- Text --------------------------------------------------------------- */
.kyb-skz__text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(var(--s5), 5vw, var(--s8));
}
.kyb-skz__text .kyb-kicker { margin-bottom: var(--s2); }

.kyb-skz__h { margin: 0; }
.kyb-skz__titel {
  display: block;
  color: var(--kyb-white);
  font-weight: 600;
  font-size: clamp(2.2rem, 4.2vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -.032em;
  text-wrap: balance;
  hyphens: manual;
}

/* Säulen: zweite Zeile der Überschrift, drei gleich breite Felder */
.kyb-skz__saeulen {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(var(--s5), 3.4vw, var(--s6));
  border-top: 1px solid var(--kyb-line);
  border-bottom: 1px solid var(--kyb-line);
}
.kyb-skz__s {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s3);
  min-width: 0;
  padding: var(--s4) var(--s3) var(--s4) var(--s4);
}
.kyb-skz__s:first-child { padding-left: 0; }
.kyb-skz__s + .kyb-skz__s::before {
  content: "";
  position: absolute;
  top: var(--s3); bottom: var(--s3); left: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--kyb-line-strong) 30%, var(--kyb-line-strong) 70%, transparent);
}
.kyb-skz__wort {
  display: block;
  color: var(--kyb-neon);
  font-weight: 600;
  font-size: clamp(1.15rem, 1.9vw, 1.55rem);
  line-height: 1.1;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
}

.kyb-skz__body {
  max-width: 52ch;
  margin-top: clamp(var(--s4), 3vw, var(--s5));
  color: var(--kyb-text-2);
  font-size: clamp(1.02rem, 1.3vw, 1.14rem);
  line-height: 1.62;
}
.kyb-skz__body > * + * { margin-top: var(--s2); }
.kyb-skz__body strong { color: var(--kyb-white); font-weight: 600; }

/* --- Icons -------------------------------------------------------------- */
.kyb-skz__icon {
  display: block;
  width: var(--kyb-skz-icon);
  height: var(--kyb-skz-icon);
  overflow: visible;
  color: var(--kyb-skz-line);
}
.kyb-skz__fill {
  fill: var(--kyb-neon);
  transform-box: view-box;
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}
.kyb-skz__line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.kyb-skz__ink { color: var(--kyb-skz-grund); }
.kyb-skz__s:hover .kyb-skz__fill { transform: translate(-3px, -3px); }

/* --- Bild --------------------------------------------------------------- */
.kyb-skz__bild {
  position: relative;
  margin: 0;
  min-height: 380px;
  overflow: hidden;
  background: #0d0d13;
  border-top: 1px solid var(--kyb-line);
}
@media (min-width: 1000px) {
  .kyb-skz__bild { border-top: 0; border-left: 1px solid var(--kyb-line); min-height: 0; }
}
.kyb-skz__foto {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 80%;
  filter: grayscale(1) contrast(1.12) brightness(.66);
  transform-origin: 48% 36%;
}
/* Tönung: kühl-dunkel mit einem Hauch Neon im Licht, Abdunkler unten für die Leiter */
.kyb-skz__bild::before,
.kyb-skz__bild::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.kyb-skz__bild::before {
  background: linear-gradient(140deg, rgba(15, 255, 222, .5), rgba(0, 255, 130, .28));
  mix-blend-mode: soft-light;
  opacity: .75;
}
.kyb-skz__bild::after {
  background:
    linear-gradient(to top, rgba(10, 10, 16, .92) 0%, rgba(10, 10, 16, .55) 34%, rgba(10, 10, 16, 0) 62%),
    linear-gradient(to right, rgba(10, 10, 16, .45), rgba(10, 10, 16, 0) 40%);
}

/* Sucherecken */
.kyb-skz__ecken { position: absolute; inset: var(--s4); z-index: 1; pointer-events: none; }
.kyb-skz__ecken i {
  position: absolute;
  width: 22px; height: 22px;
  border: 0 solid rgba(255, 255, 255, .55);
}
.kyb-skz__ecken i:nth-child(1) { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.kyb-skz__ecken i:nth-child(2) { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.kyb-skz__ecken i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.kyb-skz__ecken i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }

/* Abtastlinie — nur in Bewegung sichtbar */
.kyb-skz__scan {
  position: absolute;
  left: var(--s4); right: var(--s4);
  top: 0;
  height: 1px;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(15, 255, 155, .7) 30%, rgba(15, 255, 155, .7) 70%, transparent);
  box-shadow: 0 0 14px 1px rgba(15, 255, 155, .28);
}

/* Zonen-Leiter */
.kyb-skz__leiter {
  position: absolute;
  z-index: 2;
  left: clamp(var(--s4), 3vw, var(--s6));
  right: clamp(var(--s4), 3vw, var(--s6));
  bottom: clamp(var(--s4), 3vw, var(--s6));
}
.kyb-skz__leiter-t {
  display: block;
  margin-bottom: var(--s2);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--kyb-text-3);
}
.kyb-skz__zonen {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.kyb-skz__z {
  --stufe: 18px;
  position: relative;
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  margin-left: calc(var(--i) * var(--stufe));
  padding: 5px 0 5px 20px;
  color: var(--kyb-white);
  font-size: 1rem;
  line-height: 1.25;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .5);
}
/* Winkel: jede Zone hängt eingerückt an der äußeren */
.kyb-skz__z::before {
  content: "";
  position: absolute;
  left: 3px;
  top: -6px;
  width: 11px;
  height: calc(50% + 6px);
  border-left: 1px solid rgba(255, 255, 255, .38);
  border-bottom: 1px solid rgba(255, 255, 255, .38);
  border-bottom-left-radius: 3px;
}
.kyb-skz__z:first-child::before {
  top: 50%;
  height: 7px;
  width: 7px;
  margin-top: -3.5px;
  left: 5px;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 2px;
}
.kyb-skz__nr {
  flex: none;
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--kyb-text-3);
  font-variant-numeric: tabular-nums;
}
.kyb-skz__name { font-weight: 500; letter-spacing: -.005em; }
.kyb-skz__z--kern .kyb-skz__nr,
.kyb-skz__z--kern .kyb-skz__name { color: var(--kyb-neon); }
.kyb-skz__z--kern .kyb-skz__name { font-weight: 600; }
.kyb-skz__z--kern::after {
  content: "";
  align-self: center;
  width: 6px; height: 6px;
  margin-left: 2px;
  border-radius: 50%;
  background: var(--kyb-neon);
  box-shadow: 0 0 0 4px rgba(15, 255, 155, .16);
}

/* --- Breiten ------------------------------------------------------------ */
@media (min-width: 1000px) and (max-width: 1199px) {
  .kyb-skz__band { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); }
  .kyb-skz { --kyb-skz-icon: 54px; }
  .kyb-skz__z { --stufe: 13px; }
}
@media (min-width: 700px) and (max-width: 999px) {
  .kyb-skz__bild { min-height: 440px; }
}
@media (max-width: 699px) {
  .kyb-skz { --kyb-skz-icon: 46px; --kyb-skz-rand: var(--r-3, 16px); }
  .kyb-skz__band::before { left: var(--s4); }
  .kyb-skz__titel { font-size: clamp(2rem, 9.4vw, 2.5rem); }
  .kyb-skz__s { padding: var(--s3) var(--s1) var(--s3) var(--s3); gap: var(--s2); }
  .kyb-skz__wort { font-size: clamp(.98rem, 4.4vw, 1.12rem); hyphens: auto; -webkit-hyphens: auto; }
  .kyb-skz__body { font-size: 1rem; line-height: 1.58; }
  .kyb-skz__bild { min-height: 400px; }
  .kyb-skz__foto { object-position: 50% 92%; }
  .kyb-skz__ecken { inset: var(--s3); }
  .kyb-skz__ecken i { width: 16px; height: 16px; }
  .kyb-skz__z { --stufe: 12px; font-size: .95rem; padding-block: 4px; }
}

/* --- Bewegung (nur mit JS, nur ohne reduzierte Bewegung) --------------- */
.kyb-skz--anim [data-skz-reveal] { opacity: 0; }
.kyb-skz--anim [data-skz-reveal].is-in {
  opacity: 1;
  animation: kybSkzRein 1.4s cubic-bezier(.2, .7, .2, 1) backwards;
}
.kyb-skz--anim .is-in .kyb-skz__foto {
  animation: kybSkzFoto 3.6s cubic-bezier(.2, .6, .2, 1) backwards;
}
.kyb-skz--anim .is-in .kyb-skz__ecken i {
  animation: kybSkzEcke 1.4s cubic-bezier(.2, .7, .2, 1) backwards;
  animation-delay: .9s;
}
.kyb-skz--anim .is-in .kyb-skz__line > * {
  stroke-dasharray: 1;
  animation: kybSkzZug 2s cubic-bezier(.45, 0, .2, 1) backwards;
  animation-delay: calc(var(--i, 0) * 280ms + 500ms);
}
.kyb-skz--anim .is-in .kyb-skz__fill {
  animation: kybSkzFlaeche 1.2s cubic-bezier(.2, .7, .2, 1) backwards;
  animation-delay: calc(var(--i, 0) * 280ms + 1700ms);
}
.kyb-skz--anim .is-in .kyb-skz__ink {
  animation: kybSkzTinte 1s ease backwards;
  animation-delay: calc(var(--i, 0) * 280ms + 2000ms);
}
.kyb-skz--anim .is-in .kyb-skz__wort {
  animation: kybSkzWort 1.2s cubic-bezier(.2, .7, .2, 1) backwards;
  animation-delay: calc(var(--i, 0) * 280ms + 700ms);
}
.kyb-skz--anim .is-in .kyb-skz__leiter-t {
  animation: kybSkzWort 1.2s cubic-bezier(.2, .7, .2, 1) backwards;
  animation-delay: 1.2s;
}
.kyb-skz--anim .is-in .kyb-skz__z {
  animation: kybSkzZone 1.2s cubic-bezier(.2, .7, .2, 1) backwards;
  animation-delay: calc(var(--i) * 320ms + 1400ms);
}
.kyb-skz--anim .is-in .kyb-skz__scan {
  animation: kybSkzScan 9s cubic-bezier(.45, 0, .55, 1) 3.4s infinite;
}
.kyb-skz--anim .is-in .kyb-skz__z--kern::after {
  animation: kybSkzPuls 3.6s ease-in-out 3.4s infinite;
}

@keyframes kybSkzRein   { from { opacity: 0; transform: translateY(18px); } }
@keyframes kybSkzFoto   { from { transform: scale(1.07); opacity: .3; } }
@keyframes kybSkzEcke   { from { opacity: 0; transform: scale(.6); } }
@keyframes kybSkzZug    { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes kybSkzFlaeche{ from { opacity: 0; transform: translate(-6px, -6px); } }
@keyframes kybSkzTinte  { from { opacity: 0; } }
@keyframes kybSkzWort   { from { opacity: 0; transform: translateY(8px); } }
@keyframes kybSkzZone   { from { opacity: 0; transform: translateX(-10px); } }
@keyframes kybSkzScan {
  0%   { top: 8%;  opacity: 0; }
  12%  { opacity: .55; }
  48%  { top: 60%; opacity: .45; }
  60%, 100% { top: 70%; opacity: 0; }
}
@keyframes kybSkzPuls {
  0%, 100% { box-shadow: 0 0 0 4px rgba(15, 255, 155, .16); }
  50%      { box-shadow: 0 0 0 7px rgba(15, 255, 155, .05); }
}

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