/* オープニング中だけスクロール無効 */
body:not(.show-content) {
  overflow: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  color: #fff;
}

/* オープニング canvas スタイル */
#opening {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

#animationCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.logo-text {
  color: white;
  font-size: 2rem;
  z-index: 2;
  opacity: 0;
  animation: fadeIn 2s ease-in-out forwards;
  animation-delay: 0.5s;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.hidden {
  display: none;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.show {
  display: block;
  opacity: 1;
}

/* オープニングをフェードアウトするクラス */
.fade-out {
  animation: fadeOut 1.5s ease-in-out forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}


/* 背景動画（横は常にぴったり。上下は単色でレターボックス） */
.video-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  display: flex;               /* 中央寄せで上下の余白を均等に */
  align-items: center;
  justify-content: center;
  background-color: #000;      /* 上下の余白を黒で塗る */
}

.video-bg video {
  width: 100%;                 /* 横は常にぴったり */
  height: auto;                /* 縦は比率維持で自動 */
  display: block;
  background-color: #000;      /* ちらつき防止 */
}


.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   レスポンシブ対応
   ======================================== */

/* タブレット（768px以下） */
@media (max-width: 768px) {
  .logo-text {
    font-size: 1.6rem;
  }

  .container {
    padding: 0 15px;
  }
}

/* スマートフォン（480px以下） */
@media (max-width: 480px) {
  #opening {
    justify-content: center;
    align-items: center;
  }

  #animationCanvas {
    width: 100%;
    height: 100%;
  }

  .logo-text {
    font-size: 1.3rem;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
  }

  .container {
    padding: 0 12px;
  }
}

/* 超小型デバイス（320px以下） */
@media (max-width: 320px) {
  .logo-text {
    font-size: 1.1rem;
    padding: 0 15px;
  }

  .container {
    padding: 0 10px;
  }
}
