:root {
  --error-navy: #0f4c81;
  --error-navy-deep: #08345d;
  --error-gold: #f7ca44;
  --error-ink: #173047;
  --error-muted: #5f7180;
  --error-surface: #ffffff;
  --error-line: rgba(15, 76, 129, 0.14);
}

.error-page {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 8% 10%, rgba(247, 202, 68, 0.16), transparent 28rem),
    radial-gradient(circle at 90% 85%, rgba(15, 76, 129, 0.12), transparent 34rem),
    #f6f9fc;
  color: var(--error-ink);
  font-family:
    "Overpass",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

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

.error-header {
  background: var(--error-navy);
  box-shadow: 0 8px 28px rgba(8, 52, 93, 0.18);
}

.error-header__inner,
.error-footer__inner {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.error-header__inner {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.error-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.error-brand:hover,
.error-brand:focus {
  color: #ffffff;
}

.error-brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.error-header__link {
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.error-header__link:hover,
.error-header__link:focus {
  color: var(--error-gold);
}

.error-main {
  display: grid;
  min-height: calc(100vh - 182px);
  place-items: center;
  padding: 4rem 1rem;
}

.error-card {
  position: relative;
  width: min(760px, 100%);
  overflow: hidden;
  padding: clamp(2rem, 6vw, 4.5rem);
  border: 1px solid var(--error-line);
  border-radius: 26px;
  background: var(--error-surface);
  box-shadow: 0 30px 80px -52px rgba(8, 52, 93, 0.72);
  text-align: center;
}

.error-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--error-gold), #f2a93b, var(--error-navy));
  content: "";
}

.error-code {
  margin: 0 0 0.6rem;
  color: var(--error-navy);
  font-family: "Dosis", "Overpass", sans-serif;
  font-size: clamp(4.75rem, 16vw, 8.5rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.error-eyebrow {
  margin: 0 0 0.75rem;
  color: var(--error-navy);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.error-title {
  max-width: 620px;
  margin: 0 auto 1rem;
  color: var(--error-ink);
  font-family: "Dosis", "Overpass", sans-serif;
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 600;
  line-height: 1.1;
}

.error-copy {
  max-width: 590px;
  margin: 0 auto;
  color: var(--error-muted);
  font-size: 1.04rem;
  line-height: 1.75;
}

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

.error-action {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0.82rem 1.3rem;
  border: 2px solid var(--error-navy);
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.error-action--primary {
  background: var(--error-navy);
  color: #ffffff;
}

.error-action--primary:hover,
.error-action--primary:focus {
  background: var(--error-navy-deep);
  color: #ffffff;
}

.error-action--secondary {
  background: transparent;
  color: var(--error-navy);
}

.error-action--secondary:hover,
.error-action--secondary:focus {
  background: rgba(15, 76, 129, 0.07);
  color: var(--error-navy-deep);
}

.error-help {
  margin: 1.75rem 0 0;
  color: var(--error-muted);
  font-size: 0.9rem;
}

.error-help a {
  color: var(--error-navy);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.error-footer {
  padding: 1.25rem 0;
  background: #ffffff;
  color: var(--error-muted);
  font-size: 0.82rem;
  text-align: center;
}

.error-footer p {
  margin: 0;
}

@media (max-width: 575.98px) {
  .error-header__inner {
    min-height: 68px;
  }

  .error-brand img {
    width: 42px;
    height: 42px;
  }

  .error-main {
    min-height: calc(100vh - 164px);
    padding: 2rem 1rem;
  }

  .error-card {
    border-radius: 20px;
  }

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

  .error-action {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .error-page *,
  .error-page *::before,
  .error-page *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
