/* ==========================================================
   歴史再現めし REKISHI MESHI — 公式サイト
   世界観: 墨黒 × 白筆文字 × 縦書き明朝 × 余白 × 落款の朱
   依存: Google Fonts (Shippori Mincho B1) のみ
   ========================================================== */

:root {
  --sumi: #0c0a08;        /* 地: 墨黒（わずかに暖色） */
  --sumi-2: #14110d;      /* 面: 一段浮いた墨 */
  --kinari: #ece5d8;      /* 文字: 生成り */
  --kinari-dim: #a89e8e;  /* 文字弱: 灰生成り */
  --line: #2b261f;        /* 罫線 */
  --shu: #9e3b2c;         /* 差し色: 弁柄（落款の朱） */
  --serif: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--sumi);
  color: var(--kinari);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 2;
  letter-spacing: 0.08em;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 和紙の質感（微細ノイズ） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

::selection { background: var(--shu); color: #fff; }

/* ---------- 汎用 ---------- */
/* 和文の改行制御:
   auto-phrase = 文節単位で折る（語中で切れない）／balance = 行長を揃えて1文字だけ残るのを防ぐ
   対応していないブラウザでは通常の折り返しに戻るだけで害はない */
h1, h2, h3,
.hero-copy, .concept-text,
.article-head .lead, .col-card h3, .col-card .lead,
.press-note, .contact-lead, .article figcaption, .article-hero figcaption {
  word-break: auto-phrase;
  text-wrap: pretty;
}
.article-head h1, .article-head .lead, .col-card h3 { text-wrap: balance; }
/* この範囲は途中で折らない（末尾に1〜2文字だけ残るのを防ぐ） */
.nw { white-space: nowrap; }

/* 罫線（ダッシュ文字は字間で分断され連結が保証されないためCSSで描く）
   inline-size = 文字の流れ方向なので、縦書き・横書きのどちらでも1本の線になる */
.rule {
  display: inline-block;
  inline-size: var(--rule-len, 2.4em);
  block-size: 1px;
  background: currentColor;
  vertical-align: middle;   /* 横書き用 */
  opacity: 0.5;
}
/* 縦書きの中では middle（欧文のx-height基準）だと和文の中心から約0.25emずれるため
   baseline（＝和文のセンターベースライン）に合わせる。実測でズレ2.9px→0.5pxに解消 */
.hero-copy .rule,
.concept-text .rule { vertical-align: baseline; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; }

section { position: relative; padding: 120px 0; }

.sec-head {
  display: flex;
  align-items: baseline;
  gap: 22px;
  margin: 0 0 64px;
}
h1.hero-title { margin: 0; font-size: 0; line-height: 0; }
.sec-head .ja {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.3em;
}
.sec-head .en {
  font-size: 11px;
  letter-spacing: 0.42em;
  color: var(--kinari-dim);
  text-transform: uppercase;
}
.sec-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
  transform: translateY(-6px);
}

/* スクロール表示演出（プログレッシブエンハンスメント:
   JSが動く環境でだけ html.js が付き非表示から始まる。JS無効時は常時表示） */
.reveal { transition: opacity 1.1s ease, transform 1.1s ease; }
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
}
.js .reveal.on { opacity: 1; transform: none; }

/* ---------- ヘッダー ---------- */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 30px;
  background: linear-gradient(to bottom, rgba(12,10,8,0.92), rgba(12,10,8,0));
  transition: background 0.4s ease;
}
header.scrolled {
  background: rgba(12,10,8,0.92);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 30px; width: auto; }
nav { display: flex; gap: 30px; }
nav a {
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--kinari-dim);
  transition: color 0.3s;
}
nav a:hover, nav a.current { color: var(--kinari); }

