/* =========================================================================
   カフェテンプレート スタイル(古民家カフェ / ナチュラル)
   配色の切り替えは下の :root 変数を差し替えるだけ(README「配色の切り替え」)。
   変数名・クラス名は他テンプレート(restaurant/juku/dojo)と共通化してあり、
   .faq-* / .form-note / .float-cta などのブロックは相互にコピーできる。
   デザイン原則:
   - 明色アクセント(テラコッタ)を白背景に器(丸・帯)として置かない。
     濃色(深緑)の上の小さなマーク・細い線としてのみ使う(CLAUDE.md の鉄則を準用)
   - 見出しは Zen Old Mincho。明朝は行ボックスが膨張するため line-height を明示する
   ========================================================================= */

:root {
  /* --- 配色(古民家カフェ:深緑 × テラコッタ × 生成り) ---
     業態で差し替える例(いずれも --accent は白文字が載る濃さを保つこと):
       山カフェ・緑     --accent: #A85A3C(テラコッタ)  ← 既定
       ベーカリー       --accent: #9C6B3F(きつね色)
       海カフェ         --sumi: #24404A(濃藍) / --accent: #C06A4A(珊瑚)
  */
  --sumi: #2E3A2C;          /* 深緑:森のような濃色。濃色セクション・見出し(役割は他テンプレの「墨」) */
  --sumi-2: #3D4B39;        /* 深緑の明るめ(グラデ・ホバー) */
  --accent: #A85A3C;        /* テラコッタ:ボタン・アクセント。白文字が載る濃さを保つこと */
  --accent-soft: #D89A76;   /* テラコッタの明るめ:濃色背景の上の文字・マーク専用 */

  --paper: #FAF6EE;         /* 生成りの紙色(ページ地) */
  --paper-2: #F1EBDD;       /* 淡い生成り(セクション地) */
  --ink: #33352E;
  --ink-muted: #75776C;
  --line: #E4DDCE;

  /* --- タイポ --- */
  --font-head: "Zen Old Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --font-en: "Cormorant Garamond", "Zen Old Mincho", serif; /* 英字アクセント(黒板風) */
  --font-body: "Zen Kaku Gothic New", "Yu Gothic", "Noto Sans JP", sans-serif;

  --wrap: 1080px;
  --radius: 10px;
  --shadow: 0 12px 32px rgba(46, 58, 44, 0.12);
  --shadow-sm: 0 3px 12px rgba(46, 58, 44, 0.07);
}

/* --------------------------------------------------------------- base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt" 1;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
/* 明朝見出し:line-height 明示(行ボックス膨張対策) */
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.5; margin: 0; letter-spacing: .04em; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
/* アンカー着地時にstickyヘッダーで見出しが隠れないように */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; scroll-margin-top: 68px; }
.section--tint { background: var(--paper-2); }
.section--dark { background: var(--sumi); color: #fff; }

/* 画像プレースホルダ(顧客写真に差し替える枠) */
.ph {
  position: relative;
  background:
    linear-gradient(135deg, rgba(46,58,44,.05), rgba(46,58,44,.02)),
    repeating-linear-gradient(45deg, #EEE8D9 0 12px, #E7E0CF 12px 24px);
  display: grid; place-items: center;
  color: var(--ink-muted);
  font-size: .8rem; letter-spacing: .06em; text-align: center;
  border-radius: var(--radius);
  padding: 1rem;
}
.ph::after { content: attr(data-label); }

/* --------------------------------------------------------- demo banner */
.demobar {
  background: var(--sumi);
  color: rgba(255,255,255,.85);
  font-size: .78rem;
  text-align: center;
  padding: .4rem 1rem;
  letter-spacing: .02em;
}
.demobar b { color: var(--accent-soft); font-weight: 700; }

/* -------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,246,238,.94);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; }
/* ロゴ=濃色の丸 × 明色のマーク(鉄則の基本形) */
.brand__mark {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--sumi);
  display: grid; place-items: center; flex: none;
}
.brand__mark span {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent-soft);
}
.brand__name { font-family: var(--font-head); font-weight: 700; color: var(--sumi); font-size: 1.2rem; line-height: 1.4; letter-spacing: .06em; }
.brand__name small { display: block; font-size: .58rem; letter-spacing: .3em; color: var(--ink-muted); font-weight: 500; font-family: var(--font-en); }

.nav { display: flex; align-items: center; gap: 1.7rem; }
.nav a { text-decoration: none; }
.nav a:not(.btn) {
  color: var(--sumi); font-family: var(--font-head); font-weight: 600; font-size: .95rem;
  letter-spacing: .08em; line-height: 1.5; position: relative; padding: .2rem 0;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 0;
  background: var(--accent); transition: width .2s ease;
}
.nav a:not(.btn):hover::after { width: 100%; }

