/* パターンI：軽やかモーション型（レシピIトークン）
   動きは motion-parts.md の M1・M2・M3・M5・M6 を使用。
   動きの初期非表示は html.js-motion（JS有効＋reduced-motionでない）ときだけ。
   それ以外（JS無効・reduced-motion）では最初から静止表示で完全に読める。 */
:root {
  --base: #f8f7f1;
  --surface: #ffffff;
  --alt: #edf1e8;
  --ink: #2e332e;
  --main: #33463a;
  --accent: #47603f;
  --sub: #5a6157;
  --line: #dde2d2;
  --cta: #9e3b26;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0; background: var(--base); color: var(--ink);
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.85; letter-spacing: 0.02em;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); }
.sample-banner { background: var(--main); color: #fff; text-align: center; font-size: 0.82rem; font-weight: 700; line-height: 1.6; padding: 8px 12px; }

header { max-width: 960px; margin: 0 auto; padding: 22px 16px 6px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.logo { margin: 0; font-size: 1.35rem; font-weight: 700; display: flex; align-items: center; gap: 9px; color: var(--main); }
.logo a { text-decoration: none; color: var(--main); }
.logo svg { flex: none; }
.header-tel { margin: 0; white-space: nowrap; }
.header-tel a { font-weight: 700; text-decoration: none; border-bottom: 3px solid var(--accent); }

main { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.hero { padding-top: 22px; }
.hero h1 { font-size: 2.3rem; font-weight: 700; line-height: 1.45; margin: 0 0 6px; color: var(--main); }
.hero .hero-sub { margin: 14px 0 18px; font-size: 1.05rem; }
.hero-photo { border-radius: 16px; overflow: hidden; }
.hero-zoom { position: relative; aspect-ratio: 3 / 2; }
.hero-zoom img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-img-b { opacity: 0; }
.photo-note { font-size: 0.8rem; color: var(--sub); margin: 8px 2px 0; }
.open-chip { display: inline-block; background: var(--main); color: #fff; font-weight: 700; border-radius: 999px; padding: 4px 16px; font-size: 0.95rem; margin-bottom: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 13px 30px; border-radius: 999px;
  background: var(--main); color: #fff; font-weight: 700; text-decoration: none; font-size: 1.05rem;
}
.btn-tel { background: var(--cta); }
.btn-ghost { background: #ffffff; color: var(--main); border: 2px solid var(--main); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

section.block { padding: 54px 0 8px; }
section.block, .cta-band, footer { scroll-margin-top: 16px; }
.sec-label { margin: 0; font-size: 0.8rem; letter-spacing: 0.3em; color: var(--accent); font-weight: 700; }
h2.sec-title { font-size: 1.6rem; font-weight: 700; line-height: 1.5; margin: 6px 0 18px; color: var(--main); }

/* コンセプト3分解 */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.trio-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px 20px; }
.trio-num { margin: 0 0 8px; font-size: 1.6rem; font-weight: 700; color: var(--accent); line-height: 1; }
.trio-card h3 { margin: 0 0 6px; font-size: 1.12rem; font-weight: 700; color: var(--main); }
.trio-card p { margin: 0; }

/* 実績の数字（M3カウントアップ） */
.stats-block .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stat { background: var(--alt); border-radius: 16px; padding: 26px 16px; text-align: center; }
.stat-num { margin: 0; font-size: 2.6rem; font-weight: 700; color: var(--main); line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-unit { font-size: 1.15rem; margin-left: 2px; }
.stat-label { margin: 4px 0 0; color: var(--ink); }
.stats-note { font-size: 0.85rem; color: var(--sub); margin: 12px 2px 0; }

/* クラスと料金 */
.class-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 26px; }
.class-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.class-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.class-card h3 { margin: 14px 18px 4px; font-size: 1.08rem; font-weight: 700; color: var(--main); }
.class-card p { margin: 0 18px 18px; }
table.menu { width: 100%; border-collapse: collapse; }
table.menu th, table.menu td { text-align: left; padding: 11px 4px; border-bottom: 2px dashed var(--line); vertical-align: top; }
table.menu th { font-weight: 700; }
table.menu th small { display: block; font-weight: 500; font-size: 0.9rem; color: var(--sub); }
table.menu td { text-align: right; font-weight: 700; white-space: nowrap; }
.menu-note { font-size: 0.92rem; margin: 12px 2px 0; }

/* 初めての方の流れ */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.step-num { margin: 0; flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--alt); color: var(--main); font-weight: 700; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; }
.steps h3 { margin: 2px 0 4px; font-size: 1.08rem; font-weight: 700; color: var(--main); }
.steps p { margin: 0; }

table.info { width: 100%; border-collapse: collapse; background: var(--alt); border-radius: 16px; overflow: hidden; }
table.info th, table.info td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.info th { width: 6.5em; font-weight: 700; color: var(--main); }
table.info tr:last-child th, table.info tr:last-child td { border-bottom: none; }

.cta-band { background: var(--alt); border-radius: 16px; padding: 28px 22px; text-align: center; margin: 52px 0 8px; }
.cta-band p { margin: 0 0 6px; font-weight: 700; font-size: 1.15rem; color: var(--main); }
.cta-band .hours { margin: 0 0 16px; font-weight: 500; font-size: 0.98rem; color: var(--ink); }

/* 動きの説明ページへの案内ブロック（独立ブロック） */
.motion-guide { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px 22px; text-align: center; margin-top: 30px; }
.motion-guide h3 { margin: 0 0 8px; font-size: 1.2rem; font-weight: 700; color: var(--main); }
.motion-guide p { margin: 0 0 14px; }
.motion-guide p:last-child { margin-bottom: 0; }

footer { margin-top: 56px; background: var(--main); color: #f2f4ec; padding: 34px 16px 92px; }
.footer-inner { max-width: 960px; margin: 0 auto; }
.footer-logo { font-weight: 700; font-size: 1.2rem; margin: 0 0 6px; }
footer p { margin: 0 0 8px; }
.credits { font-size: 0.8rem; color: #ccd4c2; margin-top: 18px; }

.cta-bar { display: none; }

/* ===== 動き（M5：ボタン・カードの反応） ===== */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; } /* M6 */
  .btn, .trio-card, .class-card, .steps li { transition: transform .35s ease, box-shadow .35s ease; }
  .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(51, 70, 58, .18); }
  .btn:active { transform: scale(.98); }
  .trio-card:hover, .class-card:hover, .steps li:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(51, 70, 58, .10); }

  /* ===== 動き（M1：ヒーロー切り替え＋緩やかなズーム） ===== */
  .hero-zoom { animation: heroZoom 16s ease-in-out infinite alternate; }
  .hero-img-b { animation: heroCross 16s ease-in-out infinite; }
  @keyframes heroZoom {
    from { transform: scale(1); }
    to   { transform: scale(1.06); }
  }
  @keyframes heroCross {
    0%, 38%   { opacity: 0; }
    50%, 88%  { opacity: 1; }
    100%      { opacity: 0; }
  }
}

