/*
 * Gemeinsames Ablaufsegment fuer Start, Ueber uns und Leistungen.
 * Das vorhandene LMZ-Markup bleibt Inhaltsquelle; rt-process.js vergibt nur
 * die neutralen Komponentenklassen. Hell ist die Leistungsreferenz, dunkel
 * verwendet exakt dieselbe Geometrie mit den Startseiten-Farbtokens.
 */

.rt-process-unified {
  --rt-process-edge: max(24px, calc((100vw - 1280px) / 2));
  --rt-process-line: 0;
  --rt-process-red: #e4002b;
  --rt-process-red-dark: #b10e2b;
  --rt-process-paper: #e9ece8;
  --rt-process-ink: #10151b;
  --rt-process-copy: #59636e;
  --rt-process-rule: rgba(16, 21, 27, .22);
  --rt-process-rule-soft: rgba(16, 21, 27, .15);
  --rt-process-icon-bg: rgba(255, 255, 255, .55);
  --rt-process-icon-shadow: rgba(16, 21, 27, .045);
  position: relative;
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(98px, 10vw, 152px) var(--rt-process-edge) clamp(112px, 11vw, 170px);
  overflow: hidden;
  background:
    radial-gradient(circle at 83% 12%, rgba(228, 0, 43, .06), transparent 25%),
    var(--rt-process-paper);
  color: var(--rt-process-ink);
}

.rt-process-unified--dark {
  --rt-process-paper: #090d13;
  --rt-process-ink: #f5f7f9;
  --rt-process-copy: #b7c0ca;
  --rt-process-rule: rgba(255, 255, 255, .2);
  --rt-process-rule-soft: rgba(255, 255, 255, .13);
  --rt-process-icon-bg: rgba(255, 255, 255, .045);
  --rt-process-icon-shadow: rgba(0, 0, 0, .22);
  background:
    radial-gradient(circle at 83% 12%, rgba(228, 0, 43, .16), transparent 27%),
    radial-gradient(circle at 9% 100%, rgba(80, 111, 143, .12), transparent 34%),
    linear-gradient(118deg, #070a0f 0%, #0e151d 58%, #17070d 100%);
}

.rt-process-unified::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: .24;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
}

.rt-process-unified--light::before {
  opacity: .2;
  background-image:
    linear-gradient(rgba(16, 21, 27, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 21, 27, .035) 1px, transparent 1px);
}

.rt-process-unified > .rt-process-header,
.rt-process-unified > .rt-process-track {
  position: relative;
  z-index: 1;
}

.rt-process-unified > .rt-process-header {
  display: block;
  width: 100%;
  max-width: 900px;
  margin: 0 0 clamp(54px, 6vw, 86px);
  padding: 0;
  text-align: left;
}

.rt-process-unified > .rt-process-header::before,
.rt-process-unified > .rt-process-header::after {
  display: none;
}

.rt-process-unified > .rt-process-header .rt-process-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  color: var(--rt-process-red) !important;
  font: 700 .64rem/1.3 "Space Mono", ui-monospace, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.rt-process-unified > .rt-process-header .rt-process-eyebrow::before {
  width: 34px;
  height: 2px;
  content: "";
  background: currentColor;
}

.rt-process-unified > .rt-process-header h2 {
  max-width: 16ch;
  margin: 0;
  color: inherit;
  font-size: clamp(2rem, 3.6vw, 3.35rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -.047em;
  text-wrap: balance;
}

.rt-process-unified > .rt-process-track {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--rt-process-rule);
  background: transparent;
}

.rt-process-unified > .rt-process-track::before {
  display: none;
}

.rt-process-unified > .rt-process-track::after {
  position: absolute;
  z-index: 2;
  top: -2px;
  right: 0;
  left: 0;
  display: block;
  width: auto;
  height: 3px;
  content: "";
  background: var(--rt-process-red);
  transform: scaleX(var(--rt-process-line));
  transform-origin: left center;
  pointer-events: none;
}

.rt-process-unified .rt-process-step {
  position: relative;
  display: grid;
  flex: none;
  min-width: 0;
  min-height: 260px;
  grid-template-columns: 58px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 24px 18px;
  align-content: start;
  margin: 0;
  padding: 44px clamp(22px, 2.5vw, 38px) 34px;
  border: 0;
  border-right: 1px solid var(--rt-process-rule-soft);
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  color: inherit;
  text-align: left;
  transition: none;
}

