/* --- 404 --- */

.page-404 {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0 100px;
  overflow: hidden;
  background-color: var(--color-primary-100);
}

.page-404-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0, 80, 161, 0.12) 0%, transparent 70%),
    linear-gradient(180deg, #f9fbfd 0%, #e0eaf4 100%);
}

.page-404-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 80, 161, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 80, 161, 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 65% at 50% 45%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 45%, #000 20%, transparent 75%);
  opacity: 0.7;
}

.page-404 > .container {
  position: relative;
  z-index: 1;
}

.page-404-content {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.page-404-code {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(96px, 18vw, 160px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--color-primary);
  opacity: 0.14;
  user-select: none;
  animation: page-404-fade 0.7s ease both;
}

.page-404-title {
  margin: -28px 0 0;
  font-family: var(--font-heading);
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-primary-dark);
  text-wrap: balance;
  animation: page-404-rise 0.7s 0.08s ease both;
}

.page-404-text {
  margin: 16px auto 0;
  max-width: 480px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--color-primary-500);
  text-wrap: pretty;
  animation: page-404-rise 0.7s 0.16s ease both;
}

.page-404-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
  animation: page-404-rise 0.7s 0.24s ease both;
}

.page-404 .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: 99px;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.page-404 .btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
}

.page-404 .btn-primary:hover {
  background-color: var(--color-primary-700);
  color: #ffffff;
}

.page-404 .btn-secondary {
  background-color: #ffffff;
  color: var(--color-primary-dark);
  box-shadow: inset 0 0 0 1px #dce7f2;
}

.page-404 .btn-secondary:hover {
  color: var(--color-primary);
  box-shadow: inset 0 0 0 1px var(--color-primary-300);
}

@keyframes page-404-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.14;
  }
}

@keyframes page-404-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .page-404 {
    padding: 64px 0 80px;
  }

  .page-404-title {
    margin-top: -18px;
  }

  .page-404-actions {
    margin-top: 28px;
  }

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

@media (prefers-reduced-motion: reduce) {
  .page-404-code,
  .page-404-title,
  .page-404-text,
  .page-404-actions {
    animation: none;
  }
}
