Why is the Croatian word "pjena" (foam) spelt with "je" as if it were from Slavic yat, rather than "i", as it is from Slavic "y"? We know it is from Slavic "y" because of the 'u' in Latin "spuma" (also meaning "foam", the 's' here is s-mobile which was common in Indo-Europan), right? As in Latin "fumus" and Croatian "dim", both meaning "smoke" (it was 'dh' there in Indo-European, which turns into 'd' in Croatian and 'f' in Latin), for example.
The ū in Latin fūmus and spūma have different sources. The ū in spūma is from the Proto-Italic diphthong *oi̯. The Proto-Indo-European root would have had an *e or *o vowel followed by a laryngeal and then *y~*i (Michel de Vaan gives the PIE reconstructed form as *(s)poHi-nh2- or *(s)peh3i-nh2-).