.nav-toggle { display: none; background: none; border: 0; padding: .4rem; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--sumi); margin: 5px 0; transition: .25s; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-head); font-weight: 700; line-height: 1.5; letter-spacing: .08em;
  padding: .8rem 1.7rem; border-radius: 6px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; font-size: 1rem;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(1px); }
/* 白背景で使う主ボタン=深緑塗り+白文字 */
.btn--primary { background: var(--sumi); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--sumi-2); }
/* テラコッタボタン=白文字が載る濃さなので白背景でも濃色背景でも使える */
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { filter: brightness(1.08); }
/* 濃色背景の上の従ボタン=白枠 */
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn--ghost:hover { border-color: #fff; }
.btn--sm { padding: .5rem 1.15rem; font-size: .88rem; }

/* ----------------------------------------------------------------- hero */
/* washi 型:縦書き明朝＋和紙テクスチャ(古民家カフェの設え)。正典は ../../hero-patterns/README.md。
   写真は背景div(.heroB__photo)で graceful degradation=未設置なら --sumi-2 の地が出る。 */
.hero--washi {
  position: relative; overflow: hidden; color: #fff;
  min-height: clamp(480px, 78vh, 700px);
  display: flex; align-items: center;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.022) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.015) 0 1px, transparent 1px 4px),
    radial-gradient(130% 120% at 15% 10%, var(--sumi-2), var(--sumi) 72%);
}
.hero--washi .wrap { position: relative; z-index: 2; width: min(var(--wrap), 100% - 2.5rem); }
.heroB__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 2.4rem; align-items: center; padding: clamp(2.5rem, 6vh, 4rem) 0; }
.heroB__photo {
  width: 100%; aspect-ratio: 3/4; max-height: 60vh;
  background: var(--sumi-2) center / cover no-repeat;   /* 写真未設置時のフォールバック地 */
  border-radius: 4px; border: 1px solid var(--accent-soft); box-shadow: 0 26px 54px rgba(0,0,0,.5);
}
.heroB__text { display: flex; flex-direction: row-reverse; gap: 1.4rem; align-items: center; }
.hero--washi h1 {
  writing-mode: vertical-rl; text-orientation: mixed;
  font-size: clamp(1.9rem, 4.4vw, 2.9rem); line-height: 1.7; letter-spacing: .14em; margin: 0;
  border-right: 1px solid var(--accent-soft); padding-right: 1.1rem;
}
.hero--washi h1 .accent { color: var(--accent-soft); }
.heroB__side { display: flex; flex-direction: column; gap: 1rem; }
/* 縦書き見出しの脇に置く説明・ボタン(eyebrow/lead/cta は共通スタイルを流用) */
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .7rem;
  font-family: var(--font-head); font-weight: 600; font-size: .82rem; letter-spacing: .16em;
  color: rgba(255,255,255,.9); line-height: 1.5;
}
.hero__eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-soft); flex: none; }
.hero__lead { font-size: 1rem; color: rgba(255,255,255,.9); max-width: 34ch; }
.hero__cta { display: flex; gap: .8rem; margin-top: .4rem; flex-wrap: wrap; }

@media (max-width: 860px) {
  .hero--washi { min-height: 0; }
  .heroB__grid { grid-template-columns: 1fr; }
  .heroB__text { flex-direction: column; align-items: flex-start; }
  .hero--washi h1 { writing-mode: horizontal-tb; border-right: 0; padding-right: 0; }  /* スマホは横書きに戻す */
  .heroB__photo { aspect-ratio: 16/10; max-height: none; }
}

