If I remember @Sirrian’s description right from the video:
Troop levels
Troop ascension levels / Rarity
Kingdom Bonuses of the player (include 5* increases)
Gem Masteries
Spell does not affect team power?
I don’t think so… the magic stat is counted, and I assume the spell power is regulated around the card’s base rarity.