/* ==========================================================================
   404 — Novinex
   سکانس دو ستونه: استیج (عدد گرادیانی + صفحه‌ی گرد موسیقی) + متن و مسیرها.
   پترن نت‌های شناور در پس‌زمینه — کاملاً متفاوت از هر قالب دیگر.
   ========================================================================== */

.ap-404-page {
    position: relative;
    min-height: calc(100vh - 160px);
    display: flex; align-items: center;
    padding: 56px 20px;
    background:
        radial-gradient(1000px 460px at 88% -10%, rgba(127, 181, 255, .3), transparent 60%),
        radial-gradient(760px 460px at 8% 105%, rgba(108, 43, 217, .16), transparent 55%),
        #eef4ff;
    color: #14101f; overflow: hidden; direction: rtl; box-sizing: border-box;
}
.ap-404-page * { box-sizing: border-box }

/* ---------- نت‌های شناور ---------- */
.ap-404-notes { position: absolute; inset: 0; pointer-events: none; z-index: 1 }
.ap-404-notes span {
    position: absolute; top: -60px;
    color: rgba(108, 43, 217, .16); font-size: 30px; font-weight: 700;
    animation: ap404Fall 9s linear infinite;
    animation-delay: var(--d, 0s);
}
.ap-404-notes span:nth-child(odd) { left: 8% }
.ap-404-notes span:nth-child(3n) { left: 30%; font-size: 24px }
.ap-404-notes span:nth-child(3n+1) { left: 55% }
.ap-404-notes span:nth-child(4n) { left: 78%; font-size: 36px }
.ap-404-notes span:nth-child(5n) { left: 92%; font-size: 22px }
@keyframes ap404Fall {
    0% { transform: translateY(0) rotate(-8deg); opacity: 0 }
    8% { opacity: 1 }
    92% { opacity: 1 }
    100% { transform: translateY(115vh) rotate(10deg); opacity: 0 }
}

/* ---------- سکانس ---------- */
.ap-404-shell {
    position: relative; z-index: 2;
    display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 48px; align-items: center;
    width: min(1060px, 100%); margin: 0 auto;
}

/* ---------- استیج: عدد + صفحه گرد ---------- */
.ap-404-stage { position: relative; display: grid; place-items: center; min-height: 340px }
.ap-404-number {
    position: relative; z-index: 1;
    font-size: clamp(120px, 16vw, 210px); font-weight: 900; line-height: 1; letter-spacing: -.04em;
    background: linear-gradient(135deg, #2B5CE6 15%, #7fb5ff 90%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 18px 30px rgba(108, 43, 217, .25));
}
.ap-404-disc {
    position: absolute; z-index: 0;
    width: 330px; height: 330px; border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, #0B1220 0%, #0B1220 18%, #12224A 18%, #12224A 20%, #0B1220 20%, #0B1220 34%, rgba(127, 181, 255, .5) 34%, rgba(127, 181, 255, .5) 35%, #0B1220 35%, #0B1220 52%, rgba(255, 255, 255, .35) 52%, rgba(255, 255, 255, .35) 53%, #0B1220 53%),
        linear-gradient(135deg, #0B1220, #2B5CE6 75%, #7fb5ff 130%);
    box-shadow: 0 30px 60px rgba(36, 21, 64, .35);
    animation: ap404Spin 9s linear infinite;
}
.ap-404-disc::after {
    content: ""; position: absolute; inset: 42%;
    border-radius: 50%; background: #F3F6FD; border: 4px solid #7fb5ff;
}
@keyframes ap404Spin { to { transform: rotate(360deg) } }

/* ---------- متن ---------- */
.ap-404-tag {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 16px; margin-bottom: 12px;
    border: 1px solid #d9c8f7; border-radius: 999px;
    background: #fff; color: #1E46B8;
    font-size: 13.5px; font-weight: 800;
}
.ap-404-tag::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%;
    background: linear-gradient(135deg, #2B5CE6, #7fb5ff);
}
.ap-404-copy h1 { margin: 0 0 10px; font-size: clamp(19px, 3.8vw, 25px); line-height: 1.5 }
.ap-404-copy p { max-width: 470px; margin: 0 0 20px; color: #6f6893; font-size: 15px; line-height: 2.1 }

/* ---------- دکمه‌ها ---------- */
.ap-404-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 26px }
.ap-404-cta {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 13px 26px; border-radius: 999px;
    font: inherit; font-size: 14px; font-weight: 800; text-decoration: none; cursor: pointer;
    transition: transform 280ms cubic-bezier(.2, .8, .2, 1), box-shadow 280ms cubic-bezier(.2, .8, .2, 1), border-color 280ms cubic-bezier(.2, .8, .2, 1);
}
.ap-404-cta.is-primary {
    background: linear-gradient(135deg, #2B5CE6 0%, #7fb5ff 100%);
    color: #fff !important; box-shadow: 0 8px 22px rgba(76, 42, 165, .22);
}
.ap-404-cta.is-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(76, 42, 165, .3) }
.ap-404-cta.is-ghost { background: #fff; color: #2B5CE6 !important; border: 2px solid #F3F6FD }
.ap-404-cta.is-ghost:hover { border-color: #2B5CE6; transform: translateY(-2px) }

/* ---------- لینک‌های کمکی ---------- */
.ap-404-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid #e3ddf5 }
.ap-404-links a { color: #3a3350; font-size: 13px; font-weight: 700; text-decoration: none; transition: color 180ms ease }
.ap-404-links a:hover { color: #2B5CE6 }

/* ---------- واکنش‌گرایی ---------- */
@media (max-width: 860px) {
    .ap-404-shell { grid-template-columns: 1fr; gap: 30px; text-align: center }
    .ap-404-stage { min-height: 260px; order: -1 }
    .ap-404-disc { width: 230px; height: 230px }
    .ap-404-number { font-size: clamp(90px, 20vw, 150px) }
    .ap-404-copy p { margin-inline: auto }
    .ap-404-actions { justify-content: center }
    .ap-404-links { justify-content: center }
}
@media (prefers-reduced-motion: reduce) {
    .ap-404-notes span, .ap-404-disc { animation: none }
    .ap-404-cta { transition: none }
}
