/* ==========================================================================
   トップページ（index.html）
   方針：主役は「手形・足形のフォトフレーム」。目立つボタンは各セクション1つ。
   見出し＝明朝体・本文＝ゴシック体。色は variables.css のトークンのみを使う。
   ========================================================================== */

.page-home { background: var(--color-bg); }

/* 見出し・リード（全セクション共通） */
.h-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.6vw, 2.125rem);
  line-height: 1.45;
  letter-spacing: 0.04em;
  color: var(--color-text-primary);
  margin: 0 0 var(--space-md);
}
/* 見出しの役割分担：h-label＝何の説明か（ゴシック・小）、h-title＝心に届くキャッチ（明朝・大）、h-lead＝事実の説明 */
.h-label {
  margin: 0 0 12px;
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--color-accent);
}
.h-head .h-title { margin-bottom: var(--space-md); }
.h-head { max-width: 40rem; margin: 0 auto var(--space-xl); text-align: center; }
.h-lead { color: var(--color-text-secondary); line-height: 1.9; margin: 0; }
.h-more { margin: var(--space-xl) 0 0; text-align: center; }
.h-section { padding: clamp(64px, 9vw, 120px) 0; }
.h-tint { background: var(--color-surface); }

/* テキストリンク（.h-text-link）は style.css に共通定義 */

/* ---------- 1. ファーストビュー ---------- */
.h-hero {
  padding: clamp(32px, 6vw, 88px) 0 clamp(56px, 8vw, 112px);
  background: linear-gradient(180deg, #FFFFFF 0%, var(--color-bg) 100%);
}
.h-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.h-eyebrow {
  margin: 0 0 var(--space-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--color-accent);
}
.h-hero-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.875rem, 3vw, 2.75rem);
  line-height: 1.5;
  letter-spacing: 0.03em;
  color: var(--color-text-primary);
  margin: 0 0 var(--space-lg);
}
.h-hero-lead {
  font-size: clamp(1rem, 1.3vw, 1.0625rem);
  line-height: 2;
  color: var(--color-text-secondary);
  max-width: 30rem;
  margin: 0 0 var(--space-lg);
}
.h-hero-product {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 20px;
  max-width: 30rem;
  padding: 16px 20px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-text-primary);
  transition: border-color .2s ease;
}
.h-hero-product:hover { border-color: var(--color-accent); }
.h-hero-product-name { font-weight: 600; }
.h-hero-product-price { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; color: var(--color-accent); }
.h-hero-product-price small { font-family: var(--font-sans); font-size: var(--font-size-xs); font-weight: 400; color: var(--color-text-secondary); }
.h-checks {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  list-style: none; padding: 0; margin: 14px 0 var(--space-xl);
  font-size: var(--font-size-sm); color: var(--color-text-secondary);
}
.h-checks li::before { content: "✓"; margin-right: 6px; color: var(--color-accent); font-weight: 700; }
.h-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.h-hero-visual { margin: 0; }
.h-hero-visual img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 1400 / 1190; object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 30px 60px -30px rgba(41, 39, 37, 0.35);
}
.h-hero-visual figcaption { margin-top: 10px; font-size: var(--font-size-xs); color: var(--color-text-secondary); text-align: right; }

/* ---------- 2. 場面と悩み ---------- */
.h-scenes { list-style: none; padding: 0; margin: var(--space-xl) 0 0; counter-reset: scene; }
.h-scene {
  counter-increment: scene;
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 4px 20px;
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
}
.h-scene:last-child { border-bottom: 1px solid var(--color-border); }
.h-scene::before {
  content: counter(scene, decimal-leading-zero);
  grid-row: span 2;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--color-accent);
  line-height: 1.6;
}
.h-scene-q { font-family: var(--font-serif); font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.7; margin: 0; color: var(--color-text-primary); }
.h-scene-a { margin: 8px 0 0; line-height: 1.9; color: var(--color-text-secondary); }

