/* Smyalichi — context-aware error pages (404/500 + gateway standby) */

:root {
    --error-bg-1: #f4f7fb;
    --error-bg-2: #e8eef8;
    --error-card: rgba(255, 255, 255, 0.88);
    --error-card-border: rgba(15, 23, 42, 0.08);
    --error-text: #0f172a;
    --error-muted: #64748b;
    --error-code: #ef4444;
    --error-accent: #2563eb;
    --error-accent-hover: #1d4ed8;
    --error-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    --error-radius: 20px;
    --error-font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.error-shell--site {
    --error-bg-1: #f8fafc;
    --error-bg-2: #e2e8f0;
    --error-accent: #0f766e;
    --error-accent-hover: #0d5f59;
    --error-code: #dc2626;
}

.error-shell--admin {
    --error-bg-1: #111827;
    --error-bg-2: #1f2937;
    --error-card: rgba(31, 41, 55, 0.92);
    --error-card-border: rgba(255, 255, 255, 0.08);
    --error-text: #f9fafb;
    --error-muted: #9ca3af;
    --error-accent: #60a5fa;
    --error-accent-hover: #3b82f6;
    --error-code: #f87171;
}

.error-shell--data {
    --error-bg-1: #f0f9ff;
    --error-bg-2: #dbeafe;
    --error-accent: #0284c7;
    --error-accent-hover: #0369a1;
}

.error-shell--seo {
    --error-bg-1: #faf5ff;
    --error-bg-2: #ede9fe;
    --error-accent: #7c3aed;
    --error-accent-hover: #6d28d9;
}

.error-shell--assistant {
    --error-bg-1: #fff7ed;
    --error-bg-2: #ffedd5;
    --error-accent: #ea580c;
    --error-accent-hover: #c2410c;
}

.error-shell--fit {
    --error-bg-1: #ecfdf5;
    --error-bg-2: #d1fae5;
    --error-accent: #059669;
    --error-accent-hover: #047857;
}

.error-shell--price {
    --error-accent: #2563eb;
}

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

html,
body {
    margin: 0;
    min-height: 100%;
}

body.error-shell {
    font-family: var(--error-font);
    color: var(--error-text);
    background: linear-gradient(145deg, var(--error-bg-1), var(--error-bg-2));
}

.error-shell__backdrop {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, color-mix(in srgb, var(--error-accent) 18%, transparent), transparent 42%),
        radial-gradient(circle at 85% 80%, color-mix(in srgb, var(--error-code) 12%, transparent), transparent 38%);
    pointer-events: none;
}

.error-shell__main {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem 1.25rem 2.5rem;
}

.error-shell__brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 560px;
    width: 100%;
}

.error-shell__logo {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--error-accent), color-mix(in srgb, var(--error-accent) 65%, #000));
    box-shadow: 0 10px 24px color-mix(in srgb, var(--error-accent) 35%, transparent);
}

.error-shell__product {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.error-shell__tagline {
    margin-top: 0.15rem;
    font-size: 0.9rem;
    color: var(--error-muted);
}

.error-card {
    width: min(560px, 100%);
    padding: 2rem 1.75rem;
    border-radius: var(--error-radius);
    background: var(--error-card);
    border: 1px solid var(--error-card-border);
    box-shadow: var(--error-shadow);
    backdrop-filter: blur(10px);
    text-align: center;
}

.error-card__code {
    font-size: clamp(4.5rem, 16vw, 6.5rem);
    line-height: 0.95;
    font-weight: 800;
    letter-spacing: -0.06em;
    color: var(--error-code);
    opacity: 0.92;
    margin-bottom: 0.35rem;
}

.error-card__title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.error-card__text {
    margin: 0 auto 1.5rem;
    max-width: 34rem;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--error-muted);
}

.error-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.error-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.65rem 1.25rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.error-btn:hover {
    transform: translateY(-1px);
}

.error-btn--primary {
    color: #fff;
    background: var(--error-accent);
    border: 1px solid var(--error-accent);
}

.error-btn--primary:hover {
    background: var(--error-accent-hover);
    border-color: var(--error-accent-hover);
}

.error-btn--ghost {
    color: var(--error-text);
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--error-muted) 45%, transparent);
}

.error-btn--ghost:hover {
    border-color: var(--error-accent);
    color: var(--error-accent);
}

.error-shell__footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--error-muted);
}

.error-shell__footer-dot {
    opacity: 0.5;
}

@media (max-width: 480px) {
    .error-card {
        padding: 1.5rem 1.15rem;
    }

    .error-card__actions {
        flex-direction: column;
    }

    .error-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .error-btn:hover {
        transform: none;
    }
}
