The gap you see is caused by the top:-40px you applied to the logo plus the margins on existing elements. You used relative positioning (and a magic number) to get the logo into position but relative positioning does not move anything physically. It moves the element visually but in essence still occupies the space it originally did (i.e. the space where the element was is always preserved). Thus when you move it by top:-40px you get a 40px of space where the element originally resided. Relative positioning is not meant for structural changes like this where the flow needs to follow the elements actual position.
Instead you should have floated the logo to the right before the html for the text that you want to the left (although these days we would use flex to avoid html order dependencies).
A quick fix is to use a margin-top instead of top and them remove the margins from elements adjacent.
Avoid using !important as that is a sign that you didn’t understand specificity and means that I have to also use !important to over-ride your rules.
The reason you though that clearfix was at fault has to do with block formatting and margin-collapse which is something that needs to be studied in detail as its effects are far and wide