#flujos {
  scroll-margin-top: 88px;
}

.flows {
  padding: 96px 0;
}

.flows .kicker {
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.flows h2 {
  color: var(--ink);
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  margin-bottom: 12px;
  letter-spacing: -0.04em;
}

.flows .section-head p {
  color: var(--ink-2);
}

.flows .section-head.center {
  margin-bottom: 36px;
}

.flow-grid {
  display: grid;
  gap: 16px;
}

.flow-tile {
  --tone: #e87426;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #161922;
  border-radius: 18px;
  padding: 32px 28px 24px;
  overflow: hidden;
  min-height: 500px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.flow-tile:hover {
  border-color: var(--tone-border);
  box-shadow: 0 0 0 1px var(--tone-glow);
}

.tone-channels {
  --tone: #38bdf8;
  --tone-soft: rgba(56, 189, 248, 0.12);
  --tone-border: rgba(56, 189, 248, 0.45);
  --tone-glow: rgba(56, 189, 248, 0.18);
  --tone-ring: rgba(56, 189, 248, 0.55);
}

.tone-gestiones {
  --tone: #e87426;
  --tone-soft: rgba(232, 116, 38, 0.12);
  --tone-border: rgba(232, 116, 38, 0.45);
  --tone-glow: rgba(232, 116, 38, 0.18);
  --tone-ring: rgba(232, 116, 38, 0.55);
}

.tone-crm {
  --tone: #818cf8;
  --tone-soft: rgba(129, 140, 248, 0.12);
  --tone-border: rgba(129, 140, 248, 0.45);
  --tone-glow: rgba(129, 140, 248, 0.18);
  --tone-ring: rgba(129, 140, 248, 0.55);
}

.tone-ia {
  --tone: #c084fc;
  --tone-soft: rgba(192, 132, 252, 0.12);
  --tone-border: rgba(192, 132, 252, 0.45);
  --tone-glow: rgba(192, 132, 252, 0.18);
  --tone-ring: rgba(192, 132, 252, 0.55);
}

.tone-auto {
  --tone: #fbbf24;
  --tone-soft: rgba(251, 191, 36, 0.12);
  --tone-border: rgba(251, 191, 36, 0.45);
  --tone-glow: rgba(251, 191, 36, 0.18);
  --tone-ring: rgba(251, 191, 36, 0.55);
}

.tone-blast {
  --tone: #34d399;
  --tone-soft: rgba(52, 211, 153, 0.12);
  --tone-border: rgba(52, 211, 153, 0.45);
  --tone-glow: rgba(52, 211, 153, 0.18);
  --tone-ring: rgba(52, 211, 153, 0.55);
}

.flow-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--tone);
  background: var(--tone-soft);
  margin: 0 auto 12px;
}

.flow-icon svg {
  width: 18px;
  height: 18px;
}

.flow-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tone);
  margin-bottom: 8px;
}

.flow-tile h3 {
  color: #fff;
  font-size: 1.28rem;
  line-height: 1.25;
  margin-bottom: 8px;
}

.flow-tile h3 + p {
  color: #9aa3b8;
  font-size: 0.94rem;
  line-height: 1.5;
}

.flow-board {
  position: relative;
  flex: 1;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0;
  padding: 8px 0 4px;
  color: var(--tone);
}

.flow-chip,
.flow-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  color: #d5d9e4;
  background: #1e2330;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 6px 10px;
  white-space: nowrap;
}

.flow-dash {
  width: 2px;
  height: 36px;
  background-image: linear-gradient(
    to bottom,
    var(--tone) 0 5px,
    transparent 5px 11px
  );
  background-size: 2px 11px;
  animation: flow-march 0.7s linear infinite;
}

.flow-core {
  display: flex;
  justify-content: center;
  margin: 4px 0;
}

.flow-feats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.flow-feats li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  color: #c5cad6;
  background: #1e2330;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 4px 10px;
}

