Rule 1: 1. مَا إِنْ … حَتَّى 'no sooner … than'
مَا إِنْ + perfect, followed by حَتَّى + perfect, expresses two events in immediate succession: 'hardly had … when'. The إِنْ here is a redundant particle that strengthens مَا; it is not the conditional.
مَا إِنْ جَاوَزْنَا الْبَابَ حَتَّى وَجَدْتُ نَفْسِي فِي مَدِينَةٍ أُخْرَى.
mā in jāwaznā l-bāba ḥattā wajadtu nafsī fī madīnatin ukhrā
No sooner had we passed the gate than I found myself in another city.
مَا إِنْ جَلَسْنَا حَتَّى جَاءَ الشَّايُ.
mā in jalasnā ḥattā jāʾa sh-shāyu
Hardly had we sat down when the tea came.
مَا إِنْ سَمِعَ الْأَذَانَ حَتَّى قَامَ إِلَى الصَّلَاةِ.
mā in samiʿa l-adhāna ḥattā qāma ila ṣ-ṣalāti
As soon as he heard the call to prayer he rose to pray.