Snell geometry and layer phase
The angle is measured from the normal. When phases are compared on a common outgoing wavefront, the cosine factor sets the relative phase; the longer zigzag path inside the layer does not set it alone. The indices are fixed real numbers, and changing an index leaves the thickness unchanged.