/* story.css
   Restaurant Kakurai — 世界観ページ（額縁版 / 非額縁版）共通スタイル
   スコープ: すべて .story-page 配下。既存 hybrid-main の他ページには影響しない。
*/

.story-page {
  --story-ink: #1a1613;
  --story-muted: rgba(26, 22, 19, 0.62);
  --story-line: rgba(26, 22, 19, 0.16);
  --story-serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Times New Roman", serif;
  --story-en-serif: "Cormorant Garamond", "Times New Roman", serif;
  --story-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
  background: #fff;
  color: var(--story-ink);
}

.story-page main {
  background: #fff;
}

/* ---------- 共通セクション骨組み ---------- */

.story-section {
  display: flex;
  justify-content: center;
  padding: clamp(72px, 11vw, 132px) 24px;
  border-bottom: 1px solid var(--story-line);
}

.story-section:last-of-type {
  border-bottom: 0;
}

.story-section--hero {
  padding-top: clamp(140px, 20vw, 208px);
  padding-bottom: clamp(96px, 13vw, 148px);
  min-height: 72svh;
  align-items: center;
}

.story-inner {
  width: min(680px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.story-eyebrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0 0 28px;
}

.story-eyebrow .story-en {
  font-family: var(--story-en-serif);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--story-ink);
}

.story-eyebrow .story-jp {
  font-family: var(--story-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: var(--story-muted);
  text-transform: uppercase;
}

.story-catch {
  margin: 0 0 32px;
  font-family: var(--story-serif);
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--story-ink);
}

.story-section--hero .story-catch {
  font-size: clamp(28px, 4.4vw, 44px);
}

.story-lead {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 0 40px;
}

.story-lead p {
  margin: 0;
  font-family: var(--story-sans);
  font-size: clamp(15px, 1.6vw, 17px);
  font-weight: 400;
  line-height: 2;
  letter-spacing: 0.03em;
  color: rgba(26, 22, 19, 0.82);
}

.story-lead:last-child {
  margin-bottom: 0;
}

/* 「詳細を見る」ボタン */

.story-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 4px 2px 6px;
  border: 0;
  border-bottom: 1px solid rgba(26, 22, 19, 0.42);
  background: none;
  font-family: var(--story-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--story-ink);
  text-decoration: none;
  text-transform: uppercase;
  transition: border-color 220ms ease, color 220ms ease, letter-spacing 220ms ease;
}

.story-more:hover,
.story-more:focus-visible {
  border-color: var(--story-ink);
  color: #000;
  letter-spacing: 0.16em;
}

/* ---------- Hero ---------- */

.story-section--hero .story-eyebrow .story-en {
  font-size: clamp(34px, 6vw, 52px);
}

/* ---------- Chef節: 完全に文字だけ・大きな余白 ---------- */

.story-section--chef {
  padding-top: clamp(120px, 16vw, 176px);
  padding-bottom: clamp(140px, 18vw, 196px);
}

.story-section--chef .story-eyebrow .story-en {
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--story-muted);
}

.story-section--chef .story-name {
  margin: 0 0 28px;
  font-family: var(--story-en-serif);
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--story-ink);
}

.story-section--chef .story-catch {
  margin: 0;
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 400;
}

/* =========================================================
   額縁版 (.story-frame) — 美術館風
   ========================================================= */

