@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@100..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Shippori+Mincho+B1:wght@400;500;600;700;800&display=swap");

/* Reset CSS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  word-break: auto-phrase;
  font-family: "Noto Sans JP", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
  font-family: "Arial", sans-serif;
  line-height: 1.6;
  color: white;
}

.container {
  display: flex;
  flex-direction: column;
  gap: 2em;
  width: 100%;
  max-width: 70em;
  margin: 0 auto;
  position: relative; /* オーバーレイやアニメーション用に相対位置を設定 */
  transform: translateX(100px); /* 初期状態で右にスライド */
  transition: opacity 1s ease, transform 1s ease; /* アニメーションの設定 */
}

#hero .container {
  height: 100vh;
}

header {
  background: #11111100;
  color: #fff; /* テキストを白に設定 */
  padding: 10px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed; /* ヘッダーを固定 */
  top: 0;
  width: 100%;
  height: 40px;
  z-index: 1000; /* ヘッダーを前面に表示 */
  transition: 0.6s all;
}

header.scroll {
  height: 80px;
  background-color: #111111;
}

#logo {
  position: absolute;
  height: 60px;
  top: 10px;
  transform-origin: 0% 0%;
  transform: translate(calc(-45vw + 50%), 100px) scale(3);
  transition: 0.6s all;
}

#logo.scroll {
  transform: translate(0, 0) scale(1);
}

#hero {
  background: url("./img/package.png") no-repeat center center/cover;
  padding: 100px 0;
  min-height: 100vh; /* セクションの高さを画面の高さと同じにする */
  display: block;
  position: relative; /* オーバーレイのために位置を相対に設定 */
  overflow: hidden; /* オーバーレイがはみ出さないようにする */
}

section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(#111111, #11111180, #11111180, #111111);
  z-index: 1; /* 背景画像の上、テキストの下に表示 */
}

#hero-d02 img {
  width: 100%;
  object-fit: contain;
}

#hero-d02 a:hover > img {
  filter: brightness(1.2);
}

h2 {
  margin: 1em;
}

.flex-box {
  display: flex;
}

.flex-row {
  flex-direction: row;
}

.flex-col {
  flex-direction: column;
}

.grid-box {
  display: grid;
  gap: 2em;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2em;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2em;
}

#hero-d01 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(4, 1fr);
  margin-bottom: 2em;
}

#hero-p01 {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
}

#blank_ {
  grid-column: 1 / 2;
  grid-row: 2 / 4;
}

.btn {
  color: #fff; /* テキストカラーを白に設定 */
}

#box {
  width: 100%;
  height: 50vh;
  object-fit: contain;
  grid-column: 2 / 3;
  grid-row: 1 / 5;
}

#hero-description {
  grid-column: 1 / 2;
  grid-row: 4 / 5;
}

#story {
  background: url("./img/library8_0.png") no-repeat center center/cover;
  position: relative;
  overflow: hidden;
  padding: 60px 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  line-height: 2em;
}

#story .container {
  gap: 1em;
}

#story .container > p:nth-of-type(1) {
  margin: 2em 0;
  font-size: 140%;
  font-family: "Shippori Mincho B1", serif;
}

#about {
  background: url("./img/library8_1.png") no-repeat center center/cover;
  position: relative;
  overflow: hidden;
  padding: 60px 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

#about .container {
  align-items: center;
}

#about-inner {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  grid-template-columns: repeat(2, 1fr);
  gap: 1em;
}

#about-inner > div {
  padding-bottom: 2em;
}

#about-inner > div:nth-child(2n + 1) {
  grid-column: 1/2;
  grid-row: span 2;
}

#about-inner > div:nth-child(2n) {
  grid-column: 2/3;
  grid-row: span 2;
}

#about-inner > div:nth-child(2) {
  grid-column: 2/3;
  grid-row: 2 / span 2;
}

#about-inner > div:nth-child(6) {
  display: flex;
  justify-content: center;
  align-items: center;
  grid-column: 2/3;
  grid-row: 1 / 2;
}

#about-inner > div:nth-child(7) {
  display: flex;
  justify-content: center;
  align-items: center;
  grid-column: 2/3;
  grid-row: 6 / 7;
}

#about-inner > div > a {
  color: white;
  font-size: 120%;
}

#about img {
  width: 100%;
  max-width: 900px;
  object-fit: contain;
}

#credits {
  background: url("./img/library8_3.png") no-repeat center center/cover;
  position: relative;
  overflow: hidden;
  padding: 60px 0;
  min-height: 50vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2em;
}

dt {
  grid-column: 1 / 2;
  text-align: end;
}

dd {
  grid-column: 2 / 3;
  text-align: start;
}

a.twitter {
  display: inline-block;
  background: #000;
  border-radius: 15%;
  width: 1.5em;
  height: 1.5em;
  vertical-align: top;
}

a.twitter > svg {
  width: 100%;
  height: 100%;
}

#faq {
  background: url("./img/library8_2.png") no-repeat center center/cover;
  position: relative;
  overflow: hidden;
  padding: 60px 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

#dl-faq {
  display: flex;
  flex-direction: column;
  gap: 2em;
}

#dl-faq img {
  height: 8em;
}

#dl-faq dt {
  display: flex;
  flex-direction: row;
  text-align: start;
  padding-right: 3em;
}

#dl-faq dd {
  display: flex;
  flex-direction: row-reverse;
  text-align: end;
  padding-left: 3em;
  margin-bottom: 3em;
}

#dl-faq dt p {
  position: relative;
  margin-left: 1.8em;
  margin-bottom: 1em;
  background: #cccccc66;
  border-radius: 1em;
  padding: 1em 2em;
  align-content: center;
}

#dl-faq dt p::before {
  position: absolute;
  content: "";
  top: 2.5em;
  right: 100%;
  width: 1.5em;
  height: 2em;
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
  background: #cccccc66;
}

#dl-faq dd p {
  position: relative;
  margin-right: 1.8em;
  margin-bottom: 1em;
  background: #cccc9966;
  border-radius: 1em;
  padding: 1em 2em;
  align-content: center;
}

#dl-faq dd p::before {
  position: absolute;
  content: "";
  top: 2.5em;
  left: 100%;
  width: 1.5em;
  height: 2em;
  clip-path: polygon(0 0, 0 100%, 100% 50%);
  background: #cccc9966;
}

#dl-faq dt p::first-letter,
#dl-faq dd p::first-letter {
  font-size: 180%;
}

#faq a {
  color: white;
  font-size: 120%;
}

section.visible .container {
  opacity: 1; /* フェードイン後に表示 */
  transform: translateX(0); /* 右からスライドイン */
  z-index: 2; /* テキストをオーバーレイの上に表示 */
}

footer {
  background: #111;
  color: #fff;
  text-align: center;
  padding: 10px 0;
  font-size: 70%;
}

@media screen and (max-width: 768px) {
  .container {
    padding: 0 1em;
  }

  img#logo {
    transform-origin: 50% 50%;
    transform: none;
  }

  div#hero-d01 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;
  }

  div#hero-d02 {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
  }

  #hero .container {
    height: auto;
  }

  div#about-inner {
    display: flex;
    flex-direction: column;
  }
}

@media screen and (max-width: 480px) {
  #dl-faq img {
    height: 6em;
  }
  #dl-faq {
    font-size: 80%;
  }

  #dl-faq dt {
    padding-right: 1em;
  }

  #dl-faq dd {
    padding-left: 1em;
    margin-bottom: 2em;
  }

  #dl-faq dt p,
  #dl-faq dd p {
    padding: 0.8em 1.2em;
  }
}
