/* ===== カラーパレット・基本設定 ===== */
:root {
  --ink: #1c1a17;
  --ink-soft: #4a463f;
  --gold: #c8a04b;
  --gold-dark: #9c7a2e;
  --marble: #f5f1e8;
  --marble-deep: #ece5d6;
  --night: #16202e;
  --night-soft: #233447;
  --line: #ddd3bf;
  --white: #fffdf8;
  --max: 1120px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(28, 26, 23, 0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Serif JP", serif;
  color: var(--ink);
  background: var(--marble);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }

/* ===== ヘッダー / ナビ ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 241, 232, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.brand {
  font-family: "Cinzel", serif;
  font-size: 1.4rem;
  letter-spacing: 0.12em;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand span {
  font-family: "Noto Serif JP", serif;
  font-size: 0.62rem;
  letter-spacing: 0.25em;
  color: var(--gold-dark);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: 1.8rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.95rem;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.2s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width 0.25s;
}
.nav-links a:hover { color: var(--gold-dark); }
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  width: 26px; height: 2px;
  background: var(--ink);
  transition: 0.3s;
}

/* ===== ヒーロー ===== */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 70% 20%, rgba(200,160,75,0.25), transparent 55%),
    linear-gradient(160deg, var(--night) 0%, var(--night-soft) 100%);
  color: var(--white);
  overflow: hidden;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 60px);
  pointer-events: none;
}
.hero-content { position: relative; padding: 4rem 0; }
.hero-eyebrow {
  font-family: "Cinzel", serif;
  letter-spacing: 0.4em;
  font-size: 0.8rem;
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.04em;
}
.hero-lead {
  margin-top: 1.6rem;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255,253,248,0.85);
}
.hero-actions {
  margin-top: 2.4rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  font-size: 0.98rem;
  letter-spacing: 0.05em;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn-primary {
  background: var(--gold);
  color: var(--night);
  font-weight: 700;
}
.btn-primary:hover { background: #d8b25e; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(200,160,75,0.35); }
.btn-ghost {
  border: 1px solid rgba(255,255,255,0.4);
  color: var(--white);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); transform: translateY(-2px); }

/* ===== セクション共通 ===== */
.section-title {
  font-family: "Cinzel", serif;
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  letter-spacing: 0.06em;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: "";
  display: block;
  width: 48px; height: 3px;
  background: var(--gold);
  margin-top: 0.6rem;
}
.section-head { margin-bottom: 2.5rem; }
.section-sub { color: var(--ink-soft); margin-top: 0.8rem; }

/* 導入 */
.intro { padding: 5rem 0 1rem; text-align: center; }
.intro .section-title::after { margin-inline: auto; }
.intro-text {
  max-width: 720px;
  margin: 1.8rem auto 0;
  color: var(--ink-soft);
}

/* ===== カタログ（カードグリッド） ===== */
.catalog { padding: 5rem 0; }
.catalog-alt { background: var(--marble-deep); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--gold);
}
.card-icon { font-size: 2.4rem; margin-bottom: 0.8rem; }
.card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
}
.card p { font-size: 0.92rem; color: var(--ink-soft); }

/* 準備中カード */
.card-soon {
  position: relative;
  display: block;
  opacity: 0.65;
  cursor: default;
}
.card-soon:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--line);
}
.soon-badge {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--marble-deep);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.more-link {
  display: inline-block;
  margin-top: 2.5rem;
  color: var(--gold-dark);
  font-weight: 500;
  transition: gap 0.2s;
}
.more-link:hover { color: var(--gold); }

/* ===== 物語リスト ===== */
.stories { padding: 5rem 0; background: var(--night); color: var(--white); }
.stories .section-sub { color: rgba(255,253,248,0.7); }
.story-list { display: grid; gap: 1rem; }
.story-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.6rem 1.8rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  transition: background 0.25s, border-color 0.25s;
}
.story-item:hover { background: rgba(255,255,255,0.05); border-color: var(--gold); }
.story-num {
  font-family: "Cinzel", serif;
  font-size: 1.8rem;
  color: var(--gold);
  min-width: 2.5rem;
}
.story-item h3 { font-size: 1.2rem; margin-bottom: 0.3rem; }
.story-item p { font-size: 0.92rem; color: rgba(255,253,248,0.7); }
.story-source {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--gold);
}
.story-soon { opacity: 0.6; cursor: default; }
.story-soon:hover { background: none; border-color: rgba(255,255,255,0.12); }
.soon-inline {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.55rem;
  margin-left: 0.5rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,253,248,0.7);
  vertical-align: middle;
}