.story-frame .story-figure {
  margin: 0 0 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.story-frame .story-frame-mat {
  padding: 18px;
  background: linear-gradient(180deg, #fdfcfa, #f6f3ee);
  border: 1px solid rgba(26, 22, 19, 0.14);
  box-shadow:
    0 1px 2px rgba(26, 22, 19, 0.06),
    0 22px 44px -20px rgba(26, 22, 19, 0.32),
    0 8px 18px -10px rgba(26, 22, 19, 0.18);
}

.story-frame .story-frame-mat img {
  display: block;
  width: min(520px, 72vw);
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(26, 22, 19, 0.28);
}

.story-frame .story-figure figcaption {
  margin-top: 16px;
  font-family: var(--story-sans);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--story-muted);
}

/* ---------- 非額縁版 (.story-plain) — 言葉中心・写真は控えめ ---------- */

.story-plain .story-figure {
  margin: 0 0 44px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.story-plain .story-figure img {
  display: block;
  width: min(460px, 84vw);
  max-width: 100%;
  height: clamp(160px, 22vw, 220px);
  object-fit: cover;
  filter: grayscale(6%);
}

/* ---------- レスポンシブ ---------- */

@media (max-width: 640px) {
  .story-section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .story-lead p {
    line-height: 1.9;
  }

  .story-frame .story-frame-mat {
    padding: 12px;
  }

  .story-frame .story-frame-mat img {
    width: min(420px, 80vw);
  }
}

@media (max-width: 375px) {
  .story-section {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* =========================================================
   クリーン版 (.story-clean) — 額縁装飾なし・余白そのものが額縁
   フォント/写真サイズは額縁版を継承。マット/枠/影/プレートと
   セクション区切り線を除き、余白で見せる。
   ========================================================= */
.story-clean .story-section {
  border-bottom: 0;                                   /* 区切り線を撤去し余白で仕切る */
  padding-top: clamp(96px, 14vw, 168px);
  padding-bottom: clamp(96px, 14vw, 168px);
}
.story-clean .story-section--hero { border-bottom: 0; }

.story-clean .story-figure {
  margin: clamp(24px, 4vw, 48px) 0;
  display: flex;
  justify-content: center;
}
.story-clean .story-figure img {
  display: block;
  width: min(520px, 74vw);       /* 額縁版と同じ写真サイズ・自然な縦横比 */
  max-width: 100%;
  height: auto;
  border: 0;
  box-shadow: none;
}

/* ENTER後(世界観ページ)は もう少しゆっくり滲み出るように（本編styles.cssは据え置き） */
.hybrid-main.story-page .scroll-reveal {
  filter: blur(6px);
  transform: translateY(10px);
  transition-duration: 1180ms;
  transition-timing-function: ease-out;
}
.hybrid-main.story-page .scroll-reveal.is-visible {
  filter: none;
  transform: translateY(0);
}

/* ABOUTだけ 約1秒遅れて滲み出す（Heroが先に出た後に現れる） */
.hybrid-main.story-page #about .scroll-reveal {
  transition-delay: calc(1000ms + var(--reveal-delay, 0ms));
}

/* =========================================================
   仕上げ調整（施主フィードバック 2026-07-05）採用版 .story-clean にスコープ
   ・メインタイトルは英字＋日本語を同格・同サイズで並列
   ・リード以外を小さめに、行間・余白を引き締め
   ・詳細ページは独立したクリック導線として明示
   ========================================================= */
.story-clean .story-title {
  display: flex;
  justify-content: center;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5em;
  margin: 0 0 clamp(18px, 2.4vw, 24px);
  font-size: clamp(17px, 2.2vw, 22px);
  font-weight: 500;
  line-height: 1.5;
  color: var(--story-ink);
}
.story-clean .story-title .t-en {
  font-family: var(--story-en-serif);
  letter-spacing: 0.1em;
}
.story-clean .story-title .t-jp {
  font-family: var(--story-serif);
  letter-spacing: 0.08em;
}
.story-clean .story-title--hero {
  font-size: clamp(21px, 2.9vw, 29px);
  opacity: 0;
  animation: storyHeroCopyReveal 4200ms linear 600ms both;
}
.story-clean .story-section--hero .story-title--hero {
  margin-bottom: clamp(104px, 12.8vw, 144px);
}

.story-clean .story-catch {
  font-size: clamp(18px, 2.3vw, 23px);
  line-height: 1.5;
  margin-bottom: clamp(20px, 2.4vw, 26px);
}
.story-clean .story-section--hero .story-catch {
  font-size: clamp(19px, 2.6vw, 26px);
}
.story-clean .story-section--hero .story-catch,
.story-clean .story-section--hero .story-lead {
  opacity: 0;
  animation: storyHeroCopyReveal 4200ms linear 4800ms both;
}
.story-clean .story-lead {
  gap: 10px;
  margin-bottom: clamp(22px, 2.8vw, 30px);
}
.story-clean .story-lead p {
  line-height: 1.85;
}

.story-clean .story-section {
  padding-top: clamp(72px, 10vw, 120px);
  padding-bottom: clamp(72px, 10vw, 120px);
}
.story-clean .story-section.story-section--hero {
  padding-top: clamp(200px, 16vw, 232px);
  padding-bottom: clamp(96px, 13vw, 148px);
}
.story-clean .story-title[id] {
  scroll-margin-block-start: 96px;
}
.story-clean .story-figure {
  margin: clamp(20px, 3vw, 40px) 0;
}
/* Chef節: eyebrow+name をひと組にし、間を空けて静かな結びで終える（顧客FB 2026-07-10） */
.story-clean .story-section--chef .story-eyebrow {
  margin-bottom: 6px;
}
.story-clean .story-section--chef .story-eyebrow .story-en {
  font-size: 12px;
  letter-spacing: 0.26em;
}
.story-clean .story-section--chef .story-name {
  margin-bottom: clamp(44px, 6vw, 72px);
  font-size: clamp(21px, 2.8vw, 28px);
  letter-spacing: 0.04em;
}
.story-clean .story-section--chef .story-catch {
  font-size: clamp(15px, 1.8vw, 18px);
}

.story-clean .story-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: clamp(20px, 3vw, 30px);
}
.story-clean .story-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 9px 4px;
  font-family: var(--story-sans);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--story-ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(26, 22, 19, 0.28);
  transition: color 200ms ease, border-color 200ms ease, gap 200ms ease;
}
.story-clean .story-link::after {
  content: "›";
  font-size: 1.15em;
  line-height: 1;
  color: var(--story-muted);
  transition: transform 200ms ease, color 200ms ease;
}
.story-clean .story-link:hover,
.story-clean .story-link:focus-visible {
  color: #000;
  border-color: var(--story-ink);
  gap: 0.7em;
}
.story-clean .story-link:hover::after,
.story-clean .story-link:focus-visible::after {
  color: var(--story-ink);
  transform: translateX(2px);
}
.story-clean .story-link.is-pending {
  cursor: default;
}
.story-clean .story-link.is-pending:hover,
.story-clean .story-link.is-pending:focus-visible {
  color: var(--story-ink);
  border-color: rgba(26, 22, 19, 0.28);
  gap: 0.5em;
}
.story-clean .story-link.is-pending:hover::after,
.story-clean .story-link.is-pending:focus-visible::after {
  color: var(--story-muted);
  transform: none;
}

.story-clean .story-link--notice {
  font-size: 12px;
  letter-spacing: 0.04em;
}

.story-clean .story-disclosure {
  margin-top: clamp(20px, 3vw, 30px);
  text-align: center;
}

.story-clean .story-disclosure summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  cursor: pointer;
  list-style: none;
  border-bottom: 1px solid rgba(26, 22, 19, 0.28);
  padding: 9px 4px;
  font-family: var(--story-sans);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.story-clean .story-disclosure summary::-webkit-details-marker { display: none; }
.story-clean .story-disclosure summary::after { content: "+"; color: var(--story-muted); }
.story-clean .story-disclosure[open] summary::after { content: "−"; }
.story-clean .story-disclosure .story-links { margin-top: 10px; }

/* =========================================================
   詳細ページ — 本編の余白・文字組みを継承する簡潔な情報ページ
   ========================================================= */
.story-detail .story-section--detail {
  min-height: min(760px, 100svh);
  padding-top: clamp(156px, 19vw, 220px);
  padding-bottom: clamp(96px, 13vw, 148px);
}

.story-detail .story-title {
  margin-bottom: clamp(26px, 3vw, 36px);
}

.story-detail .story-detail-copy {
  width: min(540px, 100%);
  display: flex;
  flex-direction: column;
  gap: clamp(30px, 4vw, 46px);
  text-align: center;
}

.story-detail .story-detail-copy p,
.story-detail .story-detail-copy address {
  margin: 0;
  font-family: var(--story-sans);
  font-size: clamp(14px, 1.55vw, 16px);
  font-style: normal;
  font-weight: 400;
  line-height: 2;
  letter-spacing: 0.04em;
  color: rgba(26, 22, 19, 0.82);
}

.story-detail .story-detail-copy .story-detail-note {
  font-size: clamp(12px, 1.35vw, 14px);
  line-height: 1.9;
  color: var(--story-muted);
}

.story-detail .story-detail-course {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.story-detail .story-detail-course[id] {
  scroll-margin-block-start: 96px;
}

.story-detail .story-detail-course h2 {
  margin: 0;
  font-family: var(--story-serif);
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.6;
  color: var(--story-ink);
}

.story-detail .story-detail-back {
  margin-top: clamp(12px, 2vw, 24px);
}

.story-detail .story-detail-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px;
  margin-top: clamp(20px, 3vw, 30px);
}

@media (max-width: 640px) {
  .story-detail .story-section--detail {
    padding-top: 136px;
  }

  .story-detail .story-detail-copy {
    gap: 32px;
  }
}

/* スマホ: 文字・写真・リンクを同じ中央軸に揃え、写真の見え方を統一する */
@media (max-width: 640px) {
  .story-clean .story-title,
  .story-clean .story-catch,
  .story-clean .story-lead,
  .story-clean .story-lead p,
  .story-clean .story-links {
    width: 100%;
  }

  .story-clean .story-figure {
    width: min(100%, 360px);
    aspect-ratio: 4 / 3;
    overflow: hidden;
  }

  .story-clean .story-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .story-clean #about .story-figure img {
    object-position: center 62%;
  }

  .story-clean #menu .story-figure img {
    object-position: center 58%;
  }

  .story-clean #private-use .story-figure img {
    object-position: 58% center;
  }
}

