@charset "UTF-8";
/* ============================================================
   バッハの森クワイア — style.css
   方向: 木造奏楽堂/オルガンの響き系(ウォールナット×真鍮)
   構成: 1.トークン → 2.リセット/ベース → 3.レイアウト
        → 4.コンポーネント → 5.モーション → 6.停止ポリシー
   ============================================================ */

/* ---------- 1. トークン ---------- */
:root {
  --walnut-deepest: #1C0F07;
  --walnut-deep: #2E1B10;
  --walnut: #402917;
  --walnut-warm: #4E3220;
  --brass: #B08D57;
  --brass-deep: #755A34;
  --brass-light: #D8BC8B;
  --brass-glow: #F0CE93;
  --ivory: #F4ECDD;
  --ivory-soft: #FAF6EC;
  --ink: #241609;
  --ink-muted: #6B5A45;
  --line-on-dark: rgba(216, 188, 139, 0.28);
  --line-on-light: rgba(64, 41, 23, 0.18);

  --font-display: "Shippori Mincho", "Hiragino Mincho ProN", serif;
  --font-body: "Noto Serif JP", "Hiragino Mincho ProN", serif;
  --font-latin: "EB Garamond", serif;

  --space: 8px;
  --section-pad: clamp(72px, 12vw, 148px);
  --container: 1160px;
  --container-narrow: 720px;

  --z-header: 100;
  --z-nav: 200;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 1.5s;
}

/* ---------- 2. リセット/ベース ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.95;
  font-size: 16px;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}

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

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

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.03em;
}

.wrap { width: min(var(--container), 100% - 48px); margin-inline: auto; }
.wrap--narrow { width: min(var(--container-narrow), 100% - 48px); margin-inline: auto; }
.center { text-align: center; }

.section { padding-block: var(--section-pad); position: relative; }
.section--light { background: var(--ivory); }
.section--soft { background: var(--ivory-soft); }
.section--dark {
  background: linear-gradient(180deg, var(--walnut-deep) 0%, var(--walnut-deepest) 100%);
  color: var(--ivory);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-latin);
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--brass-deep);
  margin-bottom: calc(var(--space) * 2);
}
.section--dark .eyebrow { color: var(--brass-light); }

.section-title {
  font-size: clamp(26px, 3.6vw, 38px);
  margin-bottom: calc(var(--space) * 4);
}

.lede {
  max-width: 38em;
  color: var(--ink-muted);
  font-size: 17px;
}
.lede + .lede { margin-top: 1.2em; }
.section--dark .lede { color: rgba(244, 236, 221, 0.82); }

.divider { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: calc(var(--space) * 3); }
.divider .stroke { width: 48px; height: 1px; background: var(--line-on-light); }
.section--dark .divider .stroke { background: var(--line-on-dark); }

/* ハンドベル(3つ組・大きさ違いで組ベルを示す。文言では触れず意匠のみで) */
.bell-trio { display: flex; align-items: flex-end; gap: 5px; color: var(--brass); }
.section--dark .bell-trio { color: var(--brass-light); }
.bell { display: block; }
.bell--sm { width: 9px; height: 10.5px; }
.bell--md { width: 11px; height: 12.8px; }
.bell--lg { width: 14px; height: 16.3px; }

/* ハンドベル・クワイア(スクロールで鳴らす演出。演目セクションのパイプ点灯と対になる存在) */
.bell-choir {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 10px;
  margin-bottom: calc(var(--space) * 4);
}
.bell-choir .bell {
  width: var(--bw, 14px);
  height: var(--bh, 16px);
  color: var(--brass-deep);
  transform-origin: 50% 8%;
}
.bell-choir.is-rung .bell {
  animation: bellSwing 2.6s var(--ease-out) 2 both;
  animation-delay: calc(var(--i, 0) * 0.32s);
}
@keyframes bellSwing {
  0% { transform: rotate(0deg); }
  22% { transform: rotate(16deg); }
  45% { transform: rotate(-12deg); }
  65% { transform: rotate(7deg); }
  82% { transform: rotate(-3deg); }
  100% { transform: rotate(0deg); }
}