.flow-feats i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tone);
  flex-shrink: 0;
}

.flow-fork {
  width: min(100%, 280px);
  height: 72px;
}

.flow-fork svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.flow-path {
  fill: none;
  stroke: var(--tone);
  stroke-width: 1.6;
  stroke-dasharray: 5 7;
  stroke-linecap: round;
  animation: flow-stroke 0.9s linear infinite;
}

.flow-ends {
  display: flex;
  justify-content: space-between;
  width: min(100%, 280px);
  gap: 8px;
}

.flow-box {
  border-radius: 10px;
  flex: 1;
  text-align: center;
  white-space: normal;
  line-height: 1.3;
  padding: 8px 6px;
}

.flow-story {
  margin-top: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(1200px 280px at 10% 0%, rgba(52, 211, 153, 0.08), transparent 50%),
    radial-gradient(900px 240px at 90% 100%, rgba(192, 132, 252, 0.08), transparent 46%),
    #161922;
  border-radius: 18px;
  padding: 32px 24px 28px;
}

.flow-story-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 32px;
}

.flow-story-head .flow-label {
  background: linear-gradient(90deg, #34d399, #38bdf8, #c084fc, #e87426, #818cf8, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.flow-story h3 {
  color: #fff;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.25;
  margin-bottom: 10px;
}

.flow-story-head p:last-child {
  color: #9aa3b8;
  font-size: 0.98rem;
  line-height: 1.55;
}

.flow-pipeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.pipe-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 8px 10px 28px;
}

.pipe-step::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 2px;
  height: 20px;
  transform: translateX(-50%);
  background-image: linear-gradient(
    to bottom,
    var(--tone) 0 5px,
    transparent 5px 11px
  );
  background-size: 2px 11px;
  animation: flow-march 0.7s linear infinite;
}

.pipe-step:last-child {
  padding-bottom: 8px;
}

.pipe-step:last-child::after {
  display: none;
}

.pipe-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--tone);
}

.pipe-step h4 {
  color: #fff;
  font-size: 0.98rem;
  margin: 0;
}

.pipe-step > p:last-child {
  color: #9aa3b8;
  font-size: 0.82rem;
  line-height: 1.45;
  margin: 0;
}

.pipe-step .flow-icon {
  margin-bottom: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .flow-dash,
  .flow-path,
  .pipe-step::after {
    animation: none;
  }
}

@media (min-width: 720px) {
  .flow-pipeline {
    grid-template-columns: repeat(3, 1fr);
  }

  .pipe-step {
    padding: 0 10px 36px;
  }

  .pipe-step::after {
    top: 58px;
    left: calc(50% + 24px);
    bottom: auto;
    width: calc(100% - 28px);
    height: 2px;
    transform: none;
    background-image: linear-gradient(
      to right,
      var(--tone) 0 6px,
      transparent 6px 12px
    );
    background-size: 12px 2px;
    animation-name: flow-march-x;
  }

  .pipe-step:nth-child(3n)::after {
    display: none;
  }

  .pipe-step:last-child {
    padding-bottom: 0;
  }
}

@media (min-width: 860px) {
  .flow-grid {
    grid-template-columns: 1fr 1fr;
  }

  .flow-tile {
    /* min-height: 560px; */
    padding: 36px 32px 28px;
  }

  .flow-story {
    padding: 40px 36px 32px;
  }
}

@media (min-width: 1100px) {
  .flow-pipeline {
    grid-template-columns: repeat(6, 1fr);
  }

  .pipe-step {
    padding: 0 8px;
  }

  .pipe-step:nth-child(3n)::after {
    display: block;
  }

  .pipe-step:last-child::after {
    display: none;
  }
}

@keyframes flow-march {
  to {
    background-position: 0 11px;
  }
}

@keyframes flow-stroke {
  to {
    stroke-dashoffset: -24;
  }
}

@keyframes flow-march-x {
  to {
    background-position: 12px 0;
  }
}
