/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-page: #ffffff;
  --bg-offwhite: #fafafa;
  --bg-card: #f7f6f2;
  --gold: #b8860b;
  --gold-soft: #9c7a1c;
  --gold-line: #d4af37;
  --red: #c0392b;
  --red-bg: #fff5f5;
  --line-green: #06c755;
  --line-green-dark: #05a848;
  --text-main: #1a1a1a;
  --text-sub: #5a5a5a;
  --border-soft: rgba(184, 134, 11, 0.3);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== Fade-in animation（基本ルール。後続の各コンポーネント固有のhover/active指定を
   ソース順で確実に上書きできるよう、あえてファイル冒頭で定義する） ===== */
/* スクロールで画面に入ったブロックが下からふわっと浮かび上がる演出。初回表示のみ(script.js側でunobserve) */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 見出しの1文字ずつのstagger reveal（script.jsが文字をspanに分割してからis-visibleを付与） */
.heading-stagger .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.heading-stagger.is-visible .char {
  opacity: 1;
  transform: translateY(0);
}

.wrapper {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px;
  background: var(--bg-page);
  position: relative;
}

/* ===== Section spacing ===== */
.section {
  position: relative;
  padding: 56px 0;
}

/* 上品なグラデーションぼかし区切り線（単純な直線の代わり） */
.section:not(:last-of-type)::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 134, 11, 0.3) 50%, transparent);
}

.section-heading {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
  position: relative;
  padding-bottom: 14px;
}

.section-heading::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  background: var(--gold-line);
  margin: 14px auto 0;
  border-radius: 2px;
}

.body-text {
  font-size: 0.98rem;
  color: var(--text-main);
  margin-bottom: 20px;
}

.body-text.emphasis {
  color: var(--gold-soft);
  font-weight: 600;
}

.body-text.emphasis-strong {
  color: var(--gold);
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
}

.closing-text {
  text-align: center;
  margin-top: 8px;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding-top: 40px;
  padding-bottom: 8px;
  text-align: center;
}

/* 実績セクションとの間の余白が広くなりすぎないよう調整 */
.results {
  padding-top: 12px;
}

/* ヒーロー末尾〜実績見出しの間にある、次コンテンツへの視線誘導矢印 */
@keyframes scroll-cue-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.scroll-cue {
  display: block;
  text-align: center;
  color: var(--gold);
  font-size: 1.4rem;
  line-height: 1;
  margin: 6px 0;
  animation: scroll-cue-blink 1.5s ease-in-out infinite;
}

/* ごく薄い光の粒がゆっくり漂う演出。ヒーローの背景内だけに限定し、控えめな密度に留める */
.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.4), rgba(212, 175, 55, 0) 70%);
  opacity: 0;
  animation: particle-drift linear infinite;
}

@keyframes particle-drift {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0;
  }
  12% {
    opacity: 0.55;
  }
  88% {
    opacity: 0.35;
  }
  100% {
    transform: translate3d(0, -90px, 0);
    opacity: 0;
  }
}

.particle.p1 { left: 6%;  top: 90%; width: 5px; height: 5px; animation-duration: 17s; animation-delay: 0s; }
.particle.p2 { left: 20%; top: 82%; width: 4px; height: 4px; animation-duration: 21s; animation-delay: 3s; }
.particle.p3 { left: 36%; top: 94%; width: 7px; height: 7px; animation-duration: 19s; animation-delay: 6s; }
.particle.p4 { left: 52%; top: 86%; width: 5px; height: 5px; animation-duration: 23s; animation-delay: 1.5s; }
.particle.p5 { left: 68%; top: 92%; width: 6px; height: 6px; animation-duration: 18s; animation-delay: 8s; }
.particle.p6 { left: 82%; top: 84%; width: 4px; height: 4px; animation-duration: 22s; animation-delay: 4.5s; }
.particle.p7 { left: 92%; top: 96%; width: 5px; height: 5px; animation-duration: 20s; animation-delay: 10s; }
.particle.p8 { left: 12%; top: 78%; width: 4px; height: 4px; animation-duration: 24s; animation-delay: 12s; }

.lead-in {
  color: var(--gold);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 20px;
}

