/* Explain: Styles for the animated pepper introduction splash and its explosion effect. */
/* Animacja wprowadzająca – papryczka pojawiająca się przy wejściu na stronę */
.intro-splash {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 44%, rgba(230, 51, 41, 0.34), transparent 62%),
        radial-gradient(circle at 50% 92%, rgba(255, 184, 0, 0.16), transparent 55%),
        var(--background-color);
    transition: opacity 650ms ease;
}

.intro-splash.is-leaving {
    opacity: 0;
    pointer-events: none;
}

.intro-splash__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: intro-rise 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.intro-splash__badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(90vw, 460px);
}

.intro-splash__pepper {
    width: 100%;
    height: auto;
    animation: intro-pepper 1200ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.intro-splash__name {
    margin: 1.6rem 0 0;
    font-size: clamp(2.6rem, 12vw, 4.2rem);
    letter-spacing: 0.02em;
    color: var(--text-color);
    text-shadow: 0 10px 44px rgba(230, 51, 41, 0.55);
    animation: intro-fade-up 700ms ease 550ms both;
}

.intro-splash__sub {
    margin: 0.6rem 0 0;
    font-size: clamp(0.8rem, 3vw, 1rem);
    font-weight: 700;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--accent-color);
    animation: intro-fade-up 700ms ease 720ms both;
}

@keyframes intro-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes intro-pepper {
    0% {
        opacity: 0;
        transform: scale(0.55) translateY(26px);
    }
    60% {
        opacity: 1;
        transform: scale(1.06) translateY(-6px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes intro-fade-up {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .intro-splash__inner,
    .intro-splash__pepper,
    .intro-splash__name,
    .intro-splash__sub,
    .intro-splash.is-exploding,
    .intro-blast__flash,
    .intro-blast__ring,
    .intro-blast__spark {
        animation: none !important;
    }
}

/* Wybuch – warstwa efektu eksplozji papryczki */
.intro-blast {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
}

.intro-blast__flash {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: radial-gradient(circle, #FFFDF5 0%, #FFE066 34%, #FF8C42 64%, rgba(230, 51, 41, 0) 100%);
    opacity: 0;
}

.intro-blast__ring {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 999px;
    border: 5px solid #FFB800;
    opacity: 0;
}

.intro-blast__ring--2 {
    border-color: #E63329;
}

.intro-blast__spark {
    position: absolute;
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: radial-gradient(circle, #FFE066 0%, #FF8C42 70%, rgba(230, 51, 41, 0) 100%);
    box-shadow: 0 0 14px rgba(255, 184, 0, 0.9);
    opacity: 0;
}

.intro-splash.is-exploding {
    animation: blast-shake 520ms ease-in-out both;
}

.intro-splash.is-exploding .intro-splash__inner {
    animation: intro-charge 520ms cubic-bezier(0.66, 0, 0.34, 1) both;
}

.intro-splash.is-exploding .intro-blast__flash {
    animation: blast-flash 760ms ease-out 180ms both;
}

.intro-splash.is-exploding .intro-blast__ring {
    animation: blast-ring 820ms ease-out 240ms both;
}

.intro-splash.is-exploding .intro-blast__ring--2 {
    animation: blast-ring 900ms ease-out 320ms both;
}

.intro-splash.is-exploding .intro-blast__spark {
    animation: blast-spark 820ms ease-out 240ms both;
}

@keyframes intro-charge {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    42% {
        transform: scale(0.9);
        opacity: 1;
    }
    100% {
        transform: scale(1.32);
        opacity: 0;
    }
}

@keyframes blast-flash {
    0% {
        opacity: 0;
        transform: scale(0.15);
    }
    32% {
        opacity: 1;
        transform: scale(9);
    }
    100% {
        opacity: 0;
        transform: scale(64);
    }
}

@keyframes blast-ring {
    0% {
        opacity: 0.95;
        transform: scale(0.18);
    }
    100% {
        opacity: 0;
        transform: scale(9);
    }
}

@keyframes blast-spark {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0.25);
    }
}

@keyframes blast-shake {
    0%, 100% {
        transform: translate(0, 0);
    }
    18% {
        transform: translate(-7px, 5px);
    }
    38% {
        transform: translate(6px, -6px);
    }
    58% {
        transform: translate(-5px, -4px);
    }
    78% {
        transform: translate(5px, 4px);
    }
}