/* ---------- 3. 商品 ---------- */
.h-products {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.h-product { grid-column: span 3; }
.h-product.is-feature { grid-column: span 6; grid-row: span 2; }
.h-product-link {
  display: flex; flex-direction: column; height: 100%;
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: 6px;
  overflow: hidden;
  color: var(--color-text-primary);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.h-product-link:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -24px rgba(41, 39, 37, 0.45); border-color: var(--color-border); }
.h-product-thumb { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--color-surface-light); }
.h-product.is-feature .h-product-thumb { aspect-ratio: auto; flex: 1 1 auto; min-height: 320px; }
.h-product.is-feature .h-product-body { flex: 0 0 auto; }
.h-product-thumb picture { display: block; width: 100%; height: 100%; }
.h-product-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.h-product-link:hover .h-product-thumb img { transform: scale(1.03); }
.h-product-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 20px; flex: 1; }
.h-product-name { font-weight: 600; line-height: 1.6; }
.h-product.is-feature .h-product-name { font-family: var(--font-serif); font-size: 1.25rem; }
.h-product-desc { font-size: var(--font-size-xs); line-height: 1.8; color: var(--color-text-secondary); display: none; }
.h-product.is-feature .h-product-desc { display: block; font-size: var(--font-size-sm); }
.h-product-price { margin-top: auto; padding-top: 6px; font-family: var(--font-serif); font-size: 1.125rem; font-weight: 600; color: var(--color-accent); }
.h-product-price small { font-family: var(--font-sans); font-size: var(--font-size-xs); font-weight: 400; color: var(--color-text-secondary); }
.h-product-cta { font-size: var(--font-size-xs); color: var(--color-text-secondary); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 4. つくり方 ---------- */
.h-craft { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.h-craft-visual { margin: 0; }
.h-craft-visual img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 6px; }
.h-facts { margin: var(--space-lg) 0 0; counter-reset: fact; }
.h-facts > div { counter-increment: fact; padding: 18px 0; border-top: 1px solid var(--color-border); }
.h-facts > div:last-child { border-bottom: 1px solid var(--color-border); }
.h-facts dt { font-weight: 700; font-size: var(--font-size-base); color: var(--color-text-primary); }
.h-facts dt::before { content: counter(fact, decimal-leading-zero); margin-right: 12px; font-family: var(--font-serif); font-weight: 600; color: var(--color-accent); }
.h-facts dd { margin: 6px 0 0 2.3em; line-height: 1.9; color: var(--color-text-secondary); font-size: var(--font-size-sm); }

/* ---------- 6. お届けまで ---------- */
.h-flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; position: relative; }
.h-flow::before { content: ""; position: absolute; top: 20px; left: 10%; right: 10%; height: 1px; background: var(--color-border); }
.h-flow-step { position: relative; text-align: center; }
.h-flow-num {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--color-bg); border: 1px solid var(--color-accent);
  font-family: var(--font-serif); font-weight: 600; color: var(--color-accent);
  position: relative;
}
.h-flow-step h3 { font-size: var(--font-size-sm); font-weight: 700; margin: 14px 0 6px; line-height: 1.6; }
.h-flow-step p { font-size: var(--font-size-xs); line-height: 1.8; color: var(--color-text-secondary); margin: 0; }

/* ---------- 7. そのほかの贈り物 ---------- */
.h-others { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.h-other-link {
  display: flex; flex-direction: column; gap: 6px; height: 100%;
  padding-bottom: 16px;
  color: var(--color-text-primary);
}
.h-other-thumb { display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 6px; margin-bottom: 8px; background: var(--color-surface-light); }
.h-other-thumb picture { display: block; width: 100%; height: 100%; }
.h-other-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.h-other-link:hover .h-other-thumb img { transform: scale(1.03); }
.h-other-cat { font-size: var(--font-size-xs); color: var(--color-accent); font-weight: 500; }
.h-other-name { font-weight: 600; line-height: 1.6; font-size: var(--font-size-sm); }
.h-other-desc { font-size: var(--font-size-xs); line-height: 1.8; color: var(--color-text-secondary); }
.h-other-price { margin-top: auto; font-family: var(--font-serif); font-weight: 600; color: var(--color-accent); }
.h-other-price small { font-family: var(--font-sans); font-size: var(--font-size-xs); font-weight: 400; color: var(--color-text-secondary); }
.h-other-custom .h-other-link {
  justify-content: center; padding: 24px; border: 1px dashed var(--color-border); border-radius: 6px; background: var(--color-bg);
}
.h-other-custom .h-other-price { font-family: var(--font-sans); font-size: var(--font-size-sm); text-decoration: underline; text-underline-offset: 4px; margin-top: 12px; }

/* ---------- 9. 行動 ---------- */
.h-final { padding: clamp(72px, 10vw, 128px) 0; background: var(--color-surface-light); text-align: center; }
.h-final-title { font-family: var(--font-serif); font-weight: 600; font-size: clamp(1.625rem, 3vw, 2.5rem); line-height: 1.5; margin: 0 0 var(--space-md); color: var(--color-text-primary); }
.h-final-lead { color: var(--color-text-secondary); margin: 0 0 var(--space-xl); }
.h-final-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 28px; }

/* ---------- スマホ用に組み直す ---------- */
.sp-only { display: none; }
@media (max-width: 960px) {
  .h-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-product, .h-product.is-feature { grid-column: span 1; grid-row: auto; }
  .h-product.is-feature { grid-column: 1 / -1; }
  .h-others { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-flow { grid-template-columns: 1fr; gap: 0; }
  .h-flow::before { top: 20px; bottom: 20px; left: 20px; right: auto; width: 1px; height: auto; }
  .h-flow-step { display: grid; grid-template-columns: 40px 1fr; gap: 0 16px; text-align: left; padding-bottom: 20px; }
  .h-flow-num { grid-row: span 2; }
  .h-flow-step h3 { margin: 8px 0 4px; }
}
@media (max-width: 760px) {
  .sp-only { display: inline; }
  .h-hero-grid, .h-craft { grid-template-columns: 1fr; }
  .h-hero-visual { order: -1; }
  .h-hero-visual img { aspect-ratio: 4 / 3; }
  .h-hero-title { font-size: clamp(1.625rem, 7vw, 2rem); margin-bottom: var(--space-md); }
  .h-hero-actions .btn { flex: 1 1 100%; }
  .h-hero-actions .h-text-link { margin: 0 auto; }
  .h-scene { grid-template-columns: 2.25rem 1fr; gap: 4px 12px; }
  .h-facts dd { margin-left: 0; }
}

/* 動きを減らす設定のときはアニメーションを止める */
@media (prefers-reduced-motion: reduce) {
  .h-product-link, .h-product-thumb img, .h-other-thumb img, .h-text-link::after { transition: none; }
  .h-product-link:hover { transform: none; }
}

/* 日本語の見出しを文節で改行する */
.h-phrase { display: inline-block; }

/* レビューは内容の長さに合わせる（短いカードに空白を作らない） */
.page-home .review-grid { align-items: start; }