/* ---------------------------------------------------------- section head */
.head { text-align: center; margin-bottom: 2.8rem; }
/* eyebrow:ピルをやめ、テラコッタの英字トラッキング文字に(黒板風) */
.head .eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--accent);
  font-family: var(--font-en); font-weight: 600; font-size: 1rem; letter-spacing: .26em;
  line-height: 1.5; text-transform: uppercase;
}
.head .eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.section--dark .head .eyebrow, .section--dark .head .eyebrow .dot { color: var(--accent-soft); background-color: transparent; }
.section--dark .head .eyebrow .dot { background: var(--accent-soft); }
.head h2 { font-size: clamp(1.6rem, 4vw, 2.25rem); margin-top: .7rem; color: var(--sumi); line-height: 1.5; }
/* 見出し下の短いテラコッタ線(控えめな印) */
.head h2::after {
  content: ""; display: block; width: 44px; height: 2px;
  background: var(--accent); margin: 1.1rem auto 0;
}
.section--dark .head h2 { color: #fff; }
.section--dark .head h2::after { background: var(--accent-soft); }
.head p { color: var(--ink-muted); margin: 1rem 0 0; }
.section--dark .head p { color: rgba(255,255,255,.72); }

/* ------------------------------------------------------------ menu cards */
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.dish {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .2s ease;
}
.dish:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.dish .ph { aspect-ratio: 4/3; border-radius: 0; }
.dish__img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; display: block; }
.dish__body { padding: 1.15rem 1.25rem 1.4rem; }
.dish__name {
  font-size: 1.12rem; color: var(--sumi); line-height: 1.5;
  display: flex; justify-content: space-between; align-items: baseline; gap: .6rem;
}
.dish__price { font-family: var(--font-head); font-weight: 700; color: var(--accent); white-space: nowrap; }
.dish__price small { font-size: .68em; font-weight: 600; }
.dish__desc { color: var(--ink-muted); font-size: .9rem; margin: .55rem 0 0; }
/* 看板メニュー(D1から動的描画・写真なしのテキストカード)。本体パディングを少し厚めに */
.dish--text .dish__body { padding: 1.25rem 1.3rem 1.4rem; }
.dish.is-soldout .dish__name { text-decoration: line-through; opacity: .5; }
.menu-note { text-align: center; color: var(--ink-muted); font-size: .85rem; margin-top: 1.7rem; }

/* --------------------------------------------------------------- feature */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.feature + .feature { margin-top: 3.2rem; }
.feature--rev .feature__media { order: 2; }
.feature__media .ph, .feature__ph { aspect-ratio: 5/4; }
.feature__img { width: 100%; height: auto; aspect-ratio: 5/4; object-fit: cover; display: block; border-radius: var(--radius); }
.feature__kicker {
  font-family: var(--font-head); font-weight: 600; color: var(--accent); font-size: .92rem;
  letter-spacing: .16em; line-height: 1.6;
}
.feature h3 { font-size: clamp(1.35rem, 3.4vw, 1.85rem); color: var(--sumi); margin: .5rem 0 .9rem; line-height: 1.5; }
.feature p { color: var(--ink-muted); }

/* --------------------------------------------------------------- gallery */
/* おしゃれカフェの要:あえて不均等なタイル(縦長・横長を混ぜる)で写真の世界観を見せる */
.gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 200px; gap: 1rem;
}
.gallery-item { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; }
.gallery-item .ph { position: absolute; inset: 0; border-radius: 0; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-item--tall { grid-row: span 2; }
.gallery-item--wide { grid-column: span 2; }
/* キャプションは写真下部にそっと重ねる(白背景の器にしない=鉄則) */
.gallery-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.4rem .9rem .7rem;
  background: linear-gradient(0deg, rgba(30,38,28,.78), transparent);
  color: #fff; font-size: .82rem; letter-spacing: .04em; line-height: 1.5;
}

