:root {
    --loading-screen-navy: #07111f;
    --loading-screen-navy-rgb: 7, 17, 31;
    --loading-screen-gold: #d4af70;
    --loading-screen-gold-rgb: 212, 175, 112;
    --loading-screen-ivory: #f6f2eb;
    --loading-screen-ivory-rgb: 246, 242, 235;
    --loading-screen-draw-duration: 1.15s;
    --loading-screen-sweep-duration: 850ms;
    --loading-screen-sweep-delay: 1.55s;
    --loading-screen-reveal-duration: 620ms;
    --loading-screen-reveal-delay: 1.05s;
    --loading-screen-progress-duration: 1.55s;
    --loading-screen-exit-duration: 720ms;
}

.preloader {
    position: fixed;
    z-index: 2147483000;
    inset: 0;
    display: grid;
    overflow: hidden;
    place-items: center;
    background: var(--loading-screen-navy);
    color: var(--loading-screen-ivory);
    direction: ltr;
    isolation: isolate;
    animation: loading-screen-safety 650ms 10s ease-in forwards;
}

.loading-screen__architecture {
    position: absolute;
    inset: 0;
    display: grid;
    overflow: hidden;
    place-items: center;
    opacity: .72;
    pointer-events: none;
}

.loading-screen__building {
    width: min(76vw, 360px);
    max-height: min(82vh, 440px);
    overflow: visible;
}

.loading-screen__outline path,
.loading-screen__sweep {
    fill: none;
    stroke: var(--loading-screen-gold);
    stroke-linecap: round;
    stroke-linejoin: round;
}

.loading-screen__outline path {
    stroke-width: 1;
    stroke-dasharray: 900;
    stroke-dashoffset: 900;
    animation: loading-screen-draw var(--loading-screen-draw-duration) cubic-bezier(.55, 0, .25, 1) forwards;
}

.loading-screen__outline path:nth-child(-n + 3) {
    opacity: .7;
}

.loading-screen__outline path:nth-child(4),
.loading-screen__outline path:nth-child(5),
.loading-screen__outline path:nth-child(6),
.loading-screen__outline path:nth-child(7),
.loading-screen__outline path:nth-child(8) {
    animation-delay: 140ms;
}

.loading-screen__outline path:nth-child(n + 9):nth-child(-n + 14) {
    animation-delay: 280ms;
    opacity: .48;
}

.loading-screen__outline path:nth-child(n + 15) {
    animation-delay: 420ms;
    opacity: .62;
}

.loading-screen__sweep {
    stroke-width: 13;
    stroke-dasharray: 48 280;
    stroke-dashoffset: 328;
    opacity: 0;
    filter: drop-shadow(0 0 8px rgba(var(--loading-screen-gold-rgb), .72));
    animation: loading-screen-sweep var(--loading-screen-sweep-duration) var(--loading-screen-sweep-delay) ease-out forwards;
}

.loading-screen__brand {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(88vw, 380px);
    align-items: center;
    flex-direction: column;
    margin-top: 10px;
    padding: 18px 24px 12px;
    border: 1px solid rgba(var(--loading-screen-gold-rgb), .12);
    background: rgba(var(--loading-screen-navy-rgb), .94);
    opacity: 0;
    transform: translateY(13px);
    animation: loading-screen-reveal var(--loading-screen-reveal-duration) var(--loading-screen-reveal-delay) cubic-bezier(.2, .7, .2, 1) forwards;
}

.loading-screen__logo {
    display: grid;
    width: 92px;
    height: 92px;
    place-items: center;
}

.loading-screen__logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.loading-screen__company-name {
    margin: 14px 0 0;
    color: var(--loading-screen-gold);
    font-family: "Cairo", sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .08em;
    line-height: 1.6;
    text-align: center;
}

[dir="rtl"] .loading-screen__company-name {
    letter-spacing: 0;
}

.loading-screen__progress {
    position: absolute;
    right: 24px;
    bottom: max(28px, env(safe-area-inset-bottom));
    left: 24px;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 12px;
}

.loading-screen__progress-track {
    position: relative;
    display: block;
    width: min(220px, 62vw);
    height: 1px;
    overflow: hidden;
    background: rgba(var(--loading-screen-gold-rgb), .22);
}

.loading-screen__progress-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 32%;
    background: var(--loading-screen-gold);
    box-shadow: 0 0 9px rgba(var(--loading-screen-gold-rgb), .45);
    animation: loading-screen-progress var(--loading-screen-progress-duration) cubic-bezier(.65, 0, .35, 1) infinite;
    transition: width 320ms ease;
}

.loading-screen__caption {
    color: rgba(var(--loading-screen-gold-rgb), .78);
    font-family: "Cairo", sans-serif;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: .18em;
    line-height: 1.4;
    text-align: center;
}

[dir="rtl"] .loading-screen__caption {
    letter-spacing: .04em;
}

.preloader.is-ready {
    pointer-events: none;
}

.preloader.is-ready .loading-screen__progress-bar {
    width: 100%;
    animation: none;
}

.preloader.is-leaving {
    animation: loading-screen-exit var(--loading-screen-exit-duration) cubic-bezier(.76, 0, .24, 1) forwards;
    pointer-events: none;
}

@keyframes loading-screen-draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes loading-screen-sweep {
    0% {
        stroke-dashoffset: 328;
        opacity: 0;
    }
    18% {
        opacity: .26;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 0;
    }
}

@keyframes loading-screen-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes loading-screen-progress {
    0% {
        transform: translateX(-110%);
    }
    72%,
    100% {
        transform: translateX(330%);
    }
}

@keyframes loading-screen-exit {
    to {
        opacity: 0;
        transform: translateY(-100%);
        visibility: hidden;
    }
}

@keyframes loading-screen-safety {
    to {
        opacity: 0;
        transform: translateY(-100%);
        visibility: hidden;
        pointer-events: none;
    }
}

@media (max-width: 575.98px) {
    .loading-screen__building {
        width: min(88vw, 320px);
        max-height: 72vh;
    }

    .loading-screen__brand {
        margin-top: 4px;
        padding: 14px 18px 10px;
    }

    .loading-screen__logo {
        width: 82px;
        height: 82px;
    }

    .loading-screen__progress {
        right: 18px;
        left: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .loading-screen__outline path {
        stroke-dashoffset: 0;
        animation: none;
    }

    .loading-screen__sweep {
        display: none;
        animation: none;
    }

    .loading-screen__brand {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .loading-screen__progress-bar {
        animation: none;
        transition: none;
    }

    .preloader.is-leaving {
        animation-name: loading-screen-exit-reduced;
        animation-duration: 180ms;
    }
}

@keyframes loading-screen-exit-reduced {
    to {
        opacity: 0;
        visibility: hidden;
    }
}
