Designing a Moore sequence detector using three always blocks
You state machine coding is rather weird. 

You normally start with looking which state you are in and then respond to the input to go to a new state. Also you should give your states better names. 

case (state)
SEEN_00: 
    case (ain)
    2'b00 : next_state = SEEN_00;
    2'b01 : next_state = SEEN_01;
    2'b10 : next_state = ..
    2'b11 : next_state = ..
    endcase
SEEN_01 : 
    case (ain)
    2'b00 : next_state = ..
    2'b01 : next_state = ..
    2'b10 : next_state = ..
    2'b11 : next_state = ..
    endcase
SEEN_10 :
    ...
SEEN_11 :
    ...
endcase


Now here is a nice trick if you need to react to state transitions. You look at the current state and the next state:

if (state==SEEN_01 &amp;&amp; next_state==SEEN_00) 
   yout &lt;= ...
else
   if (state==SEEN_10 &amp;&amp; next_state==SEEN_00) 


This is an example where the coding using a state and next_state gives you a huge advantage against just writing state &lt;=  SEEN_..;

With this the state machine code becomes regular and thus trivial. 

Now here is a nice GOTCHA:

Note that the output yout is registered and is not combinatorial depending on an input.

Thus this is NOT a Mealy machine.

At the same time the output is NOT dependent on the state as in state SEEN_00 the yout can be 0 or 1 depending on the previous state. Thus if you take the definition of a Moore machine literally "a Moore machine is a finite-state machine whose output values are determined only by its current state. " 

This is NOT a Moore machine either.