/* ==========================================================================
   kyb-profil — Baustein „Das ist kyberio."
   Zentrierte Überschrift, fünf Punkte im versetzten Raster, gezeichnete Icons
   (helle Kontur + versetzte Neon-Fläche), Strahlenkranz als Schmuck.

   Bewegung nur, wenn kyb-profil.js die Klasse .kyb-profil--anim setzt
   (IntersectionObserver vorhanden, keine reduzierte Bewegung). Ohne JS ist
   alles sofort sichtbar; der Strahlenkranz pulsiert rein per CSS und steht
   bei prefers-reduced-motion still.
   ========================================================================== */

.kyb-profil {
  --kyb-profil-line: rgba(238, 240, 244, .92);   /* Kontur der Icons */
  --kyb-profil-icon: 76px;
  position: relative;
  isolation: isolate;
  overflow: clip;                  /* Schmuck darf nie seitlich überstehen */
  overflow-clip-margin: 0;
  padding-block: clamp(var(--s6), 5vw, var(--s8));
  text-align: center;
}

/* --- Strahlenkranz und Fächer ------------------------------------------- */
.kyb-profil__kranz,
.kyb-profil__faecher {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  stroke: #fff;
  stroke-width: 1.4;
  stroke-linecap: round;
}
.kyb-profil__faecher { width: 96px; height: auto; bottom: clamp(var(--s6), 5vw, var(--s8)); left: 0; }

/* Der Kranz steht horizontal mittig über der Überschrift: Mittelpunkt des
   Halbkreises (210/210 im 420er-viewBox, also --w/2) = Mitte der Unterkante
   der Überschrift. Die Striche rahmen „Das ist kyberio." wie eine aufgehende
   Sonne, ohne die Schrift zu berühren. */
.kyb-profil__kopf { position: relative; }
.kyb-profil__kranz {
  --w: 500px;
  width: var(--w); height: auto;
  left: calc(50% - var(--w) / 2);
  top: calc(100% - var(--w) / 2);
}
.kyb-profil__kranz line,
.kyb-profil__faecher line { opacity: .16; }
.kyb-profil__faecher line { opacity: .2; }

/* Welle: die Striche hellen nacheinander kurz auf, sehr ruhig. */
@media (prefers-reduced-motion: no-preference) {
  .kyb-profil__kranz line {
    animation: kybProfilStrahl 7.5s ease-in-out infinite;
    animation-delay: calc(var(--i) * .16s);
  }
  .kyb-profil__faecher line {
    animation: kybProfilFaecher 7.5s ease-in-out infinite;
    animation-delay: calc(3.2s + var(--i) * .16s);
  }
}
@keyframes kybProfilStrahl  { 0%, 22%, 100% { opacity: .16; } 11% { opacity: .5; } }
@keyframes kybProfilFaecher { 0%, 22%, 100% { opacity: .2; }  11% { opacity: .55; } }

/* --- Raster ------------------------------------------------------------- */
.kyb-profil__raster {
  display: grid;
  gap: var(--s7);
  justify-items: center;
}
.kyb-profil__kopf { max-width: 100%; }
.kyb-profil__kopf .kyb-kicker { margin-bottom: var(--s2); }

.kyb-profil__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-profil__anfang { display: block; }
.kyb-profil__wort {
  display: block;
  margin-top: .08em;
  font-weight: 600;
  font-size: clamp(3.1rem, 6.4vw, 5.4rem);
  line-height: .98;
  letter-spacing: -.035em;
  color: var(--kyb-white);
}
.kyb-profil__zeichen {
  color: var(--kyb-neon);
  letter-spacing: 0;
}

.kyb-profil__punkt { max-width: 30ch; display: grid; justify-items: center; }
.kyb-profil__t {
  margin-top: var(--s3);
  color: var(--kyb-white);
  font-weight: 600;
  font-size: 1.28rem;
  letter-spacing: -.012em;
  line-height: 1.2;
}
.kyb-profil__x {
  margin-top: var(--s1);
  color: var(--kyb-text-2);
  font-size: 1rem;
  line-height: 1.5;
  text-wrap: balance;
}

