.error404 {
    min-height: calc(100vh - 110px);
    padding: clamp(45px, 7vw, 90px) 24px;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at 78% 42%, rgba(221, 190, 167, .28), transparent 34%),
        linear-gradient(180deg, #FFFDFC 0%, #FBF6F2 58%, #F8F1EB 100%);
    overflow: hidden;
}

.error404-inner {
    width: min(1180px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(340px, 500px) minmax(420px, 1fr);
    align-items: center;
    gap: clamp(35px, 6vw, 80px);
}

.error404-content {
    position: relative;
    z-index: 2;
    animation: errorFadeLeft .8s ease forwards;
}

.error404-small {
    display: inline-block;
    margin-bottom: 18px;
    color: #C89B7B;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.error404 h1 {
    margin: 0 0 14px;
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(72px, 8vw, 128px);
    font-weight: 300;
    line-height: .9;
    color: #8B6450;
}

.error404-lead {
    max-width: 520px;
    margin: 0 0 18px;
    font-family: "Marcellus", serif;
    font-size: clamp(28px, 3vw, 44px);
    line-height: 1.18;
    color: #8B6450;
}

.error404 p {
    max-width: 500px;
    margin: 0;
    color: #5F4738;
    font-size: 18px;
    line-height: 1.9;
}

.error404-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 56px;
    margin-top: 36px;
    padding: 0 38px;
    border-radius: 999px;
    background: #C59676;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 16px 34px rgba(139, 100, 80, .14);
    transition: background .3s ease, transform .3s ease, box-shadow .3s ease;
}

.error404-button:hover {
    background: #B58361;
    transform: translateY(-3px);
    box-shadow: 0 18px 34px rgba(139, 100, 80, .2);
}

.error404-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 460px;
    transform: translateY(20px);
    animation: errorFadeRight .8s ease forwards;
}

.error404-number {
    position: absolute;
    top: 2%;
    left: -4%;
    z-index: 0;
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(130px, 18vw, 260px);
    font-weight: 300;
    line-height: 1;
    color: rgba(200, 155, 123, .16);
    pointer-events: none;
}

.error404-image img {
    position: relative;
    z-index: 1;
    width: min(100%, 680px);
    display: block;
    transform: translateX(-1%);
    user-select: none;
    pointer-events: none;
    filter: drop-shadow(0 24px 34px rgba(139, 100, 80, .12));
}

@media (max-width: 900px) {
    .error404 {
        text-align: center;
    }

    .error404-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .error404-lead,
    .error404 p {
        margin-left: auto;
        margin-right: auto;
    }

    .error404-image {
        min-height: 310px;
        order: -1;
        transform: none;
    }

    .error404-image img {
        width: min(100%, 480px);
        transform: none;
    }

    .error404-number {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 560px) {
    .error404 {
        padding: 34px 18px 46px;
    }

    .error404-small {
        margin-bottom: 14px;
        font-size: 11px;
        letter-spacing: 3px;
    }

    .error404 h1 {
        margin-bottom: 12px;
        font-size: clamp(68px, 22vw, 92px);
    }

    .error404-lead {
        font-size: 27px;
        line-height: 1.18;
    }

    .error404 p {
        font-size: 16px;
        line-height: 1.8;
    }

    .error404-image {
        min-height: 235px;
    }

    .error404-image img {
        width: min(100%, 350px);
    }

    .error404-button {
        width: 100%;
        max-width: 320px;
        min-height: 54px;
        padding: 0 22px;
    }
    
    .error404-number {
        left: 32%;
        top: 4%;
        font-size: clamp(112px, 34vw, 150px);
        transform: translateX(-50%);
    }
}

@keyframes errorFadeLeft {
    from {
        opacity: 0;
        transform: translateX(-28px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes errorFadeRight {
    from {
        opacity: 0;
        transform: translateX(28px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}