Material Lerp not working as intended?

I’m trying to Lerp between a Colour and Shadow Colour set using a mask based on the lighting to achieve the below result. However, it seems when trying to apply it, it completely ignores the A node and is only returning the Colour (Image 2 is just the colour node section, but also what the final lerp returns). What is it about the mask that is not combining them as intended?

Desired outcome:

Node Setup

Colour, and also final material currently

Shadow

Mask