.error-page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.error-page__main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem var(--margin-mobile, 20px);
}

@media (min-width: 768px) {
  .error-page__main {
    padding: 4rem 64px;
  }
}

.error-card {
  width: 100%;
  max-width: 36rem;
  text-align: center;
}

.error-card__code {
  font-family: "Newsreader", serif;
  font-size: clamp(4rem, 12vw, 6rem);
  font-weight: 700;
  line-height: 1;
  color: #af101a;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.error-card__title {
  font-family: "Newsreader", serif;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.35;
  color: #1b1c1c;
  margin: 0 0 1rem;
}

@media (min-width: 768px) {
  .error-card__title {
    font-size: 1.75rem;
  }
}

.error-card__lead {
  margin: 0 0 2rem;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: #5b403d;
}

.error-card__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.error-card__primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 20rem;
  padding: 1rem 1.5rem;
  background: #d32f2f;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  border-radius: 0.125rem;
  box-shadow: 0 4px 8px rgba(211, 47, 47, 0.15);
  transition: box-shadow 0.2s, transform 0.2s;
}

.error-card__primary:hover {
  box-shadow: 0 6px 12px rgba(211, 47, 47, 0.2);
  transform: translateY(-1px);
}

.error-nav {
  list-style: none;
  margin: 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid #e4beba;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
}

.error-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #5b403d;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.error-nav a:hover {
  color: #af101a;
}
