@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700;800&display=swap');

html {
    font-size: 62.5%; /* 1rem = 10px */
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body.error-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #ffffff;
    background-color: #0b0f19 !important;
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(197, 168, 128, 0.15), transparent 50rem),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.08), transparent 60rem),
        linear-gradient(180deg, #0b0f19, #0f172a 50%, #030303) !important;
    font-family: 'Manrope', sans-serif;
    overflow-x: hidden;
    position: relative;
}

body.error-page::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    opacity: 0.3;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(circle at 50% 50%, black, transparent 80%);
}

/* Glow effects */
.site-glow {
    position: fixed;
    width: 45rem;
    height: 45rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(197, 168, 128, 0.25) 0%, rgba(139, 92, 246, 0.1) 60%, transparent 100%);
    filter: blur(120px);
    opacity: 0.15;
    pointer-events: none;
    z-index: -1;
    animation: glowFloat 10s ease-in-out infinite alternate;
}
.site-glow-one { left: -15rem; top: 10rem; }
.site-glow-two { right: -15rem; bottom: 5rem; animation-delay: -5s; }

@keyframes glowFloat {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(30px) scale(1.1); }
}

/* Floating abstract background shapes */
.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(197, 168, 128, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(197, 168, 128, 0.1);
    backdrop-filter: blur(5px);
    pointer-events: none;
    z-index: 1;
}
.shape-1 {
    width: 120px;
    height: 120px;
    top: 15%;
    left: 10%;
    animation: floatingObj 12s ease-in-out infinite;
}
.shape-2 {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 25%;
    animation: floatingObj 8s ease-in-out infinite alternate;
    animation-delay: -2s;
}
.shape-3 {
    width: 150px;
    height: 150px;
    top: 25%;
    right: 12%;
    animation: floatingObj 16s ease-in-out infinite;
    animation-delay: -4s;
}

@keyframes floatingObj {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
    100% { transform: translateY(0) rotate(360deg); }
}

.page_404 {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16rem 2rem 12rem;
    min-height: calc(100vh - 380px);
    z-index: 10;
    position: relative;
}

/* Glassmorphic Error Container */
.error-container {
    max-width: 1000px;
    width: 100%;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 8rem;
    align-items: center;
    margin: 0 auto;
    background: rgba(30, 41, 59, 0.35);
    border: 1px solid rgba(197, 168, 128, 0.15);
    border-radius: 32px;
    padding: 6rem;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 30px 70px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    z-index: 2;
}

.error-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 320px;
}

.glow-sphere {
    position: absolute;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(197, 168, 128, 0.28) 0%, rgba(139, 92, 246, 0.08) 50%, transparent 75%);
    border-radius: 50%;
    filter: blur(20px);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Futuristic Orbits */
