@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;700;900&display=swap');

/* ── 基础变量 ── */
:root {
  --c-bg: #fafaf8;
  --c-mid: #4a4a4a;
  --c-ink: #1a1a1a;
  --c-accent: #1a1a1a;
  --c-line: #d0cfc8;
  --c-card-bg: #f3f2ee;
  --font: 'Outfit', system-ui, -apple-system, sans-serif;
  --nav-h: 64px;
  --radius: 28px;
  --max-w: 1100px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-ink);
  font-size: 17px;
  line-height: 1.7;
  padding-bottom: calc(var(--nav-h) + 12px);
  min-height: 100vh;
}

/* ── 纸质纹理叠层 ── */
.raw-texture {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
  background-repeat: repeat;
  opacity: 0.6;
  mix-blend-mode: multiply;
}

/* ── 底部固定导航 ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: var(--c-ink);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 2px solid #333;
  box-shadow: 0 -4px 0 #0002;
}

.bottom-nav ol {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: var(--max-w);
  justify-content: space-around;
  padding: 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.bottom-nav ol::-webkit-scrollbar { display: none; }

.bottom-nav ol li {
  flex-shrink: 0;
}

.bottom-nav ol li a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
  color: #fafaf8;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  text-transform: uppercase;
  transition: none;
  position: relative;
}

.bottom-nav ol li a::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 10px;
  right: 10px;
  height: 2px;
  background: #fafaf8;
  transform: scaleX(0);
  transform-origin: left;
}

.bottom-nav ol li a:hover::after {
  transform: scaleX(1);
}

.bottom-nav ol li a:hover {
  color: #ccc;
}

/* ── 主容器 ── */
.home-main,
.inner-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ── 英雄区（首页） ── */
.hero-section {
  min-height: 45vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 48px 0 40px;
  position: relative;
  border-bottom: 3px solid var(--c-ink);
}

.hero-figure {
  text-align: right;
  max-width: 780px;
}

.hero-h1 {
  font-size: clamp(2.8rem, 8vw, 7rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--c-ink);
  word-break: break-all;
}

.hero-sub {
  margin-top: 16px;
  font-size: 1.05rem;
  color: var(--c-mid);
  max-width: 560px;
  margin-left: auto;
  line-height: 1.6;
}

.hero-aside {
  position: absolute;
  top: 32px;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── 英雄区（内页） ── */
.page-hero-section {
  min-height: 30vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 40px 0 32px;
  position: relative;
  border-bottom: 3px solid var(--c-ink);
}

.page-hero-figure {
  text-align: right;
  max-width: 860px;
}

.page-h1 {
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--c-ink);
}

.page-hero-aside {
  position: absolute;
  top: 24px;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── 徽章/标签 ── */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 2px solid var(--c-ink);
  border-radius: 4px;
  color: var(--c-ink);
}

.badge--tape {
  background: #f0ede4;
  transform: rotate(-2deg);
  display: inline-block;
}

.badge--num {
  background: var(--c-ink);
  color: var(--c-bg);
  font-size: 16px;
  transform: rotate(1.5deg);
  display: inline-block;
}

.date-label {
  font-size: 11px;
  color: var(--c-mid);
  font-weight: 500;
}

/* ── 内容双栏（sidebar + body） ── */
.content-section,
.inner-content-section {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  padding: 48px 0;
  align-items: start;
}

/* ── 侧边栏 ── */
.sidebar {
  position: sticky;
  top: 24px;
  padding: 20px;
  background: var(--c-card-bg);
  border-radius: 16px;
  border: 2px solid var(--c-line);
  transform: rotate(-0.5deg);
}

.sidebar-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-mid);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--c-ink);
}

.sidebar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-list li a {
  display: block;
  padding: 6px 8px;
  color: var(--c-ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  min-height: 40px;
  display: flex;
  align-items: center;
  line-height: 1.4;
}

.sidebar-list li a:hover {
  background: var(--c-ink);
  color: var(--c-bg);
}

/* ── 正文区 ── */
.content-body h2 {
  font-size: 1.6rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--c-ink);
  margin-bottom: 8px;
}

.content-body hr {
  border: none;
  border-top: 3px solid var(--c-ink);
  margin-bottom: 24px;
}

.content-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 8px;
}

.page-content {
  font-size: 17px;
  line-height: 1.8;
  color: var(--c-ink);
}

.page-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 8px;
}

.page-content h2 + hr,
.page-content h3 + hr {
  border: none;
  border-top: 2px solid var(--c-line);
  margin-bottom: 16px;
}

.page-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 24px;
  margin-bottom: 6px;
}

.page-content p {
  margin-bottom: 16px;
}