/* ===== 原典・文献ガイド ===== */
.sources { padding: 5rem 0; background: var(--marble-deep); }
.sources-lead {
  max-width: 760px;
  color: var(--ink-soft);
  margin-bottom: 2.5rem;
}
.source-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.source-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.8rem 1.8rem 1.5rem;
  transition: transform 0.25s, box-shadow 0.25s;
}
.source-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.source-author {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--gold-dark);
  margin-bottom: 0.2rem;
}
.source-card h3 {
  font-size: 1.3rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.7rem;
}
.source-desc { font-size: 0.92rem; color: var(--ink-soft); }
.source-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.2rem;
}
.source-tags li {
  font-size: 0.74rem;
  padding: 0.25rem 0.7rem;
  background: var(--marble-deep);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
}

/* ===== キービジュアル（SVGイラスト） ===== */
.key-illust {
  margin-top: -1px;
  padding-top: 2.2rem;
}
.key-illust img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* ===== 詳細ページ ===== */
.breadcrumb {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
  padding: 1.5rem 0 0;
}
.breadcrumb a { color: var(--gold-dark); }
.breadcrumb a:hover { color: var(--gold); }

.entry-hero {
  background:
    radial-gradient(circle at 80% 30%, rgba(200,160,75,0.22), transparent 55%),
    linear-gradient(160deg, var(--night) 0%, var(--night-soft) 100%);
  color: var(--white);
  margin-top: 1.5rem;
  padding: 3.5rem 0;
}
.entry-hero-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.entry-symbol {
  font-size: 4.5rem;
  line-height: 1;
  flex-shrink: 0;
}
.entry-category {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 0.4rem;
}
.entry-title {
  font-family: "Cinzel", serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  letter-spacing: 0.05em;
}
.entry-greek {
  font-style: italic;
  color: rgba(255,253,248,0.7);
  margin-top: 0.3rem;
}
.entry-tagline {
  margin-top: 0.8rem;
  font-size: 1.05rem;
  color: rgba(255,253,248,0.9);
}

.entry-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  padding: 3.5rem 0;
  align-items: start;
}
.entry-body section { margin-bottom: 2.8rem; }
.entry-h2 {
  font-family: "Cinzel", serif;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold);
  margin-bottom: 1.2rem;
}
.entry-h3 {
  font-size: 1.15rem;
  color: var(--gold-dark);
  margin: 1.6rem 0 0.6rem;
}
.entry-body p { color: var(--ink-soft); }

.related-stories { display: flex; flex-direction: column; gap: 0.6rem; }
.related-story {
  padding: 0.9rem 1.2rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.2s, transform 0.2s;
}
.related-story:hover { border-color: var(--gold); transform: translateX(4px); }
.related-story span { color: var(--gold); margin-right: 0.4rem; }

/* サイドバー */
.profile-card, .related-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  margin-bottom: 1.5rem;
}
.profile-title {
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  padding-bottom: 0.7rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.profile-list { display: grid; gap: 0.2rem; }
.profile-list dt {
  font-size: 0.78rem;
  color: var(--gold-dark);
  letter-spacing: 0.05em;
  margin-top: 0.8rem;
}
.profile-list dt:first-child { margin-top: 0; }
.profile-list dd { font-size: 0.95rem; }
.related-links { list-style: none; display: grid; gap: 0.5rem; }
.related-links a {
  color: var(--gold-dark);
  font-size: 0.95rem;
  transition: color 0.2s;
}
.related-links a:hover { color: var(--gold); }

.entry-pager { padding-bottom: 4rem; }
.pager-back {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold-dark);
  transition: border-color 0.2s, color 0.2s;
}
.pager-back:hover { border-color: var(--gold); color: var(--gold); }

