* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body.error-page {
  min-height: 100vh;
  margin: 0;
  color: #1d2230;
  background:
    linear-gradient(135deg, rgba(15, 23, 93, 0.08), rgba(54, 15, 93, 0.06)),
    #f6f7fb;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.error-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  min-height: 78px;
  margin: 0 auto;
  gap: 24px;
}

.error-header__brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.error-header__logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex: 0 0 auto;
}

.error-header__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.error-header__title {
  color: #0f175d;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.error-header__subtitle {
  color: #666b78;
  font-size: 13px;
  line-height: 1.3;
}

.error-header__contacts {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #0f175d;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.error-header__contacts a {
  transition: color 0.2s ease;
}

.error-header__contacts a:hover {
  color: #1a2a8f;
}

.error-main {
  display: grid;
  min-height: calc(100vh - 78px);
  padding: 44px 16px 64px;
  place-items: center;
}

.error-hero {
  display: grid;
  align-items: stretch;
  width: min(1180px, 100%);
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  gap: 32px;
}

.error-hero__content {
  position: relative;
  display: flex;
  min-height: 560px;
  padding: clamp(34px, 5vw, 64px);
  overflow: hidden;
  border: 1px solid rgba(15, 23, 93, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.86)),
    url("/img/background.jpg") center / cover;
  box-shadow: 0 22px 60px rgba(15, 23, 93, 0.12);
  flex-direction: column;
  justify-content: center;
}

.error-hero__content::before {
  position: absolute;
  inset: auto -80px -120px auto;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(15, 23, 93, 0.12);
  border-radius: 50%;
  content: "";
}

.error-hero__eyebrow {
  margin: 0 0 18px;
  color: #360f5d;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.error-hero h1 {
  max-width: 680px;
  margin: 0;
  color: #0f175d;
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.error-hero__lead {
  max-width: 620px;
  margin: 28px 0 0;
  color: #222733;
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 500;
  line-height: 1.28;
}

.error-hero__description {
  max-width: 640px;
  margin: 18px 0 0;
  color: #555c69;
  font-size: 17px;
  line-height: 1.7;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.error-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.error-button:hover {
  transform: translateY(-2px);
}

.error-button--primary {
  color: #ffffff;
  background: #0f175d;
  box-shadow: 0 8px 22px rgba(15, 23, 93, 0.24);
}

.error-button--primary:hover {
  background: #1a2a8f;
  box-shadow: 0 12px 28px rgba(15, 23, 93, 0.3);
}

.error-button--secondary {
  color: #0f175d;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 23, 93, 0.18);
}

.error-button--secondary:hover {
  color: #ffffff;
  background: #360f5d;
  box-shadow: 0 12px 28px rgba(54, 15, 93, 0.18);
}

.error-hero__note {
  max-width: 560px;
  margin: 24px 0 0;
  color: #6d7280;
  font-size: 14px;
  line-height: 1.6;
}

.error-contact {
  position: relative;
  display: flex;
  min-height: 560px;
  padding: 28px;
  overflow: hidden;
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(160deg, rgba(15, 23, 93, 0.96), rgba(54, 15, 93, 0.92)),
    #0f175d;
  box-shadow: 0 22px 60px rgba(15, 23, 93, 0.18);
  flex-direction: column;
  justify-content: flex-end;
}

.error-contact__code {
  position: absolute;
  top: -16px;
  right: 18px;
  color: rgba(255, 255, 255, 0.08);
  font-size: clamp(104px, 18vw, 190px);
  font-weight: 800;
  line-height: 1;
}

.error-contact__grid {
  position: relative;
  display: grid;
  gap: 12px;
}

.error-contact__item {
  display: grid;
  gap: 7px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

a.error-contact__item {
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
}

a.error-contact__item:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-2px);
}

.error-contact__label {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.error-contact__value {
  color: #ffffff;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.45;
}

.error-messengers {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.error-messengers a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 6px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 14px;
  font-weight: 700;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}

.error-messengers a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

@media (max-width: 980px) {
  .error-hero {
    grid-template-columns: 1fr;
  }

  .error-hero__content,
  .error-contact {
    min-height: auto;
  }

  .error-contact {
    padding-top: 110px;
  }
}

@media (max-width: 760px) {
  .error-header {
    width: min(100% - 24px, 1180px);
    min-height: 70px;
  }

  .error-header__contacts {
    display: none;
  }

  .error-header__logo {
    width: 46px;
    height: 46px;
  }

  .error-header__title {
    font-size: 16px;
  }

  .error-main {
    min-height: calc(100vh - 70px);
    padding: 18px 12px 36px;
  }

  .error-hero {
    gap: 14px;
  }

  .error-hero__content {
    padding: 28px 20px;
  }

  .error-hero__lead {
    margin-top: 22px;
  }

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

  .error-button,
  .error-messengers a {
    width: 100%;
  }

  .error-contact {
    padding: 92px 18px 18px;
  }

  .error-contact__item {
    padding: 16px;
  }
}

@media (max-width: 420px) {
  .error-header__subtitle {
    display: none;
  }

  .error-hero h1 {
    font-size: 34px;
  }

  .error-hero__lead {
    font-size: 19px;
  }

  .error-hero__description,
  .error-contact__value {
    font-size: 15px;
  }
}