.orbit-circle {
    position: absolute;
    border: 1px dashed rgba(197, 168, 128, 0.15);
    border-radius: 50%;
    pointer-events: none;
}
.orbit-1 {
    width: 320px;
    height: 320px;
    animation: spin 30s linear infinite;
}
.orbit-2 {
    width: 400px;
    height: 400px;
    animation: spin-reverse 45s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes spin-reverse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

.error-code {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, #c5a880 0%, #ffffff 50%, #e2d4c0 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 15px 40px rgba(197, 168, 128, 0.35));
    z-index: 2;
    margin: 0;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    animation: shimmer 8s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.error-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

/* Error Badge with pulsing indicator */
.error-badge {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    width: fit-content;
    padding: 0.8rem 1.6rem;
    border: 1px solid rgba(197, 168, 128, 0.25);
    border-radius: 999px;
    color: #e2d4c0;
    background: rgba(197, 168, 128, 0.08);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 2.2rem;
}

.badge-pulse {
    width: 8px;
    height: 8px;
    background-color: #c5a880;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(197, 168, 128, 0.7);
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(197, 168, 128, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(197, 168, 128, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(197, 168, 128, 0);
    }
}

.error-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(3.4rem, 4vw, 5rem);
    font-weight: 700;
    line-height: 1.15;
    color: #ffffff;
    margin-bottom: 1.6rem;
    letter-spacing: -0.02em;
}

.error-text {
    font-size: clamp(1.5rem, 1.6vw, 1.7rem);
    line-height: 1.65;
    color: #94a3b8;
    margin-bottom: 3rem;
}

/* Beautiful Glassmorphic Search Form */
.error-search-form {
    margin-bottom: 3.5rem;
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(197, 168, 128, 0.2);
    border-radius: 16px;
    padding: 0.5rem 0.5rem 0.5rem 1.8rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-input-wrapper:focus-within {
    border-color: rgba(197, 168, 128, 0.6);
    box-shadow: 0 0 20px rgba(197, 168, 128, 0.15);
}

.search-icon {
    font-size: 1.6rem;
    color: rgba(197, 168, 128, 0.6);
    margin-right: 1.2rem;
}

.search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 1.5rem;
    font-family: inherit;
    padding: 1.2rem 0;
}

.search-input::placeholder {
    color: #64748b;
}

.search-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.2rem;
    height: 4.2rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #c5a880, #e2d4c0);
    border: none;
    color: #0b0f19;
    cursor: pointer;
    font-size: 1.5rem;
    transition: transform 120ms cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease;
}

.search-submit:hover {
    transform: translateX(2px);
    background: #e2d4c0;
}

.search-submit:active {
    transform: scale(0.95);
}

/* Button & Action Grid */
.error-actions {
    display: flex;
    gap: 1.6rem;
    flex-wrap: wrap;
}

/* Emil Kowalski motion tokens applied to buttons */
.error-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    min-height: 5.4rem;
    padding: 0 2.8rem;
    border-radius: 999px;
    font-size: 1.45rem;
    font-weight: 800;
    transition: transform 120ms cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 120ms cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 150ms ease, 
                background 150ms ease;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.error-actions .btn:active {
    transform: scale(0.97) !important;
}

.error-actions .btn-primary {
    color: #0f172a;
    background: linear-gradient(135deg, #c5a880, #e2d4c0);
    border-color: rgba(197, 168, 128, 0.4);
    box-shadow: 0 8px 24px rgba(197, 168, 128, 0.15);
}

.error-actions .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(197, 168, 128, 0.28);
}

.error-actions .btn-secondary {
    color: #ffffff;
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(197, 168, 128, 0.2);
}

.error-actions .btn-secondary:hover {
    transform: translateY(-3px);
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(197, 168, 128, 0.4);
}

.error-actions .btn-outline {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
}

.error-actions .btn-outline:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
}

.error-actions .btn i {
    font-size: 1.5rem;
}

/* Responsive Overrides */
@media (max-width: 992px) {
    .error-container {
        grid-template-columns: 1fr;
        gap: 5rem;
        padding: 5rem 4rem;
    }
    .error-visual {
        min-height: 260px;
    }
    .error-details {
        align-items: center;
        text-align: center;
    }
    .error-badge {
        margin-left: auto;
        margin-right: auto;
    }
    .error-actions {
        justify-content: center;
        width: 100%;
    }
    .error-search-form {
        max-width: 500px;
    }
}

@media (max-width: 576px) {
    .page_404 {
        padding: 12rem 1.6rem 8rem;
    }
    .error-container {
        padding: 4rem 2rem;
        border-radius: 24px;
    }
    .error-code {
        font-size: 11rem;
    }
    .error-actions .btn {
        width: 100%;
    }
    .floating-shape {
        display: none; /* Hide background clutter on mobile */
    }
}

/* --- SUB FOOTER & FOOTER DARK OVERRIDES --- */
.sub-footer {
    background: #0f172a !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.sub-footer-head h3 {
    color: #ffffff !important;
}

.sub-footer-head h3 i {
    color: #c5a880 !important;
}

.sub-footer-head p {
    color: #8d8d8d !important;
}

.sub-footer-col h4 {
    color: #ffffff !important;
}

.sub-footer-col a {
    color: #a8a8a8 !important;
}

.sub-footer-col a:hover {
    color: #c5a880 !important;
}

.footer {
    background: #0b0f19 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.footer .box h3 {
    color: #ffffff !important;
}

.footer .box p, 
.footer .box a {
    color: #a8a8a8 !important;
}

.footer .box a:hover {
    color: #c5a880 !important;
}

.footer .box p i {
    color: #c5a880 !important;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.footer-bottom .credit {
    color: #8d8d8d !important;
}

.footer-bottom .credit a {
    color: #c5a880 !important;
}

.footer .box .share {
    display: flex !important;
    gap: 1rem !important;
    margin-top: 1.8rem !important;
    flex-wrap: wrap !important;
    padding: 0 !important;
}

.footer .box .share a {
    display: inline-grid !important;
    place-items: center !important;
    width: 4rem !important;
    height: 4rem !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
    font-size: 1.6rem !important;
    transition: background 220ms ease, transform 220ms ease, color 220ms ease !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer .box .share a:hover {
    background: #c5a880 !important;
    color: #0f172a !important;
    transform: translateY(-3px) !important;
    border-color: #c5a880 !important;
}