/* ═══════════════════════════════════════════════════════════
   como-funciona.css — Seção 6 (Como Funciona) de /criacao-de-sites.
   Timeline conectada (linha + marcador), não card grid nem lista
   editorial — dispositivo novo na página, mas o numeral aqui é
   legítimo porque a seção É uma sequência real (4 etapas em ordem).
   Desktop: linha horizontal atravessando os marcadores. Mobile:
   mesma lógica, eixo vertical. Zero ícone, zero card, zero sombra.
═══════════════════════════════════════════════════════════ */

.como-funciona {
  padding: 104px 0;
}

.cf-wrap {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

.cf-head {
  max-width: 640px;
  margin: 0 auto 64px;
  text-align: center;
}

.cf-head h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-bottom: 14px;
  text-wrap: balance;
}

.cf-head p {
  font-size: 16px;
  line-height: 1.68;
  color: var(--text2);
}

.cf-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.cf-step {
  display: flex;
  flex-direction: column;
}

/* ── Trilho: linha + marcador, desenhado por coluna (não pelo
   grid inteiro) — escala sozinho pra qualquer número de etapas. ── */
.cf-rail {
  position: relative;
  height: 20px;
  margin-bottom: 24px;
}

.cf-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--text);
  z-index: 1;
}

.cf-rail::before,
.cf-rail::after {
  content: '';
  position: absolute;
  top: 50%;
  height: 1px;
  background: var(--border);
  transform: translateY(-50%);
}

.cf-rail::before {
  left: 0;
  right: 50%;
}

.cf-rail::after {
  left: 50%;
  right: 0;
}

.cf-step:first-child .cf-rail::before {
  display: none;
}

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

.cf-content {
  max-width: 230px;
  margin: 0 auto;
  text-align: center;
}

.cf-num {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--muted);
  margin-bottom: 10px;
}

.cf-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 10px;
  text-wrap: balance;
}

.cf-content p {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text2);
}

@media (max-width: 860px) {
  .cf-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 48px;
  }

  .cf-step:nth-child(2) .cf-rail::after {
    display: none;
  }

  .cf-step:nth-child(3) .cf-rail::before {
    display: none;
  }
}

@media (max-width: 720px) {
  .como-funciona {
    padding: 64px 0;
  }

  .cf-head {
    margin-bottom: 40px;
  }

  .cf-grid {
    grid-template-columns: 1fr;
    row-gap: 0;
  }

  .cf-step {
    flex-direction: row;
    gap: 20px;
    padding-bottom: 32px;
  }

  .cf-rail {
    flex-shrink: 0;
    width: 20px;
    height: auto;
    align-self: stretch;
    margin-bottom: 0;
  }

  .cf-marker {
    top: 4px;
    transform: translateX(-50%);
  }

  .cf-rail::before {
    left: 50%;
    right: auto;
    top: 0;
    bottom: 0;
    height: auto;
    width: 1px;
    transform: translateX(-50%);
  }

  .cf-rail::after {
    display: none;
  }

  .cf-step:first-child .cf-rail::before {
    top: 4px;
    display: block;
  }

  .cf-step:last-child .cf-rail::before {
    bottom: calc(100% - 4px);
  }

  .cf-content {
    max-width: none;
    margin: 0;
    text-align: left;
    padding-top: 1px;
  }
}
