In what state is the custody battle taking place? The rules that govern attorneys and the standard practices of attorneys vary a little bit from state to state.
In the typical hourly fee agreement, the lawyer will charge a certain amount per hour, say $200/hour, for the attorney's time and will also bill the client for direct expenses incurred in the case, like a court filing fee, service fees, copy charges, etc. The attorney will also have the client pay a retainer amount at the start of the representation, e.g. $2,000. That amount goes into the client trust account. Then when the attorney spends time on the case or incurs expenses, funds are taken out of the trust account to pay for that and the client is billed for the time and expenses, with that money then replenishing the trust account. The idea is that the retainer in the trust account is a sort of guarantee that the attorney will still be able to cover costs as the representation goes on. That $2,000 is not an extra fee. It's a just a fund used to keep things current. At the end of the representation any funds still left after all fees and expenses have been accounted for is returned to the client. Your agreement sounds like it is likely this kind of arrangement, which is very common. But of course I have not read the agreement so I cannot say for sure how it is meant to operate and if there is anything in it that might be a problem. So read the proposed fee agreement carefully and have the attorney answer any questions you have before you sign so you know exactly how this will work and what you are going to be paying.