/* =========================================
   変数定義・ベース設定
========================================= */
:root {
  --cyan: #06b6d4;
  --violet: #8b5cf6;
  --orange: #fdba74; /* スクロール誘導用（伏線） */
  --bg-base: #0b0d19; /* ご指定の基本色 */
}

body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-base);
  color: #f3f4f6;
  font-family: "Noto Serif JP", serif;
  font-weight: 300; /* すべてのウェイトをLightに一括設定 */
  overflow-x: hidden;
}

/* =========================================
   FVコンテナ (背景とレイアウト)
========================================= */
.fv-container {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  /* #0B0D19を基本色とした、空間の広がりを作るグラデーション */
  background: radial-gradient(
    circle at 50% 40%,
    #171c38 0%,
    var(--bg-base) 65%,
    #05060d 100%
  );
  padding: 100px 55px;
  box-sizing: border-box;
}

/* =========================================
   ビジュアル：立体的な分子オブジェクト
========================================= */
.molecule-wrapper {
  position: relative;
  width: 260px;
  height: 260px;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: float 6s ease-in-out infinite;
  transform-style: preserve-3d;
  perspective: 800px;
}

/* 中央の球体 */
.molecule-shell {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--cyan), var(--violet));
  box-shadow:
    inset 0 0 15px rgba(139, 92, 246, 0.4),
    0 0 25px rgba(6, 182, 212, 0.3);
  animation: glow-pure 4.5s ease-in-out infinite;
}

/* 中央を囲む複雑なリング構造 */
.molecule-rings {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.molecule-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(6, 182, 212, 0.3);
}

.ring-1 {
  animation: spinX 20s linear infinite;
}

.ring-2 {
  border-color: rgba(139, 92, 246, 0.4);
  animation: spinY 25s linear infinite reverse;
}

.ring-3 {
  border: 2px dashed rgba(6, 182, 212, 0.3);
  transform: rotateZ(60deg) rotateX(60deg);
  animation: spinZ 30s linear infinite;
}

/* =========================================
   タイポグラフィ (スマホデフォルト設定)
========================================= */
.text-container {
  width: 100%;
  max-width: 450px;
  margin: 20px auto;
}

/* 行ごとのレイアウト制御 */
.line-block {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

/* スマホ用のアライメント切り替え */
.align-left-sp {
  text-align: left;
}
.align-center-sp {
  text-align: center;
}
.align-right-sp {
  text-align: right;
}

.catchphrase {
  font-size: 28px; /* 指定数値 */
  letter-spacing: 0.05em; /* 指定数値 (5%) */
  line-height: 1.5; /* 指定数値 (150%) */
  font-weight: 300; /* Light */
  margin: 0 0 35px 0;
}

.body-text {
  font-size: 16px; /* 指定数値 */
  letter-spacing: 0.05em; /* 指定数値 (5%) */
  line-height: 1.5; /* 指定数値 (150%) */
  font-weight: 300; /* Light */
}

.narrative {
  margin: 0;
}

/* スマホ時の行ごとの余白の微調整（重なりの排除） */
.body-text .line-block {
  margin-bottom: 0.3em;
}
.body-text .line-block:last-child {
  margin-bottom: 0;
}

/* =========================================
   スクロールインジケーター
========================================= */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px; /* テキストとの重なりを防ぐ十分なマージン */
}

.scroll-text {
  font-family: "Inter", sans-serif;
  font-size: 10px;
  color: #9ca3af;
  letter-spacing: 0.15em;
  margin-bottom: 16px;
}

.scroll-line {
  position: relative;
  width: 1px;
  height: 70px;
  background: rgba(156, 163, 175, 0.3);
}

.scroll-dot {
  position: absolute;
  top: -9px;
  left: -4px; /* 直径9pxの円を中央に配置 */
  width: 9px;
  height: 9px;
  background: var(--orange);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(253, 186, 116, 0.8);
  animation: drop 2.5s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

/* =========================================
   キーフレームアニメーション
========================================= */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes glow-pure {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      inset 0 0 10px rgba(139, 92, 246, 0.3),
      0 0 15px rgba(6, 182, 212, 0.2);
  }
  50% {
    transform: scale(1.05);
    box-shadow:
      inset 0 0 20px rgba(139, 92, 246, 0.5),
      0 0 35px rgba(6, 182, 212, 0.4);
  }
}

@keyframes spinX {
  100% {
    transform: rotateX(360deg) rotateY(45deg);
  }
}
@keyframes spinY {
  100% {
    transform: rotateX(45deg) rotateY(360deg);
  }
}
@keyframes spinZ {
  100% {
    transform: rotateZ(360deg) rotateX(60deg);
  }
}

@keyframes drop {
  0% {
    transform: translateY(0px);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  85% {
    transform: translateY(70px);
    opacity: 0;
  }
  100% {
    transform: translateY(70px);
    opacity: 0;
  }
}

/* =========================================
   PCレスポンシブ (768px以上)
========================================= */
@media screen and (min-width: 768px) {
  .fv-container {
    padding-top: 12vh;
    justify-content: center; /* 画面中央に美しく寄せる */
  }

  .molecule-wrapper {
    width: 340px;
    height: 340px;
    margin-top: 0;
    margin-bottom: 60px;
  }

  .molecule-shell {
    width: 160px;
    height: 160px;
  }

  .text-container {
    max-width: 750px;
    text-align: center;
  }

  /* PCではブロック（改行）を解除し、自然な一行の流れにする */
  .line-block {
    display: inline;
  }

  /* PC表示時に文章として自然に繋がるよう、適宜スペースを自動挿入 */
  .body-text .line-block::after {
    content: " ";
  }
  .body-text .line-block:last-child::after {
    content: none;
  }

  /* 全体を中央揃えに統一 */
  .catchphrase,
  .body-text {
    text-align: center;
  }

  .scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0;
  }
}