/* ---------- ヒーロー ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 24px 90px;
  overflow: hidden;
}
/* FV背景動画（自社撮影素材のループ・無音）。文字の可読性は veil で担保 */
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.55;
  filter: saturate(0.92);
}
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom, rgba(12,10,8,0.55), rgba(12,10,8,0.15) 40%, rgba(12,10,8,0.75) 85%, var(--sumi)),
    radial-gradient(ellipse at center, rgba(12,10,8,0.35) 0%, rgba(12,10,8,0.8) 100%);
}
.hero > :not(.hero-bg):not(.hero-veil) { position: relative; z-index: 2; }
.hero-logo { width: min(560px, 78vw); height: auto; }
.hero-copy {
  writing-mode: vertical-rl;
  font-size: clamp(17px, 2.2vw, 21px);
  letter-spacing: 0.5em;
  line-height: 2.6;
  height: 17.5em;
  margin-top: 54px;
  color: var(--kinari);
}
.hero-copy .small {
  font-size: 0.68em;
  color: var(--kinari-dim);
  letter-spacing: 0.4em;
}
.hero-stats {
  display: flex;
  gap: 54px;
  margin-top: 64px;
}
.hero-stats .stat { text-align: center; }
.hero-stats .num {
  font-size: 24px;
  letter-spacing: 0.1em;
}
.hero-stats .num span { font-size: 14px; margin-left: 2px; }
.hero-stats .label {
  font-size: 11px;
  letter-spacing: 0.34em;
  color: var(--kinari-dim);
  margin-top: 6px;
}
.stats-note {
  margin-top: 18px;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--kinari-dim);
  /* flexで罫線と文字を確実に中央で揃える（vertical-alignの誤差を持ち込まない） */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9em;
  text-indent: 0.3em;   /* 末尾字間ぶんの偏りを打ち消す */
}
.scroll-cue {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 1px;
  height: 72px;
  background: var(--line);
  overflow: hidden;
}
.scroll-cue::after {
  content: "";
  position: absolute;
  top: -40%;
  left: 0;
  width: 100%;
  height: 40%;
  background: var(--kinari-dim);
  animation: cue 2.4s ease-in-out infinite;
}
@keyframes cue {
  0% { top: -40%; }
  100% { top: 110%; }
}

/* ---------- 口上 (CONCEPT) ----------
   DOM順 = 読み順（キャッチ→本文→落款）。縦書きは右から読むため row-reverse で
   キャッチを右端に置く（スクリーンリーダーは正しい順で読める） */
.concept-inner {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  gap: clamp(40px, 8vw, 110px);
}
/* 行の折り返しは固定高さに任せず、HTML側の<br>（意味の切れ目）で制御する */
.concept-text {
  writing-mode: vertical-rl;
  height: auto;
  font-size: 16px;
  line-height: 3.1;
  letter-spacing: 0.26em;
}
.concept-text strong {
  font-weight: 600;
  font-size: 1.25em;
  letter-spacing: 0.3em;
}
.rakkan {
  writing-mode: vertical-rl;
  align-self: flex-end;
  background: var(--shu);
  color: #f5efe6;
  font-size: 13px;
  letter-spacing: 0.28em;
  padding: 14px 8px;
  line-height: 1.4;
}

/* ---------- 献立 (WORKS) ---------- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.work {
  position: relative;
  display: block;
  background: var(--sumi-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.work .thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.work .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.86) contrast(1.02);
  transition: transform 1.4s ease, filter 0.6s ease;
}
.work:hover .thumb img {
  transform: scale(1.045);
  filter: saturate(1) contrast(1.05);
}
.work .body { padding: 18px 20px 20px; }
.work .era {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.3em;
  color: var(--shu);
  border: 1px solid rgba(158,59,44,0.55);
  padding: 2px 9px 2px 11px;
  margin-bottom: 10px;
}
.work h3 {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.9;
  letter-spacing: 0.06em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.work .views {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--kinari-dim);
}
.works-more {
  margin-top: 56px;
  text-align: center;
}

/* 罫ボタン */
.btn {
  display: inline-block;
  border: 1px solid var(--kinari-dim);
  padding: 15px 56px;
  font-size: 13px;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  transition: background 0.4s, color 0.4s, border-color 0.4s;
}
.btn:hover {
  background: var(--kinari);
  color: var(--sumi);
  border-color: var(--kinari);
}

