/* ==========================================================================
   Green Basilisk – „Pfad zum Launch“ (.gbpath, Section #ablauf)
   Version 5: Atmosphärischer Basilisk-BACKDROP (30% Deckkraft) hinter dem
   Inhalt. Pfad-Spitze = Basilisk-Logo (läuft den Pfad entlang). Bubbles =
   Messenger-Nachrichten (rund, randlos, gefüllt, Chat-2-Seiten), Text tippt
   sich ein. Scroll-Tracking unverändert. Layout-stabil (Zeichen als Spans).
   Farben/Schriften NUR über var(--we-*). Breakpoints exakt 768 / 480.
   ========================================================================== */

/* Atmosphärischer Basilisk-Backdrop: Bild-Ebene bei 30% Deckkraft, hinter dem
   Inhalt (::before über dem dunklen Section-Bg; Inhalt darüber via z-index).
   isolation:isolate kapselt die Stapelung sauber in der Sektion. */
.gbpath {
  isolation: isolate;
}
.gbpath::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("https://jtspyojvaqcmkjmllwrw.supabase.co/storage/v1/object/public/media/uploads/989ed50a-a8e2-4bbe-87df-00fe93852fa6.png")
    center / cover no-repeat;
  opacity: 0.3;
  pointer-events: none;
}
.gbpath-wrap {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(72px, 9vw, 120px) 24px;
}
.gbpath-head { max-width: 720px; }
.gbpath-kick {
  display: inline-block;
  font: 600 12px/1 var(--we-font-accent);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--we-primary-text);
}
.gbpath-title {
  margin: 14px 0 0;
  font: 700 clamp(30px, 4.6vw, 50px) / 1.08 var(--we-font-heading);
  letter-spacing: -0.02em;
  color: var(--we-text);
}
.gbpath-stage {
  position: relative;
  max-width: 880px;
  margin: clamp(44px, 6vw, 76px) auto 0;
}
.gbpath-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}
.gbpath-base {
  fill: none;
  stroke: color-mix(in srgb, var(--we-text) 16%, transparent);
  stroke-width: 2;
  stroke-dasharray: 5 9;
  stroke-linecap: round;
}
.gbpath-prog {
  fill: none;
  stroke: var(--we-primary);
  stroke-width: 2.5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 7px var(--we-glow-a));
}
/* Pfad-Spitze = Basilisk-Logo (läuft den Pfad entlang, per JS positioniert) */
.gbpath-walker {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  filter: drop-shadow(0 0 8px var(--we-primary)) drop-shadow(0 0 22px var(--we-glow-a));
}
.gbpath-walker img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.gbpath-stage.is-live .gbpath-walker { opacity: 1; }
.gbpath-walker i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--we-primary);
  animation: gbpathPulse 1.6s ease-out infinite;
}
@keyframes gbpathPulse {
  0%   { transform: scale(0.5); opacity: 0.7; }
  100% { transform: scale(1.7); opacity: 0; }
}
.gbpath-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: clamp(46px, 8vw, 98px);
}
.gbpath-step {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 22px);
  padding-left: 6%;
}
.gbpath-step:nth-child(even) {
  flex-direction: row-reverse;
  padding-left: 0;
  padding-right: 6%;
}
.gbpath-node {
  flex: none;
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--we-text) 25%, transparent);
  background: color-mix(in srgb, var(--we-bg) 88%, transparent);
  transition: border-color 0.4s, box-shadow 0.4s, background-color 0.4s;
}
.gbpath-node b {
  font: 700 12px/1 var(--we-font-heading);
  letter-spacing: 0.08em;
  color: var(--we-muted);
  transition: color 0.4s;
}
.gbpath-step.is-on .gbpath-node {
  border-color: var(--we-primary);
  background: color-mix(in srgb, var(--we-primary) 14%, var(--we-bg));
  box-shadow: 0 0 22px -4px var(--we-glow-a);
}
.gbpath-step.is-on .gbpath-node b { color: var(--we-primary-text); }
.gbpath-node::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--we-primary);
  opacity: 0;
}
.gbpath-step.is-on .gbpath-node::after {
  animation: gbpathPing 0.7s ease-out both;
}
@keyframes gbpathPing {
  0%   { opacity: 0.9; transform: scale(0.6); }
  100% { opacity: 0;   transform: scale(1.9); }
}

