:root {
  color-scheme: dark;
  --background: #071426;
  --surface: rgba(13, 29, 51, 0.76);
  --surface-strong: #0d1d33;
  --border: rgba(222, 199, 150, 0.16);
  --text: #f5f0e6;
  --muted: #b9b4aa;
  --accent: #d4af5a;
  --accent-light: #f0d58e;
  --accent-dark: #9b742d;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.26);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -20%, rgba(171, 126, 43, 0.16), transparent 42%),
    var(--background);
  color: var(--text);
  font-family: "Tajawal", system-ui, sans-serif;
}

a,
button {
  font: inherit;
}

a {
  color: inherit;
}

.error-page {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  padding: 28px clamp(20px, 5vw, 72px) 24px;
}

.error-page::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
  content: "";
}

.glow {
  position: fixed;
  z-index: -1;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: rgba(212, 175, 90, 0.08);
  filter: blur(90px);
  pointer-events: none;
}

.glow--top {
  top: -180px;
  left: -80px;
}

.glow--bottom {
  right: -160px;
  bottom: -180px;
}

.site-header {
  width: min(100%, 1120px);
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(212, 175, 90, 0.3);
  border-radius: 12px;
  background: rgba(212, 175, 90, 0.1);
  color: var(--accent-light);
}

.brand svg,
.support svg,
.button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.error-card {
  width: min(100%, 720px);
  margin: clamp(44px, 7vh, 86px) auto;
  text-align: center;
}

.status-badge {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.status-badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.illustration {
  position: relative;
  display: grid;
  height: clamp(132px, 20vw, 176px);
  margin: 12px auto 6px;
  place-items: center;
}

.number {
  background: linear-gradient(180deg, #fff8df 7%, #e4c16e 68%, #9b742d 100%);
  background-clip: text;
  color: transparent;
  font-size: clamp(92px, 19vw, 148px);
  font-weight: 700;
  letter-spacing: -0.075em;
  line-height: 1;
  text-indent: -0.075em;
  filter: drop-shadow(0 12px 30px rgba(212, 175, 90, 0.16));
  user-select: none;
}

.orbit {
  position: absolute;
  z-index: -1;
  width: min(100%, 460px);
  height: 86px;
  border: 1px solid rgba(224, 190, 111, 0.16);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.orbit--two {
  width: min(90%, 380px);
  height: 118px;
  border-color: rgba(224, 190, 111, 0.09);
  transform: rotate(10deg);
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--accent-light);
  font-size: 14px;
  font-weight: 500;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.description {
  max-width: 580px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.9;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  gap: 9px;
  align-items: center;
  justify-content: center;
  padding: 0 21px;
  border: 1px solid transparent;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

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

.button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(240, 213, 142, 0.4);
  outline-offset: 3px;
}

.button--primary {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  box-shadow: 0 12px 30px rgba(155, 116, 45, 0.22);
  color: #1b1509;
}

.button--ghost {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.button--ghost:hover {
  border-color: rgba(240, 213, 142, 0.32);
  background: rgba(255, 255, 255, 0.065);
}

.support {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  margin-top: clamp(38px, 6vh, 58px);
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: right;
  backdrop-filter: blur(14px);
}

.support__icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: rgba(212, 175, 90, 0.1);
  color: var(--accent-light);
}

.support p {
  margin: 0 0 1px;
  color: var(--muted);
  font-size: 12px;
}

.support a {
  direction: ltr;
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.support a:hover {
  color: var(--accent-light);
}

footer {
  color: #63768c;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 520px) {
  .error-page {
    padding: 20px 18px;
  }

  .error-card {
    margin-block: 36px;
  }

  .illustration {
    height: 128px;
  }

  .actions {
    display: grid;
  }

  .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