/* ------------------------------------------------------------------ news */
.news-cta { text-align: center; max-width: 620px; margin-inline: auto; }
.news-cta p { color: rgba(255,255,255,.82); margin: .6rem 0 1.7rem; }
/* 直近のお知らせ(JSが /news/latest.json から描画。hidden時は完全に消す) */
.news-list { list-style: none; padding: 0; margin: 0 auto 1.8rem; max-width: 560px; text-align: left; border-top: 1px solid rgba(255,255,255,.14); }
.news-list[hidden] { display: none; }
.news-list li { display: flex; gap: 1.1rem; align-items: baseline; padding: .85rem .2rem; border-bottom: 1px solid rgba(255,255,255,.14); }
.news-list .d { font-family: var(--font-en); color: var(--accent-soft); font-size: .9rem; letter-spacing: .06em; flex: none; line-height: 1.6; }
.news-list .t { color: rgba(255,255,255,.92); text-decoration: none; font-size: .95rem; line-height: 1.6; min-width: 0; }
.news-list .t:hover { color: #fff; text-decoration: underline; }

/* ------------------------------------------------------------------ info */
.info-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: start; }
.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td { text-align: left; padding: .9rem .2rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.info-table th { width: 8em; color: var(--sumi); font-family: var(--font-head); font-weight: 700; font-size: .95rem; line-height: 1.6; }
.info-table td { color: var(--ink-muted); }
.info-tel { color: var(--sumi); font-weight: 700; }
.info-map { aspect-ratio: 4/3; }
.info-map iframe { width: 100%; height: 100%; border: 0; border-radius: var(--radius); display: block; }

/* ------------------------------------------------------------------ form */
.form-wrap { max-width: 640px; margin-inline: auto; }
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-weight: 700; color: var(--sumi); margin-bottom: .35rem; font-size: .95rem; }
.field .req { color: var(--accent); font-size: .78em; margin-left: .4rem; font-weight: 700; }
.field .opt { color: var(--ink-muted); font-size: .78em; margin-left: .4rem; font-weight: 500; }
.field input, .field textarea {
  width: 100%; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 6px;
  font: inherit; color: var(--ink); background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--sumi);
  box-shadow: 0 0 0 3px rgba(46,58,44,.10);
}
.field textarea { min-height: 140px; resize: vertical; }
.field small.hint { color: var(--ink-muted); font-size: .8rem; }
/* ハニーポット:視覚・スクリーンリーダーから隠す(ボット除け。空のまま送られる) */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { text-align: center; margin-top: 1.7rem; }
.form-status { margin-top: 1.2rem; padding: .9rem 1rem; border-radius: 6px; font-size: .92rem; display: none; }
.form-status.is-ok { display: block; background: #EDF3E7; color: #3E6B34; border: 1px solid #CBDCBC; }
.form-status.is-err { display: block; background: #F9ECE8; color: #A03A28; border: 1px solid #EACDC2; }
.form-status ul { margin: .4rem 0 0; padding-left: 1.1rem; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: #232C21; color: rgba(255,255,255,.72); padding: 3rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer .brand__name { color: #fff; }
.site-footer h4 { font-family: var(--font-head); font-weight: 600; letter-spacing: .12em; color: #fff; font-size: .95rem; line-height: 1.6; margin: 0 0 .8rem; }
.site-footer a { color: rgba(255,255,255,.72); text-decoration: none; }
.site-footer a:hover { color: var(--accent-soft); }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; font-size: .9rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1.3rem; font-size: .78rem; color: rgba(255,255,255,.5); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 860px) {
  .menu-grid { grid-template-columns: 1fr 1fr; }
  .feature, .info-grid, .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .feature--rev .feature__media { order: 0; }
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 170px; }
  .gallery-item--wide { grid-column: span 2; }

  .nav {
    position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .5rem 1.25rem 1.25rem;
    transform: translateY(-140%); transition: transform .28s ease; box-shadow: var(--shadow);
  }
  .nav.is-open { transform: translateY(0); }
  .nav a:not(.btn) { padding: .85rem .2rem; border-bottom: 1px solid var(--line); }
  .nav a.btn { margin-top: .9rem; }
  .nav-toggle { display: block; }
  .nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 520px) {
  .menu-grid { grid-template-columns: 1fr; }
  .hero__cta .btn { flex: 1 1 auto; }
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 130px; }
  .gallery-item--tall { grid-row: span 2; }
}

/* ------------------------------------------- FAQ(AIO対策セクション) */
.faq-list { max-width: 760px; margin-inline: auto; display: grid; gap: .8rem; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; gap: .8rem; align-items: baseline;
  padding: 1.05rem 1.15rem; font-weight: 700; color: var(--sumi);
  font-family: var(--font-head); line-height: 1.6;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "Q"; color: var(--accent); font-family: var(--font-en); font-weight: 600; flex: none; }
.faq-item[open] summary { border-bottom: 1px solid var(--line); }
.faq-item .faq-a { padding: .95rem 1.15rem 1.1rem; color: var(--ink-muted); display: flex; gap: .8rem; line-height: 1.9; }
.faq-item .faq-a::before { content: "A"; color: var(--sumi); font-family: var(--font-en); font-weight: 600; flex: none; }
.faq-item .faq-a p { margin: 0; }

/* ---------------------------- リクエスト予約の注意書き(削除しない) */
.form-note {
  margin: 0 0 1.4rem; background: #fff; border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 6px;
  padding: .85rem 1rem; font-size: .88rem; color: var(--ink-muted); line-height: 1.8;
}
.form-note b { color: var(--sumi); }
.form-note a { color: var(--sumi); font-weight: 700; }

/* ------------------------- フローティングCTA(スマホのみ・下部固定) */
.float-cta { display: none; }
@media (max-width: 860px) {
  body { padding-bottom: 76px; } /* CTAバーの高さぶん、フッターが隠れないように */
  .float-cta {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: grid; grid-template-columns: 1fr 1fr; gap: .6rem;
    padding: .6rem .8rem calc(.6rem + env(safe-area-inset-bottom));
    background: rgba(250,246,238,.94); backdrop-filter: blur(8px);
    border-top: 1px solid var(--line);
  }
  .float-cta .btn { padding: .75rem .4rem; font-size: .93rem; white-space: nowrap; }
}

/* アニメーション抑制の希望を尊重(スライドショーも止める=main.js側で判定) */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; transition: none !important; }
}
