/* ---------------------------------------------------------------------------
   The page loader.

   What was here: a full-bleed red-to-black gradient with the company name set
   at 60px and absolutely positioned off the centre - which overflowed the
   screen on a phone, and put a wall of saturated colour in front of every page.

   What it is now: the same ink the rest of the site uses, the name set at a
   size that fits, and a bar that actually moves. jQuery fades the .preloader
   out after load, so nothing here changes how it is dismissed.
   --------------------------------------------------------------------------- */

.preloader {
    background: #141312 !important;
    flex-direction: column;
    gap: 22px;
}

/* The template gave these 100% height and a circular radius, which is why the
   name sat where it did. */
.preloader .loading-container {
    height: auto !important;
    width: auto !important;
    max-width: 88vw;
    margin: 0 !important;
    border-radius: 0 !important;
    position: static !important;
    text-align: center;
}

.preloader #loading-icon {
    position: static !important;
    transform: none !important;
    font-size: clamp(1.25rem, 5.2vw, 2.25rem) !important;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.2;
    color: #fff;
    display: block;
    margin-bottom: 4px;
}

/* A word under the name, in the mono face the rest of the site uses for
   anything that is a label rather than a sentence. */
.preloader .loading-note {
    display: block;
    font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
}

/* The bar. It sweeps rather than reporting real progress - the page has no
   figure to report, and a fake percentage would be a lie told in numbers. */
.preloader .loading-bar {
    position: relative;
    width: min(260px, 60vw);
    height: 2px;
    margin: 0 auto;
    background: rgba(255, 255, 255, .14);
    overflow: hidden;
}

    .preloader .loading-bar::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 38%;
        background: var(--primary-color);
        animation: loaderSweep 1.15s ease-in-out infinite;
    }

@keyframes loaderSweep {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(363%); }
}

/* Asked not to move things: the bar sits still, filled, rather than vanishing -
   an empty track would read as something broken. */
@media (prefers-reduced-motion: reduce) {
    .preloader .loading-bar::after {
        animation: none;
        width: 100%;
    }
}
