/* ==========================================================================
   JKU - Custom 404 Page Stylesheet
   Exact Design & Smooth Keyframe Animations
   ========================================================================== */

/* ── Container Layout ── */
.jku-404-page-wrap {
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 70px 20px 80px;
    background: #FFFFFF;
    text-align: center;
    overflow: hidden;
}

.jku-404-content {
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── Central 404 Visual (4 [Doc+Mag] 4) ── */
.jku-404-visual-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 2.5vw, 22px);
    margin-bottom: 24px;
    user-select: none;
}

.jku-404-digit {
    font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: clamp(86px, 13vw, 138px);
    font-weight: 800;
    line-height: 1;
    color: #004DA9;
    display: inline-block;
    transition: transform 0.3s ease;
}

.jku-404-digit--left {
    animation: jkuDigitLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.jku-404-digit--right {
    animation: jkuDigitRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes jkuDigitLeft {
    0% {
        opacity: 0;
        transform: translateX(-35px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes jkuDigitRight {
    0% {
        opacity: 0;
        transform: translateX(35px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* ── Center SVG Document & Magnifier ── */
.jku-404-svg-wrap {
    width: clamp(92px, 14vw, 146px);
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: jkuDocFloat 4s ease-in-out infinite;
}

.jku-404-doc-svg {
    width: 100%;
    height: auto;
    overflow: visible;
    filter: drop-shadow(0 6px 16px rgba(0, 77, 169, 0.08));
    transition: transform 0.3s ease;
}

/* Document Gentle Float */
@keyframes jkuDocFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-9px);
    }
}

/* Magnifying Glass Search Scanning Animation */
.jku-mag-anim-group {
    transform-origin: 106px 106px;
    animation: jkuMagSearch 4.5s ease-in-out infinite;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes jkuMagSearch {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(3px, -3px) rotate(4deg);
    }
    50% {
        transform: translate(0, -5px) rotate(0deg);
    }
    75% {
        transform: translate(-3px, -2px) rotate(-4deg);
    }
}

/* Warning Exclamation Mark Soft Alert Pulse */
.jku-mag-alert-pulse {
    transform-origin: 106px 106px;
    animation: jkuAlertPulse 2.2s ease-in-out infinite;
}

@keyframes jkuAlertPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.12);
        opacity: 0.88;
    }
}

/* Interactive Hover on Graphic */
.jku-404-visual-row:hover .jku-404-svg-wrap {
    animation-play-state: paused;
}

.jku-404-visual-row:hover .jku-mag-anim-group {
    transform: scale(1.12) rotate(6deg);
}

.jku-404-visual-row:hover .jku-404-digit--left {
    transform: translateX(-4px);
}

.jku-404-visual-row:hover .jku-404-digit--right {
    transform: translateX(4px);
}

/* ── Typography (Headline & Subtext) ── */
.jku-404-title {
    font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: clamp(28px, 4.4vw, 40px);
    font-weight: 800;
    color: #001B44;
    margin: 0 0 12px;
    line-height: 1.25;
    animation: jkuFadeUp 0.8s 0.15s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.jku-404-desc {
    font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: clamp(15px, 2vw, 17px);
    color: #475569;
    line-height: 1.6;
    max-width: 580px;
    margin: 0 auto 34px;
    animation: jkuFadeUp 0.8s 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── Action Buttons Row ── */
.jku-404-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    animation: jkuFadeUp 0.8s 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.jku-404-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 9px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.24s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
    border: none;
}

/* Left Button: Go Back to Home (Solid Terracotta Orange) */
.jku-404-btn--home {
    background: #C35011;
    color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(195, 80, 17, 0.28);
}

.jku-404-btn--home i {
    font-size: 15px;
    transition: transform 0.25s ease;
}

.jku-404-btn--home:hover {
    background: #A63F07;
    color: #FFFFFF !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(195, 80, 17, 0.38);
}

.jku-404-btn--home:hover i {
    transform: scale(1.15) translateY(-1px);
}

/* Entry Animation */
@keyframes jkuFadeUp {
    0% {
        opacity: 0;
        transform: translateY(18px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Mobile Responsive Adjustments ── */
@media (max-width: 576px) {
    .jku-404-page-wrap {
        padding: 50px 16px 60px;
    }

    .jku-404-visual-row {
        gap: 8px;
        margin-bottom: 20px;
    }

    .jku-404-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        gap: 12px;
    }

    .jku-404-btn {
        width: 100%;
    }
}
