Asymptotic behavior of Allen–Cahn-type energies and Neumann eigenvalues via inner variations