/* OwnSoul Theme — screen.css
 * 和紙質感・金箔ライン・縦書き教養誌風
 */

:root {
  --ink: #1a1d24;
  --ink-soft: #3a3d44;
  --ink-muted: #6a6d74;
  --paper: #f4efe6;
  --paper-bright: #faf8f3;
  --paper-shadow: #e8e0d2;
  --gold: #c9a961;
  --gold-deep: #a88a47;
  --line: rgba(26, 29, 36, 0.08);
  --line-gold: rgba(201, 169, 97, 0.35);
}

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

body {
  font-family: "Shippori Mincho", "Noto Serif JP", serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.9;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.02em;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* 和紙テクスチャ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.08 0 0 0 0 0.05 0 0 0 0 0.08 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.5'/></svg>");
  mix-blend-mode: multiply;
  opacity: 0.35;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    repeating-linear-gradient(92deg, transparent 0, transparent 3px, rgba(168, 138, 71, 0.015) 3px, rgba(168, 138, 71, 0.015) 4px, transparent 4px, transparent 8px),
    repeating-linear-gradient(178deg, transparent 0, transparent 40px, rgba(26, 29, 36, 0.008) 40px, rgba(26, 29, 36, 0.008) 41px);
}

main, header, footer { position: relative; z-index: 2; }

/* ヘッダー（サイト） */
.site-header {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 40px 60px;
  text-align: center;
  position: relative;
}

.brand {
  font-family: "Cormorant Garamond", serif;
  font-size: 42px;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--ink);
  margin-bottom: 8px;
  text-decoration: none;
  display: block;
}

.brand-ja {
  font-size: 13px;
  letter-spacing: 0.4em;
  color: var(--ink-muted);
  margin-bottom: 28px;
}

.tagline {
  font-size: 15px;
  color: var(--ink-soft);
  letter-spacing: 0.12em;
  line-height: 1.8;
}

/* 装飾罫線 */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 32px auto;
  max-width: 240px;
}

.ornament .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 40%, var(--gold) 60%, transparent);
  opacity: 0.6;
}

.ornament .diamond {
  width: 5px;
  height: 5px;
  background: var(--gold);
  transform: rotate(45deg);
  opacity: 0.7;
}

/* 記事リスト */
.posts {
  max-width: 680px;
  margin: 0 auto;
  padding: 80px 40px;
}

.section-label {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 14px;
  color: var(--gold-deep);
  letter-spacing: 0.25em;
  text-align: center;
  margin-bottom: 60px;
  text-transform: uppercase;
}

article.card {
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}

article.card::before {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  width: 40px;
  height: 1px;
  background: var(--gold);
  transform: translateX(-50%);
  opacity: 0.5;
}

article.card:last-child { border-bottom: none; }
article.card:last-child::before { display: none; }

.post-meta {
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.2em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.post-category { color: var(--gold-deep); }

.post-category::after {
  content: '·';
  margin-left: 14px;
  color: var(--ink-muted);
}

h2.post-title {
  font-size: 26px;
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 18px;
  letter-spacing: 0.04em;
}

h2.post-title a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.3s;
}

h2.post-title a:hover { color: var(--gold-deep); }

.post-excerpt {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 2;
  margin-bottom: 20px;
}

.read-more {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 14px;
  color: var(--gold-deep);
  text-decoration: none;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--line-gold);
  padding-bottom: 2px;
  transition: all 0.3s;
}

.read-more:hover {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

/* ピラー記事 */
article.card.pillar {
  padding: 64px 48px;
  margin: 40px 0;
  background: var(--paper-bright);
  position: relative;
}

article.card.pillar::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid var(--line-gold);
  pointer-events: none;
}

.pillar-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  padding: 0 16px;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--gold-deep);
  text-transform: uppercase;
  z-index: 1;
}

