/* ============================================================
   RANDORI PRO · „In drei Schritten auf die Matte" — HYBRID
   Geteilte Schicht für Standortseiten. Aktiv, sobald die
   Sektion zusätzlich die Klasse .hy-steps trägt.

   Aus WALTERSDORF v2:  sequenzielles Zeichnen der Linie
                        (Segment für Segment, links → rechts),
                        große Ghost-Ziffern, roter <em>-Akzent.
   Aus STEGLITZ:        Kreis-Nodes auf der Verbindungslinie,
                        wandernder Lichtfunke, wachsender
                        Titel-Unterstrich, Hover-Fokus.

   Flächen: Tiefschwarz (Standard) · Dunkelrot-Anker (Steglitz).
   Motion nur unter body.v3.js-motion + ohne reduced-motion;
   ohne JS ist alles statisch sichtbar.
   ============================================================ */

.v3 .hy-steps { position: relative; overflow: hidden; --hy-bg: var(--rp-tiefschwarz); }
.v3 .hy-steps.s-steps--steglitz { --hy-bg: var(--c-anker, #6D1723); }
.v3 .hy-steps > .s-wrap { position: relative; z-index: 1; }

/* Warmer Lichtschein für Tiefe (Steglitz bringt seinen eigenen mit) */
.v3 .hy-steps:not(.s-steps--steglitz)::before { content: ""; position: absolute; top: -200px; right: -160px; width: 640px; height: 640px; border-radius: 50%; background: radial-gradient(circle, rgba(220,13,29,0.16), transparent 65%); z-index: 0; }

/* Kopf · Waltersdorf-Raster, Steglitz-Kicker */
.v3 .hy-steps .hy-head { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: end; margin-bottom: clamp(56px, 7vw, 90px); }
.v3 .hy-steps .hy-kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--rp-beige); display: flex; align-items: center; gap: 12px; margin: 0 0 18px; }
.v3 .hy-steps .hy-kicker::before { content: ""; width: 30px; height: 1px; background: var(--rp-rot-akzent); }
.v3 .hy-steps .hy-h { font-family: var(--font-display); font-weight: 800; font-size: clamp(38px, 5vw, 76px); line-height: 0.98; letter-spacing: -0.03em; margin: 0; max-width: 14ch; }
.v3 .hy-steps .hy-h em { font-family: var(--font-serif); font-style: italic; font-weight: 500; letter-spacing: normal; color: var(--rp-beige); }
.v3 .hy-steps .hy-sub { font-size: 17px; line-height: 1.55; color: rgba(255,255,255,0.78); margin: 0; max-width: 44ch; }

/* Raster · Linie liegt hinter den Nodes */
.v3 .hy-steps .hy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; }

/* Schritt */
.v3 .hy-steps .hy-step { position: relative; z-index: 1; transition: transform 400ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.v3 .hy-steps .hy-step:hover { transform: translateY(-6px); }

/* Ghost-Ziffer als Tiefe (Waltersdorf-Stil, rechts oben) */
.v3 .hy-steps .hy-step__ghost { position: absolute; top: -42px; right: -4px; font-family: var(--font-display); font-weight: 800; font-size: clamp(96px, 9vw, 150px); line-height: 1; letter-spacing: -0.04em; color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,0.2); z-index: 0; pointer-events: none; user-select: none; transition: -webkit-text-stroke-color 320ms; }
.v3 .hy-steps .hy-step:hover .hy-step__ghost { -webkit-text-stroke-color: rgba(220,13,29,0.8); }

/* Linien-Segment je Schritt (Waltersdorf-Sequenz) · auf Node-Höhe */
.v3 .hy-steps .hy-step::after { content: ""; position: absolute; top: 32px; left: 0; height: 2px; width: 100%; background: rgba(255,255,255,0.28); z-index: -1; transform-origin: 0 50%; }
.v3 .hy-steps .hy-step:not(:last-child)::after { width: calc(100% + 24px); }

/* Kreis-Node auf der Linie (Steglitz) */
.v3 .hy-steps .hy-step__num { position: relative; z-index: 2; width: 66px; height: 66px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,0.28); background: var(--hy-bg); box-shadow: 0 0 0 7px var(--hy-bg); color: #fff; font-family: var(--font-mono); font-size: 15px; letter-spacing: 0.12em; margin: 0 0 32px; transition: border-color 400ms, background 400ms, box-shadow 400ms, transform 400ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.v3 .hy-steps .hy-step:hover .hy-step__num { border-color: var(--rp-rot-akzent); background: var(--rp-rot-akzent); box-shadow: 0 0 0 7px var(--hy-bg), 0 14px 34px rgba(170,26,29,0.5); }

/* Titel mit wachsendem Unterstrich (Steglitz) */
.v3 .hy-steps .hy-step__h { font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -0.015em; margin: 0 0 14px; padding-bottom: 16px; position: relative; }
.v3 .hy-steps .hy-step__h::after { content: ""; position: absolute; left: 0; bottom: 0; width: 38px; height: 2px; background: var(--rp-rot-akzent); transition: width 600ms var(--ease-standard); }
.v3 .hy-steps .hy-step:hover .hy-step__h::after { width: 64px; }
.v3 .hy-steps .hy-step__p { font-size: 15px; line-height: 1.6; color: rgba(255,255,255,0.78); margin: 0; max-width: 32ch; }

