/* product.css — product.html 専用スタイル（開発中アプリ HEARTBEAT-16 の紹介）
   英字は Liberation Mono（base.css）、日本語は Noto Sans JP */

@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/eb-garamond-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

.product {
  overflow-x: clip;   /* 横にはみ出す要素があっても、スマホで横揺れ・縮小表示させない */
  position: relative;
  z-index: 2;
  max-width: 1040px;
  margin: 0 auto;
  padding: 100px 6% 34px;   /* フッターまでの間を詰める（以前は 120px） */
  color: var(--fg);
}

.product h2 {
  font-size: clamp(1.6rem, 8vw, 3.2rem);
  letter-spacing: clamp(1px, 1vw, 4px);
  text-align: center;
  margin: 0 0 72px;
}

/* ---------- メインビジュアル：5つの画面を、中央を主役に重ねて並べる ---------- */
.product-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 64px;
  max-width: 860px;
}
.product-visual img {
  display: block;
  height: auto;
  background: #111;
  border: 4px solid #111;
  border-radius: 16px;
  box-sizing: border-box;
  flex-shrink: 0;
}
.pv-far  { width: 17%; margin: 0 -3%; opacity: 0.9; box-shadow: 0 10px 24px rgba(0,0,0,0.12); }
.pv-near { position: relative; z-index: 1; width: 22%; margin: 0 -3%; box-shadow: 0 16px 34px rgba(0,0,0,0.18); }
.pv-main { position: relative; z-index: 2; width: 29%; border-width: 5px; border-radius: 20px; box-shadow: 0 24px 50px rgba(0,0,0,0.26); }

@media (max-width: 760px) {
  .product-visual { margin-bottom: 48px; }
  .product-visual .pv-far { display: none; }
  .pv-near { width: 31%; margin: 0 -5%; }
  .pv-main { width: 44%; }
}

