/*
Theme Name: Keisen
Theme URI: https://shokakeisen.jp
Author: 書家・桂泉
Description: 書家・桂泉 公式サイト専用ブログテーマ
Version: 1.0
Text Domain: keisen
*/

:root {
  --ink: #1a1509;
  --ink-light: #3d3120;
  --paper: #faf0e6;
  --paper-warm: #f0e6d2;
  --vermillion: #c0392b;
  --gold: #b8943f;
  --gold-light: #d4ab56;
  --gray-soft: #8a8070;
}

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

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: 'Yu Mincho', '游明朝', YuMincho, 'Hiragino Mincho ProN', 'HiraMinProN-W3', 'Noto Serif JP', serif;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='washi'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.04 0.6' numOctaves='4' seed='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.07'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23washi)' fill='%23a08060'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='fiber'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.015 0.8' numOctaves='2' seed='5' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.04'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23fiber)' fill='%23806040'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ── ナビ ── */
nav.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 4rem;
  background: rgba(250, 240, 230, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(184, 148, 63, 0.25);
}

.nav-logo {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--ink);
  text-decoration: none;
}
.nav-logo span { color: var(--vermillion); }

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  color: var(--ink-light);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--vermillion);
  transition: width 0.3s ease;
}
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--vermillion); }
.nav-links a.active::after { width: 100%; }

/* ── ヒーロー帯 ── */
.hero-band {
  position: relative;
  margin-top: 64px;
  height: 240px;
  background: var(--ink);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.hero-band::before {
  content: 'vlog';
  position: absolute;
  right: 6%; top: 50%;
  transform: translateY(-50%);
  font-family: 'Shippori Mincho', serif;
  font-size: 16rem;
  font-weight: 800;
  color: rgba(255,255,255,0.04);
  line-height: 1;
  pointer-events: none;
}
.hero-band::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 55px;
  background: var(--paper);
  clip-path: polygon(0 40%, 15% 60%, 30% 30%, 45% 55%, 60% 25%, 75% 50%, 90% 20%, 100% 40%, 100% 100%, 0 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 4rem 3.5rem;
}
.hero-label {
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  color: var(--gold);
  margin-bottom: 0.6rem;
}
.hero-title {
  font-family: 'Shippori Mincho', serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.15em;
}
.hero-title-sub {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.3em;
  margin-top: 0.5rem;
  font-weight: 300;
}

/* ── メインエリア ── */
main.site-main {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 4rem 8rem;
}

/* ── 記事一覧グリッド ── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.post-card {
  background: var(--paper-warm);
  border: 1px solid rgba(184,148,63,0.2);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(26,21,9,0.12);
}

.post-card-thumb {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--ink);
}
.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.post-card:hover .post-card-thumb img {
  transform: scale(1.04);
}
.post-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Shippori Mincho', serif;
  font-size: 4rem;
  font-weight: 800;
  color: rgba(255,255,255,0.06);
}

.post-card-body {
  padding: 1.4rem 1.6rem 1.6rem;
  border-top: 1px solid rgba(184,148,63,0.15);
}
.post-card-date {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.post-card-title {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink);
  margin-bottom: 0.5rem;
  line-height: 1.7;
}
.post-card-excerpt {
  font-size: 0.78rem;
  color: var(--gray-soft);
  letter-spacing: 0.06em;
  line-height: 1.9;
}

/* ── 単記事 ── */
.single-post {
  max-width: 780px;
  margin: 0 auto;
}
.single-post-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(184,148,63,0.2);
}
.single-post-date {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--gold);
}
.single-post-cat a {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: var(--vermillion);
  text-decoration: none;
  border: 1px solid rgba(192,57,43,0.25);
  padding: 2px 8px;
}

.single-post-thumb {
  margin-bottom: 3rem;
  overflow: hidden;
}
.single-post-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

/* 記事本文 */
.entry-content {
  font-size: 0.95rem;
  line-height: 2.2;
  letter-spacing: 0.06em;
  color: var(--ink-light);
}
.entry-content h2 {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--ink);
  margin: 3rem 0 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(184,148,63,0.25);
  position: relative;
}
.entry-content h2::before {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 2.5rem; height: 1px;
  background: var(--vermillion);
}
.entry-content h3 {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink);
  margin: 2rem 0 0.8rem;
}
.entry-content p { margin-bottom: 1.6rem; }
.entry-content a {
  color: var(--ink);
  border-bottom: 1px solid rgba(184,148,63,0.5);
  text-decoration: none;
  transition: border-color 0.2s;
}
.entry-content a:hover { border-color: var(--gold); }
.entry-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2rem auto;
}
.entry-content ul, .entry-content ol {
  margin: 0 0 1.6rem 1.8rem;
}
.entry-content li { margin-bottom: 0.4rem; }
.entry-content blockquote {
  border-left: 3px solid rgba(184,148,63,0.4);
  padding: 0.8rem 1.5rem;
  margin: 2rem 0;
  background: var(--paper-warm);
  font-size: 0.9rem;
  color: var(--gray-soft);
}

/* 前後の記事ナビ */
.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(184,148,63,0.2);
  gap: 1rem;
}
.post-nav a {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--ink-light);
  text-decoration: none;
  border-bottom: 1px solid rgba(184,148,63,0.3);
  padding-bottom: 2px;
  transition: border-color 0.2s, color 0.2s;
  max-width: 45%;
}
.post-nav a:hover { color: var(--vermillion); border-color: var(--vermillion); }
.post-nav .nav-prev::before { content: '← '; }
.post-nav .nav-next::after { content: ' →'; }

/* ページネーション */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem; height: 2.4rem;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  color: var(--ink-light);
  text-decoration: none;
  border: 1px solid rgba(184,148,63,0.25);
  transition: background 0.2s, color 0.2s;
}
.pagination a:hover { background: var(--paper-warm); }
.pagination .current {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* 著作権注記 */
.copyright-note {
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--gray-soft);
  margin-top: 4rem;
  padding: 1.2rem;
  border: 1px solid rgba(184,148,63,0.15);
}

/* ── フッター ── */
footer.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  border-top: 1px solid rgba(184,148,63,0.2);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--gray-soft);
}

/* ── フェードイン ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── レスポンシブ ── */
@media (max-width: 900px) {
  nav.site-nav { padding: 1rem 1.5rem; }
  .nav-links { gap: 1.2rem; }
  main.site-main { padding: 3rem 1.5rem 5rem; }
  .hero-content { padding: 0 1.5rem 3rem; }
  .hero-title { font-size: 2rem; }
  .post-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .nav-links { display: none; }
}