/* ---------- 4. コンポーネント ---------- */

/* ヘッダー */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-header);
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px clamp(20px, 4vw, 48px);
  transition: background 0.4s, box-shadow 0.4s;
}
.site-header.is-scrolled {
  background: rgba(28, 15, 7, 0.88);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line-on-dark);
}
.site-header__logo {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ivory);
  letter-spacing: 0.06em;
}

.global-nav ul { display: flex; gap: calc(var(--space) * 4); list-style: none; padding: 0; }
.global-nav a { font-size: 14px; letter-spacing: 0.06em; color: var(--ivory-soft); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none; border: none; cursor: pointer;
  position: relative; z-index: calc(var(--z-nav) + 1);
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; margin: 5px auto;
  background: var(--ivory); transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1199px) {
  .nav-toggle { display: block; }
  .global-nav {
    position: fixed; inset: 0; z-index: var(--z-nav);
    background: var(--walnut-deepest);
    display: grid; place-content: center;
    opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0.4s;
  }
  .global-nav.is-open { opacity: 1; visibility: visible; }
  .global-nav ul { flex-direction: column; text-align: center; gap: calc(var(--space) * 4); }
  .global-nav a { font-size: 19px; }
}

/* ヒーロー */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  overflow: hidden;
  color: var(--ivory);
  padding-top: 6rem; padding-bottom: 4rem;
}
.hero-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 32%;
  filter: brightness(0.72) saturate(1.05);
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(20,11,5,0.88) 0%, rgba(20,11,5,0.76) 32%, rgba(20,11,5,0.4) 60%, rgba(20,11,5,0.14) 100%),
    linear-gradient(to top, rgba(20,11,5,0.62) 0%, rgba(20,11,5,0) 34%);
}

/* ---------- オルガンパイプ・クラスター(シグネチャー) ---------- */
.pipe-cluster {
  display: flex; align-items: flex-end;
  gap: clamp(3px, 0.6vw, 8px);
  pointer-events: none;
}
.pipe-cluster .pipe {
  width: var(--pw, 14px);
  height: var(--ph, 40%);
  background: linear-gradient(to top, var(--walnut) 0%, var(--brass) 58%, var(--brass-glow) 100%);
  border-radius: 7px 7px 2px 2px;
  position: relative;
  opacity: 0.32;
  box-shadow: 0 0 0 rgba(240,206,147,0);
  transition: opacity 3.6s var(--ease-out), box-shadow 3.6s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 0.4s);
}
.pipe-cluster .pipe::after {
  /* パイプの唇(マウス)。実物は根元寄り、下から2割ほどの高さにある */
  content: "";
  position: absolute; left: 12%; right: 12%; top: 80%;
  height: 2px;
  background: rgba(20, 11, 5, 0.4);
}
.pipe-cluster.is-lit .pipe {
  opacity: 0.92;
  box-shadow: 0 0 18px 2px rgba(240, 206, 147, 0.35);
}

/* 天使モチーフ(バロック風・トランペットを吹く天使の線画をブラス単色に変換) */
.angel-wrap {
  position: absolute; z-index: 1;
  right: clamp(0px, 1.5vw, 24px); bottom: 0%;
  width: clamp(240px, 30vw, 380px);
}
.angel-wrap img { width: 100%; height: auto; display: block; }
.angel-shimmer {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 15%, rgba(255,247,230,0.95) 50%, transparent 85%);
  background-size: 260% 260%;
  -webkit-mask-image: url(../img/angel-gold.webp);
  mask-image: url(../img/angel-gold.webp);
  -webkit-mask-mode: alpha;
  mask-mode: alpha;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  mix-blend-mode: overlay;
  animation: shimmerMove 7s ease-in-out infinite;
}
@keyframes shimmerMove {
  0%, 100% { background-position: 10% 20%; }
  50%      { background-position: 90% 80%; }
}

