I can answer 3, but I'm not sure about 1 and 2
the answer is not exactly. type matchup damage is calculated before STAB is.
Let's take Aura Sphere (Fighting type, 80 potency)
against an Alakazam, for instance (psychic type), its potency would be halved due to type matchups. However, then STAB is applied, adding 50% of the calculated value to the total. so we end up with
([original potency] * [type matchup multiplier]) * (1 + [STAB bonus])
making the final potency 60, not 80
Please correct me if I'm wrong, but that's my understanding of the mechanics.
the answer is not exactly. type matchup damage is calculated before STAB is.
Let's take Aura Sphere (Fighting type, 80 potency)
against an Alakazam, for instance (psychic type), its potency would be halved due to type matchups. However, then STAB is applied, adding 50% of the calculated value to the total. so we end up with
([original potency] * [type matchup multiplier]) * (1 + [STAB bonus])
making the final potency 60, not 80
Please correct me if I'm wrong, but that's my understanding of the mechanics.