.kyb-profil__btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s3);
  margin-top: clamp(var(--s6), 5vw, var(--s8));
}

/* Versetztes Raster ab Tablet-Quer:
     links oben   | Überschrift | rechts oben
     links unten  |   Mitte     | rechts unten   (Mitte sitzt höher als die Ecken) */
@media (min-width: 900px) {
  .kyb-profil__raster {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr) minmax(0, 1fr);
    grid-template-rows: auto var(--s7) auto;
    grid-template-areas:
      "p1 kopf p2"
      ".  p3   . "
      "p4 p3   p5";
    column-gap: clamp(var(--s5), 4vw, var(--s8));
    row-gap: var(--s5);
    align-items: start;
  }
  .kyb-profil__kopf { grid-area: kopf; align-self: end; margin-bottom: var(--s5); }
  .kyb-profil__punkt--1 { grid-area: p1; margin-top: var(--s3); }
  .kyb-profil__punkt--2 { grid-area: p2; margin-top: var(--s3); }
  .kyb-profil__punkt--3 { grid-area: p3; margin-top: calc(-1 * var(--s3)); }
  .kyb-profil__punkt--4 { grid-area: p4; }
  .kyb-profil__punkt--5 { grid-area: p5; }
}

@media (max-width: 759px) {
  .kyb-profil { --kyb-profil-icon: 68px; }
  .kyb-profil__raster { gap: var(--s6); }
  .kyb-profil__kopf { margin-bottom: var(--s4); }
  .kyb-profil { padding-top: calc(var(--s8) + var(--s5)); }
  .kyb-profil__wort { font-size: clamp(3.1rem, 15vw, 4rem); }
  .kyb-profil__kranz { --w: 380px; }
  .kyb-profil__faecher { display: none; }   /* neben gestapelten Buttons zu eng */
  .kyb-profil__btns { flex-direction: column; align-items: center; }
  .kyb-profil__btns .kyb-btn { width: min(100%, 300px); justify-content: center; }
}

/* --- Icons -------------------------------------------------------------- */
.kyb-profil__icon {
  width: var(--kyb-profil-icon);
  height: var(--kyb-profil-icon);
  overflow: visible;
  color: var(--kyb-profil-line);
}
.kyb-profil__fill {
  fill: var(--kyb-neon);
  transform-box: view-box;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.kyb-profil__line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.kyb-profil__ink { color: var(--kyb-stage); }
.kyb-profil__punkt:hover .kyb-profil__fill { transform: translate(-3px, -3px); }

/* --- Einblenden (nur mit JS) ------------------------------------------- */
.kyb-profil--anim [data-profil-reveal] { opacity: 0; }
.kyb-profil--anim [data-profil-reveal].is-in {
  opacity: 1;
  animation: kybProfilRein .9s cubic-bezier(.2, .7, .2, 1) backwards;
  animation-delay: calc(var(--d, 0) * 110ms);
}
.kyb-profil--anim .is-in .kyb-profil__line > * {
  stroke-dasharray: 1;
  animation: kybProfilZug 1.3s cubic-bezier(.45, 0, .2, 1) backwards;
  animation-delay: calc(var(--d, 0) * 110ms + 180ms);
}
.kyb-profil--anim .is-in .kyb-profil__fill {
  animation: kybProfilFlaeche .8s cubic-bezier(.2, .7, .2, 1) backwards;
  animation-delay: calc(var(--d, 0) * 110ms + 850ms);
}
.kyb-profil--anim .is-in .kyb-profil__ink {
  animation: kybProfilTinte .8s ease backwards;
  animation-delay: calc(var(--d, 0) * 110ms + 1050ms);
}
@keyframes kybProfilRein    { from { opacity: 0; transform: translateY(18px); } }
@keyframes kybProfilZug     { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes kybProfilFlaeche { from { opacity: 0; transform: translate(-6px, -6px); } }
@keyframes kybProfilTinte   { from { opacity: 0; } }

/* Einspaltig kommen die Punkte einzeln ins Bild — kein Staffelversatz nötig. */
@media (max-width: 899px) {
  .kyb-profil--anim [data-profil-reveal] { --d: 0 !important; }
}

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