/* ---------- 冒頭 ---------- */
.product-hero {
  text-align: center;
  margin: 0 0 120px;
}
.product-name { margin: 0; line-height: 0; }
.hb-logo { display: inline-block; width: auto; color: var(--fg, #111); }
.product-name .hb-logo { height: clamp(22px, 5.6vw, 40px); }
.product-tag {
  /* トップページと同じ：ゴシック体（Noto Sans JP）に、赤 → 紫 → 青のグラデーション */
  display: inline-block;
  margin: 22px 0 0;
  padding-bottom: 0.08em;
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: clamp(1.5rem, 6.4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  background: linear-gradient(90deg, #ff4d5e 0%, #9b6cf0 55%, #3fa6e8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.product-lead {
  margin: 18px 0 0;
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-weight: 500;
  font-size: clamp(0.95rem, 3.8vw, 1.15rem);
  letter-spacing: 0.14em;
}

/* ---------- DEMO SONGS：デモ曲の動画 ---------- */
.product-demo {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 72px;
  align-items: center;
  margin: 0 0 120px;
}
.demo-video { position: relative; }
.demo-video video {
  display: block;
  width: 100%;
  height: auto;
  background: #111;
  border: 5px solid #111;
  border-radius: 20px;
  box-sizing: border-box;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.22);
}
/* SOUND ボタンは画面に重ねず、動画の下に少し間をあけて置く */
.demo-video { display: flex; flex-direction: column; align-items: center; }
.demo-sound {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  white-space: nowrap;
  cursor: pointer;
}
.demo-sound .ds-icon { width: 8px; height: 8px; border-radius: 50%; background: #ff4d5e; }
.demo-sound[aria-pressed="true"] .ds-icon { animation: dsPulse 0.9s ease-in-out infinite; }
@keyframes dsPulse { 50% { transform: scale(1.6); opacity: 0.5; } }
.demo-text .point-en { line-height: 1.15; }
.demo-text .point-jp span { display: inline-block; }
/* 説明文：PC は1文1行、スマホは言葉のまとまりで改行し、文のあいだに少し間をあける */
.product-demo .demo-body { max-width: none; }
.demo-body br.sp { display: none; }
/* スマホ：改行は最小限。文はつなげて流し、言葉の切れ目で自然に折り返す。2つの段落に分ける */
@media (max-width: 760px) {
  .demo-body br.pc { display: none; }
  .demo-body .ln { display: inline; }
  .demo-body .ln.p2::before { content: ""; display: block; height: 0.9em; }
  .product-demo .demo-body { max-width: 21em; word-break: auto-phrase; text-wrap: balance; }
}

/* ---------- 5つのポイント ---------- */
.point {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 72px;
  align-items: center;
  margin: 0 0 120px;
}
/* 偶数番目は画像を右に（左右交互） */
.point:nth-of-type(even) { grid-template-columns: 1fr 300px; }
.point:nth-of-type(even) .point-shot { order: 2; }

.point-shot { margin: 0; }
.point-shot img,
.colors-row img {
  display: block;
  width: 100%;
  height: auto;
  border: 4px solid #111;
  border-radius: 16px;
  box-sizing: border-box;
  background: #111;
}

.point-no {
  margin: 0 0 14px;
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  opacity: 0.5;
}
.point-en,
.end-status {
  /* 等幅フォントは半角スペースも文字1つ分の幅があり、単語の間が空きすぎるので詰める */
  word-spacing: -0.4em;
}
.point-en {
  margin: 0 0 26px;
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.1;
}
.point-jp,
.point-body,
.colors-row figcaption,
.product-foot {
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  word-break: auto-phrase;   /* 日本語を文節の切れ目で改行（対応ブラウザのみ） */
  text-wrap: pretty;
}
.point-jp {
  margin: 0 0 16px;
  font-weight: 500;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  letter-spacing: 0.1em;
  line-height: 1.7;
}
.point-body {
  margin: 0;
  font-weight: 400;
  font-size: 0.98rem;
  line-height: 2;
  letter-spacing: 0.04em;
}

/* 説明文の改行：1文ごとに行を分け、狭い画面では文節（span）の切れ目でだけ折り返す */
.point-body .ln { display: block; }
.point-body .ln span { display: inline-block; }
.point-jp span { display: inline-block; }

/* ---------- AND MORE：そのほかの画面 ---------- */
.product-more { text-align: center; margin: 0 0 110px; }
.product-more .point-en { margin-bottom: 40px; }
.more-row { display: flex; justify-content: center; gap: 22px; }
.more-row figure { margin: 0; width: 160px; flex-shrink: 0; }
.more-row img {
  display: block; width: 100%; height: auto;
  border: 3px solid #111; border-radius: 12px; box-sizing: border-box; background: #111;
}
.more-row figcaption { margin-top: 14px; }
.more-row figcaption b { display: block; font-size: 0.82rem; letter-spacing: 0.14em; }
.more-row figcaption span {
  display: block; margin-top: 6px;
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 0.78rem; line-height: 1.6; opacity: 0.75; word-break: auto-phrase;
}
@media (max-width: 760px) {
  .product-more { margin-bottom: 88px; }
  .more-row {
    justify-content: flex-start; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 -8%; padding: 4px 8% 12px; scrollbar-width: none;
  }
  .more-row::-webkit-scrollbar { display: none; }
  .more-row figure { width: 46%; scroll-snap-align: center; }
}

/* ---------- カラー ---------- */
.product-colors { text-align: center; margin: 0 0 96px; }
.skins-lead {
  margin: -8px 0 40px;
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-weight: 500;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  letter-spacing: 0.12em;
}
.colors-row {
  display: flex;
  justify-content: center;
  gap: 18px;
}
.colors-row figure { margin: 0; width: 132px; flex-shrink: 0; }
.colors-row img { border-width: 3px; border-radius: 12px; }
.colors-row figcaption {
  margin-top: 12px;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

/* ---------- SPECS（機材好き・専門家向けの詳細） ---------- */
.product-specs { max-width: 760px; margin: 0 auto 110px; }
.product-specs .point-en { text-align: center; margin-bottom: 36px; }
.spec-list { margin: 0; border-top: 1.5px solid var(--fg); }
.spec-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  padding: 16px 4px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
}
.spec-row dt {
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  padding-top: 2px;
}
.spec-row dd {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-weight: 400;
  font-size: 0.92rem;
  line-height: 1.85;
  letter-spacing: 0.03em;
  word-break: auto-phrase;
}
/* 1項目1行の箇条書き（仕様は縦に追って読めるように） */
.spec-row dd .it { display: block; }
.spec-note {
  margin: 14px 0 0;
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 0.78rem;
  opacity: 0.6;
  text-align: right;
}
@media (max-width: 760px) {
  .product-specs { margin-bottom: 88px; }
  .spec-row { grid-template-columns: 1fr; gap: 4px; padding: 14px 2px; }
  .spec-row dt { font-size: 0.8rem; opacity: 0.6; }
  .spec-note { text-align: left; }
}

/* ---------- 締め：COMING SOON ---------- */
.product-end {
  text-align: center;
  padding: 72px 0 0;
  border-top: 1.5px solid var(--fg);
  max-width: 620px;
  margin: 0 auto;
}
.end-name { margin: 0; line-height: 0; }
.end-name .hb-logo { height: clamp(17px, 4.4vw, 25px); }
.end-status {
  margin: 20px 0 22px;
  font-size: clamp(1.6rem, 7vw, 2.8rem);
  font-weight: 700;
  letter-spacing: 0.18em;
}

.product-foot {
  margin: 0;
  text-align: center;
  font-size: clamp(0.85rem, 3.6vw, 1.05rem);
  opacity: 0.7;
}

/* ---------- スマホ：1列に（番号・見出し → 画像 → 説明） ---------- */
@media (max-width: 760px) {
  .product { padding: 80px 7% 34px; }
  .product h2 { margin-bottom: 56px; }
  .product-hero { margin-bottom: 88px; }
  .product-demo { grid-template-columns: 1fr; gap: 0; margin-bottom: 72px; text-align: center; }
  .product-demo .demo-text { display: flex; flex-direction: column; order: -1; }
  /* 文章と動画の距離は、見出し→キャッチコピーの間（約1行半）より少し広く、まとまりに見える距離に */
  .demo-video { width: 66%; max-width: 300px; margin: 44px auto 0; }
  .product-demo .point-body { margin: 0 auto; text-align: center; }
  .point,
  .point:nth-of-type(even) {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 72px;   /* 項目と項目の間（以前は 96px） */
    text-align: center;
  }
  .point-text { display: contents; }
  .point-no { order: 1; }
  .point-en { order: 2; margin-bottom: 20px; }
  .point-shot,
  .point:nth-of-type(even) .point-shot { order: 3; width: 62%; max-width: 280px; margin: 0 auto 22px; }
  .point-jp { order: 4; margin-bottom: 10px; }
  .point-body { order: 5; margin: 0 auto; text-align: center; }
  /* スマホ：横にスワイプして見る */
  .colors-row {
    justify-content: flex-start;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 -7vw;
    padding: 4px 7vw 12px;
    scrollbar-width: none;
  }
  .colors-row::-webkit-scrollbar { display: none; }
  .colors-row figure { width: 38%; scroll-snap-align: center; }
  .colors-row img { border-width: 2px; border-radius: 8px; }
}

/* ---------- スクロールでふわっと出る ---------- */
.reveal-on .product-visual,
.reveal-on .product-hero,
.reveal-on .product-demo,
.reveal-on .point,
.reveal-on .product-more,
.reveal-on .product-colors,
.reveal-on .product-specs,
.reveal-on .product-end {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal-on .is-in { opacity: 1; transform: none; }
/* 画面と文章は少しだけ時間差で */
.reveal-on .point .point-shot { transition: transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1); transform: translateY(16px); }
.reveal-on .point.is-in .point-shot { transform: none; }

/* 注記：ページの最後に小さく */
.product-note {
  margin: 40px 0 0;
  text-align: center;
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  opacity: 0.55;
}
