/* ===================================================================
   PAGE-SPECIFIC CSS - 403ページ専用
   ★common.cssの後に読み込むこと
   =================================================================== */

header {
  background: #edf1f4;
  --header-fg: var(--text-dark);
}

.nav-link {
  width: 110px;
}

@media (max-width: 1150px) and (min-width: 901px) {
  .nav-link {
    width: 96px;
  }
}

/* ─── 403本体 ─── */

.error-page {
  /* ★イラストの大きさ・位置はこの3つで調整 */
  --illust-w: min(340px, 72vw); /* イラストの幅（小さくしたい場合はここ） */
  --illust-ratio: 0.53; /* 画像の 高さ÷幅（実画像に合わせる） */
  --illust-rise: 0.6; /* ディバイダーより上に出す割合（0.5＝上半分） */

  --illust-h: calc(var(--illust-w) * var(--illust-ratio));

  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: var(--header-h, 96px);
  background: var(--bg-white);
}

.error-head {
  text-align: center;
  padding: clamp(3rem, 7vw, 5rem) 1.5rem 0;
}

.error-en {
  font-family: var(--font-en);
  font-size: clamp(16px, 1.8vw, 21px);
  letter-spacing: 0.38em;
  margin-right: -0.38em;
  color: #0062af;
  line-height: 1;
}

.error-code {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 5vw, 4.2rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  margin-right: -0.08em;
  color: #19619f;
  line-height: 1.15;
  margin-top: 0.4rem;
}

/* 雪原：上端（＝ディバイダーの位置）を、イラストが食い込む分だけ下げる */
.error-ground {
  position: relative;
  flex: 1 0 auto;
  background: #cfdbe4;
  margin-top: calc(
    var(--illust-h) * var(--illust-rise) + clamp(2rem, 4vw, 3rem)
  ); /* 2つ目の値＝「403」とイラスト上端のすき間 */
  padding: 0 1.5rem clamp(4rem, 8vw, 7rem);
  text-align: center;
}

.error-ridge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% - 1px);
  line-height: 0;
  pointer-events: none;
}

.error-ridge svg {
  display: block;
  width: 100%;
  height: clamp(16px, 2.5vw, 32px); /* PDFに合わせて稜線を少し低めに */
}

.error-ridge polygon {
  fill: #cfdbe4;
}

/* イラスト：高さ×rise の分だけ上へ引き上げ、ディバイダーをまたがせる */
.error-illust {
  position: relative;
  z-index: 2;
  width: var(--illust-w);
  margin: calc(var(--illust-h) * var(--illust-rise) * -1) auto 0;
}

.error-illust img {
  display: block;
  width: 100%;
  height: auto;
}

.error-message {
  margin-top: clamp(2.25rem, 4.5vw, 3.75rem); /* イラスト下端と本文のすき間 */
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 2;
  letter-spacing: 0.2em;
  color: #5a5757;
}

.error-btn {
  display: inline-block;
  margin-top: clamp(1.5rem, 3vw, 2rem);
  padding: 14px 52px;
  border-radius: 12px;
  background: #d5e0e9;
  color: #25689e;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-decoration: none;
  box-shadow:
    6px 6px 12px rgba(120, 142, 164, 0.45),
    -6px -6px 12px rgba(255, 255, 255, 0.65);
  transition: box-shadow 0.25s ease;
}

.error-btn:hover {
  box-shadow:
    inset 4px 4px 8px rgba(120, 142, 164, 0.4),
    inset -4px -4px 8px rgba(255, 255, 255, 0.6);
}

.error-btn:focus-visible {
  outline: 2px solid var(--misawa-blue);
  outline-offset: 3px;
}

@media (max-width: 600px) {
  .error-message {
    letter-spacing: 0.12em;
  }
}
