@import url('https://fonts.googleapis.com/css2?family=Didact+Gothic&family=Poiret+One&display=swap');

/* ===== CSS 自定义属性 ===== */
:root {
  --c-black: #000000;
  --c-white: #ffffff;
  --c-ink: #000000;
  --c-gray-100: #f5f5f5;
  --c-gray-200: #e8e8e8;
  --c-gray-400: #999999;
  --c-gray-600: #555555;
  --ff-display: 'Poiret One', sans-serif;
  --ff-body: 'Didact Gothic', sans-serif;
  --fs-base: 16px;
  --lh-base: 1.7;
  --max-w: 1200px;
  --nav-h: 64px;
  --gap: 2rem;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: var(--fs-base); scroll-behavior: smooth; }
body {
  font-family: var(--ff-body);
  color: var(--c-black);
  background: var(--c-white);
  line-height: var(--lh-base);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }
hr { border: none; border-top: 2px solid var(--c-black); margin: 0.5rem 0 1.5rem; }

/* ===== 导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-black);
  border-bottom: 1px solid var(--c-white);
  height: var(--nav-h);
}

.site-nav {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto 1fr 1fr 1fr;
  align-items: center;
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  padding: 0 1rem;
  gap: 0.25rem;
}

.nav-link {
  color: var(--c-white);
  font-family: var(--ff-body);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  padding: 0.75rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  text-align: center;
  transition: color 200ms, background 200ms;
  border: 1px solid transparent;
}
.nav-link:hover { color: var(--c-white); background: #222; border-color: var(--c-white); text-decoration: none; }
.nav-link--left { justify-content: flex-end; }
.nav-link--right { justify-content: flex-start; }

.nav-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.75rem;
}
.brand-text {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  color: var(--c-white);
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.nav-logo { height: 36px; width: auto; }

/* ===== Hero（首页） ===== */
.hero-section {
  min-height: 100vh;
  background: var(--c-black);
  display: flex;
  align-items: stretch;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
}
.hero-media {
  position: relative;
  overflow: hidden;
  background: #111;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}
.hero-dot-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.18) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 3rem;
  background: var(--c-black);
  position: relative;
}
.hero-copy::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}
.hero-h1 {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--c-white);
  letter-spacing: 0.08em;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  position: relative;
}
.hero-desc {
  color: var(--c-gray-200);
  font-size: 1rem;
  max-width: 32ch;
  margin-bottom: 2rem;
  line-height: 1.8;
  position: relative;
}

/* ===== 按钮 ===== */
.btn-primary {
  display: inline-block;
  background: var(--c-white);
  color: var(--c-black);
  font-family: var(--ff-display);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  padding: 0.75rem 2rem;
  border: 2px solid var(--c-white);
  cursor: pointer;
  min-height: 44px;
  transition: background 220ms, color 220ms;
  position: relative;
}
.btn-primary:hover {
  background: var(--c-black);
  color: var(--c-white);
  text-decoration: none;
}

/* ===== 内容区通用 ===== */
.content-section,
.ranking-body,
.article-body,
.faq-body,
.about-body,
.privacy-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.section-head { margin-bottom: 2rem; }
.section-head h2 {
  font-family: var(--ff-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

/* ===== 子页列表（ul>li>article） ===== */
.child-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
}
.child-list li { display: block; }

/* ===== 卡片：描边无阴影圆角0 ===== */
.card {
  border: 1px solid var(--c-black);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  transition: background 220ms;
}
.card:hover { background: var(--c-gray-100); }
.card h3 {
  font-family: var(--ff-display);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  line-height: 1.4;
}
.card h3 a:hover { text-decoration: underline; }
.card p {
  font-size: 0.9rem;
  color: var(--c-gray-600);
  line-height: 1.6;
  flex: 1;
}
.card-date {
  font-size: 0.78rem;
  color: var(--c-gray-400);
  letter-spacing: 0.02em;
}
.card-link {
  font-size: 0.85rem;
  font-family: var(--ff-display);
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--c-black);
  padding-bottom: 1px;
  align-self: flex-start;
  transition: color 200ms;
}
.card-link:hover { text-decoration: none; color: var(--c-gray-600); }

