/* Path: grad/website/static/css/404.css */

/* --------------------------------------------------
404 page layout
-------------------------------------------------- */

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

body {
  display: flex;
  flex-direction: column;
}

.error-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  flex: 1 0 auto;
  width: 100%;
}

/* --------------------------------------------------
Animated 404 stage
-------------------------------------------------- */

.error-stage {
  position: relative;
  width: min(100%, 1060px);
  height: 90vh;
  min-height: 420px;
  overflow: hidden;

  border-left: 1px dashed rgba(242, 107, 29, 0.28);
  border-right: 1px dashed rgba(242, 107, 29, 0.28);

  background:
    radial-gradient(
      ellipse at 50% 35%,
      rgba(242, 107, 29, 0.055),
      transparent 65%
    );
}

#error-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* --------------------------------------------------
404 message and actions
-------------------------------------------------- */

.error-message {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;

  padding: 0 1.25rem 3rem;

  text-align: center;
  pointer-events: none;
}

.error-message > * {
  pointer-events: auto;
}

.error-code {
  color: var(--primary);
  font-family: monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.error-message h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  font-weight: 500;
  line-height: 1.4;
}

.error-path {
  max-width: 680px;
  color: var(--muted);
  font-family: monospace;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.error-path[hidden] {
  display: none;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.error-actions .button {
  margin-top: 0;
}

/* --------------------------------------------------
Footer
-------------------------------------------------- */

.error-main + .site-footer {
  margin-top: 0;
}

/* --------------------------------------------------
Responsive layout
-------------------------------------------------- */

@media (max-width: 1059.98px) {
  .error-stage {
    height: 516px;
  }
}

@media (max-width: 700px) {
  .error-stage {
    height: 404px;
    min-height: 0;
  }

  .error-message {
    gap: 0.85rem;
    padding-bottom: 1.75rem;
  }

  .error-actions {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
  }

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

/* --------------------------------------------------
Reduced motion
-------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .error-stage {
    background:
      radial-gradient(
        ellipse at 50% 35%,
        rgba(242, 107, 29, 0.04),
        transparent 65%
      );
  }
}
