.error-page {
  gap: 1.4rem;
}

.error-page__hero,
.error-page__content {
  width: 100%;
}

.error-page__hero-surface {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.1), transparent 22%),
    radial-gradient(circle at 84% 22%, rgba(255, 255, 255, 0.08), transparent 20%),
    linear-gradient(180deg, var(--color-primary-dark) 0%, #8498a7 100%);
  padding: clamp(1.4rem, 2.4vw, 2.4rem) clamp(1.4rem, 2.4vw, 2.4rem) clamp(2.8rem, 5vw, 4rem);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.error-page__code {
  margin: clamp(4rem, 7vw, 6rem) auto 0;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(0.92rem, 1vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.error-page__hero-copy {
  margin: 1.4rem auto 0;
  max-width: 50rem;
  text-align: center;
}

.error-page__eyebrow {
  margin: 0 0 0.85rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.error-page__hero-copy h1 {
  margin: 0;
  color: var(--color-pure-white);
  font-size: clamp(3rem, 6vw, 5.2rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
  font-weight: 500;
}

.error-page__hero-copy p {
  margin: 1.1rem auto 0;
  max-width: 40ch;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.04rem, 1.2vw, 1.22rem);
  line-height: 1.65;
}

.error-page__actions {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

.error-page__primary,
.error-page__secondary {
  min-height: 3rem;
  padding: 0.82rem 1.5rem;
  border-radius: 0.65rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.error-page__primary {
  background: var(--color-charcoal);
  color: var(--color-pure-white);
}

.error-page__primary:hover {
  transform: translateY(-1px);
  background: var(--color-dark-grey);
  box-shadow: 0 4px 6px rgba(48, 48, 48, 0.12);
}

.error-page__secondary {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.94);
}

.error-page__secondary:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.16);
}

.error-page__content-surface {
  border-radius: var(--radius-2xl);
  border: 1px solid rgba(184, 212, 227, 0.34);
  background:
    radial-gradient(circle at 12% 18%, rgba(184, 212, 227, 0.18), transparent 24%),
    radial-gradient(circle at 88% 18%, rgba(184, 212, 227, 0.12), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 245, 245, 0.94));
  box-shadow: 0 18px 40px rgba(48, 48, 48, 0.06);
  padding: clamp(1.4rem, 2.6vw, 2.4rem);
}

.error-page__content-head {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(260px, 0.9fr);
  gap: 1.4rem 2rem;
  align-items: start;
}

.error-page__content-head h2 {
  margin: 0;
  color: var(--color-charcoal);
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 500;
}

.error-page__content-head p {
  margin: 0;
  color: rgba(48, 48, 48, 0.72);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 46ch;
}

.error-page__suggestions {
  margin-top: 1.8rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.error-page__card {
  padding: 1.35rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(184, 212, 227, 0.28);
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(48, 48, 48, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.error-page__card:hover {
  transform: translateY(-2px);
  border-color: rgba(155, 169, 181, 0.45);
  box-shadow: 0 16px 34px rgba(48, 48, 48, 0.08);
}

.error-page__card-label {
  margin: 0;
  color: var(--color-primary-dark);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.error-page__card-title {
  margin: 0.85rem 0 0;
  color: var(--color-charcoal);
  font-size: 1.35rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.error-page__card-text {
  margin: 0.75rem 0 0;
  color: rgba(48, 48, 48, 0.7);
  font-size: 0.98rem;
  line-height: 1.65;
}

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

@media (max-width: 860px) {
  .error-page__hero-surface,
  .error-page__content-surface {
    border-radius: 1.25rem;
  }

  .error-page__hero-surface {
    padding: 0.95rem 1rem 2.1rem;
  }

  .error-page__code {
    margin-top: 2.8rem;
  }
}

@media (max-width: 520px) {
  .error-page__actions {
    flex-direction: column;
  }

  .error-page__primary,
  .error-page__secondary {
    width: 100%;
  }

  .error-page__hero-copy h1 {
    font-size: clamp(2.45rem, 13vw, 3.5rem);
  }
}
