/* ============================================================
   おむすび堂 — メインスタイルシート
   カラーはすべて var(--color-*) で管理。直接値の記述禁止。
   ============================================================ */

/* ===== CSS 変数（ブランドカラートークン） ===== */
:root {
  --color-primary:     #FFFFFF; /* 白米         — 白文字・白ボタン（暗い背景上で使う） */
  --color-sub-primary: #e2e1e0; /* 白米サブ     — サーフェス背景 */
  --color-muted:       #2A2018; /* 玄米         — ダーク背景・ボーダー・アクセント文字 */
  --color-text-dark:   #1F1F1F; /* 本文テキスト — ほぼ黒 */
}

/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

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

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

ul {
  list-style: none;
}

/* ===== ベーススタイル ===== */
body {
  font-family: 'Zen Old Mincho', 'Google Sans', serif;
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text-dark);
  background-color: #fff;
}

/* ===== レイアウト ===== */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-large {
  padding: 100px 0;
}

/* 2カラムレイアウト */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

/* プロダクトグリッド */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* TOP のメニュー抜粋は4品を横一列に
   （bare 属性セレクタにして、後段のレスポンシブ指定が効くようにする） */
[data-render="menu-excerpt"] {
  grid-template-columns: repeat(4, 1fr);
}

/* ===== コンポーネント ===== */

/* セクション見出し */
.section-heading {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.section-subheading {
  font-size: 18px;
  font-weight: 500;
  color: var(--color-text-dark);
  margin-bottom: 32px;
  line-height: 1.6;
}

/* アウトラインボタン（メイン） */
.btn-outline {
  display: inline-block;
  padding: 10px 28px;
  border: 1px solid var(--color-muted);
  color: var(--color-muted);
  background: transparent;
  font-size: 12px;
  font-family: 'Zen Old Mincho', serif;
  letter-spacing: 0.1em;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-outline:hover {
  background: var(--color-muted);
  color: var(--color-primary);
}

/* テキストリンク */
.link-arrow {
  font-size: 13px;
  color: var(--color-muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: opacity 0.2s;
}

.link-arrow::after {
  content: ' 〉';
}

.link-arrow:hover {
  opacity: 0.7;
}

/* タグ */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border: 0.5px solid var(--color-muted);
  color: var(--color-muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  border-radius: 2px;
  background: transparent;
}

/* ===== グローバルナビゲーション ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--color-sub-primary);
  transition: background 0.3s;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ロゴ */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.site-logo__img {
  height: 56px;
  width: auto;
}

.site-logo__text {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-dark);
  letter-spacing: 0.08em;
}

/* ナビリンク */
.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav__link {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-dark);
  letter-spacing: 0.1em;
  transition: color 0.2s;
}

.site-nav__link:hover,
.site-nav__link.is-active {
  color: var(--color-muted);
}

/* SNS リンク */
.site-nav__sns {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid var(--color-sub-primary);
}

.site-nav__sns-link {
  font-size: 11px;
  color: var(--color-text-dark);
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.site-nav__sns-link:hover {
  color: var(--color-muted);
}

/* ハンバーガーメニュー（モバイル） */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--color-text-dark);
  transition: transform 0.25s, opacity 0.25s;
}

/* ===== ヒーローセクション ===== */
.hero {
  position: relative;
  width: 100%;
  height: 700px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: var(--color-muted);
}

/* ヒーロー背景画像 */
.hero__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* オーバーレイ */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--color-muted);
  opacity: 0.5;
}

/* テキストエリア：max-width 1080px 内に収め、右寄せ縦書き */
.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 100px 40px 100px 0;
}

/* h1 が右端・p がその左に並ぶ
   700px height - padding(100+100) = 500px がテキストの最大縦幅 */
.hero__vertical {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  gap: 48px;
  max-height: 500px;
  overflow: hidden;
}

.hero__title,
.hero__body {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* 店舗名 — 最右列・大見出し */
.hero__title {
  font-size: 56px;
  font-weight: 500;
  color: var(--color-primary);
  line-height: 1.6;
  letter-spacing: 0.15em;
}

/* ボディコピー */
.hero__body {
  font-size: 22px;
  font-weight: 400;
  color: var(--color-primary);
  line-height: 2.2;
  letter-spacing: 0.1em;
}

/* ===== コンセプトセクション ===== */
.concept {
  background: #fff;
}

.concept__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* コンセプト動画（縦長素材を程よい縦横比で表示） */
.concept__media {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--color-sub-primary);
}