.video-wrapper {
  margin: 0 0 32px;
  aspect-ratio: 16 / 9;
  width: 100%;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 16px rgba(0, 0, 0, 0.06),
    0 24px 40px -12px rgba(0, 0, 0, 0.12);
}

.video-wrapper iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

.hero .body-text {
  text-align: left;
}

/* ===== 写真・バナー画像共通：多層シャドウで立体感 + ホバーで控えめにズーム ===== */
.result-item img,
.tokuten-item img,
.line-banner-link img,
.voice-item img,
.tokuten-banner {
  border: 1px solid var(--border-soft);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 6px 14px rgba(0, 0, 0, 0.06),
    0 20px 36px -10px rgba(0, 0, 0, 0.12);
  transition: transform 0.4s ease;
}

.result-item,
.tokuten-item,
.line-banner-link,
.voice-item {
  overflow: hidden;
}

.result-item:hover img,
.tokuten-item:hover img,
.line-banner-link:hover img,
.voice-item:hover img,
.tokuten-banner:hover {
  transform: scale(1.02);
}

/* ===== Results ===== */
.result-item {
  margin-bottom: 40px;
  border-radius: 8px;
}

.result-item:last-child {
  margin-bottom: 20px;
}

.result-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--gold-soft);
  margin-bottom: 14px;
  text-align: center;
}

.count-up {
  font-variant-numeric: tabular-nums;
}

.fail-item .fail-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 12px;
}

/* 同じエピソードの2枚組画像：間隔を詰めて1セットに見せる */
.image-pair {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.image-pair img {
  margin: 0;
}

@media (min-width: 480px) {
  .image-pair {
    flex-direction: row;
  }
  .image-pair img {
    width: calc(50% - 3px);
  }
}

/* ===== CTA Blocks ===== */
.cta-block {
  text-align: center;
  padding: 44px 0;
}

.cta-copy {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 22px;
}

.cta-button {
  display: inline-block;
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, var(--line-green), var(--line-green-dark));
  color: #ffffff;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 18px 20px;
  border-radius: 50px;
  box-shadow:
    0 2px 4px rgba(6, 199, 85, 0.18),
    0 10px 18px rgba(6, 199, 85, 0.22),
    0 24px 36px -10px rgba(6, 199, 85, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 2px solid rgba(255, 255, 255, 0.4);
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.cta-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent);
  pointer-events: none;
}

.cta-button:hover {
  transform: scale(1.03);
  box-shadow:
    0 4px 8px rgba(6, 199, 85, 0.22),
    0 14px 24px rgba(6, 199, 85, 0.26),
    0 30px 44px -10px rgba(6, 199, 85, 0.34);
}

.cta-button:active {
  transform: scale(0.97);
  box-shadow:
    0 2px 4px rgba(6, 199, 85, 0.2),
    0 6px 12px rgba(6, 199, 85, 0.22);
}

/* クリック時の波紋エフェクト（JSでクリック座標に生成） */
.cta-button .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transform: scale(0);
  animation: ripple-effect 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-effect {
  to {
    transform: scale(3.2);
    opacity: 0;
  }
}

.cta-note {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--text-sub);
}

.line-banner-link {
  display: block;
  margin-bottom: 24px;
  border-radius: 8px;
}

