With $500K/1M mortgage int &100K home equity int deductible, what limit applies to HELOC interest in 1st lien position if it is used to refi 1st mortgage interest?

For example, we purchased a home for approx 400K and obtained a mortgage for approx 320K while making a 80K down payment. Assuming we refinance the 320K first mortgage utilizing a HELOC in first lien position, is all interest on the 320K HELOC deductible since it is not technically a traditional home equity loan in second mortgage position exceeding the initial acquisition financing/balance?