/* ===== 動き（M2：出現フェード） =====
   初期非表示は html.js-motion のときだけ。JS無効・reduced-motion では一切付けない */
.js-motion .rv {
  opacity: 0; transform: translateY(14px);
  transition: opacity .7s ease var(--d, 0s), transform .7s ease var(--d, 0s);
}
.js-motion .rv.on { opacity: 1; transform: none; }

@media (max-width: 720px) {
  .hero h1 { font-size: 1.8rem; }
  .trio, .class-grid, .stats-block .stats { grid-template-columns: 1fr; }
  .stat-num { font-size: 2.2rem; }
  .cta-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
    padding-bottom: env(safe-area-inset-bottom); background: var(--main);
  }
  .cta-bar a { flex: 1; text-align: center; color: #fff; font-weight: 700; padding: 15px 4px; text-decoration: none; }
  .cta-bar .cta-tel { background: var(--cta); }
}

/* ================================================================
   インタラクション・フィードバック標準 v1（IF-STD v1 / 2026-11-18）
   仕様の正本: templates/motion-parts.md「インタラクション・フィードバック標準」
   押せる要素すべてに「触っているのが分かる」反応を付ける共通ルール。
   骨格（0.2秒・イージング・変化量）は全サイト統一。色は各サイトの変数を使う。
   ================================================================ */
