﻿@import url("https://fonts.googleapis.com/css?family=Barlow+Condensed:300,400,500,600,700,800,900|Barlow:300,400,500,600,700,800,900&display=swap");

/*
 * Стили страниц ошибок. Всё под .error-page — без глобального reset body/p/button,
 * чтобы после ухода со страницы не ломать остальной UI.
 */

.error-page {
    --error-bg: #695681;
    --error-deep: #36184f;
    --error-shadow: #32243e;
    margin: 0;
    padding: 0;
    height: 100%;
    min-height: 100dvh;
    width: 100%;
    font-family: "Barlow", sans-serif;
    background: var(--error-bg);
    color: antiquewhite;
    -webkit-tap-highlight-color: transparent;
}

.error-page ::selection {
    background: var(--error-bg);
    color: antiquewhite;
}

.error-page .wrapper {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.error-page .wrapper .error-page__stage {
    margin: 0 auto;
    transition: all 0.4s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 100%;
}

.error-page .wrapper .error-page__stage .scene {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    vertical-align: middle;
}

.error-page .wrapper .error-page__stage .one,
.error-page .wrapper .error-page__stage .two,
.error-page .wrapper .error-page__stage .three,
.error-page .wrapper .error-page__stage .circle,
.error-page .wrapper .error-page__stage .p404 {
    position: absolute;
    width: 60%;
    height: 60%;
    top: 20% !important;
    left: 20% !important;
    min-width: 400px;
    min-height: 400px;
    user-select: none;
}

.error-page .wrapper .error-page__stage .one .content,
.error-page .wrapper .error-page__stage .two .content,
.error-page .wrapper .error-page__stage .three .content,
.error-page .wrapper .error-page__stage .circle .content,
.error-page .wrapper .error-page__stage .p404 .content {
    width: 600px;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: error-page-content 0.8s cubic-bezier(1, 0.06, 0.25, 1) backwards;
}

@keyframes error-page-content {
    0% {
        width: 0;
    }

    100% {
        width: 600px;
    }
}

.error-page .wrapper .error-page__stage .one .content .piece,
.error-page .wrapper .error-page__stage .two .content .piece,
.error-page .wrapper .error-page__stage .three .content .piece,
.error-page .wrapper .error-page__stage .circle .content .piece,
.error-page .wrapper .error-page__stage .p404 .content .piece {
    width: 200px;
    height: 80px;
    display: flex;
    position: absolute;
    border-radius: 80px;
    z-index: 1;
    animation: error-page-piece-left 8s cubic-bezier(1, 0.06, 0.25, 1) infinite both;
}

@keyframes error-page-piece-left {
    50% {
        left: 80%;
        width: 10%;
    }
}

@keyframes error-page-piece-right {
    50% {
        right: 80%;
        width: 10%;
    }
}

@media screen and (max-width: 799px) {
    .error-page .wrapper .error-page__stage .one,
    .error-page .wrapper .error-page__stage .two,
    .error-page .wrapper .error-page__stage .three,
    .error-page .wrapper .error-page__stage .circle,
    .error-page .wrapper .error-page__stage .p404 {
        width: 90%;
        height: 90%;
        top: 5% !important;
        left: 5% !important;
        min-width: 280px;
        min-height: 280px;
    }
}

@media screen and (max-height: 660px) {
    .error-page .wrapper .error-page__stage .one,
    .error-page .wrapper .error-page__stage .two,
    .error-page .wrapper .error-page__stage .three,
    .error-page .wrapper .error-page__stage .circle,
    .error-page .wrapper .error-page__stage .p404 {
        min-width: 280px;
        min-height: 280px;
        width: 60%;
        height: 60%;
        top: 20% !important;
        left: 20% !important;
    }
}

.error-page .wrapper .error-page__stage .text {
    width: 60%;
    height: 40%;
    min-width: 400px;
    min-height: 500px;
    position: absolute;
    margin: 40px 0;
    opacity: 1;
    animation: error-page-text 0.6s 1.8s ease both;
}

@keyframes error-page-text {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media screen and (max-width: 799px) {
    .error-page .wrapper .error-page__stage .text {
        min-height: 400px;
        height: 80%;
    }
}

.error-page .wrapper .error-page__stage .text article {
    width: 400px;
    position: absolute;
    bottom: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    left: 50%;
    transform: translateX(-50%);
}

@media screen and (max-width: 799px) {
    .error-page .wrapper .error-page__stage .text article {
        width: 100%;
    }
}

.error-page .wrapper .error-page__stage .text article p {
    color: white;
    font-size: 18px;
    letter-spacing: 0.6px;
    margin: 0 0 40px;
    padding: 0;
    text-shadow: 6px 6px 10px var(--error-shadow);
}

.error-page .wrapper .error-page__stage .text article button {
    height: 40px;
    padding: 0 30px;
    margin: 0;
    border: 0;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0px 15px 20px rgba(54, 24, 79, 0.5);
    z-index: 3;
    color: var(--error-bg);
    background-color: white;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s ease;
}

.error-page .wrapper .error-page__stage .text article button:hover {
    box-shadow: 0px 10px 10px -10px rgba(54, 24, 79, 0.5);
    transform: translateY(5px);
    background: #fb8a8a;
    color: white;
}

.error-page .wrapper .error-page__stage .text article button:focus {
    outline: 0;
}

.error-page .wrapper .error-page__stage .p404 {
    font-size: 200px;
    font-weight: 700;
    letter-spacing: 4px;
    color: white;
    display: flex !important;
    justify-content: center;
    align-items: center;
    position: absolute;
    z-index: 2;
    margin: 0;
    padding: 0;
    opacity: 1;
    animation: error-page-anime404 0.6s cubic-bezier(0.3, 0.8, 1, 1.05) both;
    animation-delay: 1.2s;
}

@media screen and (max-width: 799px) {
    .error-page .wrapper .error-page__stage .p404 {
        font-size: 100px;
    }
}

@keyframes error-page-anime404 {
    0% {
        opacity: 0;
        transform: scale(10) skew(20deg, 20deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) skew(0deg, 0deg);
    }
}

.error-page .wrapper .error-page__stage .p404:nth-of-type(2) {
    color: var(--error-deep);
    z-index: 1;
    animation-delay: 1s;
    filter: blur(10px);
    opacity: 0.8;
}

.error-page .wrapper .error-page__stage .circle {
    position: absolute;
}

.error-page .wrapper .error-page__stage .circle:before {
    content: "";
    position: absolute;
    width: 800px;
    height: 800px;
    background-color: rgba(54, 24, 79, 0.2);
    border-radius: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: inset 5px 20px 40px rgba(54, 24, 79, 0.25), inset 5px 0px 5px rgba(50, 36, 62, 0.3), inset 5px 5px 20px rgba(50, 36, 62, 0.25), 2px 2px 5px rgba(255, 255, 255, 0.2);
    animation: error-page-circle 0.8s cubic-bezier(1, 0.06, 0.25, 1) both;
}

@keyframes error-page-circle {
    0% {
        width: 0;
        height: 0;
    }

    100% {
        width: 800px;
        height: 800px;
    }
}

@media screen and (max-width: 799px) {
    .error-page .wrapper .error-page__stage .circle:before {
        width: 400px;
        height: 400px;
    }

    @keyframes error-page-circle {
        0% {
            width: 0;
            height: 0;
        }

        100% {
            width: 400px;
            height: 400px;
        }
    }
}

.error-page .wrapper .error-page__stage .one .content:before {
    content: "";
    position: absolute;
    width: 600px;
    height: 600px;
    background-color: rgba(54, 24, 79, 0.3);
    border-radius: 100%;
    box-shadow: inset 5px 20px 40px rgba(54, 24, 79, 0.25), inset 5px 0px 5px rgba(50, 36, 62, 0.3), inset 5px 5px 20px rgba(50, 36, 62, 0.25), 2px 2px 5px rgba(255, 255, 255, 0.2);
    animation: error-page-circle-inner 0.8s 0.4s cubic-bezier(1, 0.06, 0.25, 1) both;
}

@keyframes error-page-circle-inner {
    0% {
        width: 0;
        height: 0;
    }

    100% {
        width: 600px;
        height: 600px;
    }
}

@media screen and (max-width: 799px) {
    .error-page .wrapper .error-page__stage .one .content:before {
        width: 300px;
        height: 300px;
    }

    @keyframes error-page-circle-inner {
        0% {
            width: 0;
            height: 0;
        }

        100% {
            width: 300px;
            height: 300px;
        }
    }
}

.error-page .wrapper .error-page__stage .one .content .piece {
    background: linear-gradient(90deg, #8077ea 13.7%, #eb73ff 94.65%);
}

.error-page .wrapper .error-page__stage .one .content .piece:nth-child(1) {
    right: 15%;
    top: 18%;
    height: 30px;
    width: 120px;
    animation-delay: 0.5s;
    animation-name: error-page-piece-right;
}

.error-page .wrapper .error-page__stage .one .content .piece:nth-child(2) {
    left: 15%;
    top: 45%;
    width: 150px;
    height: 50px;
    animation-delay: 1s;
    animation-name: error-page-piece-left;
}

.error-page .wrapper .error-page__stage .one .content .piece:nth-child(3) {
    left: 10%;
    top: 75%;
    height: 20px;
    width: 70px;
    animation-delay: 1.5s;
    animation-name: error-page-piece-left;
}

.error-page .wrapper .error-page__stage .two .content .piece {
    background: linear-gradient(90deg, #ffedc0 0%, #ff9d87 100%);
}

.error-page .wrapper .error-page__stage .two .content .piece:nth-child(1) {
    left: 0%;
    top: 25%;
    height: 40px;
    width: 120px;
    animation-delay: 2s;
    animation-name: error-page-piece-left;
}

.error-page .wrapper .error-page__stage .two .content .piece:nth-child(2) {
    right: 15%;
    top: 35%;
    width: 180px;
    height: 50px;
    animation-delay: 2.5s;
    animation-name: error-page-piece-right;
}

.error-page .wrapper .error-page__stage .two .content .piece:nth-child(3) {
    right: 10%;
    top: 80%;
    height: 20px;
    width: 160px;
    animation-delay: 3s;
    animation-name: error-page-piece-right;
}

.error-page .wrapper .error-page__stage .three .content .piece {
    background: #fb8a8a;
}

.error-page .wrapper .error-page__stage .three .content .piece:nth-child(1) {
    left: 25%;
    top: 35%;
    height: 20px;
    width: 80px;
    animation-name: error-page-piece-left;
    animation-delay: 3.5s;
}

.error-page .wrapper .error-page__stage .three .content .piece:nth-child(2) {
    right: 10%;
    top: 55%;
    width: 140px;
    height: 40px;
    animation-name: error-page-piece-right;
    animation-delay: 4s;
}

.error-page .wrapper .error-page__stage .three .content .piece:nth-child(3) {
    left: 40%;
    top: 68%;
    height: 20px;
    width: 80px;
    animation-name: error-page-piece-left;
    animation-delay: 4.5s;
}