/* ヒーロー・ロードシーケンス */
.hero-inner { position: relative; z-index: 2; max-width: 640px; }
.hero-inner > * { opacity: 0; }
.is-loaded .hero-inner .eyebrow { animation: heroUp 1.4s var(--ease-out) 0.2s forwards; }
.is-loaded .hero-inner h1 { animation: heroUp 1.4s var(--ease-out) 0.55s forwards; }
.is-loaded .hero-inner p.sub { animation: heroUp 1.4s var(--ease-out) 0.9s forwards; }
.is-loaded .hero-inner .cta-row { animation: heroUp 1.4s var(--ease-out) 1.25s forwards; }
@keyframes heroUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

.hero h1 {
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.5;
}
.hero h1 em { font-style: normal; color: var(--brass-glow); }
.hero p.sub { margin-top: calc(var(--space) * 3); font-size: 16px; color: rgba(244,236,221,0.85); max-width: 32em; }
.hero .cta-row { margin-top: calc(var(--space) * 5); }

/* ボタン */
.btn-primary {
  display: inline-block;
  position: relative; overflow: hidden; z-index: 0;
  padding: 15px 38px;
  background: var(--brass);
  color: var(--walnut-deepest);
  border: 1px solid var(--brass);
  font-size: 15px; letter-spacing: 0.06em;
  transition: color 0.4s var(--ease-out);
}
.btn-primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--walnut-deepest);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.45s var(--ease-out);
}
.btn-primary:hover { color: var(--brass-light); }
.btn-primary:hover::before { transform: scaleX(1); }

.link-quiet {
  display: inline-block;
  font-size: 13px;
  padding-bottom: 2px;
  color: var(--brass-deep);
  background: linear-gradient(currentColor, currentColor) no-repeat left bottom / 100% 1px;
  transition: background-size 0.4s var(--ease-out), color 0.3s;
}
@media (hover: hover) {
  .link-quiet:hover { background-size: 0 1px; color: var(--brass); }
}

/* 2カラム系 */
.grid-2 {
  display: grid; grid-template-columns: 1fr; gap: calc(var(--space) * 6);
}
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(32px, 5vw, 72px); }
}
.grid-2--reverse { direction: rtl; }
.grid-2--reverse > * { direction: ltr; }

@media (min-width: 768px) {
  /* 学び舎セクション: 写真が細長いため、1fr/1frの均等割りだと文章と写真の間が間延びする */
  .grid-2--story { grid-template-columns: 1fr auto; gap: clamp(24px, 4vw, 48px); }
}

.story-col p + p { margin-top: 1.2em; }

/* 額装フレーム(小さな原資料写真用) */
.hall-frame {
  width: fit-content; margin-inline: auto;
  border: 1px solid var(--line-on-light);
  padding: 10px;
  background: var(--ivory-soft);
}
.hall-frame img { width: min(380px, 78vw); aspect-ratio: 700 / 802; height: auto; object-fit: cover; }
.section--dark .hall-frame { border-color: var(--line-on-dark); background: rgba(244,236,221,0.04); }
.portrait-caption {
  text-align: center; margin-top: 0.8rem;
  font-family: var(--font-latin); font-style: italic;
  font-size: 13px; color: var(--ink-muted);
}
.section--dark .portrait-caption { color: rgba(244,236,221,0.7); }

.portrait-frame {
  max-width: 340px; margin-inline: auto;
  position: relative;
  overflow: hidden;
}
.portrait-frame--compact { max-width: 285px; }
.portrait-frame::before {
  content: "";
  position: absolute; inset: -8px;
  border: 1px solid var(--brass);
  opacity: 0.5;
  z-index: 1;
  pointer-events: none;
}
.portrait-frame img { position: relative; transition: transform 0.9s var(--ease-out); }
@media (hover: hover) {
  .portrait-frame:hover img { transform: scale(1.05); }
}

