/* Japan Traditional Culture Signal — portal design language (Cormorant + Inter, white cards, soft shadow)
   traditional layer: indigo (藍) accent, Shippori Mincho for JA text — quiet, editorial, not plain */

:root {
  --ink: #171715;
  --muted: #6d6a63;
  --paper: #fbfaf7;
  --soft: #f1eee7;
  --line: #ded8cc;
  --gold: #9b7a38;
  --cedar: #1f3f38;
  --clay: #9b5849;
  --ai: #2d4a6b;
  --ai-soft: #e9eef5;
  --white: #ffffff;
  --shadow: 0 18px 60px rgba(26, 25, 21, .08);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
p { margin: 0; color: var(--muted); }
h1, h2, h3 { margin: 0; line-height: 1.08; font-family: "Cormorant Garamond", Georgia, serif; font-weight: 500; letter-spacing: 0; }
h1 { font-size: 68px; }
h2 { font-size: 48px; }
h3 { font-size: 24px; }
.ja-text,
[lang="ja"] .card-title, [lang="ja"] .card-ex,
[lang="ja"] .cat-empty, [lang="ja"] .note-item,
[lang="ja"] .feat-card h3, [lang="ja"] #featured h2,
[lang="ja"] .feat-desc, [lang="ja"] .section-head-sub,
[lang="ja"] .hero-credo { font-family: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif; }
.card-orig, .card-ex-orig, .src-ja { font-family: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif; }
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.eyebrow {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* ---- header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 250, 247, .86);
  border-bottom: 1px solid rgba(222, 216, 204, .72);
  backdrop-filter: blur(18px);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}
.brand { font-family: "Cormorant Garamond", Georgia, serif; font-size: 22px; letter-spacing: .03em; white-space: nowrap; }
.brand-accent { color: var(--ai); }
.nav-right { display: flex; align-items: center; gap: 18px; }
.nav-links { display: flex; gap: 20px; align-items: center; font-size: 12px; letter-spacing: .08em; }
.nav-links a { color: #34322e; }
.nav-links a:hover { color: var(--ai); }
.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--white); padding: 7px 14px;
  font: 12px/1 Inter, sans-serif; letter-spacing: .05em; color: var(--muted);
  cursor: pointer; transition: border-color .15s;
}
.lang-toggle:hover { border-color: var(--ai); }
.lang-opt.active { color: var(--ai); font-weight: 600; }
.lang-sep { color: var(--line); }