.rt-process-unified .rt-process-step:last-child {
  border-right: 0;
}

.rt-process-unified .rt-process-step:first-child {
  padding-left: clamp(22px, 2.5vw, 38px);
}

.rt-process-unified .rt-process-step::before {
  position: absolute;
  z-index: 3;
  top: -8px;
  left: clamp(22px, 2.5vw, 38px);
  display: block;
  width: 15px;
  height: 15px;
  content: "";
  border: 3px solid var(--rt-process-paper);
  border-radius: 50%;
  background: var(--rt-process-red);
  box-shadow: 0 0 0 1px var(--rt-process-red);
}

.rt-process-unified .rt-process-step::after {
  display: none;
}

.rt-process-unified .rt-process-step > b {
  display: block;
  align-self: center;
  margin: 0;
  color: var(--rt-process-red-dark);
  font: 700 .66rem/1 "Space Mono", ui-monospace, monospace;
  letter-spacing: .14em;
  transition: none;
}

.rt-process-unified--dark .rt-process-step > b {
  color: #ff526f;
}

.rt-process-unified .rt-process-step > b::after {
  content: " / 04";
  color: color-mix(in srgb, var(--rt-process-ink) 36%, transparent);
}

.rt-process-unified .rt-process-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0;
  border: 1px solid var(--rt-process-rule);
  border-radius: 0;
  background: var(--rt-process-icon-bg);
  color: var(--rt-process-red-dark);
  place-items: center;
  box-shadow: 8px 8px 0 var(--rt-process-icon-shadow);
}

.rt-process-unified--dark .rt-process-icon {
  color: #ff526f;
}

.rt-process-unified .rt-process-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rt-process-unified .rt-process-step > p {
  grid-column: 1 / -1;
  max-width: 28ch;
  margin: 0;
  color: var(--rt-process-copy);
  font-size: .9rem;
  line-height: 1.68;
  opacity: 1;
  transition: none;
}

.rt-process-unified.is-rt-process-motion-active > .rt-process-header > *,
.rt-process-unified.is-rt-process-motion-active .rt-process-step,
.rt-process-unified.is-rt-process-motion-active .rt-process-icon {
  will-change: transform, opacity;
}

@media (max-width: 900px) {
  .rt-process-unified > .rt-process-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rt-process-unified .rt-process-step:nth-child(2) {
    border-right: 0;
  }

  .rt-process-unified .rt-process-step:nth-child(-n + 2) {
    border-bottom: 1px solid var(--rt-process-rule-soft);
  }
}

@media (max-width: 640px) {
  .rt-process-unified {
    --rt-process-edge: 28px;
    padding-top: 76px;
    padding-bottom: 92px;
  }

  .rt-process-unified > .rt-process-header {
    margin-bottom: 42px;
  }

  .rt-process-unified > .rt-process-header h2 {
    max-width: 18ch;
    font-size: clamp(1.9rem, 8.3vw, 2.45rem);
  }

  .rt-process-unified > .rt-process-track {
    grid-template-columns: 1fr;
    border-top: 0;
    border-left: 1px solid var(--rt-process-rule);
  }

  .rt-process-unified > .rt-process-track::after {
    top: 0;
    right: auto;
    bottom: 0;
    left: -2px;
    width: 3px;
    height: auto;
    transform: scaleY(var(--rt-process-line));
    transform-origin: center top;
  }

  .rt-process-unified .rt-process-step,
  .rt-process-unified .rt-process-step:nth-child(2) {
    min-height: 0;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
    padding: 22px 20px 34px 42px;
    border-right: 0;
    border-bottom: 1px solid var(--rt-process-rule-soft);
  }

  .rt-process-unified .rt-process-step:first-child {
    padding-left: 42px;
  }

  .rt-process-unified .rt-process-step::before {
    top: 27px;
    left: -8px;
  }

  .rt-process-unified .rt-process-step > p {
    max-width: none;
  }

  .rt-process-unified .rt-process-icon {
    width: 48px;
    height: 48px;
  }

  .rt-process-unified .rt-process-icon svg {
    width: 23px;
    height: 23px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rt-process-unified {
    --rt-process-line: 1;
  }
}
