/* ============================================================
   Plate (pl8) – Roadmap-Sektion
   Eigenständiges Modul, wird von /roadmap.js in die Startseite
   eingefügt (zwischen "Unternehmen" und FAQ).
   Design-Tokens entsprechen dem Haupt-Stylesheet:
   ink #0a0a0f · ink-muted rgb(91 91 102) · brand-600 #2438f5
   ============================================================ */

.pl8rm {
  position: relative;
  overflow: hidden;
  padding: 6rem 0;
}
@media (min-width: 640px) {
  .pl8rm { padding: 8rem 0; }
}

/* dezenter Hintergrund-Schein wie im Hero */
.pl8rm::before {
  content: "";
  position: absolute;
  top: -10rem;
  left: 50%;
  width: 60rem;
  height: 34rem;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(63, 86, 255, 0.07), transparent 70%);
  pointer-events: none;
}

.pl8rm-head {
  position: relative;
  margin: 0 auto;
  max-width: 42rem;
  text-align: center;
}

.pl8rm-head h2 {
  margin-top: 1.25rem;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: #0a0a0f;
}

.pl8rm-accent { color: #2438f5; }

.pl8rm-head p {
  margin-top: 1rem;
  font-size: 17px;
  line-height: 1.625;
  color: rgb(91 91 102);
}

/* ---------- Akkordeon ---------- */

.pl8rm-toggle-wrap {
  position: relative;
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.pl8rm-toggle-icon {
  width: 1rem;
  height: 1rem;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.pl8rm.is-open .pl8rm-toggle-icon {
  transform: rotate(180deg);
}

.pl8rm-collapse {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.65s cubic-bezier(0.22, 0.61, 0.36, 1),
              opacity 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.pl8rm.is-open .pl8rm-collapse {
  grid-template-rows: 1fr;
  opacity: 1;
}

.pl8rm-collapse-inner {
  overflow: hidden;
  min-height: 0;
}

/* ---------- Timeline-Gerüst ---------- */

.pl8rm-timeline {
  position: relative;
  margin: 4rem auto 0;
  max-width: 62rem;
}

.pl8rm-timeline ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* durchgehende Linie */
.pl8rm-line {
  position: absolute;
  top: 8px;
  bottom: 0;
  left: 21px;
  width: 2px;
  border-radius: 999px;
  background: rgba(10, 10, 15, 0.08);
  /* unten offen auslaufen – die Reise geht weiter */
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 82%, transparent 100%);
}

.pl8rm-line-fill {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(to bottom, #3f56ff, #2438f5);
  transform: scaleY(var(--pl8rm-progress, 0));
  transform-origin: top;
  will-change: transform;
}

/* ---------- Einträge ---------- */

.pl8rm-item {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: flex-start;
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity 0.65s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--pl8rm-delay, 0s);
}
.pl8rm-item.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* ---------- Knotenpunkte ---------- */

.pl8rm-node {
  position: relative;
  z-index: 1;
  grid-column: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: 2px;
}

.pl8rm-dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #fbfbfd;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 0.45s ease, border-color 0.45s ease;
}

.pl8rm-dot svg { width: 14px; height: 14px; }

/* erledigt: gefüllt, Häkchen erscheint sobald die Linie ihn erreicht */
.is-done .pl8rm-dot {
  border: 2px solid rgba(10, 10, 15, 0.14);
  color: transparent;
}
.is-done.is-lit .pl8rm-dot {
  background: #0a0a0f;
  border-color: #0a0a0f;
  color: #fff;
  transform: scale(1.08);
}

/* aktiv in Entwicklung: blauer Puls */
.is-active .pl8rm-dot {
  background: #2438f5;
  border: 2px solid #2438f5;
  color: #fff;
  box-shadow: 0 6px 18px -4px rgba(36, 56, 245, 0.55);
}
.is-active .pl8rm-node::before,
.is-active .pl8rm-node::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1.5px solid rgba(36, 56, 245, 0.55);
  animation: pl8rm-ping 2.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.is-active .pl8rm-node::after { animation-delay: 1.3s; }

@keyframes pl8rm-ping {
  0%   { transform: scale(1);    opacity: 0.9; }
  70%, 100% { transform: scale(2.05); opacity: 0; }
}

/* geplant: leerer Ring */
.is-planned .pl8rm-dot {
  border: 2px solid rgba(10, 10, 15, 0.14);
}
.is-planned .pl8rm-dot::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(10, 10, 15, 0.18);
}

/* geheim: gestrichelt mit ? */
.is-secret .pl8rm-dot {
  border: 2px dashed rgba(10, 10, 15, 0.22);
  color: rgba(10, 10, 15, 0.45);
  font-size: 14px;
  font-weight: 700;
}

/* ---------- Karten ---------- */

.pl8rm-card {
  position: relative;
  grid-column: 2;
  border-radius: 1.5rem;
  border: 1px solid rgba(10, 10, 15, 0.07);
  background: #fff;
  padding: 1.375rem 1.5rem;
  box-shadow: 0 1px 2px rgba(10, 10, 15, 0.04), 0 12px 40px -12px rgba(10, 10, 15, 0.1);
}

.pl8rm-card h3 {
  margin: 0.5rem 0 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: #0a0a0f;
}

.pl8rm-card p {
  margin: 0.375rem 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgb(91 91 102);
}

/* Jahres-/Status-Chip */
.pl8rm-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: rgba(10, 10, 15, 0.05);
  color: rgb(91 91 102);
}

