/* ================================================
   Visual Poem CSS - 20251117-001
   本質にはたくさんの名前があるのかもしれない

   Theme: モノトーンで静かに説得力のある視覚詩
   Concept: 視点・名前・翻訳・多様性を白黒で表現
   ================================================ */

/* ========== キーワード共通スタイル ========== */
.keyword {
  position: relative;
  display: inline-block;
  font-weight: 500;
  padding: 0 0.15em;
  transition: all 0.4s ease;
  letter-spacing: 0.05em;
}

/* ========== 本質 (Essence) - 中心、シンプル ========== */
.keyword-essence {
  font-weight: 600;
  color: rgba(255, 255, 255, 1);
  position: relative;
  padding: 0.1em 0.3em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.keyword-essence::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.8);
  transition: width 0.6s ease;
}

.keyword-essence:hover::after {
  width: 100%;
}

/* ========== 名前 (Name) - 増える、散らばる ========== */
.keyword-name {
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.1em;
  position: relative;
}

.keyword-name::before {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  color: rgba(255, 255, 255, 0.15);
  transform: translate(1px, 1px);
  z-index: -1;
  pointer-events: none;
}

.keyword-name::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  color: rgba(255, 255, 255, 0.1);
  transform: translate(-1px, -1px);
  z-index: -1;
  pointer-events: none;
}

/* ========== 視点 (Perspective) - 角度が変わる ========== */
.keyword-perspective {
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  font-style: italic;
  transform-origin: center;
  display: inline-block;
}

.keyword-perspective::before {
  content: '';
  position: absolute;
  left: -0.3em;
  top: 50%;
  width: 2px;
  height: 60%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateY(-50%) rotate(15deg);
}

/* ========== 翻訳 (Translation) - 境界を越える ========== */
.keyword-translation {
  color: rgba(255, 255, 255, 0.95);
  position: relative;
  padding: 0 0.4em;
}

.keyword-translation::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 20%,
    rgba(255, 255, 255, 0.2) 80%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateY(-50%);
}

.keyword-translation::after {
  content: '↔';
  position: absolute;
  right: -1.2em;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7em;
  color: rgba(255, 255, 255, 0.3);
  font-style: normal;
}

/* ========== 多様性 (Diversity) - 複数の影 ========== */
.keyword-diversity {
  color: rgba(255, 255, 255, 1);
  font-weight: 600;
  position: relative;
  text-shadow:
    1px 1px 0 rgba(255, 255, 255, 0.2),
    2px 2px 0 rgba(255, 255, 255, 0.15),
    3px 3px 0 rgba(255, 255, 255, 0.1),
    4px 4px 0 rgba(255, 255, 255, 0.05);
  letter-spacing: 0.15em;
}

/* ========== 段落の視覚化 ========== */
.article-content p {
  position: relative;
  line-height: 2.2;
  margin: 1.8em 0;
  text-align: justify;
  text-justify: inter-ideograph;
}

/* 重要な段落の強調 */
.article-content section:nth-child(3) p:first-of-type,
.article-content section:nth-child(4) p:first-of-type {
  padding-left: 1.5em;
  border-left: 2px solid rgba(255, 255, 255, 0.2);
}

/* ========== リストアイテムの視覚化 ========== */
.article-content ul {
  list-style: none;
  padding-left: 0;
  margin: 2em 0;
}

.article-content ul li {
  position: relative;
  padding: 0.6em 0 0.6em 2em;
  margin: 0.8em 0;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
}

.article-content ul li::before {
  content: '—';
  position: absolute;
  left: 0.3em;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 300;
}

.article-content ul li::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30%;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0) 100%
  );
}

/* ========== 見出しの視覚化 ========== */
.article-content h2 {
  position: relative;
  padding: 1.5em 0 1em 0;
  margin: 3em 0 2em 0;
  line-height: 1.9;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: left;
}

.article-content h2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3em;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0) 100%
  );
}

.article-content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0) 100%
  );
}

/* ========== セクション間の境界 ========== */
.article-content section {
  position: relative;
  margin: 4em 0;
  padding: 2em 0;
}

.article-content section::after {
  content: '...';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.5em;
  font-size: 0.9em;
}

.article-content section:last-of-type::after {
  content: none;
}

/* ========== 画像キャプションの視覚化 ========== */
.image-caption {
  text-align: center;
  font-style: italic;
  margin-top: 1.5em;
  padding-top: 1em;
  color: rgba(255, 255, 255, 0.6);
  position: relative;
  font-size: 0.9em;
  letter-spacing: 0.05em;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.image-caption::before,
.image-caption::after {
  content: '';
  position: absolute;
  top: 0;
  width: 2em;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
}

.image-caption::before {
  left: 50%;
  transform: translateX(-3em);
}

.image-caption::after {
  left: 50%;
  transform: translateX(1em);
}

/* ========== 引用・強調の視覚化 ========== */
.article-content p:has(.keyword-essence) {
  position: relative;
  padding-left: 0.5em;
}

.article-content p:has(.keyword-diversity) {
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* ========== ホバー効果（控えめ） ========== */
.keyword:hover {
  color: rgba(255, 255, 255, 1);
  letter-spacing: 0.12em;
}

.keyword-essence:hover {
  border-bottom-color: rgba(255, 255, 255, 0.6);
}

.keyword-perspective:hover {
  transform: skewX(-3deg);
}

/* ========== タイトルには効果をつけない ========== */
.article-title {
  /* タイトルには何も効果を追加しない */
  animation: none !important;
  transform: none !important;
  opacity: 1 !important;
}

/* ========== レスポンシブ調整 ========== */
@media (max-width: 768px) {
  .keyword {
    padding: 0 0.1em;
  }

  .article-content h2::before {
    width: 2em;
  }

  .article-content section {
    margin: 3em 0;
    padding: 1.5em 0;
  }

  .article-content ul li {
    padding-left: 1.5em;
  }
}

/* ========== アクセシビリティ: prefers-reduced-motion ========== */
@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01s !important;
  }
}

/* ========== コントラスト調整 ========== */
@media (prefers-contrast: high) {
  .keyword {
    font-weight: 600;
  }

  .keyword-essence {
    border-bottom-width: 2px;
  }
}
