/* ヒーローメッセージ */
#message {
  font-size: 3.3rem; /* 文字の大きさ */
  font-family: 'Zen Old Mincho', serif; /* フォント */
  font-weight: bold;
  letter-spacing: 0.2em;
  white-space: pre-line;
  color: rgb(225, 224, 224);
  text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.6);
  text-align: center;
  line-height: 1.5;
  padding: 10px 20px;
  max-width: 80%;
  margin: 0 auto;
}

/* ヒーローセクション全体 */
.hero-section {
  width: 100%;
  padding: 50px 0;
  position: relative;
  text-align: center;
  background-color: #ffffff;
  overflow: visible;
  margin-bottom: 20px;
  background-image: 
    linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%),
    linear-gradient(90deg, #feecf8 0%, #fff9e7 50%, #fce9f2 100%);
  background-blend-mode: normal;
  background-repeat: no-repeat;
  background-size: cover;
}

/* 親コンテナ */
.hero-container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-container h3 {
  font-weight: normal;
  font-family: "ヒラギノ明朝 ProN", "ＭＳ Ｐ明朝", "MS PMincho", serif;
}

@keyframes glowLetter {
  0% { color: rgb(134, 126, 126); text-shadow: none; }
  50% { color: #50504c; text-shadow: 0 0 0px #605f5e, 0 0 5px #524f43; }
  100% { color: rgb(50, 49, 49); text-shadow: none; }
}

#unmute-button {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  padding: 10px 20px;
  font-size: 1rem;
  cursor: pointer;
}

/* ひと文字ずつアニメーション */
.glow-text span {
  display: inline-block;
  animation: glowLetter 6.0s infinite alternate ease-in-out;
}

/* ノート背景画像（WebP 形式に変更） */
.notes-background {
  position: absolute;
  top: 38%;
  left: 50%;
  width: 1420px;
  height: 1420px;
  transform: translate(-50%, -50%);
  background: url('../assets/images/home/music-notes.webp') no-repeat center;
  background-size: contain;
  opacity: 0.8;
  z-index: 0;
  animation: float 8s infinite ease-in-out;
}

@keyframes float {
  0% {
    transform: translate(-50%, -50%) translateY(0) translateX(0);
  }
  50% {
    transform: translate(-50%, -50%) translateY(10px) translateX(10px);
  }
  100% {
    transform: translate(-50%, -50%) translateY(0) translateX(0);
  }
}

/* ノート背景内の img は（不要なら削除） */
.notes-background img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.hero-container h2 {
  font-size: 1.9rem;
  color: #333;
  margin-top: 330px;
  margin-bottom: 250px;
  font-family: "Didot", serif;
}
.hero-container h3 {
  font-size: 1.2rem;
  color: #555;
  margin: 5px 0;
}

/* 初期状態 */
.hero-container h2, .hero-container h3 {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* フェードイン + バウンド */
@keyframes bounceFadeIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  50% {
    opacity: 1;
    transform: translateY(-5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.loaded .hero-container h2 {
  animation: bounceFadeIn 1.0s ease-out forwards;
}
.loaded .hero-container h3 {
  animation: bounceFadeIn 1.2s ease-out forwards;
}

/* グリッドセクション */
.grid-section {
  margin-top: 30px;
  padding: 50px 0;
  display: flex;
  justify-content: center;
}

.grid-container {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 15px;
  background: transparent;
  border-radius: 0;
  padding: 10px;
  width: 60vw;
  max-width: 700px;
}
.grid-container::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 35px;
  left: 35px;
  right: 35px;
  bottom: 35px;
  background-color: #c4c9bcc1;
}

/* グリッドアイテム */
.grid-item {
  color: #fffeff !important;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  font-family: "Didot", serif;
  font-size: 2.5rem;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.15);
}

/* 背景の色 */
.dark-bg {
  background-color: #4A4A4A;
}

.light-bg {
  color: #333;
  font-weight: normal;
  line-height: 1.8;
  color: #fce9f2 !important;
  font-size: 1.2rem;
}

/* LESSON & TOMO ボックス */
.lesson-box, .tomo-box {
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.lesson-box:hover, .tomo-box:hover {
  transform: translateY(-5px) rotate(3deg);
  box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.3);
}

/* 動く背景 */
.moving-bg {
  position: relative;
  overflow: hidden;
  background: transparent;
}

.moving-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    var(--angle, 45deg),
    #ec79af  var(--stop1, 20%),
    #ec79aff3 var(--stop2, 40%),
    rgba(243, 148, 192, 0.896)  var(--stop3, 60%),
    #ec79afc9 var(--stop4, 80%)
  );
  background-size: cover;
  opacity: 1.0;
  z-index: 0;
}

.moving-bg2 {
  position: relative;
  overflow: hidden;
  background: transparent;
}

.moving-bg2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    var(--angle, 45deg),
    #f6c958  var(--stop1, 20%),
    #fbcf61e5 var(--stop2, 40%),
    #f6c958e5 var(--stop3, 60%) var(--stop3, 60%),
    #f6c958d3 var(--stop4, 80%)
  );
  background-size: cover;
  opacity: 1.0;
  z-index: 0;
}

