:root {
    color-scheme: dark;
    font-family: Arial, Helvetica, sans-serif;
    background: #03090c;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    overflow: hidden;
    background: #03090c;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    color: #f5f7f7;
}

button {
    font: inherit;
}

.splash {
    position: fixed;
    inset: 0;
    isolation: isolate;
    overflow: hidden;
    background-color: #03090c;
    opacity: 1;
    transition: opacity 280ms ease;
}

.splash__stage {
    --vault-core-x: 49.666667%;
    --vault-core-y: 45.716073%;
    position: absolute;
    top: 50%;
    left: 50%;
    width: auto;
    height: 100vh;
    height: 100dvh;
    aspect-ratio: 900 / 1599;
    container-type: size;
    overflow: visible;
    background-color: #03090c;
    background-image: url("/media/gorilla/splash_vault_activation_v1.webp");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    transform: translate(-50%, -50%);
}

.splash__stage::after {
    position: absolute;
    inset: 0;
    z-index: 20;
    content: "";
    box-shadow:
        inset 0 0 80px rgba(0, 0, 0, 0.42),
        inset 0 -80px 100px rgba(0, 0, 0, 0.26);
    pointer-events: none;
}

.splash.is-leaving {
    opacity: 0;
}

.splash__brand {
    position: absolute;
    top: 9.7%;
    left: 50%;
    width: 72%;
    margin: 0;
    transform: translateX(-50%);
    color: #f4cc64;
    font-size: clamp(20px, 4.1cqw, 30px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
}

.splash__core {
    position: absolute;
    top: var(--vault-core-y);
    left: var(--vault-core-x);
    width: 24.5%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
}

.splash__core-pulse {
    position: absolute;
    inset: 6%;
    border: 2px solid rgba(57, 230, 225, 0.66);
    border-radius: 50%;
    opacity: 0;
    animation: core-scan 2.1s ease-out infinite;
}

.splash__coin {
    position: absolute;
    top: 12.77%;
    left: 12%;
    width: 76%;
    height: 76%;
    object-fit: contain;
    filter: drop-shadow(0 7px 16px rgba(0, 0, 0, 0.72));
    transform: scale(1);
    transform-origin: 50% 50%;
    animation: coin-idle 2.2s ease-in-out infinite;
}

.splash__copy {
    position: absolute;
    top: 58.8%;
    left: 50%;
    width: 72%;
    transform: translateX(-50%);
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.splash__copy h1 {
    margin: 0;
    color: #f6f7f5;
    font-size: clamp(20px, 4.35cqw, 31px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: 0;
}

.splash__copy p {
    min-height: 1.25em;
    margin: 10px 0 0;
    color: #9fe7e4;
    font-size: clamp(13px, 2.55cqw, 18px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
}

.splash__meter {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.splash__segments {
    position: absolute;
    inset: 0;
}

.splash__segments span {
    position: absolute;
    top: 68.0425%;
    height: 2.7517%;
    border-radius: 14%;
    background: transparent;
    opacity: 0;
    transition:
        background-color 180ms ease,
        box-shadow 180ms ease,
        opacity 180ms ease;
}

.splash__segments span:nth-child(1) { left: 17.8889%; width: 4.6667%; }
.splash__segments span:nth-child(2) { left: 23.3333%; width: 4.5556%; }
.splash__segments span:nth-child(3) { left: 28.6667%; width: 4.6667%; }
.splash__segments span:nth-child(4) { left: 34.1111%; width: 4.5556%; }
.splash__segments span:nth-child(5) { left: 39.5556%; width: 4.5556%; }
.splash__segments span:nth-child(6) { left: 44.8889%; width: 4.6667%; }
.splash__segments span:nth-child(7) { left: 50.3333%; width: 4.5556%; }
.splash__segments span:nth-child(8) { left: 55.7778%; width: 4.5556%; }
.splash__segments span:nth-child(9) { left: 61.1111%; width: 4.6667%; }
.splash__segments span:nth-child(10) { left: 66.5556%; width: 4.5556%; }
.splash__segments span:nth-child(11) { left: 71.8889%; width: 4.6667%; }
.splash__segments span:nth-child(12) { left: 77.3333%; width: 4.6667%; }

.splash__segments span.is-active {
    background: linear-gradient(180deg, #a8f3bd 0%, #63d997 100%);
    box-shadow:
        inset 0 0 0 1px rgba(222, 255, 232, 0.75),
        0 0 7px rgba(72, 224, 157, 0.58);
    opacity: 1;
}

.splash__percent {
    position: absolute;
    top: 72.7%;
    left: 50%;
    min-width: 58px;
    padding: 5px 10px;
    border: 1px solid rgba(54, 211, 204, 0.45);
    border-radius: 6px;
    background: rgba(4, 14, 18, 0.84);
    color: #e8ffff;
    font-size: clamp(13px, 2.35cqw, 17px);
    font-weight: 700;
    line-height: 1;
    text-align: center;
    transform: translateX(-50%);
    pointer-events: none;
}

.splash__retry {
    position: absolute;
    top: 76%;
    left: 50%;
    min-width: 150px;
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid #48ded7;
    border-radius: 7px;
    background: #09282b;
    color: #eaffff;
    font-weight: 700;
    transform: translateX(-50%);
}

.splash.is-complete .splash__segments span {
    background: #f0bf42;
    box-shadow:
        inset 0 0 0 1px rgba(255, 244, 186, 0.88),
        0 0 11px rgba(255, 192, 47, 0.82);
}

.splash.is-complete .splash__coin {
    animation: coin-unlock 420ms ease both;
}

.splash.is-complete .splash__core-pulse {
    border-color: #ffd15a;
    animation: core-unlock 420ms ease-out both;
}

.splash.is-error .splash__copy p {
    color: #ffb2a7;
}

@keyframes coin-idle {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.025);
    }
}

@keyframes core-scan {
    0% {
        opacity: 0;
        transform: scale(0.78);
    }
    35% {
        opacity: 0.72;
    }
    100% {
        opacity: 0;
        transform: scale(1.14);
    }
}

@keyframes coin-unlock {
    0% {
        transform: scale(1);
    }
    55% {
        filter:
            drop-shadow(0 7px 16px rgba(0, 0, 0, 0.72))
            drop-shadow(0 0 20px rgba(255, 196, 54, 0.9));
        transform: scale(1.12);
    }
    100% {
        transform: scale(1.04);
    }
}

@keyframes core-unlock {
    0% {
        opacity: 0.5;
        transform: scale(0.9);
    }
    100% {
        opacity: 0;
        transform: scale(1.34);
    }
}

@media (min-aspect-ratio: 900 / 1599) {
    .splash__stage {
        width: 100vw;
        height: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .splash,
    .splash__coin,
    .splash__core-pulse,
    .splash__segments span {
        animation: none;
        transition: none;
    }
}
