Heavy, cold air will generate more lift since it's "thicker" for lack of a better term.
Hot air is less dense. This means it takes more power to move more air.
It's easier to maybe think of the air that you breath as a "liquid" like material comprised of a mix of mostly nitrogen, some oxygen and a little carbon dioxide and other gases. That mix changes with temperature and elevation. Just like the deeper under the ocean that you go, you have more pressure, the lower to the ground you are the more atmospheric pressure you will feel. And the higher that you go, there's less pressure.
When the air is cold the air is more dense. This has an impact both on how much lift is generated per amount of speed over the wings, and also impacts how much power the engine/carburetor are able to generate.
I believe engines make less power when the air in is hotter too as there is less delta T. Something something Carnot cycle
Anyway, I think the reduction of oxygen density is the primary driver for reduction in power as ambient temperatures rise.
For airplanes take-off, the lift is the issue I'd say.
The elevation of the track is around 2200m, and as you say the loss of drag more than compensates for the loss of engine power. Though being turbo engines helps as I understand.
[1]: https://en.wikipedia.org/wiki/List_of_Formula_One_race_recor...
Warmer air reduces density, thus reducing lift and slightly reducing the amount of oxygen reaching the engine's combustion area, thus some power loss as well. In order to take off in the same distance, it must be operating at reduced takeoff weight.
> Doesn’t heat generate lift, like in gliders crossing hilly terrain?
That lift is generated by a temperature difference, not a globally high temperature. Thermals used by gliders are thermals because the air is locally hotter than the environment. If the whole environment gets warm, you don't get thermals.