.grid-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  z-index: 0;
}

.grid-item span,
.grid-item h3,
.grid-item p {
  position: relative;
  z-index: 1;
}

/* 中央の円形アイコン */
.center-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  background-color: #fff;
  border-radius: 50%;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.8;
}
.center-circle img {
  width: 120px;
  height: 120px;
  object-fit: contain;
}


.news-section {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 20px;
}

.news-section__title {
  font-family: "Didot", serif;
  font-size: 1rem;       /* お好みで */
  color: #444;           /* タイトルの色 */
  margin-bottom: 0px;
}

.news-section__banner {
  width: 600px;
  display: block; /* 幅をテキストに合わせる */
  margin: 0 auto;
  background-color: #e8d9d9;
  color: #444;
  font-family: "Didot", serif;
  font-size: 1.0rem;
  padding: 0px 0px;
  margin-bottom: 3px;
  border-radius: 4px;
  text-align: center;
  box-sizing: border-box; /* padding込みで幅を計算 */
}


.music-line img {
  display: block;
  margin: auto;
  width: 800px;
  height: auto;
  margin-top: 0px;
  margin-bottom: 120px;
  z-index: 0;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {

  #message {
    font-size: 2rem;
  }

  .notes-background {
    position: absolute;
    top: 40%;
    left:50%;
    width: 600px;
    transform: translate(-50%, -50%);
    background: url('../assets/images/home/music-notes2.webp') no-repeat center;
    background-size: contain;
    opacity: 0.8;
    z-index: 0;
  }

  .hero-container {
    margin: 0 auto;
    padding: 0px;
    position: relative;
    display: flex;
    min-height: 500px;
  }

  .hero-container h3 {
    font-size: 1.0rem;
    color: #555;
    margin: 3px 0;
  }

  .hero-container h2 {
    font-size: 1.9rem;
    color: #333;
    margin-top: 230px;
    margin-bottom: 250px;
  }

  .grid-container {
    width: 90vw;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 15px;
  }

  .grid-item {
    font-size: 1.1rem;
  }

  .grid-item span {
    font-size: 2.0rem;
  }

  .center-circle {
    width: 70px;
    height: 70px;
  }
  .center-circle img {
    width: 100px;
    height: 100px;
  }

  .news-section {
    margin-top: 5px;
    margin-bottom: 10px;
  }
  
  .news-section__title {
    font-size: 1.0rem;       /* お好みで */
    margin-bottom: 0px;
  }
  
  .news-section__banner {
    width: 80%;
    margin: 0 auto;
    color: #444;
    font-size: 1.0rem;
    padding: 0px 0px;
    margin-bottom: 3px;
    border-radius: 4px;
  }

  .music-line img {
    margin: auto;
    width: 600px;
    height: auto;
    margin-top: 0px;
    margin-bottom: 120px;
    z-index: 0;
  }
}

/* レスポンシブ対応 */
@media screen and (max-width: 430px) {

  #message {
    font-size: 1.05rem;
  }

  .grid-section {
    margin-top: 17px;
    padding: 20px 0;
    display: flex;
    justify-content: center;
  }

  .notes-background {
    position: absolute;
    top: 37%;
    left:50%;
    width: 310px;
    transform: translate(-50%, -50%);
    background: url('../assets/images/home/music-notes2.webp') no-repeat center;
    background-size: contain;
    opacity: 0.8;
    z-index: 0;
  }

  .hero-section {
    margin-bottom: 0px;
  }

  .hero-container {
    margin: 0 auto;
    padding: 0px;
    position: relative;
    display: flex;
    min-height: 280px;
  }

  .hero-container h3 {
    font-size: 0.72rem;
    color: #555;
    margin: 3px 0;
  }

  .hero-container h2 {
    font-size: 1.0rem;
    color: #333;
    margin-top: 130px;
    margin-bottom: 140px;
  }




  .grid-container {
    width: 90vw;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
  }

  .grid-item {
    font-size: 0.63rem;
    border-radius: 11px;
    font-weight: bold;
  }

  .grid-item img{
    border-radius: 11px;
  }

  .grid-item span {
    font-size: 1.1rem;
  }

  .center-circle {
    width: 40px;
    height: 40px;
  }
  .center-circle img {
    width: 55px;
    height: 55px;
  }

  .news-section {
    margin-top: 3px;
    margin-bottom: 7px;
  }
  
  .news-section__title {
    font-size: 0.7rem;       /* お好みで */
    margin-bottom: 0px;
  }
  
  .news-section__banner {
    width: 80%;
    margin: 0 auto;
    color: #444;
    font-size: 0.7rem;
    padding: 0px 0px;
    margin-bottom: 3px;
    border-radius: 4px;
  }

  .music-line img {
    margin: auto;
    width: 330px;
    height: auto;
    margin-top: 0px;
    margin-bottom: 65px;
    z-index: 0;
  }
}
