:root {
  --light: #F5F0F2;
  --base: #EFD9E2;
  --accent: #786828;
  --dark: #2E2A26;
  --logo-gold: #726732;
  --bg: #FAF8F7;
  --text: #2E2A26;
  --text-muted: #7A7470;
  --serif: 'Cormorant Garamond', 'Georgia', serif;
  --sans: 'Noto Sans JP', 'Helvetica Neue', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ===== HEADER ===== */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(250, 248, 247, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(239, 217, 226, 0.4);
}

.header-logo img { width: 140px; height: auto; }

nav { display: flex; gap: 2.5rem; }

nav a {
  font-family: var(--serif);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.3s ease;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

nav a:hover { color: var(--accent); }
nav a:hover::after { width: 100%; }
nav a.active { color: var(--accent); }
nav a.active::after { width: 100%; }

/* ===== HERO ===== */
.story-hero {
  position: relative;
  height: 85vh;
  margin-top: 62px;
  overflow: hidden;
}

.story-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.story-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(46, 42, 38, 0.05) 0%,
    rgba(46, 42, 38, 0.55) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 4rem 3rem;
}

.story-hero-label {
  font-family: var(--serif);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1rem;
}

.story-hero-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
}

/* ===== PAGE CONTENT ===== */
.page-content {
  position: relative;
  z-index: 1;
  background: var(--bg);
}

/* ===== CHAPTER ===== */
.chapter {
  background: var(--bg);
  display: grid;
  grid-template-columns: 80px 1fr 320px;
  gap: 0 3rem;
  padding: 6rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
  border-top: 1px solid rgba(239, 217, 226, 0.4);
}

.chapter:first-of-type {
  border-top: none;
}

/* 章番号 */
.chapter-aside {
  padding-top: 0.5rem;
}

.chapter-num {
  font-family: var(--serif);
  font-size: 4.5rem;
  font-weight: 300;
  color: var(--accent);
  opacity: 0.2;
  line-height: 1;
  letter-spacing: 0.05em;
  display: block;
  position: sticky;
  top: 100px;
}

/* 本文エリア */
.chapter-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* サブタイトル */
.chapter-body .chapter-subtitle {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--accent);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}


/* 本文段落 */
.chapter-body p {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 2.3;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* 締めの一文 */
.chapter-closing {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  line-height: 2;
  color: var(--text) !important;
  letter-spacing: 0.04em;
  padding-top: 1rem;
  border-top: 1px solid rgba(239, 217, 226, 0.5);
  margin-top: 0.5rem;
}

/* ===== CHAPTER PHOTO ===== */
.chapter-photo {
  height: 280px;
  background-size: cover;
  background-position: center;
  margin-top: 0.25rem;
}

.story-bg-1 { background-image: url('../images/20260421-_DSC0791_web.jpg'); }
.story-bg-2 { background-image: url('../images/20260421-_DSC0863_web.jpg'); }
.story-bg-3 { background-image: url('../images/20260421-_DSC0833_web.jpg'); }

/* ===== OWNER PROFILE ===== */
.owner-block {
  background: var(--bg);
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 6rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 4rem 7rem;
  align-items: start;
  border-top: 1px solid rgba(239, 217, 226, 0.4);
  border-bottom: 1px solid rgba(239, 217, 226, 0.4);
}

.owner-photo {
  overflow: hidden;
  position: sticky;
  top: 100px;
  align-self: start;
}

.owner-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.owner-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--base);
}

.owner-photo-placeholder span {
  font-family: var(--serif);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  opacity: 0.6;
  text-transform: uppercase;
}

.owner-bio {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
}

.owner-bio-label {
  font-family: var(--serif);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
}

.owner-bio-name {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text);
  line-height: 1.8;
}

.owner-bio-name:empty { display: none; }

/* 新規ラッパー要素: デスクトップでは透明 */
.owner-intro { display: none; }
.owner-photo-section { display: contents; }
.owner-photo-frame { display: contents; }
.owner-expansion-spacer { display: none; }

/* インタビュー */
.owner-interview {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-top: 0.5rem;
}

.interview-item {
  padding-top: 0;
}

.interview-q {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text);
  padding-bottom: 0.85rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid rgba(239, 217, 226, 0.6);
  line-height: 1.9;
}