.concept__text p {
  font-size: 14px;
  line-height: 2.0;
  color: var(--color-text-dark);
  margin-bottom: 20px;
}

.concept__text p:last-child {
  margin-bottom: 0;
}

/* ===== メニューセクション ===== */
.menu {
  background: var(--color-sub-primary);
}

.menu-card {
  background: #fff;
}

.menu-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.menu-card__body {
  padding: 16px 10px 8px;
}

.menu-card__name {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-dark);
  margin-bottom: 6px;
}

.menu-card__desc {
  font-size: 13px;
  color: var(--color-text-dark);
  line-height: 1.8;
  margin-bottom: 10px;
}

.menu-card__price {
  font-size: 13px;
  font-family: monospace;
  color: var(--color-muted);
  letter-spacing: 0.05em;
}

.menu-card__note {
  font-size: 11px;
  color: var(--color-muted);
  line-height: 1.6;
  margin-top: 4px;
}

/* ===== お米へのこだわりセクション ===== */
.rice {
  background: #fff;
}

.rice__image-main {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.rice__text h3 {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text-dark);
  margin-bottom: 20px;
  line-height: 1.6;
}

.rice__text p {
  font-size: 14px;
  line-height: 2.0;
  color: var(--color-text-dark);
  margin-bottom: 16px;
}

.rice__text p:last-child {
  margin-bottom: 0;
}

.rice__detail {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-sub-primary);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rice__detail-item {
  display: flex;
  gap: 16px;
  font-size: 13px;
}

.rice__detail-label {
  color: var(--color-muted);
  letter-spacing: 0.05em;
  min-width: 60px;
  font-size: 11px;
  padding-top: 2px;
}

.rice__detail-value {
  color: var(--color-text-dark);
}

/* ===== 店舗情報セクション ===== */
.shop {
  background: var(--color-sub-primary);
}

.shop__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.shop__info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.shop__info-block h3 {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.shop__info-block p,
.shop__info-block address {
  font-style: normal;
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text-dark);
}

.shop__map {
  width: 100%;
  aspect-ratio: 4 / 3;
}

.shop__map iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ===== お問い合わせセクション ===== */
.contact {
  background: #fff;
}

.contact__lead {
  font-size: 14px;
  color: var(--color-text-dark);
  line-height: 2.0;
  margin-bottom: 40px;
  max-width: 560px;
}

.contact__form-wrapper {
  width: 100%;
  min-height: 520px;
  background: var(--color-sub-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact__form-note {
  font-size: 12px;
  color: var(--color-text-dark);
  letter-spacing: 0.05em;
  text-align: center;
}

/* ===== フッター ===== */
.site-footer {
  background: var(--color-sub-primary);
  padding: 60px 0 40px;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.site-footer__logo {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text-dark);
  letter-spacing: 0.1em;
}

.site-footer__sns {
  display: flex;
  gap: 24px;
}

.site-footer__sns-link {
  font-size: 11px;
  color: var(--color-text-dark);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.site-footer__sns-link:hover {
  color: var(--color-muted);
}

.site-footer__nav {
  display: flex;
  gap: 24px;
}

.site-footer__nav-link {
  font-size: 11px;
  color: var(--color-text-dark);
  letter-spacing: 0.06em;
  transition: color 0.2s;
}

.site-footer__nav-link:hover {
  color: var(--color-muted);
}

.site-footer__copy {
  font-size: 11px;
  color: var(--color-text-dark);
  letter-spacing: 0.04em;
  margin-top: 8px;
}

/* ===== 区切り線 ===== */
.divider {
  border: none;
  border-top: 1px solid var(--color-sub-primary);
  margin: 0;
}

/* ============================================================
   下層ページ共通（固定ヘッダー分の余白・ページ見出し）
   ============================================================ */
.subpage {
  padding-top: 56px; /* 固定ヘッダー(56px)分を確保 */
}

.page-intro {
  text-align: center;
}

.page-intro .section-heading {
  margin-bottom: 8px;
}

.page-intro__lead {
  font-size: 14px;
  line-height: 2.0;
  color: var(--color-text-dark);
  max-width: 600px;
  margin: 0 auto;
}

/* メニュー抜粋下の「すべて見る」導線など */
.section-action {
  margin-top: 40px;
  text-align: center;
}

/* ============================================================
   白米/玄米トグル
   ============================================================ */
.rice-toggle {
  display: flex;
  width: fit-content;
  border: 1px solid var(--color-muted);
  border-radius: 0;
  margin: 0 auto 32px; /* 中央配置 */
}

.rice-toggle__btn {
  min-width: 110px;          /* クリック領域を確保 */
  padding: 12px 28px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--color-muted);
  color: var(--color-muted);
  font-family: 'Zen Old Mincho', serif;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.2s, color 0.2s;
}

.rice-toggle__btn:last-child {
  border-right: none;
}

/* 未選択ボタンのホバー：クリックできることを示す */
.rice-toggle__btn:not(.is-active):hover {
  background: var(--color-sub-primary);
}

.rice-toggle__btn.is-active {
  background: var(--color-muted);
  color: var(--color-primary);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.25); /* 選択時の押し込み感 */
}

/* ランチセット — 1枚のイメージ画像（16:9） */
.set-menu {
  margin: 0 0 16px;
}

.set-menu__image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  background: var(--color-sub-primary);
}

