:root {
  --base: #f8f7ef;
  --surface: #ffffff;
  --ink: #2e3524;
  --sub: #556045;
  --accent: #4a7c2f;
  --line: #d8dcc8;
  --cta: #4a7c2f;
  --radius: 14px;
}

* { box-sizing: border-box; }

/* M6 なめらかなページ内スクロール（動きOKのときだけ） */
html.js-motion { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--base);
  color: var(--ink);
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 16px;
  line-height: 1.85;
  font-weight: 500;
  padding-bottom: 64px;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, .sec-title, .footer-logo { font-family: "Shippori Mincho", serif; font-weight: 700; }

/* ---------- リンクの反応（共通） ---------- */
a {
  color: var(--accent);
  transition: color .2s cubic-bezier(.25,.7,.3,1), opacity .2s cubic-bezier(.25,.7,.3,1);
}
a:hover { color: var(--ink); }
a:active { opacity: .72; }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.sample-banner {
  background: #2e3524;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  padding: 8px 16px;
}

/* ---------- ヘッダー ---------- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  max-width: 1180px;
  margin: 0 auto;
}

.logo { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.2; font-family: "Shippori Mincho", serif; }
.logo a { color: var(--ink); text-decoration: none; }
.logo small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .18em; color: var(--accent); font-family: "Zen Kaku Gothic New", sans-serif; }

.header-tel { margin: 0; font-weight: 700; }
.header-tel a {
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 7px 16px;
  background: var(--surface);
  transition: background-color .2s cubic-bezier(.25,.7,.3,1), color .2s cubic-bezier(.25,.7,.3,1), transform .15s cubic-bezier(.25,.7,.3,1);
}
.header-tel a:hover { background: var(--base); }
.header-tel a:active { transform: scale(.98); opacity: 1; }

/* ---------- ヒーロー ---------- */
.hero { background: var(--base); }
.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 20px 8px;
  display: grid;
  gap: 26px;
}

.open-chip {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  border-radius: 999px;
  padding: 5px 16px;
  margin: 0 0 18px;
}

.hero h1 {
  font-size: clamp(34px, 8.6vw, 56px);
  line-height: 1.35;
  margin: 0 0 16px;
}
.hero-sub { margin: 0 0 14px; max-width: 36em; }
.hero-price { margin: 0 0 24px; font-size: 17px; }
.hero-price strong { color: var(--accent); font-size: 21px; font-weight: 700; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.photo-note { font-size: 13px; color: var(--sub); margin: 16px 0 0; }
.hero-img { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.hero-img img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  transition: transform .2s cubic-bezier(.25,.7,.3,1), box-shadow .2s cubic-bezier(.25,.7,.3,1), background-color .2s cubic-bezier(.25,.7,.3,1), color .2s cubic-bezier(.25,.7,.3,1);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(46, 53, 36, .16);
}
.btn:active { transform: translateY(0) scale(.98); box-shadow: none; opacity: 1; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-main { background: var(--cta); color: #ffffff; }
.btn-main:hover { color: #ffffff; }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--accent); }
.btn-ghost:hover { color: var(--ink); }
.btn-ghost2 { border: 1px solid var(--line); background: var(--surface); }
.btn-ghost2:hover { color: var(--ink); }

/* ---------- ブロック共通 ---------- */
main { display: block; }
.block { max-width: 1080px; margin: 0 auto; padding: 64px 20px 8px; }

.sec-label {
  font-size: 13px;
  letter-spacing: .22em;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  margin: 0 0 10px;
}
.sec-title {
  font-size: clamp(28px, 7vw, 40px);
  line-height: 1.4;
  margin: 0 0 18px;
}
.sec-lead { margin: 0 0 24px; max-width: 42em; color: var(--ink); }

/* ---------- M12 写真の帯（畑の一年） ---------- */
.band {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 18px;
  /* M12の移動量計算（100cqw＝帯の表示幅）の基準にする */
  container-type: inline-size;
}
.band-track {
  display: flex;
  gap: 18px;
  width: max-content;
}
.band-item { margin: 0; flex: 0 0 262px; }
.band-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
}
.band-item figcaption {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  padding-top: 8px;
  line-height: 1.6;
}

/* M12：ページ全体のスクロール量に連動して帯を横に流す。
   対応ブラウザ（Chrome 115+ / Safari 26+）でのみ有効化する。
   移動量は固定率ではなく「トラック全幅 − 帯の表示幅（100cqw）」で計算し、
   帯の最後の写真まで必ず画面内に入り切るようにする。
   animation-range で動きをページ前半（帯が画面内にある区間）に寄せ、
   帯が見えている間に流れ切るようにする。 */
@supports (animation-timeline: scroll()) {
  .band-track {
    animation: band-drift linear both;
    animation-timeline: scroll(root block);
    animation-range: 0% 45%;
  }
  @keyframes band-drift {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-100% + 100cqw)); }
  }
}