:root {
  --if-dur: .2s;
  --if-ease: cubic-bezier(.25, .7, .3, 1);
  --if-focus: var(--cta, #9e3b26);
  --if-shadow: 0 8px 20px rgba(43, 36, 28, .16);
  --if-shadow-sm: 0 3px 8px rgba(43, 36, 28, .14);
}

/* 下地：色・影・透明度・下線は常になめらかに変化させる（動き自体は付けない） */
a, button, [role="button"], summary {
  -webkit-tap-highlight-color: transparent;
  transition: color var(--if-dur) var(--if-ease),
    background-color var(--if-dur) var(--if-ease),
    border-color var(--if-dur) var(--if-ease),
    box-shadow var(--if-dur) var(--if-ease),
    opacity var(--if-dur) var(--if-ease),
    text-decoration-color var(--if-dur) var(--if-ease);
}

/* 本文中テキストリンク：動きでなく、下線の太さで反応する */
a:hover { text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* 押した瞬間の反応（スマホのタップでも効く） */
a:active, button:active, [role="button"]:active { opacity: .72; }

/* キーボード操作時の位置表示（消さない） */
a:focus-visible, button:focus-visible, [role="button"]:focus-visible,
summary:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--if-focus);
  outline-offset: 2px;
}

/* ボタン・カードの「浮く／沈む」は、動きを減らす設定でない環境でのみ付ける */
@media (prefers-reduced-motion: no-preference) {
  .btn, .btn-main, .btn-sub, .btn-ghost, .btn-tel, .btn-light,
  .cta-tel, .cta-map, .cta-mail, .cta-price, .mail-big,
  button, input[type="submit"], input[type="button"], [role="button"],
  .card, .sample-card, .works-card, .staff-card, .feature-card,
  .svc-card, .stock-card, .set-card, .trio-card, .class-card {
    transition: color var(--if-dur) var(--if-ease),
      background-color var(--if-dur) var(--if-ease),
      border-color var(--if-dur) var(--if-ease),
      box-shadow var(--if-dur) var(--if-ease),
      opacity var(--if-dur) var(--if-ease),
      transform var(--if-dur) var(--if-ease);
  }
  .btn:hover, .btn-main:hover, .btn-sub:hover, .btn-ghost:hover,
  .btn-tel:hover, .btn-light:hover,
  .cta-tel:hover, .cta-map:hover, .cta-mail:hover, .cta-price:hover,
  .mail-big:hover, button:hover, [role="button"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--if-shadow);
  }
  .btn:active, .btn-main:active, .btn-sub:active, .btn-ghost:active,
  .btn-tel:active, .btn-light:active,
  .cta-tel:active, .cta-map:active, .cta-mail:active, .cta-price:active,
  .mail-big:active, button:active, [role="button"]:active {
    transform: translateY(0) scale(.98);
    box-shadow: var(--if-shadow-sm);
    opacity: 1;
  }
  .card:hover, .sample-card:hover, .works-card:hover, .staff-card:hover,
  .feature-card:hover, .svc-card:hover, .stock-card:hover, .set-card:hover,
  .trio-card:hover, .class-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--if-shadow);
  }
}

/* 動きを減らす設定：動きは止め、色の変化だけを即時に効かせる */
@media (prefers-reduced-motion: reduce) {
  a, button, [role="button"], summary,
  .card, .sample-card, .works-card, .staff-card, .feature-card,
  .svc-card, .stock-card, .set-card, .trio-card, .class-card {
    transition: none;
  }
}