.set-menu__lead {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text-dark);
  margin: 0 0 6px;
}

.set-menu__note {
  font-size: 11px;
  color: var(--color-muted);
  margin: 0 0 56px;
}

/* 白米/玄米の説明文（トグル直下に表示） */
.rice-desc {
  max-width: 760px;
  margin: -8px 0 36px;
  font-size: 14px;
  line-height: 2.0;
  color: var(--color-text-dark);
}

/* ============================================================
   カルーセル（写真複数枚）
   ============================================================ */
/* Instagram アイコン */
.icon-instagram {
  display: block;
  width: 20px;
  height: 20px;
}

.farmer-card__link .icon-instagram {
  display: inline-block;
  vertical-align: -3px;
  width: 16px;
  height: 16px;
  margin-right: 6px;
}

.carousel {
  position: relative;
  width: 100%;
}

.carousel__viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--color-sub-primary);
}

/* 単品メニューカードの写真は縦長 */
.menu-card .carousel__viewport {
  aspect-ratio: 3 / 4;
}

.carousel__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.carousel__slide.is-active {
  opacity: 1;
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  touch-action: manipulation; /* SPでの連続タップによるダブルタップズームを抑制 */
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  border: 1px solid var(--color-muted);
  color: var(--color-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 0;
  opacity: 0.85;
  transition: opacity 0.2s, background 0.2s, color 0.2s;
}

.carousel__btn:hover {
  opacity: 1;
  background: var(--color-muted);
  color: var(--color-primary);
}

.carousel__btn--prev { left: 8px; }
.carousel__btn--next { right: 8px; }

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.carousel__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--color-muted);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  touch-action: manipulation; /* ダブルタップズーム抑制 */
}

.carousel__dot.is-active {
  background: var(--color-muted);
}

/* ============================================================
   セット・詰め合わせ（目立たせ枠）
   ============================================================ */
.product-sets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 64px;
}

.product-set {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--color-muted);
}

.product-set__media .carousel__viewport {
  aspect-ratio: 3 / 4; /* 商品写真は縦長 */
}

.product-set__body {
  padding: 24px 24px 28px;
}

.product-set__label {
  display: inline-block;
  padding: 3px 12px;
  border: 0.5px solid var(--color-muted);
  color: var(--color-muted);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 2px;
  margin-bottom: 12px;
}

.product-set__name {
  font-size: 18px;
  font-weight: 500;
  color: var(--color-text-dark);
  margin-bottom: 10px;
}

.product-set__desc {
  font-size: 13px;
  line-height: 1.9;
  color: var(--color-text-dark);
  margin-bottom: 14px;
}

.product-set__price {
  font-size: 16px;
  font-family: monospace;
  color: var(--color-muted);
  letter-spacing: 0.05em;
}

/* ============================================================
   農家さんカード
   ============================================================ */
