/* ======================================
   鏡面人世 - 共通スタイル
   江戸麻の葉 × 茶金 × 暗めグラデーション
   ====================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@300;400;500;700&family=Noto+Sans+JP:wght@300;400&family=Shippori+Mincho:wght@400;500;700&display=swap');

/* ── CSS変数 ──────────────────────── */
:root {
  /* 茶金カラーパレット */
  --cha-deep:   #2e1e0a;   /* 最深部・焦げ茶（明るめに） */
  --cha-dark:   #3d2a10;   /* 暗茶 */
  --cha-mid:    #5a3d18;   /* 中茶 */
  --cha-warm:   #7a5525;   /* 温茶 */
  --kin-dark:   #a87c28;   /* 暗金（より明るく） */
  --kin:        #d4af50;   /* 金（メインアクセント・明るく） */
  --kin-light:  #ecd078;   /* 明金 */
  --kin-pale:   #f5e8a8;   /* 薄金 */
  --hakkin:     #f0d040;   /* 箔金（明るい発光金） */
  --washi:      #f5edd8;   /* 和紙色（テキスト） */
  --usuzumi:    #b09878;   /* 薄墨（サブテキスト・明るく） */
  --kakishibu:  #8a5c2a;   /* 柿渋（ボーダー） */

  /* 麻の葉模様のSVG（金色・より目立つように opacity と stroke-width を上げた） */
  --asanoha: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='69.28'%3E%3Cg fill='none' stroke='%23d4af50' stroke-width='0.9' stroke-linecap='round' opacity='0.6'%3E%3Cpolygon points='30,0 60,17.32 60,51.96 30,69.28 0,51.96 0,17.32'/%3E%3Cpolygon points='30,17.32 45,25.98 45,43.3 30,51.96 15,43.3 15,25.98'/%3E%3Cline x1='30' y1='17.32' x2='30' y2='0'/%3E%3Cline x1='45' y1='25.98' x2='60' y2='17.32'/%3E%3Cline x1='45' y1='43.3' x2='60' y2='51.96'/%3E%3Cline x1='30' y1='51.96' x2='30' y2='69.28'/%3E%3Cline x1='15' y1='43.3' x2='0' y2='51.96'/%3E%3Cline x1='15' y1='25.98' x2='0' y2='17.32'/%3E%3Cline x1='30' y1='17.32' x2='45' y2='43.3'/%3E%3Cline x1='30' y1='17.32' x2='15' y2='43.3'/%3E%3Cline x1='45' y1='25.98' x2='15' y2='43.3'/%3E%3Cline x1='45' y1='25.98' x2='30' y2='51.96'/%3E%3Cline x1='15' y1='25.98' x2='45' y2='43.3'/%3E%3Cline x1='15' y1='25.98' x2='30' y2='51.96'/%3E%3C/g%3E%3C/svg%3E");

  /* タイポグラフィ */
  --font-serif: 'Shippori Mincho', 'Noto Serif JP', serif;
  --font-sans:  'Noto Sans JP', sans-serif;

  /* スペーシング */
  --gap-xs: 0.5rem;
  --gap-sm: 1rem;
  --gap-md: 2rem;
  --gap-lg: 4rem;
  --gap-xl: 8rem;

  /* アニメーション */
  --ease:     cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);
}

/* ── リセット ──────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background-color: var(--cha-deep);
  color: var(--washi);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;

  /*
   * 背景レイヤー構成（下から）
   *  1. 麻の葉タイル（落ち着いた金線）
   *  2. 上が明るい縦グラデーション（深茶→暗茶）
   *  3. ページ上部の光彩（温かみのある金光）
   */
  background-image:
    linear-gradient(
      to bottom,
      rgba(90, 58, 18, 0.70) 0%,
      rgba(60, 38, 10, 0.82) 40%,
      rgba(40, 25, 6, 0.90) 100%
    ),
    var(--asanoha);
/* fixedはモバイルでアドレスバーの伸縮により黒帯が出るため scroll に変更 */
  background-attachment: local, scroll;
  background-size: auto, 60px 69.28px;
  background-position: 0 0, 0 0;
}

/* ページ上部だけ少し明るい金光を疑似要素で追加 */
body::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 65vh;
  background: radial-gradient(
    ellipse 90% 70% at 50% -5%,
    rgba(210, 150, 40, 0.32) 0%,
    rgba(150, 90, 15, 0.16) 45%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; transition: color 0.3s var(--ease); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { background: none; border: none; cursor: pointer; font-family: inherit; color: inherit; }

/* ── スクロールバー ─────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--cha-deep); }
::-webkit-scrollbar-thumb { background: var(--kin-dark); border-radius: 2px; }

/* ── テキスト選択 ───────────────────── */
::selection { background: rgba(201,168,76,0.35); color: var(--washi); }

/* ══════════════════════════════════════
   ナビゲーション
══════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(20,12,3,0.96), transparent);
  backdrop-filter: blur(10px);
  transition: background 0.4s var(--ease);
}

.nav.scrolled {
  background: rgba(20,12,3,0.96);
  border-bottom: 1px solid rgba(201,168,76,0.2);
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  letter-spacing: 0.22em;
  color: var(--kin-light);
  opacity: 0.9;
  transition: opacity 0.3s;
}
.nav-logo:hover { opacity: 1; }

.nav-links { display: flex; gap: 2.5rem; align-items: center; }

.nav-links a {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--usuzumi);
  position: relative;
  padding-bottom: 3px;
  transition: color 0.3s var(--ease);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--kin);
  transition: width 0.3s var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: var(--kin-light); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* ハンバーガー */
.nav-burger { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.nav-burger span {
  display: block; width: 22px; height: 1px;
  background: var(--washi);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* モバイルメニュー */
.nav-mobile {
  display: none;
  position: fixed; inset: 0;
  z-index: 99;
  background: rgba(20,12,3,0.97);
  backdrop-filter: blur(16px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  letter-spacing: 0.25em;
  color: var(--kin-light);
  opacity: 0.7;
  transition: opacity 0.3s;
}
.nav-mobile a:hover { opacity: 1; }

/* ══════════════════════════════════════
   共通コンポーネント
══════════════════════════════════════ */

/* セクション区切り線 */
.section-divider {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 3rem;
}
.section-divider::before,
.section-divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(to right, transparent, rgba(201,168,76,0.35));
}
.section-divider::after {
  background: linear-gradient(to left, transparent, rgba(201,168,76,0.35));
}

.section-label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  color: var(--kin);
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.15em;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: var(--kin-pale);
}

/* 楽曲カード */
.song-card {
  display: block;
  padding: 1.5rem;
  border: 1px solid rgba(201,168,76,0.18);
  background: rgba(37,26,12,0.5);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease);
  cursor: pointer;
}
.song-card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 2px; height: 0;
  background: var(--kin);
  transition: height 0.4s var(--ease);
}
.song-card:hover {
  border-color: rgba(201,168,76,0.45);
  background: rgba(61,42,16,0.6);
  transform: translateX(4px);
}
.song-card:hover::before { height: 100%; }

