:root {
  --color-background: #000000;
  --color-text-primary: #ffffff;
  --color-text-secondary: rgba(255, 255, 255, 0.64);
  --color-dots: rgba(255, 255, 255, 0.28);
  --button-height: 44px;
  --button-padding-inline: 28px;
  --button-radius: 999px;
  --transition-base: 280ms;
  --ease-standard: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  background: var(--color-background);
  color-scheme: dark;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--color-background);
  color: var(--color-text-primary);
  font-family: "Inter", sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

.error-page {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  isolation: isolate;
  background: #000000;
}

.error-page__layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto;
  justify-items: center;
  width: min(100%, 760px);
  margin-inline: auto;
  padding: clamp(104px, 12vh, 132px) 24px 40px;
}

.error-page__code {
  margin: 0;
  background-image: radial-gradient(
    circle,
    var(--color-dots) 0 0.9px,
    transparent 1px
  );
  background-position: center;
  background-size: 7px 7px;
  background-clip: text;
  color: transparent;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(190px, 17vw, 300px);
  font-weight: 400;
  line-height: 0.82;
  letter-spacing: 0px;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  user-select: none;
}

.error-page__content {
  display: flex;
  width: min(100%, 520px);
  margin-top: clamp(20px, 2.6vh, 28px);
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.error-page__content h1 {
  margin: 0;
  font-size: clamp(20px, 1.45vw, 24px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.error-page__content p {
  margin: 12px 0 0;
  color: var(--color-text-secondary);
  font-size: 16px;
  line-height: 1.22;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.error-page__button {
  display: inline-flex;
  height: var(--button-height);
  margin-top: 24px;
  align-items: center;
  justify-content: center;
  padding-inline: var(--button-padding-inline);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--button-radius);
  background: transparent;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    border-color var(--transition-base) ease,
    background-color var(--transition-base) ease,
    color var(--transition-base) ease,
    transform 180ms var(--ease-standard);
}

.error-page__button:focus-visible {
  outline: 2px solid #f9f295;
  outline-offset: 4px;
}

.error-page__button:active {
  transform: scale(0.98);
}

.error-page__map {
  position: absolute;
  z-index: 0;
  top: clamp(392px, 43vh, 468px);
  left: 50%;
  width: min(70vw, 1120px);
  min-width: 760px;
  aspect-ratio: 2752.766 / 1537.631;
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.3) 0 0.85px,
    transparent 1px
  );
  background-position: center;
  background-size: 7px 7px;
  opacity: 0.72;
  transform: translateX(-50%);
  -webkit-mask: url("Assets/world-map-equirectangular.svg") center / contain no-repeat;
  mask: url("Assets/world-map-equirectangular.svg") center / contain no-repeat;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .error-page__button:hover {
    border-color: #ffffff;
    background: #ffffff;
    color: #000000;
  }
}

@media (max-width: 700px) {
  .error-page {
    min-height: 560px;
  }

  .error-page__layout {
    padding: clamp(92px, 11vh, 108px) 20px 32px;
  }

  .error-page__code {
    background-size: 6px 6px;
    font-size: clamp(156px, 50vw, 210px);
  }

  .error-page__content {
    width: min(100%, 390px);
    margin-top: clamp(20px, 3vh, 28px);
  }

  .error-page__content h1 {
    max-width: 320px;
    font-size: 20px;
  }

  .error-page__content p {
    max-width: 360px;
    font-size: 15px;
    line-height: 1.3;
  }

  .error-page__button {
    height: 48px;
    margin-top: 26px;
  }

  .error-page__map {
    top: clamp(420px, 50vh, 520px);
    width: 170vw;
    min-width: 660px;
    background-size: 6px 6px;
    opacity: 0.58;
  }
}

@media (max-height: 700px) and (min-width: 701px) {
  .error-page__layout {
    padding-top: 64px;
  }

  .error-page__code {
    font-size: 190px;
  }

  .error-page__content {
    margin-top: 24px;
  }

  .error-page__map {
    top: 350px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .error-page__button {
    transition: none;
  }
}