.farmers-list {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.farmer-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.farmer-card:nth-child(even) .farmer-card__media {
  order: 2;
}

.farmer-card__media .carousel__viewport {
  aspect-ratio: 4 / 3;
}

/* 農家写真は比率がまちまちなので、見切れないよう全体表示にする
   （余白はサーフェス色で整える） */
.farmer-card__media .carousel__slide {
  object-fit: contain;
}

.farmer-card__name {
  font-size: 20px;
  font-weight: 500;
  color: var(--color-text-dark);
  margin-bottom: 12px;
}

.farmer-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 20px;
}

.farmer-card__meta-item {
  font-size: 12px;
  color: var(--color-muted);
  letter-spacing: 0.05em;
}

.farmer-card__meta-item + .farmer-card__meta-item {
  padding-left: 16px;
  border-left: 1px solid var(--color-sub-primary);
}

.farmer-card__text p {
  font-size: 14px;
  line-height: 2.0;
  color: var(--color-text-dark);
  margin-bottom: 16px;
}

.farmer-card__text p:last-child {
  margin-bottom: 0;
}

.farmer-card__links {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.farmer-card__link {
  display: inline-block;
  padding: 8px 20px;
  border: 1px solid var(--color-muted);
  color: var(--color-muted);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  border-radius: 0;
  transition: background 0.2s, color 0.2s;
}

.farmer-card__link:hover {
  background: var(--color-muted);
  color: var(--color-primary);
}

/* ===== レスポンシブ（768px 以下） ===== */
@media (max-width: 768px) {
  .section-large {
    padding: 60px 0;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  /* 白米/玄米トグルは横幅いっぱい・大きめタップ領域に */
  .rice-toggle {
    display: flex;
    width: 100%;
    max-width: 320px;
  }

  .rice-toggle__btn {
    flex: 1;
    padding: 12px 0;
  }

  /* カルーセル操作をタップしやすく */
  .carousel__btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .carousel__dots {
    gap: 12px;
    margin-top: 12px;
  }

  .carousel__dot {
    width: 10px;
    height: 10px;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .shop__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* セット・農家カードを1カラムに */
  .product-sets {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 48px;
  }

  .farmer-card {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .farmer-card:nth-child(even) .farmer-card__media {
    order: 0; /* モバイルでは写真を常に上に */
  }

  .farmers-list {
    gap: 48px;
  }

  /* ヒーロー縦書き — モバイル調整
     高さ 700px はそのまま、padding を縮小して確保 */
  .hero__content {
    /* 固定ヘッダー(56px)の下に余白を確保し、上の詰まりを解消 */
    padding: 96px 20px 56px 0;
    max-width: 100%;
  }

  .hero__vertical {
    gap: 24px;
    max-height: 548px; /* 700px - 96px - 56px */
  }

  .hero__title {
    font-size: 38px;
  }

  .hero__body {
    font-size: 15px;
  }

  /* モバイルナビ */
  .site-nav {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    text-align: center;
    z-index: 99;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav__link {
    font-size: 16px;
    color: var(--color-text-dark);
  }

  .site-nav__sns {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.is-open .nav-toggle__bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-toggle.is-open .nav-toggle__bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.is-open .nav-toggle__bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  /* スマホの文字を読みやすく（通常16px・見出し18〜24px） */
  body { font-size: 16px; }

  .section-heading { font-size: 22px; }
  .section-subheading { font-size: 18px; }
  .menu-card__name { font-size: 18px; }
  .rice__text h3 { font-size: 18px; }
  .product-set__name { font-size: 20px; }
  .farmer-card__name { font-size: 20px; }

  .concept__text p,
  .rice__text p,
  .farmer-card__text p,
  .shop__info p,
  .shop__info address,
  .page-intro__lead,
  .rice-desc,
  .set-menu__lead,
  .product-set__desc,
  .menu-card__desc {
    font-size: 16px;
    line-height: 1.9;
  }

  .menu-card__price { font-size: 16px; }
}

@media (max-width: 480px) {
  /* 最小幅ではメニューを1列にして、大きめの文字を読みやすく */
  .products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .container {
    padding: 0 16px;
  }

  .site-header__inner {
    padding: 0 16px;
  }
}
