/* ================================================================
   404 page (Lapa nav atrasta)
   .nf        — hero with the text, the address and two buttons,
                "404" drawn as an assay hallmark
   .nf-links  — popular sections
   ================================================================ */

.nf,
.nf *,
.nf *::before,
.nf *::after {
    box-sizing: border-box;
}

.nf {
    position: relative;
    overflow: hidden;
    padding: 72px 0 96px;
    background: linear-gradient(180deg, #fbf5f6 0%, #fdfbf9 60%);
}

.nf p {
    margin: 0;
}

.nf__decor {
    position: absolute;
    top: 0;
    right: 0;
    width: min(620px, 50vw);
    opacity: .35;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to left, #000 35%, transparent);
    mask-image: linear-gradient(to left, #000 35%, transparent);
}

.nf__decor img {
    display: block;
    width: 100%;
    height: auto;
}

.nf .container {
    position: relative;
}

.nf__hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 56px;
}

.nf__eyebrow {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 16px !important;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--pub-bordo-soft, #9b4a61);
}

.nf__eyebrow::after {
    content: '';
    width: 64px;
    height: 1px;
    background-color: #d8c3c9;
}

.nf__title {
    margin: 0 0 18px;
    font-size: clamp(36px, 4.6vw, 58px);
    font-weight: 700;
    line-height: 1.1;
    color: var(--pub-bordo, #6b0c26);
}

.nf__text {
    max-width: 560px;
    font-size: 17px;
    line-height: 1.7;
    color: var(--pub-muted, #7d6a70);
}

.nf__path {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    max-width: 100%;
    margin-top: 22px !important;
    padding: 9px 16px;
    border: 1px dashed #dcbcc5;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, .8);
    font-size: 14px;
    color: var(--pub-ink, #33282b);
}

.nf__path svg {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    color: var(--pub-red, #8d0b2c);
}

.nf__path code {
    overflow: hidden;
    font-family: 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: line-through;
    text-decoration-color: rgba(141, 11, 44, .45);
}

.nf__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.nf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 52px;
    padding: 0 28px;
    border: 1px solid var(--pub-bordo, #6b0c26);
    border-radius: 999px;
    background-color: var(--pub-bordo, #6b0c26);
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.nf-btn svg {
    width: 19px;
    height: 19px;
}

.nf-btn:hover {
    border-color: var(--pub-red, #8d0b2c);
    background-color: var(--pub-red, #8d0b2c);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(107, 12, 38, .2);
}

.nf-btn--ghost {
    border-color: var(--pub-line, #e7dcdf);
    background-color: #fff;
    color: var(--pub-bordo, #6b0c26);
}

.nf-btn--ghost:hover {
    border-color: var(--pub-bordo, #6b0c26);
    background-color: var(--pub-card, #faf2f3);
    color: var(--pub-bordo, #6b0c26);
    box-shadow: none;
}

/* ================= hallmark ================= */

.nf__stamp {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 400px;
    height: 320px;
}

.nf-stamp {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .6em;
    width: 34em;
    height: 23em;
    font-size: 10px;
    border: .5em solid var(--pub-bordo, #6b0c26);
    border-radius: 48% / 42%;
    background-color: rgba(253, 251, 249, .92);
    box-shadow: 0 0 0 1.4em rgba(253, 251, 249, .7), 0 2.4em 5em rgba(88, 20, 40, .12);
    color: var(--pub-bordo, #6b0c26);
    transform: rotate(-8deg);
    animation: nf-press .9s cubic-bezier(.2, .9, .3, 1.2) both;
}

/* inner line of the hallmark */
.nf-stamp::before {
    content: '';
    position: absolute;
    inset: 1em;
    border: .2em solid currentColor;
    border-radius: inherit;
    opacity: .75;
}

/* worn ink */
.nf-stamp::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: inherit;
    background:
        radial-gradient(circle at 22% 30%, #fdfbf9 0 7px, transparent 8px),
        radial-gradient(circle at 78% 72%, #fdfbf9 0 5px, transparent 6px),
        radial-gradient(circle at 64% 12%, #fdfbf9 0 4px, transparent 5px),
        radial-gradient(circle at 12% 78%, #fdfbf9 0 3px, transparent 4px);
    pointer-events: none;
}

.nf-stamp__top,
.nf-stamp__bottom {
    position: relative;
    max-width: 24em;
    font-size: 1.15em;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .14em;
    text-align: center;
    white-space: nowrap;
    text-transform: uppercase;
}

.nf-stamp__num {
    position: relative;
    font-size: 10.4em;
    font-weight: 700;
    line-height: .95;
    letter-spacing: .02em;
}

@keyframes nf-press {
    0% {
        opacity: 0;
        transform: rotate(-8deg) scale(1.35);
    }

    60% {
        opacity: 1;
    }

    100% {
        opacity: 1;
        transform: rotate(-8deg) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .nf-stamp {
        animation: none;
    }
}

/* ================= popular sections ================= */

.nf__links {
    margin-top: 64px;
}

.nf__links-title {
    margin: 0 0 18px !important;
    font-size: 24px;
    font-weight: 700;
    color: var(--pub-bordo, #6b0c26);
}

.nf-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nf-link {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 100%;
    padding: 18px 20px;
    border: 1px solid var(--pub-line, #e7dcdf);
    border-radius: 16px;
    background-color: #fff;
    box-shadow: var(--pub-shadow-s, 0 6px 18px rgba(88, 20, 40, .06));
    text-decoration: none;
    transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.nf-link:hover {
    border-color: #e2c3ca;
    box-shadow: var(--pub-shadow-m, 0 14px 34px rgba(88, 20, 40, .11));
    transform: translateY(-3px);
}

.nf-link__icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 13px;
    background-color: var(--pub-card, #faf2f3);
    color: var(--pub-red, #8d0b2c);
    transition: background-color .25s ease, color .25s ease;
}

.nf-link__icon svg {
    width: 24px;
    height: 24px;
}

.nf-link:hover .nf-link__icon {
    background-color: var(--pub-bordo, #6b0c26);
    color: #fff;
}

.nf-link__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.nf-link__title {
    font-size: 16px;
    font-weight: 500;
    color: var(--pub-ink, #33282b);
}

.nf-link__text {
    font-size: 14px;
    color: var(--pub-muted, #7d6a70);
}

.nf-link__go {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: var(--pub-red, #8d0b2c);
    transition: transform .25s ease;
}

.nf-link:hover .nf-link__go {
    transform: translateX(3px);
}

/* ================= adaptive ================= */

@media (max-width: 1200px) {
    .nf__stamp {
        width: 340px;
    }

    .nf-stamp {
        font-size: 8.8px;
    }
}

@media (max-width: 1024px) {
    .nf {
        padding: 56px 0 80px;
    }

    .nf__hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .nf__stamp {
        order: -1;
        justify-content: flex-start;
        width: auto;
        height: auto;
        padding: 10px 0 24px 12px;
    }

    .nf-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .nf {
        padding: 36px 0 64px;
    }

    .nf-stamp {
        font-size: 7.6px;
    }

    .nf__text {
        font-size: 16px;
    }

    .nf__path {
        display: flex;
    }

    .nf__actions {
        flex-direction: column;
    }

    .nf-links {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .nf__links {
        margin-top: 44px;
    }
}