/* ============================================================
   Prozess-Kreislauf – "So gehen wir vor" (gruender.html)
   6 Schritt-Knoten auf einem Ring; beim Hover/Fokus eines Knotens
   öffnet sich in der Mitte der zugehörige Text. Reine CSS-Lösung
   über :has().
   ============================================================ */

.process-wheel {
  position: relative;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 1 / 1;
  margin: clamp(2rem, 5vw, 3.5rem) auto 0;
}

/* --- Verbindungs-Ring --- */
.pw-ring {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}
.pw-ring__base {
  fill: none;
  stroke: rgba(20, 33, 61, 0.10);
  stroke-width: 0.6;
}
.pw-ring__flow {
  fill: none;
  stroke: #D4B36A;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-dasharray: 2 6;
  animation: pw-flow 9s linear infinite;
}
@keyframes pw-flow { to { stroke-dashoffset: -80; } }

/* --- Center detail panel --- */
.pw-center {
  position: absolute;
  top: 48%; left: 50%;
  transform: translate(-50%, -50%);
  width: 47%;
  min-height: 46%;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 2.6vw, 1.7rem);
  text-align: center;
  background: linear-gradient(160deg, #ffffff 0%, #fbf9f3 100%);
  border: 1px solid rgba(212, 179, 106, 0.28);
  border-radius: 22px;
  box-shadow: 0 16px 40px -22px rgba(20, 33, 61, 0.30);
  z-index: 1;
}
.pw-center__inner { width: 100%; }

.pw-default__eyebrow {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  color: #B08856;
}
.pw-default__text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #4b5366;
  margin: 0.4rem 0 0;
}

.pw-detail { display: none; animation: pw-fade 0.35s cubic-bezier(0.4,0,0.2,1); }
@keyframes pw-fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0);   }
}
.pw-detail__num {
  font-family: var(--font-display, "Instrument Serif", serif);
  font-style: italic;
  font-size: 1.6rem;
  color: #B08856;
  line-height: 1;
}
.pw-detail__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #14213D;
  margin: 0.3rem 0 0.5rem;
  letter-spacing: -0.01em;
}
.pw-detail__text {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #4b5366;
  margin: 0;
}
.pw-detail__text strong { color: #14213D; font-weight: 600; }

/* :has() — Default ausblenden sobald ein Schritt aktiv ist, passendes Detail zeigen */
.process-wheel:has(.pw-step:hover) .pw-default,
.process-wheel:has(.pw-step:focus-within) .pw-default { display: none; }
.process-wheel:has(.pw-step[data-step="01"]:hover) .pw-detail[data-step="01"],
.process-wheel:has(.pw-step[data-step="01"]:focus-within) .pw-detail[data-step="01"],
.process-wheel:has(.pw-step[data-step="02"]:hover) .pw-detail[data-step="02"],
.process-wheel:has(.pw-step[data-step="02"]:focus-within) .pw-detail[data-step="02"],
.process-wheel:has(.pw-step[data-step="03"]:hover) .pw-detail[data-step="03"],
.process-wheel:has(.pw-step[data-step="03"]:focus-within) .pw-detail[data-step="03"],
.process-wheel:has(.pw-step[data-step="04"]:hover) .pw-detail[data-step="04"],
.process-wheel:has(.pw-step[data-step="04"]:focus-within) .pw-detail[data-step="04"],
.process-wheel:has(.pw-step[data-step="05"]:hover) .pw-detail[data-step="05"],
.process-wheel:has(.pw-step[data-step="05"]:focus-within) .pw-detail[data-step="05"],
.process-wheel:has(.pw-step[data-step="06"]:hover) .pw-detail[data-step="06"],
.process-wheel:has(.pw-step[data-step="06"]:focus-within) .pw-detail[data-step="06"] {
  display: block;
}

/* --- Step nodes --- */
.pw-step {
  position: absolute;
  width: 54px;
  transform: translate(-50%, -50%);
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  z-index: 2;
  outline: none;
}
/* Zahl-Badge sitzt mittig auf dem Ring → Knotenpunkte = Ring r40, cy48 */
.pw-step[data-step="01"] { left: 50%;   top: 8%;  }
.pw-step[data-step="02"] { left: 84.6%; top: 28%; }
.pw-step[data-step="03"] { left: 84.6%; top: 68%; }
.pw-step[data-step="04"] { left: 50%;   top: 88%; }
.pw-step[data-step="05"] { left: 15.4%; top: 68%; }
.pw-step[data-step="06"] { left: 15.4%; top: 28%; }

.ps-num {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 2px solid rgba(212, 179, 106, 0.55);
  color: #B08856;
  font-family: var(--font-display, "Instrument Serif", serif);
  font-style: italic;
  font-size: 1.3rem;
  box-shadow: 0 6px 16px -8px rgba(20, 33, 61, 0.25);
  transition: transform 0.45s cubic-bezier(0.34,1.56,0.64,1),
              background 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}
.ps-title {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  width: clamp(108px, 19vw, 144px);
  font-size: 0.8rem;
  font-weight: 600;
  color: #14213D;
  line-height: 1.28;
  text-align: center;
  transition: color 0.3s ease;
}
.pw-step:hover .ps-num,
.pw-step:focus-visible .ps-num {
  transform: scale(1.14);
  background: linear-gradient(135deg, #14213D 0%, #1f3258 100%);
  color: #D4B36A;
  border-color: transparent;
}
.pw-step:hover .ps-title,
.pw-step:focus-visible .ps-title { color: #B08856; }

/* reveal */
.process-wheel.reveal { opacity: 0; transform: scale(0.96); }
.process-wheel.reveal.is-visible {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.7s cubic-bezier(0.2,0.8,0.2,1),
              transform 0.7s cubic-bezier(0.2,0.8,0.2,1);
}

/* --- Mobile: aufgelöster Kreislauf → vertikale Liste --- */
@media (max-width: 820px) {
  .process-wheel {
    aspect-ratio: auto;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  .pw-ring { display: none; }
  .pw-step {
    position: static;
    transform: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    gap: 0.85rem;
    padding: 0.55rem 0.7rem;
    border-radius: 12px;
    border: 1px solid rgba(20, 33, 61, 0.08);
    background: #fff;
  }
  .ps-num { width: 44px; height: 44px; font-size: 1.1rem; flex-shrink: 0; }
  .ps-title {
    position: static;
    transform: none;
    width: auto;
    text-align: left;
    font-size: 0.92rem;
  }
  .pw-center {
    position: static;
    transform: none;
    width: 100%;
    min-height: 0;
    order: 99;
    margin-top: 0.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pw-ring__flow, .pw-step *, .pw-detail {
    animation: none !important;
    transition: none !important;
  }
}