/* =========================================================
   初回ロードの「滲み出し」演出（顧客フィードバック 2026-07-10）
   ・ファーストビューはページ全体が一度に滲み出る
   ・ヘッダーは白から赤が滲み出る
   ・値は承認済みフェードと同一（1180ms / ease-out / blur(6px)）
   ========================================================= */
@keyframes storyPageEmerge {
  from { opacity: 0; filter: blur(6px); }
  to   { opacity: 1; filter: none; }
}

@keyframes storyHeroCopyReveal {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.story-page main {
  animation: storyPageEmerge 1180ms ease-out both;
}

/* ヘッダー: 白いオーバーレイが消えていくことで赤が滲み出る
   （本文より600ms遅れて・4200msかけて一定速度で。切替のフラッシュ感を抑える）
   box-shadow はオーバーレイで覆えないため、同じタイミングでフェードインさせる */
.story-page .site-header {
  border-bottom: none; /* 下線は不要（顧客FB 2026-07-10） */
  animation: storyHeaderShadow 4200ms linear 4800ms both;
}
.story-page .site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  animation: storyHeaderReveal 4200ms linear 4800ms both;
}

@keyframes storyHeaderReveal {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes storyHeaderShadow {
  from { box-shadow: 0 10px 26px rgba(80, 0, 18, 0); }
  to   { box-shadow: 0 10px 26px rgba(80, 0, 18, 0.12); }
}

@media (prefers-reduced-motion: reduce) {
  .story-page main {
    opacity: 1;
    animation: none;
    filter: none;
  }
  .story-clean .story-section--hero .story-catch,
  .story-clean .story-section--hero .story-lead,
  .story-clean .story-title--hero {
    opacity: 1;
    animation: none;
  }
  .story-page .site-header {
    animation: none; /* 影は最初から通常表示（styles.css の値） */
  }
  .story-page .site-header::after {
    display: none;
  }
}