@media (max-width: 820px) {
  .entry-layout { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 640px) {
  .entry-hero-inner { flex-direction: column; text-align: center; gap: 1rem; }
}

/* ===== 家系図ページ ===== */
.tree-section { padding: 3.5rem 0 4rem; }
.tree-intro {
  max-width: 760px;
  color: var(--ink-soft);
  margin-bottom: 3rem;
}
.tree-gen {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
}
.tree-gen-label {
  display: inline-block;
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--gold-dark);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.8rem;
  margin-bottom: 0.7rem;
}
.tree-gen-title {
  font-size: 1.25rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.4rem;
}
.tree-gen-desc { font-size: 0.92rem; color: var(--ink-soft); margin-bottom: 1.2rem; }
.tree-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.tree-node {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  border: 1px solid var(--line);
  transition: transform 0.2s, box-shadow 0.2s;
}
a.tree-node:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tree-primordial { background: #eef1f6; border-color: #cfd8e6; }
.tree-titan { background: #f3ece0; border-color: #ddccae; }
.tree-olympian { background: #fbf3df; border-color: var(--gold); color: var(--gold-dark); font-weight: 500; }
.tree-note { font-size: 0.82rem; color: var(--ink-soft); margin-top: 1rem; }
.tree-connector {
  text-align: center;
  color: var(--gold);
  font-size: 1.2rem;
  margin: 0.9rem 0;
}
.tree-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.tree-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.tree-swatch {
  width: 18px; height: 18px;
  border-radius: 5px;
  display: inline-block;
}

/* ===== 用語集ページ ===== */
.glossary { padding: 3.5rem 0 4rem; }
.glossary-intro { max-width: 760px; color: var(--ink-soft); margin-bottom: 2.5rem; }
.glossary-group { margin-bottom: 2.5rem; }
.glossary-group h2 {
  font-family: "Cinzel", serif;
  font-size: 1.3rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold);
  margin-bottom: 1.2rem;
}
.glossary-list { display: grid; gap: 0.9rem; }
.glossary-term {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 1.1rem 1.4rem;
}
.glossary-term dt {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.glossary-term dd { font-size: 0.92rem; color: var(--ink-soft); }
.glossary-term .term-sub { color: var(--gold-dark); font-size: 0.82rem; margin-left: 0.5rem; }

/* ===== 星座ページ ===== */
.constellations { padding: 3.5rem 0 4rem; }
.const-intro { max-width: 760px; color: var(--ink-soft); margin-bottom: 2.5rem; }
.const-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.const-card {
  background: var(--night);
  color: var(--white);
  border-radius: var(--radius);
  padding: 1.8rem;
  border: 1px solid var(--night-soft);
}
.const-card .const-icon { font-size: 2rem; margin-bottom: 0.6rem; }
.const-card h3 { font-size: 1.2rem; margin-bottom: 0.2rem; letter-spacing: 0.03em; }
.const-card .const-greek { font-size: 0.8rem; color: var(--gold); margin-bottom: 0.7rem; }
.const-card p { font-size: 0.9rem; color: rgba(255,253,248,0.8); }
.const-card .const-link {
  display: inline-block;
  margin-top: 0.9rem;
  font-size: 0.85rem;
  color: var(--gold);
}
.const-card .const-link:hover { color: #e0bd6a; }

@media (max-width: 700px) {
  .const-grid { grid-template-columns: 1fr; }
}

/* ===== FAQ ===== */
.faq { padding: 5rem 0; background: var(--marble-deep); }
.faq-list { display: grid; gap: 1rem; max-width: 820px; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 1.4rem;
  transition: border-color 0.2s;
}
.faq-item[open] { border-color: var(--gold); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  font-weight: 500;
  padding: 1.1rem 2rem 1.1rem 0;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  color: var(--gold-dark);
  font-size: 1.3rem;
  transition: transform 0.2s;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
  padding: 0 0 1.2rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.faq-item a { color: var(--gold-dark); }
.faq-item a:hover { color: var(--gold); }

/* ===== フッター ===== */
.site-footer {
  background: #11161f;
  color: rgba(255,253,248,0.8);
  padding: 3rem 0 1.5rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .brand { color: var(--gold); font-size: 1.5rem; }
.footer-brand p { font-size: 0.85rem; margin-top: 0.5rem; }
.footer-nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.footer-nav a { font-size: 0.9rem; transition: color 0.2s; }
.footer-nav a:hover { color: var(--gold); }
.copyright {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,253,248,0.5);
  margin-top: 1.5rem;
}

/* ===== レスポンシブ ===== */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .source-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 70px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--marble);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-links.open { max-height: 320px; }
  .nav-links li { border-top: 1px solid var(--line); }
  .nav-links a { display: block; padding: 1rem 1.25rem; }
  .card-grid, .card-grid-3 { grid-template-columns: 1fr; }
  .story-item { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}
