@font-face {
    font-family: 'JetBrains Mono';
    src: url('/assets/private-splash-terminal.woff2?v=jetbrains-mono-500') format('woff2');
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

html {
    color-scheme: dark;
    background: #02040a;
}

.public-splash {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    place-items: center;
    overflow-x: hidden;
    background:
        radial-gradient(ellipse at 33% 59%, #03131e 0, transparent 38%),
        radial-gradient(ellipse at 68% 63%, #120719 0, transparent 37%),
        #02040a;
    color: #f8fbff;
}

.splash-shell {
    position: relative;
    isolation: isolate;
    width: min(100vw, 56.28vh, 560px);
    width: min(100vw, 56.28svh, 560px);
    aspect-ratio: 941 / 1672;
    container-type: inline-size;
}

.splash-brand {
    position: absolute;
    z-index: 2;
    inset: 5% 0 auto;
    text-align: center;
}

.splash-logo {
    display: block;
    width: 20.5%;
    margin: 0 auto;
    overflow: visible;
    filter: drop-shadow(-2px -1px 6px #1c9aff95) drop-shadow(3px 1px 5px #ef15f992);
}

.splash-brand h1 {
    margin: .15cqw 0 0;
    font: 800 9.45cqw / 1.06 Arial, 'Liberation Sans', sans-serif;
    letter-spacing: .034em;
    white-space: nowrap;
}

.splash-coord {
    color: #fbfcff;
    text-shadow: 0 0 1.65cqw #afc8ff72;
}

.splash-reader {
    color: #f728ec;
    background: linear-gradient(#fc69f7 8%, #fb15eb 60%, #e300ed 86%);
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 1.7cqw #ef0cea82);
}

.cat-stage {
    --cat-width: 100cqw;
    --spinner-width: clamp(62px, 19.5cqw, 88px);
    /* The visible ear rim starts 15 pixels into the 941-pixel-wide source. */
    --ear-offset: calc(var(--cat-width) * 15 / 941);
    --spinner-offset: calc(-27px - var(--ear-offset) - var(--spinner-width) * .016);
    position: absolute;
    z-index: 1;
    inset: 30.62% 0 auto;
}

.splash-spinner {
    position: absolute;
    z-index: 2;
    inset-inline: 0;
    bottom: calc(100% + var(--spinner-offset));
    width: var(--spinner-width);
    margin: 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 10.8px;
    overflow: visible;
    animation: splash-spin 1.75s linear infinite;
}

.splash-spinner path {
    filter: drop-shadow(0 0 2.6px currentColor);
}

.splash-cat {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(-.5cqw 0 1cqw #07cbff3a) drop-shadow(.5cqw 0 1cqw #f019e83a);
}

.splash-terminal {
    position: absolute;
    z-index: 2;
    inset: 82.82% 0 auto;
    margin: 0;
    text-align: center;
    white-space: nowrap;
    color: #f8f9ff;
    font: 500 7.25cqw / 1.18 'JetBrains Mono', 'IBM Plex Mono', SFMono-Regular, Consolas, 'Liberation Mono', monospace;
    letter-spacing: .035em;
    text-shadow: 0 0 .6cqw #a5caff55;
}

.terminal-prompt {
    color: #4bf3ff;
    text-shadow: 0 0 .7cqw #00d4ff70;
}

.terminal-hello {
    color: #b7f8ff;
    text-shadow: 0 0 .65cqw #1cdfff44;
}

.terminal-you {
    color: #ffb9f8;
    text-shadow: 0 0 .6cqw #fc31ee5c;
}

.terminal-cursor {
    color: #fff0fc;
    text-shadow: 0 0 .5cqw #fd16eb70;
    animation: splash-blink .95s steps(1, end) infinite;
}

@media (min-width: 768px) {
    .public-splash {
        min-height: 100dvh;
    }

    .splash-shell {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: min(90vw, 1000px);
        aspect-ratio: auto;
    }

    .splash-scene {
        position: fixed;
    }

    .splash-brand,
    .splash-terminal {
        position: relative;
        inset: auto;
    }

    .splash-logo {
        width: min(7dvh, 94px);
    }

    .splash-brand h1 {
        font-size: min(7.4cqw, 4.9vw, 8.2dvh, 82px);
        line-height: 1;
    }

    .cat-stage {
        --cat-width: min(86vw, 70dvh, 650px);
        --spinner-width: clamp(98px, 11.4dvh, 120px);
        --cat-top: calc(min(7.4dvh, 90px) + clamp(6px, 1.1dvh, 12px) + clamp(12px, 2.5dvh, 25px));
        position: relative;
        inset: auto;
        width: var(--cat-width);
        padding-block-start: var(--cat-top);
    }

    .splash-spinner {
        /* Leave room for the title on shorter desktop windows. */
        top: max(-8px, calc(var(--cat-top) - var(--spinner-width) - var(--spinner-offset)));
        bottom: auto;
    }

    .splash-terminal {
        margin-block-start: 4px;
        font-size: min(5cqw, 3.6dvh, 42px);
    }
}

@keyframes splash-spin {
    to { transform: rotate(360deg); }
}

@keyframes splash-blink {
    50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .splash-spinner,
    .terminal-cursor { animation: none; }
}
