/* =========================
   全局基础设置
========================= */

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: #e7ecee;
  color: #ffffff;

  font-family:
    "Yu Mincho",
    "Hiragino Mincho ProN",
    "Noto Serif JP",
    "MS Mincho",
    "Microsoft YaHei",
    serif;
}

button,
a {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}


/* =========================
   两个全屏页面
========================= */

.page {
  position: fixed;
  inset: 0;

  width: 100%;
  height: 100%;
  min-height: 100vh;

  overflow: hidden;

  transition:
    opacity 0.9s ease,
    visibility 0.9s ease,
    transform 0.9s ease;
}


/* =========================
   第一页：封面
========================= */

.cover-page {
  z-index: 2;

  display: flex;
  align-items: center;
  justify-content: center;

  background-color: #dce5e9;

  /*
    同时兼容 PNG 和 JPG。
    存在 PNG 时优先显示 PNG。
  */
  background-image:
    url("./images/cover.png"),
    url("./images/cover.jpg");

  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}


/*
  很轻的透明层：
  不会让图片变白或变模糊，
  只稍微加强下半部分层次。
*/
.cover-page::before {
  content: "";
  position: absolute;
  inset: 0;

  z-index: 0;
  pointer-events: none;

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0) 48%,
      rgba(13, 45, 79, 0.025) 70%,
      rgba(7, 31, 65, 0.07) 100%
    );
}


/* 整个封面区域都可以点击 */
.cover-button {
  position: absolute;
  inset: 0;

  z-index: 2;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;

  padding: 0;
  border: 0;

  color: #ffffff;
  background: transparent;

  cursor: pointer;
}


/* 首页“どうどう” */
.cover-button h1 {
  position: relative;
  top: 7vh;

  margin: 0;

  font-size: clamp(6rem, 10vw, 10.5rem);
  font-weight: 500;
  line-height: 1;

  letter-spacing: 0.16em;
  text-indent: 0.16em;

  color: rgba(255, 255, 255, 0.99);

  /*
    加强与浅蓝背景的区分，
    但保持柔和，不做厚重描边。
  */
  -webkit-text-stroke: 0.3px rgba(20, 48, 78, 0.28);

  text-shadow:
    0 1px 2px rgba(21, 49, 78, 0.32),
    0 4px 12px rgba(16, 44, 75, 0.3),
    0 12px 35px rgba(9, 35, 68, 0.24);

  transition:
    transform 0.6s ease,
    opacity 0.6s ease,
    letter-spacing 0.6s ease;
}

.cover-button:hover h1 {
  transform: translateY(-3px);
  letter-spacing: 0.175em;
  opacity: 0.94;
}

.cover-button:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.72);
  outline-offset: -15px;
}


/* 隐藏底部英文提示 */
.enter-hint {
  display: none;
}


/* =========================
   第二页：目录背景
========================= */

.menu-page {
  z-index: 1;

  visibility: hidden;
  opacity: 0;

  transform: scale(1.015);

  background-color: #f4f0e7;

  background-image:
    url("./images/menu.png"),
    url("./images/menu.jpg");

  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}


/*
  目录区域只添加极淡的暖白层，
  保留原图的清晰纹理。
*/
.menu-page::before {
  content: "";
  position: absolute;
  inset: 0;

  z-index: 1;
  pointer-events: none;

  background:
    radial-gradient(
      ellipse at 70% 72%,
      rgba(255, 253, 247, 0.09) 0%,
      rgba(255, 253, 247, 0.025) 48%,
      transparent 68%
    );
}


/* =========================
   目录内容
========================= */

.menu-content {
  position: absolute;
  z-index: 3;

  top: 54%;
  left: 62%;

  width: min(720px, 65vw);

  transform: translateX(-50%);
}


/* “目次” */
.menu-label {
  margin: 0 0 30px;

  color: rgba(13, 47, 81, 0.9);

  font-size: clamp(1.25rem, 1.7vw, 1.65rem);
  font-weight: 600;
  line-height: 1;

  letter-spacing: 0.38em;
}


/* 目录列表 */
.menu-list {
  display: flex;
  flex-direction: column;
}


/* 每一行 */
.menu-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;

  min-height: 116px;

  border-top: 1px solid rgba(20, 57, 91, 0.32);

  color: #123e67;
  text-decoration: none;

  transition:
    padding-left 0.42s ease,
    background-color 0.42s ease,
    color 0.42s ease;
}

.menu-item:last-child {
  border-bottom: 1px solid rgba(20, 57, 91, 0.32);
}

.menu-item:hover {
  padding-left: 17px;

  color: #052f58;
  background-color: rgba(25, 69, 106, 0.045);
}


/* 01 / 02 */
.menu-number {
  font-family:
    Arial,
    Helvetica,
    sans-serif;

  font-size: clamp(1.3rem, 1.7vw, 1.7rem);
  font-weight: 600;
  line-height: 1;

  letter-spacing: 0.1em;

  color: rgba(13, 48, 82, 0.84);
}


/* 日本語 / 英語 */
.menu-title {
  font-size: clamp(2.5rem, 4.2vw, 3.8rem);
  font-weight: 400;
  line-height: 1.15;

  letter-spacing: 0.18em;
}


/* =========================
   返回按钮
========================= */

.back-button {
  position: absolute;
  z-index: 4;

  left: 5vw;
  bottom: 4vh;

  padding: 10px 0;

  border: 0;
  background: transparent;

  color: rgba(15, 50, 84, 0.76);

  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;

  cursor: pointer;

  transition:
    color 0.35s ease,
    transform 0.35s ease;
}

.back-button:hover {
  color: #052f58;
  transform: translateX(-4px);
}


/* =========================
   页面切换
========================= */

body.menu-open .cover-page {
  visibility: hidden;
  opacity: 0;

  transform: scale(0.988);
}

body.menu-open .menu-page {
  z-index: 3;

  visibility: visible;
  opacity: 1;

  transform: scale(1);
}


/* =========================
   平板和较窄窗口
========================= */

@media (max-width: 1000px) {
  .menu-content {
    left: 58%;
    width: 72vw;
  }

  .menu-item {
    grid-template-columns: 96px 1fr;
  }
}


/* =========================
   手机适配
========================= */

@media (max-width: 700px) {
  .cover-page {
    background-position: center center;
  }

  .cover-button h1 {
    top: 4vh;

    font-size: clamp(4rem, 18vw, 6rem);

    letter-spacing: 0.13em;
    text-indent: 0.13em;
  }

  .cover-button:hover h1 {
    letter-spacing: 0.14em;
  }

  /*
    手机竖屏时稍微向右取景，
    保留更多目录页浅色区域。
  */
  .menu-page {
    background-position: 61% center;
  }

  .menu-content {
    top: 55%;
    left: 50%;

    width: 84vw;
  }

  .menu-label {
    margin-bottom: 22px;

    font-size: 1.1rem;
    letter-spacing: 0.32em;
  }

  .menu-item {
    grid-template-columns: 78px 1fr;
    min-height: 90px;
  }

  .menu-number {
    font-size: 1.15rem;
  }

  .menu-title {
    font-size: 2rem;
  }

  .back-button {
    left: 8vw;
    bottom: 3.5vh;
  }
}