:root {
  color-scheme: dark;
  --navy: #0b1b2b;
  --cyan: #12bed1;
  --gold: #d9a62b;
  --white: #f7fbfd;
  --muted: #a9bac7;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; margin: 0; }

body {
  min-height: 100vh;
  min-height: 100svh;
  color: var(--white);
  background:
    radial-gradient(circle at 20% 15%, rgb(18 190 209 / 18%), transparent 28rem),
    radial-gradient(circle at 85% 80%, rgb(217 166 43 / 13%), transparent 25rem),
    var(--navy);
  font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 4%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 4%) 1px, transparent 1px);
  background-size: 64px 64px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  pointer-events: none;
}

.error-page {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(100%, 1440px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 36px clamp(24px, 5vw, 80px) 28px;
}

.error-page__logo { display: inline-flex; width: fit-content; }
.error-page__logo img { width: clamp(150px, 16vw, 210px); height: auto; }

main { display: grid; place-items: center; padding: 48px 0; text-align: center; }
.error-card { width: min(100%, 720px); }

.error-card__code {
  margin: 0 0 20px;
  color: var(--cyan);
  font: 700 clamp(72px, 14vw, 148px)/0.9 Arial, sans-serif;
  letter-spacing: -0.04em;
  text-shadow: 0 0 70px rgb(18 190 209 / 20%);
}

.error-card__eyebrow {
  margin: 0 0 18px;
  color: var(--gold);
  font: 700 12px/1.4 Arial, sans-serif;
  letter-spacing: 0.22em;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4.5vw, 50px);
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.error-card__message {
  margin: 24px auto 0;
  color: var(--muted);
  font-size: clamp(14px, 1.6vw, 16px);
  line-height: 2;
}

.error-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 40px;
}

.button {
  display: inline-flex;
  min-width: 190px;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 999px;
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.button:hover { transform: translateY(-2px); border-color: var(--cyan); background: rgb(18 190 209 / 10%); }
.button--primary { border-color: var(--cyan); background: var(--cyan); color: var(--navy); }
.button--primary:hover { background: #4bd4e2; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid rgb(255 255 255 / 10%);
  padding-top: 22px;
  color: var(--muted);
  font: 600 10px/1.6 Arial, sans-serif;
  letter-spacing: .14em;
}

@media (max-width: 600px) {
  .error-page { padding-top: 24px; }
  main { padding: 40px 0; }
  .error-card__actions { display: grid; }
  .button { width: 100%; }
  footer { display: block; }
  footer span:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