.card--nav {
  background: var(--c-black);
  border-color: var(--c-white);
  color: var(--c-white);
}
.card--nav:hover { background: #1a1a1a; }
.card--nav p { color: var(--c-gray-200); }
.card--nav .card-link { border-bottom-color: var(--c-white); }

/* ===== 排行榜卡片 ===== */
.rank-list { display: flex; flex-direction: column; gap: 1.5rem; }
.rank-item { display: block; }
.card--rank {
  display: grid;
  grid-template-columns: 3rem auto 1fr;
  gap: 1.5rem;
  align-items: start;
  flex-direction: unset;
}
.rank-num {
  font-family: var(--ff-display);
  font-size: 2.5rem;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--c-gray-200);
  align-self: center;
}
.rank-info { display: flex; flex-direction: column; gap: 0.5rem; }
.rank-info h3 { font-family: var(--ff-display); font-size: 1.1rem; letter-spacing: 0.04em; }
.rank-thumb-wrap { width: 80px; flex-shrink: 0; }
.rank-thumb { width: 80px; height: 80px; object-fit: cover; }
.ranking-list-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

/* ===== 面包屑 ===== */
.breadcrumb {
  font-size: 0.8rem;
  color: var(--c-gray-400);
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.breadcrumb a { color: var(--c-gray-400); }
.breadcrumb a:hover { color: var(--c-black); }
.breadcrumb span { color: var(--c-gray-600); }

/* ===== 文章头部 ===== */
.page-header,
.article-header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  border-bottom: 2px solid var(--c-black);
}
.page-h1, .article-h1 {
  font-family: var(--ff-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: 0.06em;
  line-height: 1.25;
  margin-bottom: 1rem;
}
.page-desc {
  font-size: 1rem;
  color: var(--c-gray-600);
  max-width: 60ch;
  line-height: 1.8;
}
.article-meta {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.article-date, .article-modified {
  font-size: 0.8rem;
  color: var(--c-gray-400);
  letter-spacing: 0.02em;
}
.article-hero { margin-top: 1.5rem; }
.article-hero-img { width: 100%; max-height: 400px; object-fit: cover; border: 1px solid var(--c-black); }

/* ===== 关于页 logo ===== */
.page-header--about { text-align: center; }
.about-logo-wrap { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.about-logo { height: 64px; width: auto; }

/* ===== 正文排版 ===== */
.prose {
  font-size: 1rem;
  line-height: 1.85;
  max-width: 72ch;
}
.prose h2 { font-family: var(--ff-display); font-size: 1.4rem; margin: 2rem 0 0.5rem; letter-spacing: 0.04em; }
.prose h2 + hr { margin-bottom: 1rem; }
.prose h3 { font-family: var(--ff-display); font-size: 1.15rem; margin: 1.5rem 0 0.4rem; letter-spacing: 0.03em; }
.prose p { margin-bottom: 1.2rem; }
.prose ul, .prose ol { margin: 0 0 1.2rem 1.5rem; }
.prose li { margin-bottom: 0.4rem; }
.prose a { border-bottom: 1px solid var(--c-black); }
.prose a:hover { text-decoration: none; color: var(--c-gray-600); }
.prose blockquote {
  border-left: 3px solid var(--c-black);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--c-gray-100);
  font-style: normal;
}
.prose table { border-collapse: collapse; width: 100%; margin-bottom: 1.5rem; font-size: 0.9rem; }
.prose th, .prose td { border: 1px solid var(--c-black); padding: 0.5rem 0.75rem; text-align: left; }
.prose th { background: var(--c-black); color: var(--c-white); font-family: var(--ff-display); }
.prose time { font-variant-numeric: tabular-nums; }

/* FAQ 专用 */
.faq-prose { max-width: 72ch; }

/* ===== 相关文章列表 ===== */
.related-section, .faq-nav, .about-links, .privacy-footer-links, .child-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}
.related-list { display: flex; flex-direction: column; gap: 0.5rem; }
.related-list li { border-bottom: 1px solid var(--c-gray-200); }
.related-list a {
  display: block;
  padding: 0.75rem 0;
  font-size: 0.95rem;
  min-height: 44px;
  transition: color 200ms;
}
.related-list a:hover { color: var(--c-gray-600); text-decoration: none; }

/* ===== 页脚 ===== */
.site-footer {
  background: var(--c-black);
  color: var(--c-white);
  margin-top: 4rem;
}
.footer-cta {
  text-align: center;
  padding: 3.5rem 1.5rem;
  border-bottom: 1px solid #333;
}
.cta-text {
  font-family: var(--ff-display);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  letter-spacing: 0.06em;
  margin-bottom: 1.5rem;
  color: var(--c-white);
}
.footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--gap);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  border-bottom: 1px solid #333;
}
.footer-col dt {
  font-family: var(--ff-display);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-gray-400);
  margin-bottom: 1rem;
}
.footer-col dd {
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
  line-height: 1.6;
}
.footer-col dd a {
  color: var(--c-gray-200);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: color 200ms;
}
.footer-col dd a:hover { color: var(--c-white); text-decoration: none; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.copyright { font-size: 0.8rem; color: var(--c-gray-400); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.8rem; color: var(--c-gray-400); min-height: 40px; display: inline-flex; align-items: center; transition: color 200ms; }
.footer-links a:hover { color: var(--c-white); text-decoration: none; }

/* ===== Scroll Reveal 动效 ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 500ms ease, transform 500ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .site-nav {
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto auto;
    height: auto;
    padding: 0.5rem 0.75rem;
    gap: 0.15rem;
  }
  .nav-link--left:nth-child(1) { grid-column: 1; grid-row: 2; }
  .nav-link--left:nth-child(2) { grid-column: 1; grid-row: 3; display: none; }
  .nav-link--left:nth-child(3) { grid-column: 1; grid-row: 4; display: none; }
  .nav-brand { grid-column: 2; grid-row: 1 / 3; justify-self: center; }
  .nav-link--right:nth-child(5) { grid-column: 3; grid-row: 2; }
  .nav-link--right:nth-child(6) { grid-column: 3; grid-row: 3; display: none; }
  .nav-link--right:nth-child(7) { grid-column: 3; grid-row: 4; display: none; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { min-height: 40vh; }
  .hero-copy { padding: 3rem 1.5rem; }

  .card--rank {
    grid-template-columns: 2.5rem 1fr;
    grid-template-rows: auto auto;
  }
  .rank-thumb-wrap { display: none; }

  .footer-cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  :root { --gap: 1.25rem; }

  .site-header { height: auto; }
  .site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.5rem;
    gap: 0.25rem;
  }
  .nav-link, .nav-link--left, .nav-link--right {
    display: inline-flex;
    justify-content: center;
    font-size: 0.75rem;
    padding: 0.6rem 0.5rem;
    min-height: 40px;
  }
  .nav-link--left:nth-child(2),
  .nav-link--left:nth-child(3),
  .nav-link--right:nth-child(6),
  .nav-link--right:nth-child(7) {
    display: inline-flex;
  }
  .nav-brand { order: -1; width: 100%; justify-content: center; }

  .hero-section { min-height: auto; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { min-height: 220px; }
  .hero-copy { padding: 2.5rem 1rem; }
  .hero-h1 { font-size: 1.8rem; }

  .content-section,
  .ranking-body,
  .article-body,
  .faq-body,
  .about-body,
  .privacy-body { padding: 2rem 1rem; }

  .page-header, .article-header { padding: 2rem 1rem 1.5rem; }

  .child-list { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }

  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }

  .prose { font-size: 1rem; }
}
