.loader-wrap
{
    width: 100%;
    height: 100vh;
    /* replaced align-content + place-items with flex — Safari needs display:grid for those to work */
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    position: fixed;
    z-index: 1000;
    background-color: var(--primary-color);
    -webkit-transition: 0.5s ease;
    transition: 0.5s ease;
    overflow: hidden;
}

.loader {
    -webkit-transition: 0.3s;
    transition: 0.3s;
    width: 45px;
    aspect-ratio: 1;
    --c: no-repeat linear-gradient(#000 0 0);
    background: var(--c), var(--c), var(--c), var(--c), var(--c), var(--c);
    -webkit-animation:
      l14-1 .5s infinite alternate,
      l14-2  2s infinite;
    animation: 
      l14-1 .5s infinite alternate,
      l14-2  2s infinite;
}
@-webkit-keyframes l14-1 {
    0%,10% { background-size: 20% 100%; }
    100%   { background-size: 20% 20%; }
}
@keyframes l14-1 {
    0%,10% { background-size: 20% 100%; }
    100%   { background-size: 20% 20%; }
}
@-webkit-keyframes l14-2 {
    0%,49.9% { background-position: 0 0  ,0 100%,50% 50%,50% 50% ,100% 0  ,100% 100%; }
    50%,100% { background-position: 0 50%,0  50%,50% 0  ,50% 100%,100% 50%,100% 50%; }
}
@keyframes l14-2 {
    0%,49.9% { background-position: 0 0  ,0 100%,50% 50%,50% 50% ,100% 0  ,100% 100%; }
    50%,100% { background-position: 0 50%,0  50%,50% 0  ,50% 100%,100% 50%,100% 50%; }
}