/* ---- hero ---- */
.hero {
  position: relative;
  min-height: 58svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  background:
    radial-gradient(1200px 500px at 80% 0%, rgba(45, 74, 107, .6), transparent 60%),
    radial-gradient(900px 480px at 12% 110%, rgba(155, 122, 56, .5), transparent 60%),
    linear-gradient(160deg, #1c1a19 0%, #223247 100%);
  color: var(--white);
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 2.5s ease;
}
.hero-bg.on { opacity: 1; }
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(23, 23, 21, .18), rgba(23, 23, 21, .78));
}
.hero-inner { position: relative; z-index: 1; width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 96px 0 56px; }
.hero .eyebrow { color: #e7c98f; }
.hero-credo {
  color: #cfdcec;
  font-size: 19px;
  margin-top: 20px;
  font-weight: 500;
}
.hero-lede { color: rgba(255, 255, 255, .82); max-width: 660px; font-size: 15px; margin-top: 14px; }
.hero-meta { color: rgba(255, 255, 255, .6); font-size: 12px; letter-spacing: .05em; margin-top: 22px; }

/* ---- featured (私たち自身の活動 — 常設・収集ログとは区別) ---- */
.featured {
  padding: 76px 0 68px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f5f2ea 0%, var(--paper) 100%);
}
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0;
  display: flex; flex-direction: column;
  min-width: 0; overflow: hidden;
  transition: transform .18s ease, border-color .18s ease;
}
.feat-card:hover { transform: translateY(-3px); border-color: rgba(45, 74, 107, .5); }
/* 実写ヘッダ(発注者自身の公演・稽古・書道の写真) */
.feat-media { width: 100%; aspect-ratio: 8 / 5; overflow: hidden; background: #1c191b; }
.feat-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.feat-card:hover .feat-media img { transform: scale(1.04); }
.feat-body { padding: 20px 26px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.feat-tag { font-size: 11px; letter-spacing: .14em; color: var(--ai); }
.feat-card h3 { font-size: 23px; line-height: 1.3; }
.feat-desc { font-size: 13px; line-height: 1.95; color: #4c4a44; }
.feat-link { margin-top: auto; padding-top: 12px; font-size: 12px; letter-spacing: .06em; color: var(--ai); }
.feat-card:hover .feat-link { text-decoration: underline; text-underline-offset: 4px; }

/* ---- category bar ---- */
.cat-bar-wrap { background: var(--white); border-bottom: 1px solid var(--line); }
.cat-bar {
  width: min(1180px, calc(100% - 32px)); margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 0;
}
.cat-bar a {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; font-size: 12px; color: var(--muted);
  background: var(--paper); transition: all .15s;
}
.cat-bar a:hover { border-color: var(--ai); color: var(--ai); }
.cat-bar a.empty { opacity: .4; pointer-events: none; }
.cat-bar .n { color: var(--ai); font-weight: 600; margin-left: 5px; }

/* ---- category sections ---- */
.signal-main { padding-bottom: 20px; }
.cat { padding: 60px 0 8px; }
.cat .wrap > .cat-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 24px; }
.cat-title-en { font-size: 40px; }
.cat-count { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.cat-empty {
  border: 1px dashed var(--line); border-radius: var(--radius);
  background: var(--white); padding: 18px 20px; font-size: 13px; color: var(--muted);
}
.cat-empty.soft { border: 0; background: none; padding: 0 0 4px; margin-bottom: 14px; }

/* ---- アーカイブ(各ソースの最新・7日窓の外) ---- */
.arc-head { margin: 26px 0 14px; color: var(--gold); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.card.arc { background: #fdfcf9; border-style: dashed; box-shadow: none; }
.card.arc:hover { border-color: rgba(45, 74, 107, .45); }
.arc-tag { margin-top: 8px; font-size: 10px; letter-spacing: .08em; color: var(--ai); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ---- cards ---- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 20px 18px;
  display: flex; flex-direction: column;
  min-width: 0; overflow-wrap: anywhere;
  transition: transform .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(45, 74, 107, .5); }
.card-src { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; letter-spacing: .04em; color: var(--muted); }
.card-src a:hover { color: var(--ai); }
.card-date { flex: none; color: var(--gold); }
.card-title { margin-top: 10px; font-size: 15.5px; font-weight: 600; line-height: 1.6; font-family: Inter, sans-serif; }
.card-title a:hover { color: var(--ai); }
.card-orig { margin-top: 5px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.card-ex { margin-top: 10px; font-size: 12.5px; color: #4c4a44; line-height: 1.75; }
.card-ex-orig { margin-top: 5px; font-size: 11.5px; color: var(--muted); line-height: 1.8; }
.mt-note { margin-top: 9px; font-size: 10.5px; color: var(--muted); opacity: .8; }

/* 動画スロットはカード最下段に固定(横並びで位置が揃う) */
.card-media { margin-top: auto; padding-top: 12px; }
.card-video {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  /* 読み込み前の枠は絹のテクスチャで埋める(空白・ミスに見せない)。iframeが載れば隠れる */
  background: linear-gradient(rgba(23, 23, 21, .38), rgba(23, 23, 21, .38)), url("texture-silk.jpg") center/cover, #1c191b;
  border-radius: 10px; overflow: hidden;
}
.card-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 1; }
.media-cap { margin-top: 6px; font-size: 10px; color: var(--muted); text-align: right; }
.card-yt-tile, .card-link-tile {
  display: grid; place-content: center; justify-items: center; gap: 6px;
  width: 100%; aspect-ratio: 16 / 9;
  border-radius: 10px; text-align: center; padding: 12px;
  color: var(--white);
  /* 絹のテクスチャで統一 — 動画なし・再生不可でも空白を作らない */
  background: linear-gradient(180deg, rgba(23, 23, 21, .32), rgba(23, 23, 21, .68)), url("texture-silk.jpg") center/cover, #1c191b;
  transition: filter .15s ease;
}
.card-yt-tile:hover, .card-link-tile:hover { filter: brightness(1.15); }
.tile-play {
  display: grid; place-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(45, 74, 107, .92); color: var(--white); font-size: 13px;
  padding-left: 3px;
}
.tile-main { font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.tile-sub { font-size: 10px; color: rgba(255, 255, 255, .65); max-width: 260px; line-height: 1.5; }
/* 本文の高さを揃える(全文はリンク先の公式ページで読める) */
.card-ex, .card-ex-orig { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card-orig { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- sources section ---- */
.section { padding: 88px 0; border-bottom: 1px solid var(--line); }
.section.alt { background: var(--white); }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 32px; align-items: end; margin-bottom: 34px;
}
.section-head-sub { font-size: 13.5px; line-height: 1.9; }
.src-cat { margin: 26px 0 8px; color: var(--gold); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.src-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.src-row {
  display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline;
  font-size: 12.5px; padding: 8px 0; border-bottom: 1px solid var(--soft);
}
.src-row > a:hover { color: var(--ai); }
.src-ja { font-size: 11px; color: var(--muted); }
.src-status { margin-left: auto; font-size: 11px; color: var(--muted); text-align: right; }
.src-status.err { color: var(--clay); }
.note-item {
  margin-top: 18px; padding: 16px 20px;
  background: var(--ai-soft); border-radius: var(--radius);
  font-size: 12.5px; color: #3d4a58; line-height: 1.9;
}
.note-item .note-ja { display: block; margin-top: 6px; color: var(--muted); font-size: 11.5px; font-family: "Shippori Mincho", "Hiragino Mincho ProN", serif; }

/* ---- footer ---- */
.site-footer { background: #121210; color: var(--white); padding: 54px 0; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.footer-brand { font-family: "Cormorant Garamond", Georgia, serif; font-size: 24px; color: var(--white); }
.footer-note { color: rgba(255, 255, 255, .6); font-size: 12px; margin-top: 12px; max-width: 520px; line-height: 1.8; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; justify-content: flex-end; color: rgba(255, 255, 255, .7); font-size: 13px; }
.footer-links a:hover { color: #cfdcec; }

@media (max-width: 900px) {
  h1 { font-size: 44px; }
  h2 { font-size: 36px; }
  .cat-title-en { font-size: 30px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .feat-grid { grid-template-columns: 1fr; }
  .src-rows { grid-template-columns: 1fr; }
  .section-head, .footer-grid { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .nav-links { display: none; }
}
@media (max-width: 620px) {
  h1 { font-size: 34px; }
  .nav { min-height: 60px; gap: 8px; }
  .brand { font-size: 15px; }
  .lang-toggle { padding: 6px 10px; font-size: 11px; }
  .grid { grid-template-columns: 1fr; }
  .hero { min-height: 64svh; }
  .hero-credo { font-size: 16px; }
  .section { padding: 62px 0; }
  .featured { padding: 56px 0 48px; }
}
