/* Visual loader kept outside React's hydrated element tree. */
body::before,
body::after {
    position: fixed;
    z-index: 2147483000;
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
    transition: opacity 420ms ease, visibility 0s linear 420ms;
}

body::before {
    content: "";
    inset: 0;
    min-height: 100svh;
    background: #000;
}

body::after {
    content: "";
    top: 50%;
    left: 50%;
    width: min(280px, 68vw);
    aspect-ratio: 1254 / 1254;
    background: url('/assets/logo-wordmark.webp') center / contain no-repeat;
    filter:
        drop-shadow(0 0 11px rgba(157, 255, 0, 0.34))
        drop-shadow(0 0 24px rgba(157, 255, 0, 0.16));
    transform: translate(-50%, -51%) scale(0.985);
    animation: omshanti-loader-pseudo-pulse 1500ms ease-in-out infinite;
}

.omshanti-page-ready body::before,
.omshanti-page-ready body::after {
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
}

@keyframes omshanti-loader-pseudo-pulse {
    0%,
    100% {
        transform: translate(-50%, -51%) scale(0.985);
        opacity: 0.78;
    }

    50% {
        transform: translate(-50%, -51%) scale(1.015);
        opacity: 1;
    }
}

.omshanti-loader {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: grid;
    place-items: center;
    min-height: 100svh;
    padding: 32px;
    overflow: hidden;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    background: #000;
    transition:
        opacity 420ms ease,
        visibility 0s linear 420ms;
}

.omshanti-loader-active,
.omshanti-loader-active body {
    overflow: hidden;
}

.omshanti-loader-active .omshanti-loader {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
    transition: none;
}

.omshanti-loader__inner {
    position: relative;
    display: grid;
    justify-items: center;
    width: min(300px, 68vw);
    transform: translateY(-1vh);
    animation: omshanti-loader-pulse 1500ms ease-in-out infinite;
}

.omshanti-loader__halo {
    display: none;
}

.omshanti-loader__icon {
    display: none;
}

.omshanti-loader__wordmark {
    position: relative;
    z-index: 1;
    display: block;
    width: min(100%, 280px);
    height: auto;
    filter:
        drop-shadow(0 0 11px rgba(157, 255, 0, 0.34))
        drop-shadow(0 0 24px rgba(157, 255, 0, 0.16));
}

.omshanti-loader__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes omshanti-loader-pulse {
    0%,
    100% {
        transform: translateY(-1vh) scale(0.985);
        opacity: 0.78;
    }

    50% {
        transform: translateY(-1vh) scale(1.015);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .omshanti-loader,
    .omshanti-loader__halo,
    .omshanti-loader__icon,
    .omshanti-loader__wordmark,
    .omshanti-loader__inner {
        animation: none;
        transition: none;
    }
}
