:root {
  --error-ink: #552305;
  --error-cyan: #0891b2;
  --error-teal: #0f766e;
  --error-amber: #f59e0b;
  --error-rose: #e11d48;
  --error-surface: rgba(255, 255, 255, 0.8);
  --error-border: rgba(12, 30, 61, 0.14);
  --error-orange: #df630a;
  --error-green: #0b8a39;
}

.error-layout {
  min-height: 100vh;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--error-ink);
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.14), transparent 32%),
    linear-gradient(160deg, #a5673e 0%, #fcba94 48%, #4d924b 100%);
}

.error-hero {
  position: relative;
  overflow: hidden;
}

.error-hero::before,
.error-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(24px);
  opacity: 0.7;
  pointer-events: none;
}

.error-hero::before {
  top: -6rem;
  left: -4rem;
  width: 18rem;
  height: 18rem;
  background: rgba(20, 184, 166, 0.18);
}

.error-hero::after {
  right: -5rem;
  bottom: -5rem;
  width: 16rem;
  height: 16rem;
  background: rgba(14, 165, 233, 0.14);
}

.error-hero--404 .error-code,
.error-hero--406 .error-code {
  color: var(--error-orange);
}

.error-hero--422 .error-code {
  color: var(--error-green);
}

.error-hero--500 .error-code {
  color: var(--error-rose);
}

.error-panel {
  position: relative;
  border: 1px solid var(--error-border);
  border-radius: 2rem;
  background: var(--error-surface);
  box-shadow: 0 24px 60px rgba(12, 30, 61, 0.12);
  backdrop-filter: blur(14px);
}

.error-panel--main {
  padding: 2rem;
}

.error-panel--side {
  min-height: 100%;
  padding: 2rem;
}

.error-badge,
.error-side-tag {
  border: 1px solid rgba(8, 145, 178, 0.14);
  background: rgba(8, 145, 178, 0.08);
  color: var(--error-cyan);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.error-code,
.error-title {
  font-family: "Orbitron", sans-serif;
  letter-spacing: -0.03em;
}

.error-code {
  margin-bottom: 0.5rem;
  font-size: clamp(4rem, 16vw, 8rem);
  font-weight: 800;
  line-height: 0.95;
}

.error-title {
  max-width: 10ch;
  color: var(--error-ink);
}

.error-copy {
  max-width: 34rem;
  color: rgba(12, 30, 61, 0.76);
  line-height: 1.7;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.error-actions .button.is-primary {
  background: linear-gradient(135deg, #0891b2, #0f766e);
  border: none;
  color: #fff;
  box-shadow: 0 16px 28px rgba(8, 145, 178, 0.2);
}

.error-actions .button.is-light {
  border: 1px solid rgba(12, 30, 61, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--error-ink);
}

.error-stat {
  height: 100%;
  border: 1px solid rgba(12, 30, 61, 0.08);
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.72);
  padding: 1rem;
}

.error-stat .heading {
  color: rgba(12, 30, 61, 0.52);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.error-stat .title {
  margin-top: 0.35rem;
  margin-bottom: 0;
  color: var(--error-ink);
}

.error-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.error-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(12, 30, 61, 0.08);
}

.error-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.error-list .icon {
  margin-top: 0.2rem;
  color: var(--error-teal);
}

.error-message {
  margin-top: 1.75rem;
  border: 1px solid rgba(12, 30, 61, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.error-message .message-body {
  color: rgba(253, 253, 253, 0.76);
}

.error-orbits {
  position: absolute;
  inset: auto 1.5rem 1.5rem auto;
  width: 7rem;
  height: 7rem;
}

.error-orbit {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1px solid rgba(8, 145, 178, 0.18);
  transform-origin: center;
}

.error-orbit--one {
  animation: error-orbit-spin 12s linear infinite;
}

.error-orbit--two {
  inset: 0.9rem;
  border-color: rgba(15, 118, 110, 0.2);
  animation: error-orbit-spin 9s linear infinite reverse;
}

.error-orbit--three {
  inset: 1.8rem;
  border-color: rgba(245, 158, 11, 0.24);
  animation: error-orbit-pulse 2.8s ease-in-out infinite;
}

.home-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.home-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes error-orbit-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes error-orbit-pulse {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.55;
  }

  50% {
    transform: scale(1);
    opacity: 1;
  }
}

@media screen and (max-width: 768px) {
  .error-panel--main,
  .error-panel--side {
    padding: 1.5rem;
    border-radius: 1.6rem;
  }

  .error-title {
    max-width: none;
    font-size: 2.2rem;
  }

  .error-copy {
    font-size: 1rem;
  }

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

  .error-actions .button {
    width: 100%;
  }
}