:root {
  --plum: #420039;
  --violet: #5b167b;
  --indigo: #263479;
  --ink: #2e2831;
  --muted: #6f6972;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  color: var(--ink);
  background: #fff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.site-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  padding: 14px clamp(24px, 6vw, 96px);
  border-bottom: 1px solid #eeeaf0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--violet);
  text-decoration: none;
}

.brand-mark {
  width: 47px;
  height: 47px;
  padding: 5px;
  color: #fff;
  background: var(--violet);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand span { display: flex; flex-direction: column; gap: 4px; }
.brand strong { font-size: 23px; font-weight: 400; line-height: 1; }
.brand small { font-size: 10px; letter-spacing: .18em; }

main {
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 48%, rgba(73, 44, 129, .08), transparent 29%),
    linear-gradient(135deg, rgba(90, 16, 101, .025), transparent 44%);
}

.error-panel {
  width: min(1160px, calc(100% - 48px));
  min-height: 600px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  padding: 55px 0 62px;
}

.copy { position: relative; z-index: 2; }

.error-code {
  margin: 0 0 10px;
  font-size: clamp(92px, 12vw, 162px);
  font-weight: 200;
  line-height: .83;
  letter-spacing: -.07em;
  background: linear-gradient(100deg, var(--plum), #6b247e 48%, var(--indigo));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h1 {
  margin: 30px 0 20px;
  max-width: 700px;
  font-size: clamp(30px, 4vw, 51px);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.explanation {
  max-width: 570px;
  margin: 0 0 34px;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 300;
  line-height: 1.6;
}

.home-button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 0 24px;
  color: #fff;
  background: linear-gradient(100deg, var(--violet), var(--indigo));
  border: 2px solid transparent;
  border-radius: 2px;
  box-shadow: 0 12px 30px rgba(51, 20, 85, .18);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .055em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform .18s ease, box-shadow .18s ease;
}

.home-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-button:hover,
.home-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(51, 20, 85, .25);
}

.home-button:focus-visible { outline: 3px solid #bca8d4; outline-offset: 4px; }

.visual { position: relative; display: grid; place-items: center; }

.visual::before {
  content: "";
  position: absolute;
  width: min(41vw, 470px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(79, 0, 67, .10), rgba(38, 52, 121, .08));
  filter: blur(2px);
}

.visual img {
  position: relative;
  z-index: 1;
  width: min(100%, 500px);
  height: auto;
  filter: drop-shadow(0 24px 28px rgba(32, 18, 63, .14));
}

.pixel { position: absolute; background: rgba(84, 27, 112, .12); }
.pixel-one { width: 58px; height: 58px; top: 10%; right: 3%; }
.pixel-two { width: 34px; height: 34px; left: 4%; bottom: 17%; background: rgba(43, 53, 124, .12); }
.pixel-three { width: 18px; height: 18px; right: 13%; bottom: 8%; background: rgba(69, 0, 61, .16); }

footer {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px 24px;
  color: #817b84;
  border-top: 1px solid #eeeaf0;
  font-size: 12px;
  letter-spacing: .09em;
  text-transform: uppercase;
}

footer > :first-child { color: var(--violet); font-weight: 600; }
.divider { width: 1px; height: 15px; background: #d6d0d8; }

@media (max-width: 760px) {
  .site-header { min-height: 76px; padding-inline: 20px; }
  .brand-mark { width: 41px; height: 41px; }
  .brand strong { font-size: 20px; }
  .brand small { font-size: 8px; }

  .error-panel {
    width: min(100% - 38px, 600px);
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 48px 0 44px;
    text-align: center;
  }

  .copy { display: flex; flex-direction: column; align-items: center; }
  h1 { margin-top: 22px; }
  .explanation { margin-bottom: 28px; }
  .visual { grid-row: 1; }
  .visual::before { width: 280px; }
  .visual img { width: min(72vw, 310px); }
  .pixel-one { right: 12%; }
  .pixel-two { left: 12%; }
}

@media (max-width: 430px) {
  .brand small { letter-spacing: .12em; }
  h1 br { display: none; }
  footer { flex-direction: column; gap: 5px; text-align: center; }
  .divider { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .home-button { transition: none; }
}