/* --- Messenger-Nachricht (runde, randlose, gefüllte Bubble mit Tail) ------- */
.gbpath-card {
  position: relative;
  box-sizing: border-box;
  width: fit-content;
  max-width: min(56%, 366px);
  padding: 11px 16px 13px;
  border: 0;
  border-radius: 18px;
  background: var(--we-surface);
  box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.7);
  opacity: 0.32;
  transform: translateY(12px);
  filter: saturate(0.55);
  transition:
    opacity 0.5s ease,
    transform 0.5s cubic-bezier(0.22, 0.9, 0.3, 1),
    filter 0.5s,
    box-shadow 0.5s;
}
.gbpath-step.is-on .gbpath-card {
  opacity: 1;
  transform: none;
  filter: none;
  box-shadow: 0 12px 28px -14px rgba(0, 0, 0, 0.8);
}
/* Chat-Look: rechte Bubbles (ungerade) grün getönt = „gesendet“,
   linke (gerade) neutral = „empfangen“. Zickzack ergibt einen Verlauf. */
.gbpath-step:nth-child(odd) .gbpath-card {
  background: color-mix(in srgb, var(--we-primary) 16%, var(--we-surface));
}
/* Tail — kleiner Nub zur Punkt-Seite hin, in Bubble-Farbe */
.gbpath-card::before {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border: 8px solid transparent;
}
.gbpath-step:nth-child(odd) .gbpath-card::before {
  left: -7px;
  border-right-width: 9px;
  border-right-color: color-mix(in srgb, var(--we-primary) 16%, var(--we-surface));
}
.gbpath-step:nth-child(even) .gbpath-card::before {
  right: -7px;
  border-left-width: 9px;
  border-left-color: var(--we-surface);
}
.gbpath-card h3 {
  margin: 0;
  font: 600 clamp(16px, 1.9vw, 19px) / 1.25 var(--we-font-heading);
  color: var(--we-text);
}
.gbpath-card p {
  margin: 6px 0 0;
  font: 400 13.5px/1.55 var(--we-font-body);
  color: var(--we-muted);
}
/* Type-Animation über per-Zeichen-Spans: alle Zeichen sind im DOM (Layout
   reserviert), starten unsichtbar und werden nacheinander eingeblendet.
   Der Caret sitzt am gerade getippten Zeichen. */
.gbpath-card .gbpath-ch { opacity: 0; }
.gbpath-card .gbpath-ch.gbpath-on { opacity: 1; }
.gbpath-card .gbpath-ch.gbpath-cur { position: relative; }
.gbpath-card .gbpath-ch.gbpath-cur::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 1.05em;
  background: var(--we-primary);
  box-shadow: 0 0 6px var(--we-glow-a);
  animation: gbpathCaret 0.85s steps(1) infinite;
}
@keyframes gbpathCaret { 50% { opacity: 0; } }

/* --- Tablet --------------------------------------------------------------- */
@media (max-width: 768px) {
  .gbpath-step { padding-left: 2%; }
  .gbpath-step:nth-child(even) { padding-right: 2%; }
  .gbpath-card { max-width: min(66%, 380px); }
}

/* --- Mobil: kein Zickzack — Punkt links, Bubble rechts, Tail immer links ---- */
@media (max-width: 480px) {
  .gbpath-step,
  .gbpath-step:nth-child(even) {
    flex-direction: row;
    padding-left: 0;
    padding-right: 0;
  }
  .gbpath-node { width: 40px; height: 40px; }
  .gbpath-card { max-width: min(80%, 320px); padding: 10px 14px 12px; }
  .gbpath-card p { font-size: 13px; }
  .gbpath-step:nth-child(even) .gbpath-card::before {
    right: auto;
    left: -7px;
    border-left: 8px solid transparent;
    border-right-width: 9px;
    border-right-color: var(--we-surface);
  }
}

/* --- Reduced Motion --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .gbpath-walker { display: none; }
  .gbpath-card,
  .gbpath-node,
  .gbpath-node b { transition: none !important; }
  .gbpath-step.is-on .gbpath-node::after,
  .gbpath-walker i,
  .gbpath-card .gbpath-ch.gbpath-cur::after { animation: none !important; }
  .gbpath-card .gbpath-ch { opacity: 1 !important; }
}
