/* ── Error page layout ────────────────────────────────────────────────────── */

.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

.error-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--paper);
}

.error-topbar .wordmark {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--slate-800);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.error-hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
}

.error-hero-inner {
  max-width: 560px;
  width: 100%;
}

/* ── Open book illustration ───────────────────────────────────────────────── */

.book-wrap {
  position: relative;
  width: 220px;
  height: 160px;
  margin: 0 auto 48px;
}

.book-page-left,
.book-page-right {
  position: absolute;
  top: 0;
  width: 100px;
  height: 140px;
  background: #fff;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-2);
}

.book-page-left {
  left: 10px;
  border-radius: 4px 0 0 4px;
  transform: perspective(400px) rotateY(8deg);
  transform-origin: right center;
}

.book-page-right {
  right: 10px;
  border-radius: 0 4px 4px 0;
  transform: perspective(400px) rotateY(-8deg);
  transform-origin: left center;
}

.book-spine {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: 8px;
  height: 140px;
  background: var(--slate-200);
  box-shadow: 0 2px 8px rgba(10, 15, 18, 0.10);
}

.book-line {
  position: absolute;
  left: 14px;
  right: 14px;
  height: 1.5px;
  background: var(--slate-100);
  border-radius: 999px;
}

.book-line:nth-child(1) { top: 24px; }
.book-line:nth-child(2) { top: 38px; right: 28px; }
.book-line:nth-child(3) { top: 52px; }
.book-line:nth-child(4) { top: 66px; right: 40px; }
.book-line:nth-child(5) { top: 80px; }
.book-line:nth-child(6) { top: 94px; right: 32px; }
.book-line:nth-child(7) { top: 108px; }

.book-404 {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 700;
  color: var(--slate-200);
  letter-spacing: -0.03em;
  user-select: none;
}

.book-bookmark {
  position: absolute;
  top: -8px;
  right: 28px;
  width: 16px;
  height: 40px;
  background: var(--slate-500);
  clip-path: polygon(0 0, 100% 0, 100% 85%, 50% 100%, 0 85%);
}

/* ── Copy ─────────────────────────────────────────────────────────────────── */

.error-page .error-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-500);
  margin-bottom: 14px;
}

.error-page .error-h1 {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 600;
  color: var(--slate-800);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 14px;
}

.error-page .error-sub {
  font-size: 16px;
  color: var(--fg-2);
  line-height: 1.6;
  margin: 0 0 32px;
  text-wrap: pretty;
}

/* ── Actions ──────────────────────────────────────────────────────────────── */

.error-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Margin note ──────────────────────────────────────────────────────────── */

.error-margin-note {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--fg-3);
  line-height: 1.6;
}

.error-margin-note strong {
  font-style: normal;
  font-weight: 600;
  color: var(--fg-2);
}

.error-margin-note a {
  color: var(--slate-500);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease-out);
}

.error-margin-note a:hover {
  border-bottom-color: currentColor;
}
