/* error-page: existing family composition and intentional responsive variants. */
.error-page__stage {
  display: flex;
  min-height: clamp(34rem, 74svh, 52rem);
  padding-top: clamp(var(--fs-space-12), 7vw, var(--fs-space-24));
  padding-bottom: clamp(var(--fs-space-12), 7vw, var(--fs-space-24));
  overflow: hidden;
  align-items: center;
}

.error-page__inner {
  position: relative;
  width: 100%;
  max-width: var(--fs-container-site);
  margin-inline: auto;
  isolation: isolate;
}

.error-page__content {
  position: relative;
  z-index: 2;
  display: flex;
  min-width: 0;
  max-width: 62rem;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--fs-space-5);
}

.error-page__kicker {
  margin: 0;
  color: var(--accent);
  font-size: var(--fs-font-xs);
  line-height: var(--fs-line-snug);
  font-weight: var(--fs-weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.error-page__content h1 {
  max-width: 50rem;
  margin: 0;
  color: var(--foreground);
  font-size: 2.25rem;
  line-height: 0.98;
  font-weight: var(--fs-weight-bold);
  letter-spacing: 0;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.error-page__code {
  margin: 0;
  color: var(--accent);
  font-size: 7rem;
  line-height: 0.8;
  font-weight: var(--fs-weight-bold);
  letter-spacing: 0;
}

.error-page__body {
  display: flex;
  max-width: 50rem;
  flex-direction: column;
  gap: var(--fs-space-2);
  color: var(--foreground);
  font-size: var(--fs-font-lg);
  line-height: var(--fs-line-relaxed);
  font-weight: var(--fs-weight-medium);
}

.error-page__body p {
  margin: 0;
}

.error-page__actions {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fs-space-3);
  margin-top: var(--fs-space-4);
}

.error-page__button,
.error-page__link {
  transform: translateY(0);
}

.error-page__button:hover,
.error-page__button:focus-visible,
.error-page__link:hover,
.error-page__link:focus-visible {
  transform: translateY(-2px);
}

.error-page__link {
  gap: var(--fs-space-2);
  white-space: nowrap;
}

.error-page__background-code {
  position: absolute;
  z-index: 0;
  right: max(-0.08em, -6vw);
  bottom: -0.22em;
  color: transparent;
  font-size: 10rem;
  line-height: 0.78;
  font-weight: var(--fs-weight-bold);
  letter-spacing: 0;
  opacity: 0.06;
  pointer-events: none;
  -webkit-text-stroke: 1px var(--foreground);
  text-stroke: 1px var(--foreground);
}

@media (max-width: 47.999rem) {
  .error-page__stage {
    min-height: clamp(31rem, 70svh, 42rem);
  }

  .error-page__actions > * {
    width: 100%;
  }

  .error-page__background-code {
    right: -0.16em;
    bottom: -0.28em;
    font-size: 9rem;
    opacity: 0.04;
  }}

@media (min-width: 48rem) {
  .error-page__content h1 {
    font-size: 3rem;
  }

  .error-page__code {
    font-size: 11rem;
  }}

@media (min-width: 64rem) {
  .error-page__content h1 {
    font-size: 3.75rem;
  }

  .error-page__code {
    font-size: 14rem;
  }

  .error-page__background-code {
    font-size: 18rem;
  }}
