$\renewcommand{\Re}{\operatorname{Re}}$ $\renewcommand{\Im}{\operatorname{Im}}$ $\newcommand{\bR}{\mathbb{R}}$ $\newcommand{\bC}{\mathbb{C}}$ $\newcommand{\bZ}{\mathbb{Z}}$ $\newcommand{\const}{\operatorname{const}}$
We consider only linear homogeneous isotropic elasticity \begin{gather} \rho \boldsymbol{u}_{tt} =\lambda \Delta \boldsymbol{u} + 2\mu \nabla ( \nabla\cdot \boldsymbol{u}) \label{eq-5.5.1} \end{gather} where $\boldsymbol{u}$ is a displacement and $\rho$ is a density and $\lambda>0, \mu>0$ are Lamé coefficients.
Then \begin{gather} \rho (\nabla \times \boldsymbol{u})_{tt} =\lambda \Delta (\nabla \times \boldsymbol{u} ) \label{eq-5.5.2} \end{gather} and \begin{gather} \rho (\nabla \cdot \boldsymbol{u})_{tt} =(\lambda+2\mu)\Delta (\nabla \cdot \boldsymbol{u} )\label{eq-5.4.28} \end{gather} so we have two wave equations and (\ref{eq-5.5.2}) corresponds to shear waves and (\ref{eq-5.4.28}) corresponds to compression waves. Compression waves propagate with the speed \begin{gather} c_C:=\rho^{-\frac{1}{2}}(\lambda +2\mu)^{\frac{1}{2}} \label{eq-5.5.4} \end{gather} and shear waves propagate with the speed \begin{gather} c_S:=\rho^{-\frac{1}{2}}\lambda^{\frac{1}{2}}. \label{eq-5.5.5} \end{gather} Inside these waves propagate independently (in fact the similar conclusion holds for inhomogeneous isotropic media).
In compression waves displacement is parallel to the direction of the wave while in shear waves the displacement is perpendicular to the direction of the wave.
However reflecting from the boundary shear or compression waves generate both shear and compression waves according to Snell's law: \begin{gather} \frac{\sin (\alpha_{S})}{c_S}= \frac{\sin (\alpha_{C})}{c _C} \label{eq-5.5.6} \end{gather}
And in the case of \begin{gather} c_C \sin (\alpha_{S}) > c_S \label{eq-5.5.7} \end{gather} there is a complete internal reflection of shear waves. However there will be an interesting new case.
There are three the most natural boundary problems:
Each of these problem has three "scalar" boundary conditions. While in 1 and 2 nothing interested is added, in 3 (which is the only interesting for seismology since the Earth's surface is free) appears a new kind of wave.
Let us consider the case of the domain $X=\{\boldsymbol{x}\colon y:=x_2>0\}$ (but our conclusion would be valid for any dimension $d\ge 2$. Then due to rotational symmetry around $x_1$-axis it is sufficient to consider two–dimensional case.
We consider only double elliptic zone $\{(\boldsymbol{\xi},\tau)=(\xi,\eta,\tau): |\xi|> c_S^{-1}|\tau|\}$ where there could be neither shear nor compression waves; then equations to shear and compression waves give us solutions respectively \begin{align*} &\boldsymbol{v}= \begin{pmatrix}\alpha \\i\xi \end{pmatrix} e^{it\tau +ix\xi -y\alpha}, &&\alpha=(\xi^2-c_S^{-2}\tau^2)^{\frac{1}{2}}, \\ &\boldsymbol{w}= \begin{pmatrix}-i\xi\\\beta \end{pmatrix} e^{it\tau +ix\xi -y\beta}, &&\beta=(\xi^2-c_C^{-2}\tau^2)^{\frac{1}{2}} \end{align*} where vectors are derived from $v_{1,x}+v_{2,y}=0$ and $w_1=0$ and $w_{2,x}-w_{1,y}=0$.
On the other hand, (\ref{eq-5.5.8}) are \begin{align*} &u_{2,x}+u_{1,y}=0,\\ &(\lambda+\mu)u_{2,y}+\mu u_{1,x}=0. \end{align*} Plugging $u_j =Av_j+Bw_j$ we arrive to \begin{align*} -&(\alpha^2+\xi^2)A &&+i\xi(\alpha+\beta)B=0,\\ -& \lambda\alpha i\xi A &&+ (\mu \xi^2-\lambda \beta^2-\mu\beta^2)B=0 \end{align*}
Calculating determinant of this system one can see that it vanishes iff \begin{gather} |\xi|^{2}-c_R^2 \tau^2=0 \label{eq-eq-5.5.9} \end{gather} with $c_R:= c_R(\lambda,\mu) < c_S$. So in this example Raileigh waves propagate along geodesics of the border with the speed $c_R$. This is completely different from gliding rays.
One can consider not a flat border and variable $\lambda,\mu$ and construct asymptotic solution \begin{gather} \boldsymbol{u}= \sum_{l=1,2}e^{ik\phi - k\psi_l}\sum_{n\ge 0} \boldsymbol{a}_{l,n}k^{-l} \label{eq-eq-5.5.10} \end{gather} with $\psi_l=0$ on $S$ and $\psi_l\asymp d(x)$ where $d(x)$ is the distance to $Y$ while $\phi $ satisfies \begin{gather} |\nabla \phi |=c_R ,\qquad \nabla \phi\cdot \boldsymbol{\nu}=0\qquad \text{on } Y. \label{eq-eq-5.5.11} \end{gather}
Remark 1.
Remark 2. Propagation in anisotropic media is not described that simple because of characteristics of variable multiplicity. Look f.e. conical refraction in crystall optics.