*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background: linear-gradient(to bottom, #EBC7FB, #BDB7ED); /* グラデーション */
  font-family: 'Hina Mincho', serif;
  line-height: 1.6;
  color: #5B4FA3;
  opacity: 0; /* 初期は透明 */
  transition: opacity 0.5s ease;
}

body.loaded {
  opacity: 1; /* フェードイン */
}

body.fade-out {
  opacity: 0; /* フェードアウト */
  transition: opacity 0.5s ease;
}

.hero {
  display: flex; 
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  overflow: hidden;
  height: 100vh; /* ← 画面全体の高さを確保 */
  padding-top: 0; /* 上に少し余白（調整用） */
}

.hero-img-container {
  display: flex;
  justify-content: center; /* 横方向に中央寄せ */
  align-items: center;     /* 縦方向も中央寄せ（必要なら） */
  position: relative;
  margin: 0 5vw;
}
.hero-img {
  width: 100%; 
  max-width: 70%; 
  height: auto;       /* 高さは自動 */
  border-radius: 20px; 
}
.hero-text {
  position: absolute;
  top: 45%;
  left: 40%;
  transform: translate(-50%, -50%); /* 完全中央に */
  z-index: 2;
  width: 100%;
  align-items: center;
}

.hero-text p {
  width: 377px;
  height: 79px;
  font-family: 'Hina Mincho', serif;
  font-size: 20px;
  line-height: 79px; /* 白帯内で中央揃え */
  text-align: center;
    margin: 0;
  display: inline-block;
}

.hero-text p:first-child { 
  transform: translateX(-6vw);
  margin-bottom: -0.5vw;
}

.hero-text p:last-child { 
  transform: translateX(6vw);
  margin-top: -1vw;
}

.hero-text p.highlight {
  width: 20vw;          /* ビューポート幅に対して相対 */
  max-width: 300px;     /* 最大幅はデザイン通り */
  height: 7vh;          /* 高さも相対値 */
  background: rgba(255,255,255,0.6);
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0;
  font-family: 'Hina Mincho', serif;
}

.gradient-text1 {
  background: linear-gradient(to right, #C48ED0, #532E81);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent; /* 保険 */
  font-size: 1.7vw;   /* 文字の大きさはここで */
}

.gradient-text2 {
  background: linear-gradient(to right, #532E81, #7696DF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent; /* 保険 */
  font-size: 1.7vw;   /* 文字の大きさはここで */
}

.hero-nav {
  width: 100%;
  text-align: center;
  margin-top: 2vh;
  z-index: 2;
  position: static; 
}

.hero-nav ul {
  display: flex;
  justify-content: center;
  gap: 40px;
    margin: 0;
}

.hero-nav li {
  position: relative;
  list-style: none;
}

.hero-nav a {
  position: relative;
  display: inline-block;
  font-weight: bold;
  font-family: "Jaini Purva", system-ui;
  color: #fff;
  font-size: 1.5rem;
  text-decoration: none;
}

.hero-nav .text {
  position: relative;
  z-index: 2;
}

.hero-nav .shadow_1 {
  position: absolute;
  top: 4px;   /* 下にずらす距離 */
  left: 4px;  /* 右にずらす距離 */
  color: #C48ED0;
  z-index: 1;
  opacity: 0.8;
}

.hero-nav .shadow_2 {
  position: absolute;
  top: 4px;   /* 下にずらす距離 */
  left: 4px;  /* 右にずらす距離 */
  color: #A986D4;
  z-index: 1;
  opacity: 0.8;
}

.hero-nav .shadow_3 {
  position: absolute;
  top: 4px;   /* 下にずらす距離 */
  left: 4px;  /* 右にずらす距離 */
  color: #8882CC; 
  z-index: 1;
  opacity: 0.8;
}

/* ナビゲーションのホバーアニメーション */
.hero-nav a {
  position: relative;
  display: inline-block;
  font-weight: bold;
  font-family: "Jaini Purva", system-ui;
  color: #fff;
  font-size: 1.5rem;
  text-decoration: none;

  transition: transform 0.3s ease, color 0.3s ease; /* アニメーション追加 */
}

.hero-nav a:hover {
  transform: translateY(-5px); /* 上に5px浮かせる */
}


.hero-img,
.hero-text,
.hero-nav {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in {
  opacity: 1;
  transform: translateY(0);
}

footer {
  background: transparent; /* bodyの背景を透過させる */
  text-align: center;       /* 中央寄せ */
  padding: 20px 0;          /* 上下の余白 */
  font-size: 0.9rem;
}


@media (max-width: 768px) {

  .hero-text {
  position: absolute;
  top: 45%;
  left: 41%;
  width: 100%;
  align-items: center;
}

  .hero-text p {
    font-size: 1.5rem; /* 文字を小さく */
    padding: 3px 10px;  /* パディングも小さく */
  }
    .hero-nav a {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {

  .hero-text {
  position: absolute;
  top: 46%;
  left: 41%;
  width: 100%;
  align-items: center;
}

  .hero-text p {
    font-size: 1.2rem; /* さらに小さく */
    padding: 2px 8px;
  }
    .hero-nav a {
    font-size: 1rem;
  }
}