/* トップバー（記事ページ） */
.top-bar {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 40px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.back-link {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 14px;
  color: var(--ink-muted);
  text-decoration: none;
  letter-spacing: 0.1em;
}

.back-link:hover { color: var(--gold-deep); }

.site-mark {
  font-family: "Cormorant Garamond", serif;
  font-size: 18px;
  letter-spacing: 0.2em;
  color: var(--ink);
  text-decoration: none;
}

/* 記事ヘッダー */
.article-header {
  max-width: 680px;
  margin: 0 auto;
  padding: 80px 40px 60px;
  text-align: center;
}

.category-tag {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 14px;
  color: var(--gold-deep);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.article-header h1 {
  font-size: 34px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.04em;
  margin-bottom: 32px;
  color: var(--ink);
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.2em;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.article-meta span::after {
  content: '·';
  margin-left: 20px;
  color: var(--line);
}

.article-meta span:last-child::after { content: ''; }

/* 本文 */
.article-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 20px 40px 80px;
  font-size: 17px;
  line-height: 2.1;
  letter-spacing: 0.03em;
}

.article-body p {
  margin-bottom: 1.8em;
  color: var(--ink-soft);
  text-align: justify;
  text-justify: inter-ideograph;
}

/* リード段落 — 本文1つめのpをリードとして扱う */
.article-body > p:first-of-type {
  font-size: 19px;
  color: var(--ink);
  line-height: 2;
  margin-bottom: 2.5em;
  letter-spacing: 0.05em;
}

.article-body > p:first-of-type::first-letter {
  font-family: "Cormorant Garamond", serif;
  font-size: 58px;
  float: left;
  line-height: 0.9;
  padding: 8px 12px 0 0;
  color: var(--gold-deep);
}

.article-body h2 {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin: 3em 0 1.5em;
  padding-top: 1em;
  position: relative;
  text-align: center;
}

.article-body h2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}

.article-body h3 {
  font-size: 19px;
  font-weight: 500;
  margin: 2.5em 0 1em;
  color: var(--ink);
  letter-spacing: 0.04em;
}

.article-body blockquote {
  margin: 2.5em 0;
  padding: 28px 32px;
  font-style: italic;
  font-size: 16px;
  color: var(--ink);
  border-left: 2px solid var(--gold);
  background: var(--paper-bright);
  font-family: "Cormorant Garamond", "Shippori Mincho", serif;
  letter-spacing: 0.05em;
  line-height: 1.9;
}

.article-body blockquote cite {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  font-style: normal;
  color: var(--ink-muted);
  letter-spacing: 0.2em;
}

.article-body blockquote cite::before { content: '— '; }

.article-body a {
  color: var(--gold-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--line-gold);
  padding-bottom: 1px;
  transition: all 0.3s;
}

.article-body a:hover {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

.article-body strong { font-weight: 600; color: var(--ink); }

.article-body ul, .article-body ol {
  margin: 1.5em 0 1.8em 1.5em;
  color: var(--ink-soft);
}

.article-body li { margin-bottom: 0.6em; }

.article-body img {
  display: block;
  margin: 2em auto;
}

.article-body figure { margin: 2em 0; }
.article-body figcaption {
  font-size: 12px;
  color: var(--ink-muted);
  text-align: center;
  letter-spacing: 0.15em;
  margin-top: 8px;
}

/* Ghost Koenig card widths */
.kg-width-wide {
  max-width: 85vw;
  width: 900px;
  margin-left: 50%;
  transform: translateX(-50%);
}

.kg-width-full {
  max-width: 100vw;
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
}

.kg-image { max-width: 100%; height: auto; }

.kg-bookmark-card {
  display: flex;
  border: 1px solid var(--line);
  background: var(--paper-bright);
  margin: 2em 0;
  text-decoration: none;
  color: var(--ink);
}

.kg-bookmark-container { display: flex; width: 100%; text-decoration: none; color: inherit; }
.kg-bookmark-content { flex: 1; padding: 20px; }
.kg-bookmark-title { font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.kg-bookmark-description { font-size: 14px; color: var(--ink-muted); }
.kg-bookmark-thumbnail img { width: 160px; height: 100%; object-fit: cover; }

/* 区切り */
.article-body hr {
  border: none;
  margin: 4em auto;
  width: 100%;
  height: 40px;
  background:
    radial-gradient(circle at center, var(--gold) 2px, transparent 3px),
    linear-gradient(90deg, transparent 0%, transparent calc(50% - 60px), var(--line-gold) calc(50% - 60px), var(--line-gold) calc(50% - 8px), transparent calc(50% - 8px), transparent calc(50% + 8px), var(--line-gold) calc(50% + 8px), var(--line-gold) calc(50% + 60px), transparent calc(50% + 60px));
  background-size: 100% 100%, 100% 1px;
  background-position: center, center;
  background-repeat: no-repeat;
}

/* CTA */
.cta {
  margin: 4em 0 2em;
  padding: 40px 32px;
  background: var(--paper-bright);
  border: 1px solid var(--line-gold);
  text-align: center;
  position: relative;
}

.cta::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid var(--line-gold);
  pointer-events: none;
  opacity: 0.5;
}

.cta-label {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 13px;
  color: var(--gold-deep);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.cta p {
  font-size: 15px;
  margin-bottom: 20px;
  color: var(--ink);
}

.cta-button {
  display: inline-block;
  padding: 12px 32px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.25em;
  border: none;
  transition: background 0.3s;
  cursor: pointer;
}

.cta-button:hover { background: var(--gold-deep); }

/* 記事末尾 */
.article-end {
  text-align: center;
  margin: 3em 0;
}

.article-end .ornament { margin: 0 auto 20px; }

.author-note {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 14px;
  color: var(--ink-muted);
  letter-spacing: 0.1em;
}

/* ページネーション */
.pagination {
  max-width: 680px;
  margin: 40px auto 0;
  padding: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.1em;
}

.pagination a {
  color: var(--gold-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--line-gold);
  padding-bottom: 2px;
  transition: all 0.3s;
}

.pagination a:hover { color: var(--ink); border-bottom-color: var(--gold); }
.pagination .page-number { color: var(--ink-muted); }
.pagination .older,
.pagination .newer { flex: 1; }
.pagination .newer { text-align: left; }
.pagination .older { text-align: right; }
.pagination .page-number { flex: 0 0 auto; text-align: center; }

/* フッター */
footer.site-footer {
  max-width: 680px;
  margin: 80px auto 0;
  padding: 60px 40px;
  text-align: center;
  border-top: 1px solid var(--line);
  position: relative;
}

footer.site-footer .ornament {
  margin-top: -32px;
  margin-bottom: 32px;
  background: var(--paper);
  padding: 0 16px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.footer-brand {
  font-family: "Cormorant Garamond", serif;
  font-size: 20px;
  letter-spacing: 0.2em;
  color: var(--ink);
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.25em;
  margin-bottom: 32px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  font-size: 12px;
  letter-spacing: 0.2em;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-links a:hover { color: var(--gold-deep); }

.copyright {
  margin-top: 40px;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.15em;
}

/* エラー */
.error-wrapper {
  max-width: 680px;
  margin: 0 auto;
  padding: 120px 40px;
  text-align: center;
}

.error-code {
  font-family: "Cormorant Garamond", serif;
  font-size: 120px;
  color: var(--gold-deep);
  letter-spacing: 0.1em;
  line-height: 1;
  margin-bottom: 24px;
}

.error-message {
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 32px;
}

/* レスポンシブ */
@media (max-width: 640px) {
  .site-header { padding: 60px 24px 40px; }
  .brand { font-size: 34px; }
  .posts { padding: 60px 24px; }
  article.card { padding: 36px 0; }
  article.card.pillar { padding: 40px 24px; }
  h2.post-title { font-size: 22px; }
  .top-bar { padding: 24px 24px 0; }
  .article-header { padding: 48px 24px 40px; }
  .article-header h1 { font-size: 26px; }
  .article-body { padding: 20px 24px 60px; font-size: 16px; }
  .article-body > p:first-of-type { font-size: 17px; }
  .article-body > p:first-of-type::first-letter { font-size: 48px; }
  .error-code { font-size: 80px; }
}

/* フェードイン */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

article.card {
  animation: fadeUp 0.8s ease-out backwards;
}

article.card:nth-child(2) { animation-delay: 0.1s; }
article.card:nth-child(3) { animation-delay: 0.2s; }
article.card:nth-child(4) { animation-delay: 0.3s; }
article.card:nth-child(5) { animation-delay: 0.4s; }