/* aktive Karte: blaue Aura + Badge */
.is-active .pl8rm-card {
  border-color: rgba(36, 56, 245, 0.35);
  background: linear-gradient(180deg, #fff 0%, #f5f7ff 100%);
  box-shadow: 0 0 0 1px rgba(36, 56, 245, 0.12),
              0 20px 60px -18px rgba(36, 56, 245, 0.35);
  animation: pl8rm-breathe 3.4s ease-in-out infinite;
}

@keyframes pl8rm-breathe {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(36, 56, 245, 0.12),
                0 20px 60px -18px rgba(36, 56, 245, 0.3);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(36, 56, 245, 0.22),
                0 20px 64px -16px rgba(36, 56, 245, 0.45);
  }
}

.is-active .pl8rm-chip {
  background: rgba(36, 56, 245, 0.09);
  color: #2438f5;
}

.pl8rm-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #2438f5;
  animation: pl8rm-blink 1.6s ease-in-out infinite;
}

@keyframes pl8rm-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.8); }
}

/* geheime Karte */
.is-secret .pl8rm-card {
  border-style: dashed;
  border-color: rgba(10, 10, 15, 0.14);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: none;
}

.pl8rm-blur {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  user-select: none;
  pointer-events: none;
}
.pl8rm-blur span {
  display: block;
  height: 0.65rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(10, 10, 15, 0.14), rgba(36, 56, 245, 0.16), rgba(10, 10, 15, 0.09));
  filter: blur(4px);
}
.pl8rm-blur span:nth-child(1) { width: 86%; }
.pl8rm-blur span:nth-child(2) { width: 62%; }

/* ---------- Desktop: mittige, alternierende Timeline ---------- */

@media (min-width: 900px) {
  .pl8rm-timeline ol { gap: 0.75rem; }

  .pl8rm-line {
    left: 50%;
    margin-left: -1px;
  }

  .pl8rm-item {
    grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
  }

  .pl8rm-node {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    margin-top: 6px;
  }

  .pl8rm-item:nth-child(odd)  .pl8rm-card { grid-column: 1; grid-row: 1; }
  .pl8rm-item:nth-child(even) .pl8rm-card { grid-column: 3; grid-row: 1; }

  /* Karten leicht versetzt einfliegen lassen */
  .pl8rm-item:nth-child(odd)  { transform: translate3d(-18px, 22px, 0); }
  .pl8rm-item:nth-child(even) { transform: translate3d(18px, 22px, 0); }
  .pl8rm-item.is-visible      { transform: translate3d(0, 0, 0); }

  .pl8rm-card { padding: 1.5rem 1.75rem; }
}

/* ---------- Reduzierte Bewegung ---------- */

@media (prefers-reduced-motion: reduce) {
  .pl8rm-item,
  .pl8rm-item:nth-child(odd),
  .pl8rm-item:nth-child(even) {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .pl8rm-line-fill { transform: scaleY(1); transition: none; }
  .is-active .pl8rm-node::before,
  .is-active .pl8rm-node::after { animation: none; opacity: 0; }
  .is-active .pl8rm-card,
  .pl8rm-chip-dot { animation: none; }
  .pl8rm-dot { transition: none; }
  .pl8rm-collapse {
    grid-template-rows: 1fr;
    opacity: 1;
    transition: none;
  }
  .pl8rm-toggle-icon { transition: none; }
}