/* ---------- 掲載 (PRESS) ---------- */
.press-note {
  font-size: 13px;
  color: var(--kinari-dim);
  letter-spacing: 0.14em;
  margin-bottom: 40px;
}
.press-list { border-top: 1px solid var(--line); }
.press-item {
  display: grid;
  grid-template-columns: 120px 96px 1fr auto;
  gap: 26px;
  align-items: baseline;
  padding: 26px 6px;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s;
}
a.press-item:hover { background: var(--sumi-2); }
.press-item .date {
  font-size: 12.5px;
  letter-spacing: 0.14em;
  color: var(--kinari-dim);
}
.press-item .kind {
  font-size: 10.5px;
  letter-spacing: 0.26em;
  color: var(--shu);
  border: 1px solid rgba(158,59,44,0.55);
  padding: 2px 0 2px 4px;
  text-align: center;
}
.press-item .title { font-size: 15px; letter-spacing: 0.08em; line-height: 1.9; }
.press-item .medium {
  font-size: 12.5px;
  color: var(--kinari-dim);
  letter-spacing: 0.14em;
}
.press-item.placeholder .title,
.press-item.placeholder .medium,
.press-item.placeholder .date { color: #7d735f; }
.press-item.placeholder .kind { color: #7d735f; border-color: #4a4336; }
/* 実データでリンク行にする場合: <li class="linked"><a class="press-item" href>…</a></li> */
.press-list .linked { display: contents; }

/* ---------- 音信 (CONTACT) ---------- */
.contact-lead {
  font-size: 15px;
  line-height: 2.6;
  letter-spacing: 0.14em;
  margin-bottom: 48px;
}
.sns-row { display: flex; gap: 20px; flex-wrap: wrap; }
.sns {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  padding: 18px 26px;
  min-width: 250px;
  transition: border-color 0.35s, background 0.35s;
}
.sns:hover { border-color: var(--kinari-dim); background: var(--sumi-2); }
.sns svg { width: 20px; height: 20px; fill: var(--kinari-dim); flex: none; }
.sns .name { font-size: 13.5px; letter-spacing: 0.16em; }
.sns .id { font-size: 11px; color: var(--kinari-dim); letter-spacing: 0.1em; }

/* ---------- フッター ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 46px 30px 54px;
  text-align: center;
}
footer img { height: 26px; width: auto; margin: 0 auto 18px; opacity: 0.85; }
footer p {
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--kinari-dim);
}

/* ---------- 下層: 掲載ページ ---------- */
.page-head {
  padding-top: 190px;
}
.page-head .crumb {
  font-size: 11.5px;
  letter-spacing: 0.24em;
  color: var(--kinari-dim);
  margin-bottom: 26px;
}
.page-head .crumb a:hover { color: var(--kinari); }

/* ---------- 講釈（コラム） ---------- */
.col-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.col-card {
  display: block;
  background: var(--sumi-2);
  border: 1px solid var(--line);
  transition: border-color 0.4s;
}
.col-card:hover { border-color: var(--kinari-dim); }
.col-card .thumb { aspect-ratio: 16 / 9; overflow: hidden; }
.col-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s ease; }
.col-card:hover .thumb img { transform: scale(1.04); }
.col-card .body { padding: 22px 24px 26px; }
.col-card .meta { font-size: 11px; letter-spacing: 0.24em; color: var(--kinari-dim); margin-bottom: 10px; }
.col-card h3 { font-size: 17px; font-weight: 500; line-height: 1.9; letter-spacing: 0.06em; }
.col-card .lead { margin-top: 12px; font-size: 13px; line-height: 2; color: var(--kinari-dim); }

/* 記事冒頭の要点（結論の先出し。検索・AIが要旨を掴めるようにする） */
.article-summary {
  max-width: 760px;
  margin: 56px auto 0;
  padding: 30px 34px 34px;
  border: 1px solid var(--line);
  background: var(--sumi-2);
}
.article-summary h2 {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  margin: 0 0 18px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}
.article-summary h2 .en {
  display: inline;
  font-size: 9.5px;
  letter-spacing: 0.34em;
  color: var(--kinari-dim);
  margin-left: 12px;
}
.article-summary li {
  font-size: 14px;
  line-height: 2.15;
  padding-left: 1.15em;
  text-indent: -1.15em;
  margin-top: 9px;
}
.article-summary li::before { content: "・"; color: var(--shu); }

/* 記事本文 */
.article { max-width: 760px; margin: 0 auto; padding: 0 28px; }
.article-head { text-align: center; padding: 190px 0 0; }
.article-head .meta { font-size: 11.5px; letter-spacing: 0.28em; color: var(--kinari-dim); }
.article-head h1 {
  font-size: clamp(22px, 3.4vw, 31px);
  font-weight: 500;
  line-height: 1.9;
  letter-spacing: 0.08em;
  margin: 18px 0 26px;
}
/* 肩見出し（記事の主題を示す。h1内に置くことで見出しの一部として扱われる） */
.kicker {
  display: block;
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  line-height: 1.8;
  color: var(--kinari-dim);
  margin-bottom: 12px;
}
.col-card .kicker { font-size: 11px; letter-spacing: 0.22em; margin-bottom: 7px; }
.article-head .lead {
  font-size: 14.5px;
  line-height: 2.4;
  color: var(--kinari-dim);
  letter-spacing: 0.1em;
}
.article-hero { margin: 54px auto 0; max-width: 1080px; padding: 0 28px; }
.article-hero img { width: 100%; height: auto; border: 1px solid var(--line); }
.article-hero figcaption,
.article figcaption {
  margin-top: 10px;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--kinari-dim);
  text-align: center;
}
.article h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.18em;
  margin: 78px 0 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.article h2 .en {
  display: block;
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--kinari-dim);
  margin-top: 8px;
  text-transform: uppercase;
}
.article h3 {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin: 46px 0 14px;
  color: var(--kinari);
}
.article h3::before { content: "―― "; color: var(--shu); }
/* 記事内に置いたカード（あわせて読む）には本文用の見出し装飾を効かせない */
.article .col-card h3 { font-size: 17px; font-weight: 500; margin: 0; letter-spacing: 0.06em; }
.article .col-card h3::before { content: none; }
.article p { font-size: 15px; line-height: 2.5; letter-spacing: 0.06em; margin-top: 20px; }
.article figure { margin: 34px 0; }
.article figure img { width: 100%; height: auto; border: 1px solid var(--line); }
.article ul.notes { margin-top: 20px; }
.article ul.notes li {
  font-size: 13.5px;
  line-height: 2.2;
  padding-left: 1.1em;
  text-indent: -1.1em;
  color: var(--kinari-dim);
}
.article ul.notes li::before { content: "・"; color: var(--shu); }
.article ul.notes li a { border-bottom: 1px solid var(--line); }
/* 一覧のあとに置く但し書き。本文より一段落として ul.notes と同じ調子に合わせる */
.article p.note-sub {
  font-size: 13.5px;
  line-height: 2.2;
  margin-top: 18px;
  color: var(--kinari-dim);
}
.article ul.notes li a:hover { border-color: var(--kinari-dim); color: var(--kinari); }
/* 材料などの用語＋説明。用語には朱引き（語幅ぶんの朱線）を敷く */
.ingredients { margin: 30px 0 10px; }
.ingredients dt {
  display: inline-block;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  margin-top: 34px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--shu);
  line-height: 1.7;
}
.ingredients dt:first-of-type { margin-top: 6px; }
.ingredients dd {
  margin: 15px 0 0;
  font-size: 14px;
  line-height: 2.25;
  color: var(--kinari-dim);
}