.interview-q::before {
  content: "Q. ";
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.interview-a {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 2.2;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* 写真キャプション（モバイル用オーバーレイ） */
.owner-photo-caption { display: none; }

.owner-bio p {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 2.2;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* デスクトップ: アコーディオン無効 */
.chapter-toggle { display: none; }

/* デスクトップ: インタールード非表示 */
.story-interlude { display: none; }

/* デスクトップ: モバイル背景非表示 */
.story-mobile-bg { display: none; }


/* ===== SPACER ===== */
.spacer { height: 4rem; }

/* ===== CONTACT CTA ===== */
.contact-cta {
  padding: 7rem 3rem;
  text-align: center;
  border-top: 1px solid rgba(239, 217, 226, 0.35);
  max-width: 860px;
  margin: 0 auto;
}
.contact-cta-label {
  font-family: var(--serif);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
}
.contact-cta-lead {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}
.contact-cta-link {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.1em;
  border-bottom: 1px solid rgba(120, 104, 40, 0.4);
  padding-bottom: 3px;
  transition: border-color 0.3s ease;
}
.contact-cta-link:hover { border-bottom-color: var(--accent); }

/* ===== FOOTER ===== */
footer {
  padding: 5rem 3rem 3rem;
  border-top: 1px solid rgba(239, 217, 226, 0.35);
  max-width: 1100px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-col h4 {
  font-family: var(--serif);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.footer-col p,
.footer-col a {
  font-size: 0.8rem;
  font-weight: 300;
  line-height: 2;
  color: var(--text-muted);
  text-decoration: none;
  display: block;
  transition: color 0.3s ease;
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(239, 217, 226, 0.25);
}

.footer-bottom small {
  font-size: 0.65rem;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.footer-sns { display: flex; gap: 1.5rem; }

.footer-sns a {
  font-family: var(--serif);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

.footer-sns a:hover { color: var(--accent); }

.footer-recruit {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(239, 217, 226, 0.25);
  text-align: center;
}

.footer-recruit p {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.footer-recruit a {
  font-family: var(--serif);
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(120, 104, 40, 0.3);
  padding-bottom: 1px;
  transition: border-color 0.3s ease;
}

.footer-recruit a:hover { border-bottom-color: var(--accent); }

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s cubic-bezier(0.25, 0.1, 0.25, 1),
              transform 0.9s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== HAMBURGER ===== */
.nav-toggle { display: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .chapter {
    grid-template-columns: 60px 1fr 220px;
  }
  .chapter-photo {
    height: 240px;
  }
}

@media (max-width: 768px) {
  header { padding: 1rem 1.5rem; }
  .header-logo img { width: 110px; }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: space-between;
    width: 22px; height: 14px; background: none; border: none; cursor: pointer; padding: 0;
  }
  .nav-toggle span {
    display: block; width: 100%; height: 1px; background: var(--accent);
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: rgba(250,248,247,0.98);
    backdrop-filter: blur(12px); padding: 1.5rem 2rem 2rem;
    gap: 1.5rem; border-bottom: 1px solid rgba(239,217,226,0.4);
  }
  header.nav-open nav { display: flex; }
  nav a { font-size: 0.9rem; }

  .story-hero {
    height: auto;
    margin-top: 0;
    overflow: visible;
  }
  .story-hero img { display: none; }
  .story-hero-overlay {
    position: relative;
    padding: 25vh 1.5rem 2.5rem;
    background: none;
    justify-content: flex-start;
  }
  .story-hero-title { font-size: 1.6rem; }

  .chapter-body {
    gap: 0.75rem;
  }

  .chapter-body p {
    line-height: 2.0;
  }

  .chapter {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 4rem 1.5rem;
  }

  .chapter-photo { display: none; }

  .chapter-aside { padding-top: 0; }

  .chapter-num {
    font-size: 3rem;
    opacity: 0.15;
    position: static;
  }


  .contact-cta { padding: 4rem 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  footer { padding: 4rem 1.5rem 2rem; }

  .story-photo { padding: 0 1.5rem 3rem; }
  .story-photo--right figure,
  .story-photo--left figure,
  .story-photo--center figure { width: 100%; }

  .chapter {
    padding: 3rem 1.5rem;
  }

  .owner-block {
    display: block;
    position: relative;
    padding: 0;
    gap: 0;
    border-top: none;
    border-bottom: none;
  }

  /* モバイル: solid背景タイトルゾーン */
  .owner-intro {
    display: block;
    background: var(--bg);
    padding: 5rem 2rem 4rem;
    text-align: center;
    position: relative;
    z-index: 5;
  }
  .owner-intro-label {
    font-family: var(--serif);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--accent);
    display: block;
    margin-bottom: 0.75rem;
  }
  .owner-intro-name {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 0.06em;
    color: var(--text);
  }

  /* モバイル: 写真セクションのスクロールコンテナ */
  .owner-photo-section {
    display: block;
    position: relative;
  }

  /* モバイル: stickyビューポートキャンバス */
  .owner-photo-frame {
    position: sticky;
    top: 0;
    height: 100svh;
    background: var(--bg);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 3rem;
    overflow: hidden;
    z-index: 1;
  }

  /* モバイル: 写真はカードサイズからスタート（JSが拡大） */
  .owner-photo {
    position: relative;
    width: 85%;
    height: 72svh;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
  }

  .owner-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
  }

  .owner-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to top,
      rgba(46, 42, 38, 0.55) 0%,
      rgba(46, 42, 38, 0) 60%
    );
    pointer-events: none;
  }

  /* 拡大アニメ用スクロール余白 */
  .owner-expansion-spacer {
    display: block;
    height: 80vh;
    pointer-events: none;
  }

  /* bio: フルサイズ写真の上に流れてくる */
  .owner-bio {
    position: relative;
    z-index: 10;
    padding: 2.5rem 1.5rem 3rem;
    gap: 0;
    margin-top: -30vh;
  }

  /* デスクトップ用ラベル/名前はモバイルで非表示（owner-introで表示） */
  .owner-bio > .owner-bio-label { display: none; }
  .owner-bio > .owner-bio-name  { display: none; }

  .owner-bio p {
    color: var(--text-muted);
    line-height: 2;
  }

  .interview-q {
    color: var(--accent);
  }

  .interview-a {
    line-height: 2.0;
  }

  /* モバイルでは背景画像セクションを非表示 */
  .story-bg { display: none; }

  /* アコーディオン無効 - 全文表示 */
  .chapter-body-more {
    max-height: none;
    overflow: visible;
  }

  .chapter-body-more::after {
    display: none;
  }

  .chapter-toggle {
    display: none;
  }
}

/* ===== MOBILE PARALLAX BACKGROUND ===== */
@media (max-width: 768px) {

  body { background: #1E1A16; }

  /* 固定背景コンテナ */
  .story-mobile-bg {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
  }

  .story-mobile-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(28, 24, 18, 0.52);
    z-index: 1;
    pointer-events: none;
  }

  .story-mobile-bg-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease;
  }

  .story-mobile-bg-layer.is-active { opacity: 1; }

  /* セクション背景を透明に */
  .page-content { background: transparent; }
  .chapter { background: transparent; }
  .owner-block { background: transparent; }

  /* owner-introは必ず白背景を維持 */
  .owner-intro { background: var(--bg); }

  /* bioは透明 — 写真の上に直接テキストを重ねる */
  .owner-bio { background: transparent; }

  /* スクロール連動オーバーレイ（JSで不透明度制御） */
  .owner-scroll-overlay {
    position: absolute;
    inset: 0;
    background: rgba(28, 24, 18, 0);
    pointer-events: none;
    z-index: 2;
  }

  /* z-index 整理 */
  .owner-photo::after { z-index: 1; }

  /* テキストを白系に */
  .chapter-num { color: rgba(255, 255, 255, 0.18) !important; opacity: 1; }
  .chapter-body .chapter-subtitle { color: rgba(255, 255, 255, 0.75) !important; }
  .chapter-body p { color: rgba(255, 255, 255, 0.82); font-weight: 300; }
  .chapter { border-top-color: rgba(255, 255, 255, 0.1); }
  .chapter-toggle { color: rgba(255, 255, 255, 0.42); }
  .chapter.is-open .chapter-toggle { color: rgba(255, 255, 255, 0.42); }


  /* 締めの一文 */
  .chapter-closing {
    color: rgba(255, 255, 255, 0.88) !important;
    border-top-color: rgba(255, 255, 255, 0.1);
  }

  /* インタビュー */
  .interview-item { border-top: none; }
  .interview-q {
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
  .interview-q {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 400;
    font-size: 0.8rem;
  }
  .interview-a { color: rgba(255, 255, 255, 0.82) !important; font-weight: 300; }
  .owner-bio p { color: rgba(255, 255, 255, 0.82); font-weight: 300; }

  /* Contact CTA */
  /* Contact CTAは通常の背景色に戻す */
  .contact-cta {
    background: var(--bg);
    position: relative;
    z-index: 2;
    border-top-color: rgba(239, 217, 226, 0.4);
  }
  .contact-cta-label { color: var(--accent); }
  .contact-cta-lead { color: var(--text-muted); }
  .contact-cta-link {
    color: var(--accent);
    border-bottom-color: rgba(120, 104, 40, 0.4);
  }

  /* インタールード（ブランドメッセージとオーナーの区切り） */
  .story-interlude {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 5rem 2.5rem;
  }

  .story-interlude-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
  }

  .story-interlude-logo {
    width: 56px;
    height: auto;
    opacity: 0.45;
    filter: brightness(0) invert(1);
  }

  /* フッターは白背景を維持 */
  footer {
    background: var(--bg);
    position: relative;
    z-index: 2;
  }
}
