Your biggest issue is that you are going to have to be perceived as the best candidate even with the negative of working 100% remote. Why is remote considered a negative? If it wasn't viewed by them as a negative, they would have allowed for that possibility when creating the job posting.
If you also want to be considered a contractor and not as an employee, that also may be considered a a negative. In some organizations getting a non-employee access to certain systems is almost impossible.
Even your referral may not mean much, because multiple people may also have referrals.
While you could wait to get the offer, they could then pull it back when you tell them, "by the way, the core hours to be in the office as 09:00 to 15:00, will not work for me because I will be living 3,000 miles away."
You may have to pre-interview where you discuss the situation, especially if they are requiring an in-person interview and have no idea you are that far away.
Unless you have sold them on your awesomeness before bring up the topic the risk is that they will terminate your application immediately. But even if they think your are the best they may still reject you if they think you hid this fact from them.
I would be honest with them, and if they say it won't work, then nothing has been lost. You may be better off focusing on either jobs nearby or ones where remote work is encouraged.