@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:wght@400;600;700&family=EB+Garamond:wght@400;500;600;700;800&display=swap');

/* ===== 基础重置 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #000000;
  --surface: #121212;
  --surface2: #1a1a1a;
  --border: #2a2a2a;
  --red: #8b1a1a;
  --red-bright: #c0392b;
  --red-glow: rgba(139,26,26,0.25);
  --text: #e8e0d5;
  --text-muted: #8a8075;
  --text-dim: #5a5550;
  --accent: #a83232;
  --link: #d4826a;
  --link-hover: #e8a090;
  --font-serif: 'EB Garamond', 'Crimson Text', Georgia, 'Times New Roman', serif;
  --font-mono: 'Courier New', Courier, monospace;
  --radius: 10px;
  --nav-h: 64px;
  color-scheme: dark;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover, a:focus-visible {
  color: var(--link-hover);
  text-shadow: 0 0 10px rgba(212,130,106,0.4);
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

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

/* ===== 导航：header > nav > a×n ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0,0,0,0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: var(--nav-h);
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  gap: 16px;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-right {
  justify-content: flex-end;
}

.nav-link {
  color: var(--text-muted);
  font-size: 14px;
  font-family: var(--font-serif);
  letter-spacing: 0.03em;
  padding: 12px 10px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link--active {
  color: var(--text);
  border-bottom-color: var(--accent);
  text-shadow: none;
}

.nav-brand {
  flex-shrink: 0;
  text-align: center;
  color: var(--text);
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.1em;
  padding: 10px 16px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-shadow: 0 0 10px var(--red-glow);
  transition: text-shadow 0.3s;
}

.nav-brand:hover {
  text-shadow: 0 0 18px rgba(168,50,50,0.6);
  color: var(--text);
}

.brand-text {
  color: inherit;
}

.brand-logo-img {
  height: 36px;
  width: auto;
}

/* ===== 主容器 ===== */
main {
  min-height: calc(100vh - var(--nav-h) - 200px);
}

.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HERO（首页）===== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.hero-article {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 60px;
  padding: 80px 0;
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero-visual {
  flex: 0 0 40%;
  max-width: 400px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.hero-visual--empty {
  background: var(--surface);
  min-height: 300px;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--font-serif);
  margin-bottom: 16px;
  border-left: 3px solid var(--accent);
  padding-left: 10px;
}

.hero-h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.hero-lead {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 500px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--red);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 13px 28px;
  border-radius: var(--radius);
  min-height: 48px;
  border: 1px solid var(--red-bright);
  transition: background 0.2s, box-shadow 0.2s;
  text-shadow: none;
}

.btn-primary:hover {
  background: var(--red-bright);
  box-shadow: 0 0 18px var(--red-glow);
  color: #fff;
  text-shadow: none;
}

/* ===== 通用 section/article ===== */
.content-section,
.index-section,
.faq-content-section,
.sub-index-section,
.related-section,
.about-header-section,
.about-content-section,
.about-links-section,
.privacy-header-section,
.privacy-content-section,
.privacy-nav-section,
.article-header-section,
.article-body-section,
.page-hero-section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}

.content-section:last-child,
.related-section:last-child,
.about-links-section:last-child,
.privacy-nav-section:last-child,
.article-body-section:last-child {
  border-bottom: none;
}

.content-article,
.index-article,
.faq-content-article,
.sub-index-article,
.related-article,
.about-header-article,
.about-content-article,
.about-links-article,
.privacy-header-article,
.privacy-content-article,
.privacy-nav-article,
.article-header-article,
.article-body-article,
.page-hero-article {
  width: 100%;
}

/* ===== 页面标题区 ===== */
.page-h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
  margin-top: 12px;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.page-meta {
  color: var(--text-dim);
  font-size: 15px;
  margin-top: 8px;
}

.page-meta time {
  color: var(--text-muted);
}

/* ===== 面包屑 ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-dim);
}

.breadcrumb a:hover {
  color: var(--link);
  text-shadow: none;
}

.bc-sep {
  color: var(--border);
}

/* ===== h2 + hr 装饰 ===== */
.section-h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.section-hr {
  border: none;
  border-top: 1px solid var(--red);
  margin-bottom: 28px;
  opacity: 0.6;
}

/* ===== 索引表格：table > tbody > tr > td ===== */
.index-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.index-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.index-table tbody tr:last-child {
  border-bottom: none;
}

.index-table tbody tr:hover {
  background: var(--surface);
}

.td-num {
  width: 52px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--red);
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 18px 12px 18px 0;
  vertical-align: top;
  white-space: nowrap;
}

