/* ========================================================================== 
   EFEKTY WIZUALNE: PROCESS PIPELINE, TECHNOLOGY ROUTE, ANIMACJE
   ========================================================================== */
.process-stage {
  position: relative;
  margin: 28px 0 18px;
  padding: 14px 6px 8px;
  border-radius: 18px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    color-mix(in srgb, var(--surface-muted) 70%, transparent);
  background-size: 26px 26px;
  overflow: hidden;
}
.process-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, var(--surface) 0, transparent 9%, transparent 91%, var(--surface) 100%);
  opacity: .58;
}
.flow-pipeline {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(12px, 1fr) auto minmax(12px, 1fr) auto minmax(12px, 1fr) auto minmax(12px, 1fr) auto;
  align-items: start;
}
.flow-step {
  position: relative;
  z-index: 2;
  width: 76px;
  min-width: 0;
  padding: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
}
.flow-step__node {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: color-mix(in srgb, var(--surface-elevated) 94%, transparent);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
}
.flow-step__node i {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-faint);
  opacity: .55;
}
.flow-step__node b { font: 800 .67rem/1 var(--font-mono); }
.flow-step strong {
  max-width: 86px;
  min-height: 2.5em;
  font-size: .6rem;
  line-height: 1.22;
  letter-spacing: .035em;
  text-align: center;
  text-transform: uppercase;
}
.flow-step:hover .flow-step__node { transform: translateY(-3px); border-color: var(--accent); }
.flow-step.is-active { color: var(--accent-strong); }
.flow-step.is-active .flow-step__node {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
  transform: translateY(-4px);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 11%, transparent), var(--shadow-sm);
}
.flow-step.is-active .flow-step__node i {
  background: var(--accent);
  opacity: 1;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent), 0 0 12px var(--accent);
}
.flow-connector {
  position: relative;
  height: 54px;
  overflow: hidden;
}
.flow-connector::before {
  content: "";
  position: absolute;
  top: 27px;
  right: 7px;
  left: 7px;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), color-mix(in srgb, var(--accent) 72%, var(--line-strong)), var(--line-strong));
  background-size: 220% 100%;
  animation: connector-line-glow 5s ease-in-out infinite;
  animation-delay: var(--connector-delay, 0s);
}
.flow-connector::after {
  content: "";
  position: absolute;
  top: 24px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-top: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
  transform: rotate(45deg);
  opacity: .36;
  animation: connector-arrow-glow 5s ease-in-out infinite;
  animation-delay: var(--connector-arrow-delay, .28s);
}
.flow-connector i {
  position: absolute;
  z-index: 2;
  top: 25px;
  left: -5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: connector-particle 2.6s linear infinite;
  animation-delay: var(--connector-particle-delay, 0s);
}
.flow-connector.is-passed::before { opacity: .82; background: var(--accent); }
.flow-connector.is-passed::after { opacity: .8; }
.flow-connector.is-next::before { opacity: 1; box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 45%, transparent); }
.flow-connector.is-next::after { opacity: 1; filter: drop-shadow(0 0 5px var(--accent)); }
.flow-detail {
  min-height: 174px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-muted);
}
.flow-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.flow-detail-code { color: var(--accent); font-family: var(--font-mono); font-size: .68rem; font-weight: 800; }
.flow-detail-output { color: var(--text-faint); font-family: var(--font-mono); font-size: .6rem; text-align: right; }
.flow-detail h3 { margin: 15px 0 8px; font-size: 1rem; letter-spacing: -.025em; }
.flow-detail p { margin: 0; color: var(--text-soft); font-size: .78rem; }
.flow-detail.is-changing { animation: flow-detail-change .48s var(--ease) both; }

.stack-route { margin-top: 36px; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr; align-items: stretch; }
.route-stage { min-width: 0; padding: 20px 16px; display: grid; align-content: start; gap: 6px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-muted); }
.route-number { color: var(--accent); font-family: var(--font-mono); font-size: .63rem; font-weight: 800; }
.route-stage strong { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; }
.route-stage em { color: var(--text); font-size: .83rem; font-style: normal; font-weight: 780; }
.route-stage small { color: var(--text-faint); font-size: .67rem; }
.route-line { position: relative; width: 34px; overflow: hidden; }
.route-line::before { content: ""; position: absolute; top: 50%; right: 5px; left: 5px; height: 1px; background: var(--line-strong); }
.route-line::after { content: ""; position: absolute; top: calc(50% - 3px); right: 4px; width: 6px; height: 6px; border-top: 1px solid var(--accent); border-right: 1px solid var(--accent); transform: rotate(45deg); }
.route-line i { position: absolute; z-index: 2; top: calc(50% - 2px); left: -6px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: route-particle 2.2s linear infinite; }
.route-line:nth-of-type(4) i { animation-delay: -.5s; }
.route-line:nth-of-type(6) i { animation-delay: -1s; }
.route-line:nth-of-type(8) i { animation-delay: -1.5s; }

@keyframes ticker-marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(var(--ticker-shift, -720px), 0, 0); }
}
@keyframes partners-marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(var(--partners-shift, -1200px), 0, 0); }
}
@keyframes detail-in { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes connector-particle { from { left: -5px; } to { left: calc(100% + 2px); } }
@keyframes route-particle { from { left: -5px; } to { left: calc(100% + 2px); } }

@keyframes connector-line-glow {
  0%, 12%, 100% { background-position: 100% 0; opacity: .38; }
  28%, 48% { background-position: 0 0; opacity: 1; }
  68% { opacity: .52; }
}
@keyframes connector-arrow-glow {
  0%, 18%, 100% { opacity: .28; filter: none; }
  34%, 50% { opacity: 1; filter: drop-shadow(0 0 5px var(--accent)); }
  72% { opacity: .42; }
}
@keyframes flow-detail-change {
  from { opacity: .72; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