/* „Was mitbringen" · Waltersdorf-Panel + Steglitz-Akzent-Ticks */
.v3 .hy-steps .hy-bring { margin-top: clamp(56px, 7vw, 80px); display: grid; grid-template-columns: 200px 1fr; gap: 40px; align-items: center; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.14); border-radius: 18px; padding: 32px 40px; }
.v3 .hy-steps .hy-bring__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--rp-beige); }
.v3 .hy-steps .hy-bring__list { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; margin: 0; padding: 0; }
.v3 .hy-steps .hy-bring__list li { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 14px; letter-spacing: 0.04em; color: #fff; border: 1px solid rgba(255,255,255,0.25); border-radius: 999px; padding: 10px 20px; transition: border-color 250ms, background 250ms, transform 250ms; }
.v3 .hy-steps .hy-bring__list li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--rp-rot-akzent); flex-shrink: 0; }
.v3 .hy-steps .hy-bring__list li:hover { border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.06); transform: translateY(-2px); }
.v3 .hy-steps .hy-bring__list li:last-child::before { display: none; }
.v3 .hy-steps .hy-bring__list li:last-child { opacity: 0.6; font-style: italic; }

@media (max-width: 900px) {
  .v3 .hy-steps .hy-head { grid-template-columns: 1fr; gap: 20px; }
  .v3 .hy-steps .hy-grid { grid-template-columns: 1fr; gap: 44px; }
  .v3 .hy-steps .hy-step::after, .v3 .hy-steps .hy-step:not(:last-child)::after { width: 100%; }
  .v3 .hy-steps .hy-step:hover { transform: none; }
  .v3 .hy-steps .hy-bring { grid-template-columns: 1fr; gap: 20px; padding: 26px 28px; }
}

/* ============================================================
   MOTION · Sequenz: Segment 1 zeichnet → Node 1 poppt →
   Segment 2 → Node 2 → … → Lichtfunke läuft über die Linie.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .v3.js-motion .hy-steps .hy-step::after { transform: scaleX(0); transition: transform 650ms linear; }
  .v3.js-motion .hy-steps.is-lit .hy-step::after { transform: scaleX(1); }
  .v3.js-motion .hy-steps.is-lit .hy-step:nth-child(1)::after { transition-delay: 200ms; }
  .v3.js-motion .hy-steps.is-lit .hy-step:nth-child(2)::after { transition-delay: 900ms; }
  .v3.js-motion .hy-steps.is-lit .hy-step:nth-child(3)::after { transition-delay: 1600ms; }

  .v3.js-motion .hy-steps .hy-step__num { opacity: 0; transform: scale(0.55); }
  .v3.js-motion .hy-steps.is-lit .hy-step__num { opacity: 1; transform: scale(1); transition: opacity 500ms ease, transform 550ms cubic-bezier(0.34, 1.56, 0.64, 1), border-color 400ms, background 400ms, box-shadow 400ms; }
  .v3.js-motion .hy-steps.is-lit .hy-step:nth-child(1) .hy-step__num { transition-delay: 250ms; }
  .v3.js-motion .hy-steps.is-lit .hy-step:nth-child(2) .hy-step__num { transition-delay: 950ms; }
  .v3.js-motion .hy-steps.is-lit .hy-step:nth-child(3) .hy-step__num { transition-delay: 1650ms; }
  /* Node leuchtet rot auf, sobald die Linie ihn erreicht */
  .v3.js-motion .hy-steps.is-lit .hy-step .hy-step__num { border-color: var(--rp-rot-akzent); box-shadow: 0 0 0 7px var(--hy-bg), 0 0 24px rgba(220,13,29,0.45); }

  .v3.js-motion .hy-steps .hy-step__h::after { width: 0; }
  .v3.js-motion .hy-steps.is-lit .hy-step:nth-child(1) .hy-step__h::after { width: 38px; transition-delay: 450ms; }
  .v3.js-motion .hy-steps.is-lit .hy-step:nth-child(2) .hy-step__h::after { width: 38px; transition-delay: 1150ms; }
  .v3.js-motion .hy-steps.is-lit .hy-step:nth-child(3) .hy-step__h::after { width: 38px; transition-delay: 1850ms; }

  .v3.js-motion .hy-steps .hy-step__body { opacity: 0; transform: translateY(22px); transition: opacity 700ms ease, transform 700ms var(--v3-ease); }
  .v3.js-motion .hy-steps.is-lit .hy-step__body { opacity: 1; transform: translateY(0); }
  .v3.js-motion .hy-steps.is-lit .hy-step:nth-child(1) .hy-step__body { transition-delay: 300ms; }
  .v3.js-motion .hy-steps.is-lit .hy-step:nth-child(2) .hy-step__body { transition-delay: 1000ms; }
  .v3.js-motion .hy-steps.is-lit .hy-step:nth-child(3) .hy-step__body { transition-delay: 1700ms; }

  /* Lichtfunke (Steglitz) · läuft nach dem Zeichnen einmal durch */
  .v3.js-motion .hy-steps .hy-grid::after { content: ""; position: absolute; top: 31px; left: 0; width: 90px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, transparent, rgba(255,200,200,0.95), transparent); opacity: 0; z-index: 2; pointer-events: none; }
  .v3.js-motion .hy-steps.is-lit .hy-grid::after { animation: hy-spark 1.1s var(--ease-standard) 2.35s forwards; }

  .v3.js-motion .hy-steps .hy-bring { opacity: 0; transform: translateY(18px); transition: opacity 700ms ease 2300ms, transform 700ms var(--v3-ease) 2300ms; }
  .v3.js-motion .hy-steps.is-lit .hy-bring { opacity: 1; transform: translateY(0); }

  @keyframes hy-spark {
    0% { left: 0; opacity: 0; }
    12% { opacity: 1; }
    88% { opacity: 1; }
    100% { left: calc(100% - 90px); opacity: 0; }
  }
}