/* ===== Emotional section : 引用ブロック ===== */
.quote-text {
  position: relative;
  overflow: hidden;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--red);
  text-align: center;
  padding: 26px 22px 24px 36px;
  margin: 22px 0;
  border-radius: 24px;
  /* うっすらとした斜めのテクスチャ（ストライプ）+ 左上→右下の対角グラデーション */
  background:
    repeating-linear-gradient(
      45deg,
      rgba(230, 57, 70, 0.05) 0,
      rgba(230, 57, 70, 0.05) 1px,
      transparent 1px,
      transparent 9px
    ),
    linear-gradient(135deg, rgba(255, 228, 232, 0.92), rgba(255, 247, 247, 0.78) 55%, rgba(255, 214, 222, 0.88));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-shadow: 0 0 14px rgba(230, 57, 70, 0.22);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.05),
    0 8px 24px rgba(0, 0, 0, 0.12),
    0 10px 22px rgba(192, 57, 43, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* 左側の色帯：太さアップ＋コントラストの強い2色グラデーション */
.quote-text::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 10px;
  bottom: 10px;
  width: 9px;
  border-radius: 6px;
  background: linear-gradient(180deg, #7a1220, #ff8fa3);
}

/* 背景に沈める装飾的な引用符（サイズ・濃さを強化） */
.quote-text::before {
  content: "\201C";
  position: absolute;
  top: -0.2em;
  left: 0.1em;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 7.2rem;
  line-height: 1;
  color: var(--red);
  opacity: 0.28;
  pointer-events: none;
}

.quote-text.small {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  text-shadow: 0 0 14px rgba(184, 134, 11, 0.18);
  background:
    repeating-linear-gradient(
      45deg,
      rgba(184, 134, 11, 0.045) 0,
      rgba(184, 134, 11, 0.045) 1px,
      transparent 1px,
      transparent 9px
    ),
    linear-gradient(135deg, rgba(250, 244, 228, 0.92), rgba(247, 246, 242, 0.78) 55%, rgba(240, 227, 195, 0.85));
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.05),
    0 8px 24px rgba(0, 0, 0, 0.12),
    0 10px 22px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.quote-text.small::after {
  background: linear-gradient(180deg, #7a611a, #f3ddaa);
}

.quote-text.small::before {
  color: var(--gold-line);
}

/* ===== Text link (utage) ===== */
.text-link {
  color: var(--gold);
  text-decoration: underline;
  word-break: break-all;
}

/* ===== Tokuten ===== */
.tokuten-banner {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin-bottom: 32px;
}

.tokuten-item {
  position: relative;
  margin-bottom: 36px;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  /* ガラスモーフィズム風の半透明ぼかし背景 + うっすら光沢のあるグラデーション縁取り */
  background-image:
    linear-gradient(rgba(247, 246, 242, 0.78), rgba(247, 246, 242, 0.78)),
    linear-gradient(135deg, rgba(212, 175, 55, 0.65), rgba(184, 134, 11, 0.15) 45%, rgba(212, 175, 55, 0.5) 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 10px 18px rgba(0, 0, 0, 0.05),
    0 28px 44px -14px rgba(184, 134, 11, 0.2);
}

.tokuten-item img {
  margin-bottom: 14px;
}

.tokuten-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

/* ===== 相談者の声（証言カード） ===== */
.voices .section-heading {
  margin-bottom: 32px;
}

.voice-item {
  max-width: 100%;
  margin-bottom: 20px;
  border-radius: 12px;
}

.voice-item:last-child {
  margin-bottom: 0;
}

.voice-item img {
  border-radius: 12px;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 32px 0 48px;
  color: var(--text-sub);
  font-size: 0.78rem;
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .heading-stagger .char {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .particle {
    animation: none;
    opacity: 0;
  }
  .scroll-cue {
    animation: none;
    opacity: 1;
  }
  .cta-button,
  .result-item img,
  .tokuten-item img,
  .line-banner-link img,
  .voice-item img,
  .tokuten-banner {
    transition: none;
  }
}

/* ===== Responsive tweaks ===== */
@media (max-width: 380px) {
  .wrapper {
    padding: 0 16px;
  }
  .section {
    padding: 44px 0;
  }
  .cta-button {
    font-size: 0.98rem;
    padding: 16px 18px;
  }
}

@media (min-width: 601px) {
  .wrapper {
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.06);
  }
}

/* ホバー操作ができる環境（PC等）でのみ画像ズーム・ボタン拡大を有効化し、タッチ端末での誤作動を避ける */
@media (hover: none) {
  .result-item:hover img,
  .tokuten-item:hover img,
  .line-banner-link:hover img,
  .voice-item:hover img,
  .tokuten-banner:hover {
    transform: none;
  }
  .cta-button:hover {
    transform: none;
    box-shadow:
      0 2px 4px rgba(6, 199, 85, 0.18),
      0 10px 18px rgba(6, 199, 85, 0.22),
      0 24px 36px -10px rgba(6, 199, 85, 0.3);
  }
}
