/* ==========================================================================
   So entsteht eine Mod: Schritt-Leiste + Bild/Text je Schritt
   ========================================================================== */
.workflow__track {
  position: relative;
  display: grid;
  gap: 4px;
  margin-bottom: 40px;
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(var(--count, 7), minmax(0, 1fr));
}
/* graue Linie + grüner Fortschritt */
.workflow__track::before,
.workflow__track::after {
  content: "";
  position: absolute;
  left: 0;
  top: 21px;
  height: 2px;
}
.workflow__track::before {
  right: 0;
  background: var(--line);
}
.workflow__track::after {
  width: calc((var(--index, 0) + 0.5) / var(--count, 7) * 100%);
  background: var(--green-500);
  transition: width 0.6s ease;
}
.workflow__track button {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 44px;
  padding: 8px 6px 8px 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: transform 0.2s;
}
.workflow__track button:hover {
  transform: translateY(-2px);
}
.workflow__track button::before {
  content: "";
  width: 26px;
  height: 24px;
  background: #c5ccc7;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transition: background 0.3s;
}
.workflow__track button.is-done::before {
  background: var(--green-500);
}
.workflow__track button.is-active::before {
  background: var(--green-700);
}
.workflow__track .num {
  font-family: var(--font-head);
  font-size: 13px;
  color: #8a918c;
}
.workflow__track .title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  color: #8a918c;
}
.workflow__track button.is-active .title {
  color: var(--ink);
}

/* Schritte liegen übereinander */
.workflow__stage {
  display: grid;
  counter-reset: step;
}
.step {
  grid-area: 1 / 1;
  counter-increment: step;
  display: flex;
  flex-wrap: wrap;
  gap: 32px 48px;
  align-items: stretch;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.8s ease,
    visibility 0.8s;
}
.step.is-active {
  opacity: 1;
  visibility: visible;
}
html:not(.js) .step {
  grid-area: auto;
  opacity: 1;
  visibility: visible;
  margin-bottom: 48px;
}

.step__media {
  position: relative;
  flex: 999 1 560px;
  min-width: 0;
  min-height: 420px;
  overflow: hidden;
  background: #232725;
}
.step__media::after {
  /* grünes Eckdreieck */
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 56px;
  height: 56px;
  background: var(--green-500);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.step__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 7s cubic-bezier(0.25, 0.1, 0.25, 1);
  will-change: transform;
  backface-visibility: hidden;
}
.step.is-active .step__media img {
  transform: scale(1.04);
}
/* Variante für Drahtgitter / Grafiken: ganz zeigen statt beschneiden */
.step__media--contain img {
  object-fit: contain;
  padding: 24px;
}
/* Variante: Raster über dem Bild (Referenz) */
.step__media--grid::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(rgba(166, 207, 106, 0.16) 1px, transparent 1px) 0 0 / 32px
      32px,
    linear-gradient(90deg, rgba(166, 207, 106, 0.16) 1px, transparent 1px) 0 0 /
      32px 32px;
}

.step__body {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.step__body::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-head);
  font-weight: 300;
  font-size: 64px;
  line-height: 1;
  color: var(--green-500);
}
.step__body h3 {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 32px;
}
.step__body p {
  color: var(--ink-soft);
}
.step__meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.step__meta dt {
  color: var(--muted);
}
.step__meta dd {
  margin: 0;
  font-weight: 600;
}

/* Zeitbalken bis zum nächsten Schritt */
.step__body::after {
  content: "";
  height: 3px;
  background: var(--green-500);
  transform-origin: left;
  transform: scaleX(0);
}
.step.is-active .step__body::after {
  animation: progress var(--interval, 7s) linear forwards;
}
@keyframes progress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@media (max-width: 820px) {
  /* Auf dem Handy nur Dreiecke + Nummern, der Titel steht unten im Schritt */
  .workflow__track .title {
    display: none;
  }
  .workflow__track button {
    align-items: center;
    padding-inline: 0;
  }
  .step__media {
    min-height: 260px;
  }
}