/* コラール(破調セクション) */
.legacy-quote {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 26px);
  line-height: 1.9;
  color: var(--ivory-soft);
  border-left: 2px solid var(--brass);
  padding-left: 1.4em;
  margin: calc(var(--space) * 6) auto;
  max-width: 34em;
}
.legacy-quote__cite {
  display: block;
  font-family: var(--font-latin);
  font-style: italic;
  font-size: 14px;
  color: var(--brass-light);
  margin-top: 0.7em;
}

/* 奏楽堂を通り抜けるオルガンパイプ(演目セクションのシグネチャー) */
.repertoire-pipes {
  justify-content: center;
  gap: clamp(4px, 1.4vw, 14px);
  height: clamp(48px, 8vw, 96px);
  margin: 0 auto calc(var(--space) * 5);
}
/* スクロールscrubで直接opacityを制御するため、CSS側の遅延トランジションは切る(GSAPのscrub自体が滑らかさを担う) */
.repertoire-pipes .pipe { transition: box-shadow 0.4s var(--ease-out); transition-delay: 0s; }
/* このセクションはパイプの丈が低く、口の位置が下すぎると見えにくいため5%上げる */
.repertoire-pipes .pipe::after { top: 75%; }

/* 主な取り組む作品 */
.rep-list { max-width: 620px; margin: calc(var(--space) * 5) auto 0; display: grid; gap: calc(var(--space) * 3); }
.rep-list div {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 0; border-bottom: 1px solid var(--line-on-dark);
  gap: 1em;
  transition: padding-left 0.35s var(--ease-out), border-color 0.35s;
}
@media (hover: hover) {
  .rep-list div:hover { padding-left: 10px; border-color: var(--brass); }
}
.rep-list span:first-child { font-family: var(--font-latin); font-style: italic; font-size: 18px; color: var(--brass-light); }
.rep-list span:last-child { font-size: 14px; color: rgba(244,236,221,0.75); text-align: right; }

.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: calc(var(--space) * 3); }
.badge {
  font-size: 12px; letter-spacing: 0.03em;
  padding: 6px 14px;
  border: 1px solid var(--line-on-light);
  color: var(--ink-muted);
  transition: border-color 0.3s, color 0.3s;
}
.section--dark .badge { border-color: var(--line-on-dark); color: rgba(244,236,221,0.8); }
@media (hover: hover) {
  .badge:hover { border-color: var(--brass); color: var(--brass-deep); }
  .section--dark .badge:hover { border-color: var(--brass-light); color: var(--brass-light); }
}

.pull {
  font-family: var(--font-display);
  font-size: 20px; font-style: normal;
  color: var(--brass-deep);
  margin-top: calc(var(--space) * 3);
}

/* カード(参加案内) */
.cards {
  display: grid; grid-template-columns: 1fr; gap: calc(var(--space) * 4);
  margin-top: calc(var(--space) * 6);
}
@media (min-width: 768px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}
.card {
  padding: calc(var(--space) * 4);
  background: var(--ivory-soft);
  border: 1px solid var(--line-on-light);
  text-align: left;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.4s;
}
@media (hover: hover) {
  .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(28, 15, 7, 0.12);
    border-color: var(--brass);
  }
}
.card h3 { font-size: 17px; margin-bottom: 0.6em; }
.card p { font-size: 14.5px; color: var(--ink-muted); }

/* CTA帯 */
.cta-band { padding: calc(var(--space) * 6) 0; }

