/* 404 (404.php): the message and the "not found" drawing (parts/not-found-art.php), then the popular pages as cards. */
.rm-404 {
    padding: clamp(48px, 7vw, 110px) 20px clamp(56px, 8vw, 120px);
}

.rm-404__inner {
    max-width: var(--rm-content);
    margin: 0 auto;
}

.rm-404__hero {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: clamp(32px, 6vw, 96px);
    align-items: center;
}

.rm-404__eyebrow {
    margin-bottom: 20px;
    color: var(--rm-blurple);
}

.rm-404__title {
    margin: 0 0 16px;
    font-family: var(--rm-font-helvetica);
    font-size: var(--rm-type-h60);
    font-weight: 500;
    line-height: 1.1;
    color: var(--rm-black);
}

.rm-404__text {
    max-width: 34em;
    margin: 0 0 32px;
    font-size: var(--rm-type-20l);
    font-weight: 300;
    line-height: 1.5;
    color: var(--rm-grey);
}

.rm-404__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.rm-404__actions .rm-btn--dark {
    gap: 10px;
    padding: 18px 28px;
}

.rm-404__actions .rm-btn--outline {
    padding: 18px 24px;
}

.rm-404__art {
    justify-self: end;
    width: 100%;
    max-width: 460px;
    aspect-ratio: 1;
    padding: clamp(16px, 3vw, 40px);
    border: 1px solid var(--rm-grey-medium);
    border-radius: 32px;
    background: var(--rm-grey-light);
}

.rm-404-art__ghost {
    fill: none;
    stroke: var(--rm-blurple-medium);
    stroke-width: 2;
    stroke-dasharray: 4 4;
}

.rm-404__popular {
    margin-top: clamp(48px, 7vw, 96px);
    padding-top: 32px;
    border-top: 1px solid var(--rm-grey-medium);
}

.rm-404__popular-title {
    margin-bottom: 20px;
    color: var(--rm-grey);
}

.rm-404__cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rm-404__card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
    padding: 24px;
    border-radius: 24px;
    background: var(--rm-lavender);
    color: var(--rm-black);
    text-decoration: none;
    transition: background var(--rm-dur-base) var(--rm-ease);
}

.rm-404__card:hover,
.rm-404__card:focus-visible {
    background: var(--rm-blurple-medium);
}

.rm-404__card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-family: var(--rm-font-helvetica);
    font-size: var(--rm-type-24);
    font-weight: 500;
}

.rm-404__arrow {
    flex: none;
    width: 20px;
    color: var(--rm-blurple);
    transition: transform var(--rm-dur-base) var(--rm-ease);
}

.rm-404__card:hover .rm-404__arrow,
.rm-404__card:focus-visible .rm-404__arrow {
    transform: translateX(4px);
}

.rm-404__card-text {
    font-size: 15px;
    font-weight: 300;
    line-height: 1.45;
    color: var(--rm-grey);
}

@media (max-width: 1024px) {
    .rm-404__cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .rm-404__hero {
        grid-template-columns: 1fr;
    }

    .rm-404__art {
        order: -1;
        justify-self: start;
        max-width: 220px;
        border-radius: 24px;
    }

    .rm-404__cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .rm-404__card {
        padding: 18px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rm-404__card,
    .rm-404__arrow {
        transition: none;
    }
}