.page-content a {
  color: var(--c-ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.page-content a:hover {
  text-decoration-style: wavy;
}

.page-content ul,
.page-content ol {
  padding-left: 20px;
  margin-bottom: 16px;
}

.page-content li {
  margin-bottom: 6px;
}

/* ── 文章元信息 ── */
.article-meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--c-mid);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

/* ── 卡片网格（首页 FAQ） ── */
.cards-section {
  padding: 48px 0;
  border-top: 2px solid var(--c-line);
}

.section-heading {
  font-size: 2rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.cards-section hr,
.related-section hr {
  border: none;
  border-top: 3px solid var(--c-ink);
  margin-bottom: 32px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--c-card-bg);
  border-radius: var(--radius);
  padding: 28px 24px 20px;
  border: 2px solid var(--c-line);
  border-bottom: 4px solid var(--c-ink);
  transform: rotate(var(--rot, 0deg));
  position: relative;
  transition: none;
}

.card:hover {
  background: var(--c-ink);
  border-color: var(--c-ink);
}

.card:hover a,
.card:hover dd {
  color: var(--c-bg);
}

.card a {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-ink);
  text-decoration: none;
  margin-bottom: 10px;
  line-height: 1.4;
}

.card dd {
  font-size: 13px;
  color: var(--c-mid);
  line-height: 1.6;
}

/* ── 信息区（首页底部关于） ── */
.info-section {
  padding: 48px 0;
  border-top: 2px solid var(--c-line);
}

.info-fig {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  align-items: start;
}

.info-aside {
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-text h2 {
  font-size: 1.8rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.info-text hr {
  border: none;
  border-top: 3px solid var(--c-ink);
  margin-bottom: 16px;
}

.info-text p {
  color: var(--c-mid);
  line-height: 1.7;
  margin-bottom: 20px;
}

.info-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── 按钮 ── */
.btn-raw {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 20px;
  background: var(--c-ink);
  color: var(--c-bg);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 8px;
  border: 2px solid var(--c-ink);
}

.btn-raw:hover {
  background: transparent;
  color: var(--c-ink);
}

/* ── 相关区/FAQ列表 ── */
.related-section {
  padding: 40px 0;
  border-top: 2px solid var(--c-line);
}

.related-section h2 {
  font-size: 1.6rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--c-line);
}

.faq-item a {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-ink);
  text-decoration: none;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.faq-item a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.faq-list dd {
  font-size: 14px;
  color: var(--c-mid);
  padding: 4px 0 8px;
  line-height: 1.6;
}

/* ── 页脚（极简：仅 p + small） ── */
.site-footer {
  border-top: 3px solid var(--c-ink);
  padding: 40px 20px 120px;
  text-align: center;
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer-brand {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--c-ink);
  margin-bottom: 12px;
  line-height: 1;
}

.site-footer small {
  font-size: 13px;
  color: var(--c-mid);
}

.site-footer small a {
  color: var(--c-ink);
  text-decoration: underline;
}

/* ── HR 装饰 ── */
hr {
  border: none;
  border-top: 2px solid var(--c-line);
  margin: 16px 0;
}

/* ── 移动端 ── */
@media (max-width: 680px) {
  .content-section,
  .inner-content-section {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 0;
  }

  .sidebar {
    position: static;
    transform: none;
  }

  .hero-section {
    min-height: 45vh;
    padding: 72px 0 32px;
    flex-direction: column;
    align-items: flex-end;
  }

  .hero-aside {
    position: static;
    flex-direction: row;
    margin-bottom: 16px;
    align-self: flex-start;
  }

  .page-hero-section {
    flex-direction: column;
    align-items: flex-end;
    padding: 64px 0 28px;
  }

  .page-hero-aside {
    position: static;
    flex-direction: row;
    margin-bottom: 12px;
    align-self: flex-start;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .card {
    transform: none;
  }

  .info-fig {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .bottom-nav ol {
    gap: 0;
    justify-content: flex-start;
  }

  .bottom-nav ol li a {
    font-size: 11px;
    padding: 8px 8px;
  }

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

@media (max-width: 400px) {
  .hero-h1 {
    font-size: 2.4rem;
  }

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

/* ── 动效 ── */
@media (prefers-reduced-motion: no-preference) {
  .card {
    transition: background 0.15s step-end, border-color 0.15s step-end, color 0.15s step-end;
  }

  .bottom-nav ol li a::after {
    transition: transform 0.2s cubic-bezier(0.17, 0.67, 0.35, 1.3);
  }

  .btn-raw {
    transition: background 0.15s step-end, color 0.15s step-end;
  }

  .sidebar-list li a {
    transition: background 0.1s step-end, color 0.1s step-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