.song-card-track {
  font-size: 0.65rem; letter-spacing: 0.2em;
  color: var(--kin-dark); margin-bottom: 0.5rem;
}
.song-card-title {
  font-family: var(--font-serif);
  font-size: 1.15rem; font-weight: 400;
  letter-spacing: 0.1em; margin-bottom: 0.3rem;
  color: var(--kin-pale);
}
.song-card-reading {
  font-size: 0.7rem; color: var(--usuzumi); letter-spacing: 0.15em;
}
.song-card-desc {
  font-size: 0.8rem; color: var(--usuzumi);
  margin-top: 0.8rem; line-height: 1.7;
}
.song-card-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }

.tag {
  font-size: 0.6rem; letter-spacing: 0.15em;
  padding: 2px 8px;
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--kin-dark);
}

/* ボタン */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 2rem;
  font-family: var(--font-sans); font-size: 0.75rem; letter-spacing: 0.2em;
  border: 1px solid;
  transition: all 0.3s var(--ease);
  position: relative; overflow: hidden;
}
.btn::before {
  content: ''; position: absolute; inset: 0;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.btn:hover::before { transform: scaleX(1); }

.btn-primary {
  border-color: rgba(201,168,76,0.5);
  color: var(--kin-light);
}
.btn-primary::before { background: rgba(201,168,76,0.12); }
.btn-primary:hover { border-color: var(--kin-light); }

.btn-accent {
  border-color: var(--kin);
  color: var(--kin);
}
.btn-accent::before { background: rgba(201,168,76,0.15); }
.btn-accent:hover { color: var(--cha-deep); background: var(--kin); }

/* ── フッター ──────────────────────── */
.footer {
  margin-top: var(--gap-xl);
  padding: 3rem 2.5rem;
  border-top: 1px solid rgba(201,168,76,0.15);
  text-align: center;
}
.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.2rem; letter-spacing: 0.25em;
  margin-bottom: 1.5rem; color: var(--kin-light);
}
.footer-links {
  display: flex; justify-content: center; gap: 2rem; margin-bottom: 2rem;
}
.footer-links a {
  font-size: 0.7rem; letter-spacing: 0.15em;
  color: var(--usuzumi); transition: color 0.3s;
}
.footer-links a:hover { color: var(--kin-light); }
.footer-copy {
  font-size: 0.65rem; letter-spacing: 0.15em;
  color: rgba(154,136,112,0.45);
}

/* ── ページヘッダー ─────────────────── */
.page-header {
  padding: calc(7rem + 5vw) 2.5rem 4rem;
  text-align: center; position: relative;
}
.page-header::after {
  content: '';
  position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 1px; height: 3rem;
  background: linear-gradient(to bottom, rgba(201,168,76,0.5), transparent);
}
.page-header-en {
  font-size: 0.65rem; letter-spacing: 0.4em;
  color: var(--kin); margin-bottom: 1rem;
}
.page-header-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400; letter-spacing: 0.2em; line-height: 1.3;
  margin-bottom: 1rem; color: var(--kin-pale);
}
.page-header-desc {
  font-size: 0.85rem; color: var(--usuzumi);
  letter-spacing: 0.1em; max-width: 40rem; margin: 0 auto;
}

/* ── YouTube埋め込み ─────────────────── */
.youtube-wrap {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: #000; overflow: hidden;
}
.youtube-wrap iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}

/* ── フェードインアニメーション ───────── */
.fade-in {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── コンテナ ──────────────────────── */
.container {
  width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 2.5rem;
}

/* ── 波紋装飾 ──────────────────────── */
.ripple-deco {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(240,208,64,0.22);
  box-shadow: 0 0 8px rgba(240,208,64,0.08);
  animation: ripple 6s ease-out infinite; pointer-events: none;
}
@keyframes ripple {
  0%   { transform: scale(0.8); opacity: 0.7; }
  100% { transform: scale(2);   opacity: 0; }
}

/* ══════════════════════════════════════
   レスポンシブ
══════════════════════════════════════ */
@media (max-width: 768px) {
  :root { font-size: 15px; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav { padding: 1rem 1.5rem; }
  .container { padding: 0 1.5rem; }
  .page-header { padding: calc(5rem + 3vw) 1.5rem 3rem; }
  .footer { padding: 2.5rem 1.5rem; }
  .footer-links { flex-wrap: wrap; gap: 1.2rem; }
}

@media (max-width: 480px) {
  :root { font-size: 14px; }
}