/* 問い合わせ */
.contact-box {
  max-width: 640px; margin: calc(var(--space) * 6) auto 0;
  padding: calc(var(--space) * 5);
  background: var(--ivory-soft);
  border: 1px solid var(--line-on-light);
}
.contact-row {
  display: grid; grid-template-columns: 1fr; gap: calc(var(--space) * 3);
  text-align: left; margin-bottom: calc(var(--space) * 5);
}
@media (min-width: 600px) {
  .contact-row { grid-template-columns: 1fr 1fr; }
  .contact-row__wide { grid-column: 1 / -1; }
}
.contact-row dt { font-size: 12px; letter-spacing: 0.1em; color: var(--brass-deep); margin-bottom: 0.3em; }
.contact-row dd { font-size: 15px; }
.contact-row dd br + a { margin-top: 0.3em; display: inline-block; }

/* SNSリンク(会費・指揮・オルガン担当と同じ表内、オルガン担当の右の空きセルに配置) */
.sns-links { display: flex; align-items: center; gap: 12px; align-self: end; }
.sns-links a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line-on-light);
  color: var(--brass-deep);
  transition: border-color 0.3s, color 0.3s;
}
.sns-links a svg { width: 17px; height: 17px; }
@media (hover: hover) {
  .sns-links a:hover { border-color: var(--brass); color: var(--brass); }
}

/* フッター */
.site-footer {
  padding: calc(var(--space) * 8) 0 calc(var(--space) * 5);
  background: var(--walnut-deepest);
  color: rgba(244,236,221,0.75);
  font-size: 13px;
  text-align: center;
}
.site-footer .logo { font-family: var(--font-display); font-size: 16px; color: var(--ivory); display: block; margin-bottom: 0.6em; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-top: calc(var(--space) * 3); }
.foot-links a {
  font-size: 12.5px;
  background: linear-gradient(currentColor, currentColor) no-repeat left bottom / 0 1px;
  transition: background-size 0.35s var(--ease-out), color 0.3s;
}
@media (hover: hover) {
  .foot-links a:hover { background-size: 100% 1px; color: var(--brass-light); }
}
.footer-pipes { justify-content: center; height: 28px; margin-bottom: calc(var(--space) * 4); opacity: 0.8; }

/* デスクトップナビの下線ホバー */
.global-nav a {
  background: linear-gradient(currentColor, currentColor) no-repeat left bottom / 0 1px;
  transition: background-size 0.35s var(--ease-out), color 0.2s;
}
@media (hover: hover) {
  .global-nav a:hover { background-size: 100% 1px; color: var(--brass-light); }
}

/* ---------- 5. モーション基盤 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--duration) var(--ease-out), transform var(--duration) var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }

/* ---------- 6. モーション停止(reduced-motion環境にのみ表示) ---------- */
.motion-stop {
  display: none;
  position: fixed; right: 16px; bottom: 16px; z-index: 300;
  padding: 10px 16px; font-size: 12px;
  background: rgba(28, 15, 7, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line-on-dark);
  color: var(--ivory);
  border-radius: 999px; cursor: pointer;
}
.motion-stop:hover { border-color: var(--brass); color: var(--brass-light); }
@media (prefers-reduced-motion: reduce) {
  .motion-stop { display: block; }
}
html.is-motion-off .reveal,
html.is-motion-off .pipe-cluster .pipe,
html.is-motion-off *[class] {
  transition-duration: 0.01ms !important;
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
}
html.is-motion-off .reveal { opacity: 1; transform: none; }

/* ---------- レスポンシブ調整 ---------- */
@media (max-width: 767px) {
  .portrait-frame { max-width: 260px; }
  .section { padding-block: clamp(56px, 14vw, 96px); }
  .btn-primary { padding: 15px 26px; font-size: 14px; letter-spacing: 0.04em; }

  /* モバイルではテキスト(見出し〜CTA)が縦に長く伸び、下端固定だと天使モチーフと重なるため
     常に空いているヘッダー下の余白(本文開始前)へ退避させ、サイズも縮小する */
  .angel-wrap {
    top: 5.5rem; bottom: auto; right: 4%;
    width: clamp(110px, 32vw, 190px);
  }
}