/* M12フォールバック：スクロール連動に未対応のブラウザでは、
   帯を横スクロール可能にして全ての写真に利用者が到達できるようにする。
   品目・値段の情報は直後の静的グリッドが正本として担保する。 */
@supports not (animation-timeline: scroll()) {
  .band {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
}

/* ---------- 今週の直売所（静的グリッド） ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s cubic-bezier(.25,.7,.3,1), box-shadow .2s cubic-bezier(.25,.7,.3,1);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(46, 53, 36, .16);
}
.card:active { transform: translateY(0) scale(.98); box-shadow: none; }
.card-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-text { padding: 18px 20px 20px; }
.card-text h3 { font-size: 19px; font-weight: 700; margin: 0 0 6px; }
.card-text p { margin: 0 0 8px; }
.card-price { font-size: 20px; font-weight: 700; color: var(--accent); margin: 0; }

/* ---------- 園主 ---------- */
.owner-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.owner-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 30%; }
.owner-text { padding: 24px 24px 28px; }
.owner-name { font-size: 19px; font-weight: 700; margin: 0 0 8px; font-family: "Shippori Mincho", serif; }
.owner-text p { margin: 0 0 10px; }
.owner-note { font-size: 13px; color: var(--sub); }

/* ---------- 体験の流れ ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; }
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px 22px;
}
.step-num {
  margin: 0 0 8px;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--cta);
  color: #ffffff;
  font-weight: 700;
  font-size: 17px;
}
.step h3 { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.step p { margin: 0; }

/* ---------- 料金・店舗情報 ---------- */
table.price, table.info {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
table.price th, table.info th {
  text-align: left;
  font-weight: 700;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  width: 58%;
}
table.price td {
  text-align: right;
  font-weight: 700;
  font-size: 19px;
  color: var(--accent);
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.info td { padding: 15px 16px; border-bottom: 1px solid var(--line); }
table.price tr:last-child th, table.price tr:last-child td,
table.info tr:last-child th, table.info tr:last-child td { border-bottom: none; }
table.price small { display: block; font-weight: 500; color: var(--sub); font-size: 13px; }
.price-note { font-size: 14px; color: var(--sub); margin: 12px 0 0; }
.price-cta { margin: 22px 0 0; text-align: center; }

footer { margin-top: 72px; background: #2e3524; color: #ffffff; }
.footer-inner { max-width: 1080px; margin: 0 auto; padding: 30px 20px 38px; }
.footer-logo { font-size: 20px; margin: 0 0 8px; }
.footer-logo small { font-size: 12px; color: #e6e8d8; }
footer p { margin: 0 0 8px; font-size: 14px; }
.credits { font-size: 12px; color: #e6e8d8; }
footer a { color: #ffffff; }

.cta-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--line);
  z-index: 50;
}
.cta-bar a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  transition: background-color .2s cubic-bezier(.25,.7,.3,1), transform .15s cubic-bezier(.25,.7,.3,1);
}
.cta-bar a:active { transform: scale(.98); opacity: 1; }
.cta-bar .cta-tel { background: var(--cta); color: #ffffff; }

@media (min-width: 760px) {
  body { padding-bottom: 0; }
  .cta-bar { display: none; }
  .hero-inner { grid-template-columns: 1fr 1.1fr; align-items: center; padding-top: 30px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .owner-card { display: flex; }
  .owner-img { flex: 0 0 38%; }
  .owner-img img { height: 100%; aspect-ratio: auto; }
  .owner-text { flex: 1; padding: 30px 30px 32px; }
  .band-item { flex-basis: 300px; }
}

/* ---------- 動き（M2 出現フェード） ---------- */
.js-motion .rv {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s ease, transform .7s ease;
  transition-delay: var(--d, 0s);
}
.js-motion .rv.on { opacity: 1; transform: none; }

/* ---------- 動きを減らす設定では、動きを止めて色の変化だけ残す ---------- */
@media (prefers-reduced-motion: reduce) {
  .btn, a, .cta-bar a, .header-tel a, .card { transition: none; }
  .btn:hover, .card:hover { transform: none; box-shadow: none; }
  .btn:active, .cta-bar a:active, .header-tel a:active { transform: none; }
  /* M12：スクロール連動を無効化して帯を静止させ、代わりに横スクロールで全写真に届くようにする */
  .band-track { animation: none; animation-timeline: none; }
  .band { overflow-x: auto; overflow-y: hidden; }
  .card:active { transform: none; }
}

/* ================= IF-STD v1 =================
   インタラクション・フィードバック標準（templates/motion-parts.md）準拠。
   ボタンは上の各規則で「浮く／沈む＋影・色」を実装し、本文リンクは色の変化のみ。
   時間0.2秒・イージング cubic-bezier(.25,.7,.3,1)・:active と :focus-visible 必須。
   reduced-motion では末尾のメディアクエリで動きを止め、色の変化だけを即時に効かせる。 */
