:root {
  --ink: #111110;
  --mist: #8a8a85;
  --paper: #f5f4f0;
  --line: #e0dfd9;
  --accent: #c8b89a;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  font-weight: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  background:
    var(--paper);
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.page {
  width: 100%;
  max-width: 480px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 72px 28px 48px;
}

.mark {
  width: 100px;
  height: auto;
  margin-bottom: 64px;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.mark img {
  width: 100%;
  height: auto;
}

.headline {
  margin: 0 0 40px;
  font-family: "Instrument Serif", serif;
  font-size: clamp(2.25rem, 9vw, 2.75rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.02em;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.body-block {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.body-block p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  opacity: 0.7;
}

.contact-line a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}

.contact-line a:hover {
  opacity: 0.5;
}

footer {
  width: 100%;
  max-width: 480px;
  padding: 32px 28px 48px;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
  border-top: 1px solid var(--line);
}

.footer-name {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 6px;
}

.footer-address {
  margin: 0;
  font-size: 0.8125rem; /* slightly smaller than body */
  font-weight: 300;    /* light */
  color: var(--mist);
  opacity: 0.66;       /* less prominent */
  letter-spacing: 0.01em;
  line-height: 1.6;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .page {
    padding: 56px 20px 40px;
  }

  .mark {
    width: 90px;
    margin-bottom: 52px;
  }

  .headline {
    font-size: clamp(2rem, 10vw, 2.75rem);
  }

  footer {
    padding: 28px 20px 40px;
  }
}

.error-code {
  margin: 0 0 16px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mist);
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.error-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s, opacity 0.2s;
}

.error-actions a:hover {
  border-color: var(--accent);
  background: rgba(200, 184, 154, 0.12);
  opacity: 1;
}