.td-main {
  padding: 18px 0;
  vertical-align: top;
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-link:hover .card-title {
  color: var(--link-hover);
  text-shadow: 0 0 8px rgba(212,130,106,0.3);
}

.card-title {
  display: block;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 4px;
  transition: color 0.2s;
}

.card-desc {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-date {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 6px;
  font-family: var(--font-mono);
}

/* ===== 正文 HTML 内容 ===== */
.page-content {
  line-height: 1.8;
  color: var(--text);
  font-size: 18px;
}

.page-content h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 40px;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--red);
}

.page-content h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 28px;
  margin-bottom: 8px;
}

.page-content p {
  margin-bottom: 18px;
  color: var(--text);
}

.page-content a {
  color: var(--link);
  border-bottom: 1px solid rgba(212,130,106,0.35);
  transition: color 0.2s, border-color 0.2s;
}

.page-content a:hover {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
  text-shadow: none;
}

.page-content ul,
.page-content ol {
  margin: 0 0 18px 24px;
  padding: 0;
}

.page-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.page-content blockquote {
  border-left: 3px solid var(--red);
  margin: 24px 0;
  padding: 12px 20px;
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  font-style: italic;
}

.page-content code {
  font-family: var(--font-mono);
  font-size: 15px;
  background: var(--surface2);
  padding: 2px 6px;
  border-radius: 4px;
  color: #e09070;
}

.page-content pre {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  overflow-x: auto;
  margin-bottom: 18px;
}

.page-content pre code {
  background: none;
  padding: 0;
}

.page-content strong {
  color: var(--text);
  font-weight: 700;
}

.page-content em {
  font-style: italic;
  color: var(--text-muted);
}

.page-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 16px;
}

.page-content table th,
.page-content table td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}

.page-content table th {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
}

.page-content time {
  color: var(--text-muted);
  font-style: normal;
}

/* ===== 隐私页正文 ===== */
.privacy-text {
  font-size: 17px;
}

/* ===== 文章 hero ===== */
.article-hero-figure {
  margin-top: 28px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.article-hero-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== 页脚：三列 dl ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 24px 32px;
  max-width: 1280px;
  margin: 0 auto;
}

.footer-brand-block {
  text-align: center;
  margin-bottom: 36px;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  color: var(--surface2);
  letter-spacing: 0.08em;
  text-shadow: 0 0 40px rgba(139,26,26,0.2);
  line-height: 1;
  display: inline-block;
  -webkit-text-stroke: 1px var(--border);
}

.footer-cols {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.footer-dl {
  min-width: 120px;
}

.footer-dl dt {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.footer-dl dd {
  margin: 0 0 6px 0;
  list-style: none;
}

.footer-dl dd a {
  color: var(--text-dim);
  font-size: 14px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-dl dd a:hover {
  color: var(--link);
  text-shadow: none;
}

.footer-copy {
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

/* ===== Scroll Reveal 动效 ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.10s; }
.stagger-3 { transition-delay: 0.15s; }
.stagger-4 { transition-delay: 0.20s; }
.stagger-5 { transition-delay: 0.25s; }
.stagger-6 { transition-delay: 0.30s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ===== 移动端 ===== */
@media (max-width: 768px) {
  :root {
    --nav-h: 56px;
  }

  body {
    font-size: 17px;
  }

  .top-nav {
    padding: 0 14px;
    gap: 8px;
    overflow-x: auto;
  }

  .nav-left,
  .nav-right {
    gap: 0;
  }

  .nav-link {
    font-size: 13px;
    padding: 10px 7px;
    min-height: 40px;
  }

  .nav-brand {
    font-size: 16px;
    padding: 10px 10px;
    min-height: 40px;
  }

  .wrap {
    padding: 0 16px;
  }

  .hero-article {
    flex-direction: column;
    gap: 32px;
    padding: 48px 0 40px;
  }

  .hero-visual {
    max-width: 100%;
    flex: none;
    width: 100%;
  }

  .hero-section {
    min-height: auto;
    padding-top: 0;
  }

  .footer-cols {
    gap: 28px;
  }

  .footer-dl dd a {
    min-height: 44px;
    padding: 6px 0;
  }

  .site-footer {
    padding: 36px 16px 24px;
  }

  .td-num {
    width: 40px;
    font-size: 12px;
    padding-right: 8px;
  }

  .card-title {
    font-size: 16px;
  }

  .page-content {
    font-size: 17px;
  }

  .footer-dl {
    min-width: 90px;
  }
}

@media (max-width: 480px) {
  .nav-link {
    font-size: 12px;
    padding: 10px 5px;
  }

  .hero-h1 {
    font-size: 1.8rem;
  }

  .page-h1 {
    font-size: 1.5rem;
  }

  .section-h2 {
    font-size: 1.3rem;
  }

  .hero-lead {
    font-size: 16px;
  }

  .footer-brand {
    font-size: 2.2rem;
  }
}
