.startup-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background: #fff;
    color: #737373;
    font-family: system-ui, sans-serif;
    opacity: 1;
    transition: opacity 300ms ease;
    --logo-animation-duration: 2s;
}

@media (prefers-color-scheme: dark) {
    html:not([data-startup-theme="light"]) .startup-screen {
        background: #161616;
        color: #a3a3a3;
    }
}

html[data-startup-theme="dark"] .startup-screen {
    background: #161616;
    color: #a3a3a3;
}

.startup-screen.is-exiting {
    opacity: 0;
    pointer-events: none;
}

.startup-screen__logo {
    position: relative;
    display: flex;
    width: 6rem;
    height: 6rem;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.startup-screen__logo::before {
    position: absolute;
    inset: 0;
    background: oklch(63.7% 0.237 25.331);
    content: "";
}

.startup-screen__logo svg {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.startup-screen__label {
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

@media (prefers-reduced-motion: no-preference) {
    .startup-screen__logo::before {
        transform-origin: bottom;
        animation: startup-square-fill 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .logo-path {
        stroke-dasharray: 1;
        stroke-dashoffset: 1;
        fill-opacity: 0;
    }

    .logo-path--inner {
        animation: logo-draw-inner var(--logo-animation-duration, 3.2875s) ease-in-out infinite;
    }

    .logo-path--outer {
        animation: logo-draw-outer var(--logo-animation-duration, 3.2875s) ease-in-out infinite;
    }
}

@media (prefers-reduced-motion: reduce) {
    .startup-screen {
        transition: none;
    }
}

@keyframes startup-square-fill {
    from {
        transform: scaleY(0);
    }
    to {
        transform: scaleY(1);
    }
}

@keyframes logo-draw-inner {
    0% {
        stroke-dashoffset: 1;
        fill-opacity: 0;
    }
    26.093156% {
        stroke-dashoffset: 0;
        fill-opacity: 0;
    }
    43.488593%,
    100% {
        stroke-dashoffset: 0;
        fill-opacity: 1;
    }
}

@keyframes logo-draw-outer {
    0% {
        stroke-dashoffset: 1;
        fill-opacity: 0;
    }
    41.749049% {
        stroke-dashoffset: 0;
        fill-opacity: 0;
    }
    69.581749%,
    100% {
        stroke-dashoffset: 0;
        fill-opacity: 1;
    }
}