/* 引用・強調。囲みや縦線は使わず、余白と菱形の印で見せる */
.pull {
  margin: 62px 0;
  padding: 0;
  text-align: center;
  font-size: 17.5px;
  line-height: 2.5;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
}
.pull::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  background: var(--shu);
  transform: rotate(45deg);
  margin: 0 auto 30px;
}
.article-video { margin: 46px 0; }
.article-video .frame { position: relative; aspect-ratio: 16 / 9; border: 1px solid var(--line); }
.article-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
/* 記事末尾の導線。下に余白がないとボタンがフッターの罫線に接してしまう */
.article-foot {
  margin-top: 84px;
  padding: 40px 0 110px;
  border-top: 1px solid var(--line);
  text-align: center;
}

/* ---------- レスポンシブ ---------- */
/* 動きを抑えたい環境ではアニメーションを止める */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .js .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue::after { animation: none; }
  .work .thumb img { transition: none; }
  .hero-bg { display: none; }
}

@media (max-width: 860px) {
  section { padding: 88px 0; }
  /* ナビ項目が増えたため、狭い画面では横スクロールで1行に収める */
  header {
    padding: 12px 0 12px 14px;
    align-items: center;
    gap: 10px;
  }
  .brand img { height: 22px; }
  nav {
    gap: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-right: 14px;
    flex: 1;
    justify-content: flex-end;
  }
  nav::-webkit-scrollbar { display: none; }
  nav a {
    font-size: 11px;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }
  .works-grid { grid-template-columns: 1fr; gap: 20px; }
  /* 縦書きのまま縦積みに（DOM順のまま上から: キャッチ→本文→落款） */
  .concept-inner {
    flex-direction: column;
    align-items: center;
    gap: 44px;
  }
  .concept-text { font-size: 14px; line-height: 2.7; }
  .rakkan { align-self: center; }
  .hero-copy { height: 17.5em; margin-top: 44px; }
  .hero-stats { gap: 30px; }
  .press-item {
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    gap: 8px 18px;
    padding: 22px 4px;
  }
  .press-item .title { grid-column: 1 / -1; grid-row: 2; }
  .press-item .medium { grid-column: 2; justify-self: end; }
  .press-item .kind { justify-self: end; padding: 2px 10px; }
  .col-list { grid-template-columns: 1fr; gap: 20px; }
  .article-head { padding-top: 140px; }
  .article h2 { margin-top: 58px; font-size: 18px; }
  .article p { font-size: 14.5px; line-height: 2.3; }
  .pull { margin: 48px 0; font-size: 16px; line-height: 2.4; }
  .sec-head .ja { font-size: 26px; }
}

/* 目には見せないが支援技術には読ませる見出し用。display:none だと読み上げからも消える */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* フッターの補助リンク（プライバシーポリシー等）。ロゴと著作権表示の間に一段だけ置く */
footer .foot-links {
  margin-bottom: 14px;
  font-size: 11px;
  letter-spacing: 0.22em;
}
footer .foot-links a {
  color: var(--kinari-dim);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.3s, border-color 0.3s;
}
footer .foot-links a:hover { color: var(--kinari); border-color: var(--kinari-dim); }
