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

/* ===== 变量 ===== */
:root {
  --c-white: #ffffff;
  --c-light: #f5f5f5;
  --c-ink: #1f1f1f;
  --c-ink-60: rgba(31,31,31,0.6);
  --c-ink-10: rgba(31,31,31,0.08);
  --c-glass: rgba(255,255,255,0.72);
  --c-glass-border: rgba(255,255,255,0.45);
  --radius-card: 24px;
  --radius-sm: 10px;
  --shadow-card: 0 4px 24px rgba(0,0,0,0.07);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.13);
  --font-head: 'Lora', Georgia, serif;
  --font-body: 'Raleway', system-ui, sans-serif;
  --nav-h: 64px;
  --content-max: 1200px;
  --prose-max: 780px;
  --gap: 16px;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--c-ink);
  background: var(--c-light);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, menu { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ===== 站点外壳 ===== */
.site-wrap { display: flex; flex-direction: column; min-height: 100vh; }

/* ===== 顶部导航 ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--c-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--c-glass-border);
}
.header-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-ink);
}
.site-logo { height: 36px; width: auto; }
.logo-text { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; }

/* ===== 汉堡 details 导航 ===== */
.nav-details { position: static; }
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  list-style: none;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.nav-toggle::-webkit-details-marker { display: none; }
.nav-toggle:hover { background: var(--c-ink-10); }
.hamburger-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--c-ink);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
details[open] .hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
details[open] .hamburger-bar:nth-child(2) { opacity: 0; }
details[open] .hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(31,31,31,0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.nav-overlay-inner { width: 100%; max-width: 540px; padding: 48px 32px; }

.nav-menu { display: flex; flex-direction: column; gap: 8px; }
.nav-menu li a {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 500;
  color: var(--c-white);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
  min-height: 48px;
  line-height: 1.4;
}
.nav-menu li a:hover,
.nav-menu li a[aria-current="page"] {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* ===== Hero ===== */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 80px;
  overflow: hidden;
  background: var(--c-ink);
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img,
.hero-media .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-fallback { background: linear-gradient(135deg, #1f1f1f 0%, #3a3a3a 100%); }
.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.25) 60%, transparent 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 32px;
  width: 100%;
  text-align: left;
}
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 12px;
}
.hero-h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--c-white);
  line-height: 1.2;
  max-width: 720px;
  margin-bottom: 16px;
}
.hero-desc {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.78);
  max-width: 560px;
  margin-bottom: 28px;
  line-height: 1.6;
}

/* ===== 按钮 ===== */
.btn-primary {
  display: inline-block;
  background: var(--c-ink);
  color: var(--c-white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: 999px;
  transition: transform 0.2s, box-shadow 0.2s;
  min-height: 48px;
  line-height: 1.4;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.hero-content .btn-primary { background: var(--c-white); color: var(--c-ink); }
.hero-content .btn-primary:hover { background: var(--c-light); }

.btn-outline {
  display: inline-block;
  border: 1.5px solid var(--c-ink);
  color: var(--c-ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 22px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
  min-height: 44px;
  line-height: 1.4;
}
.btn-outline:hover { background: var(--c-ink); color: var(--c-white); }

/* ===== Bento Grid ===== */
.bento-section {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 64px 24px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}
.section-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  background: var(--c-white);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
}
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: var(--gap);
}
.bento-card {
  background: var(--c-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--c-glass-border);
}
.bento-card:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-hover);
}
.bento-card.bento-wide { grid-column: span 2; }
.bento-card.bento-tall { grid-row: span 2; }
.bento-card-inner {
  padding: 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.card-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-ink-60);
  margin-bottom: 6px;
}
.bento-card h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 8px;
  color: var(--c-ink);
}
.bento-card h3 a { color: inherit; }
.bento-card h3 a:hover { text-decoration: underline; }
.card-desc {
  font-size: 0.85rem;
  color: var(--c-ink-60);
  flex: 1;
  margin-bottom: 12px;
  line-height: 1.5;
}
.card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-ink);
  transition: opacity 0.2s;
}
.card-link:hover { opacity: 0.6; }

/* ===== 正文区块 ===== */
.page-content-section {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px 80px;
}
.content-figure {
  background: var(--c-white);
  border-radius: var(--radius-card);
  padding: 40px 48px;
  box-shadow: var(--shadow-card);
}

/* ===== 侧边栏布局（FAQ / Article / About / Privacy）===== */
.faq-main, .article-main, .about-main, .privacy-main {
  margin-top: var(--nav-h);
  flex: 1;
}

.faq-hero, .about-banner, .privacy-header-section, .article-header-section {
  background: var(--c-ink);
  padding: 80px 24px 60px;
}
.faq-hero-figure, .about-banner-figure, .privacy-header-figure {
  max-width: var(--content-max);
  margin: 0 auto;
}
.faq-hero-content, .about-banner-content, .privacy-header-content {
  max-width: 680px;
}
.faq-hero-content h1,
.about-banner-content h1,
.privacy-header-content h1 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--c-white);
  line-height: 1.25;
  margin-bottom: 12px;
}
.faq-hero .hero-desc,
.about-banner .hero-desc {
  color: rgba(255,255,255,0.72);
  font-size: 1rem;
  margin-bottom: 16px;
}

/* section hero */
.article-hero-figure {
  position: relative;
  width: 100%;
  min-height: 420px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background: var(--c-ink);
}
.article-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.15) 70%, transparent 100%);
}
.article-hero-caption {
  position: relative;
  z-index: 2;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 40px 32px;
  width: 100%;
}
.article-hero-caption h1 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--c-white);
  line-height: 1.25;
  margin-bottom: 10px;
}
.article-hero-plain {
  min-height: 280px;
  background: var(--c-ink);
}
.article-hero-content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 60px 32px 40px;
  width: 100%;
}
.article-hero-content h1 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--c-white);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 10px;
}

.date-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.page-date {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  font-family: var(--font-body);
}

/* ===== 正文 + 侧栏布局 ===== */
.faq-body-section,
.article-body-section,
.about-body-section,
.privacy-body-section {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 48px 24px 64px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 32px;
  align-items: start;
}
.faq-content-wrap,
.article-content-wrap,
.about-content-wrap,
.privacy-content-wrap {
  background: var(--c-white);
  border-radius: var(--radius-card);
  padding: 36px 40px;
  box-shadow: var(--shadow-card);
  order: 1;
}
.faq-sidebar,
.article-sidebar,
.about-sidebar,
.privacy-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  background: var(--c-white);
  border-radius: var(--radius-card);
  padding: 24px 20px;
  box-shadow: var(--shadow-card);
  order: 2;
}

/* ===== 侧边栏公共 ===== */
.sidebar-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--c-ink);
  margin-bottom: 14px;
  margin-top: 4px;
}
.sidebar-links { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.sidebar-links li a {
  display: block;
  font-size: 0.88rem;
  color: var(--c-ink);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  line-height: 1.4;
  transition: background 0.2s;
  min-height: 36px;
}
.sidebar-links li a:hover { background: var(--c-light); }
.sidebar-cta { margin-top: 16px; }

/* ===== 相关/关联区块 ===== */
.related-section,
.related-articles-section,
.about-faq-section {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px 72px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--gap);
  align-items: start;
}
.related-section > small,
.related-section > h2,
.related-articles-section > small,
.related-articles-section > h2,
.about-faq-section > small,
.about-faq-section > h2 {
  grid-column: 1 / -1;
}
.related-section h2,
.related-articles-section h2,
.about-faq-section h2 {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-ink);
  margin-bottom: 4px;
}
.related-card {
  background: var(--c-white);
  border-radius: var(--radius-card);
  padding: 24px 22px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--c-glass-border);
  backdrop-filter: blur(6px);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.related-card:hover { transform: scale(1.02); box-shadow: var(--shadow-hover); }
.related-card h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--c-ink);
}
.related-card h3 a { color: inherit; }
.related-card h3 a:hover { text-decoration: underline; }
.related-card p {
  font-size: 0.85rem;
  color: var(--c-ink-60);
  flex: 1;
  line-height: 1.55;
}

/* ===== prose 正文排版 ===== */
.prose-wrap { max-width: var(--prose-max); }
.prose-wrap h2 {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--c-ink);
  margin: 36px 0 12px;
  line-height: 1.3;
}
.prose-wrap h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--c-ink);
  margin: 28px 0 10px;
  line-height: 1.35;
}
.prose-wrap p { margin-bottom: 18px; font-size: 1rem; line-height: 1.75; color: var(--c-ink); }
.prose-wrap ul, .prose-wrap ol { margin: 0 0 18px 1.4em; }
.prose-wrap li { margin-bottom: 8px; line-height: 1.65; }
.prose-wrap a { color: var(--c-ink); text-decoration: underline; text-underline-offset: 3px; }
.prose-wrap a:hover { opacity: 0.65; }
.prose-wrap small {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-ink-60);
  margin-bottom: 4px;
}
.prose-wrap blockquote {
  border-left: 3px solid var(--c-ink);
  margin: 24px 0;
  padding: 12px 20px;
  background: var(--c-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--c-ink-60);
}

/* ===== 眉题 small 通用 ===== */
small.hero-eyebrow,
.section-sidebar > small,
.faq-sidebar > small,
.article-sidebar > small,
.about-sidebar > small,
.privacy-sidebar > small,
.related-section > small,
.related-articles-section > small,
.about-faq-section > small {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-ink-60);
  margin-bottom: 6px;
}
.faq-hero small, .about-banner small, .privacy-header-section small {
  color: rgba(255,255,255,0.55);
}

/* ===== 页脚 ===== */
.site-footer { margin-top: auto; background: var(--c-white); border-top: 1px solid var(--c-ink-10); }
.footer-cta {
  background: var(--c-ink);
  padding: 64px 24px;
  text-align: center;
}
.footer-cta-inner { max-width: 600px; margin: 0 auto; }
.footer-cta small {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
}
.footer-cta h2 {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: 24px;
  line-height: 1.25;
}
.footer-cta .btn-primary { background: var(--c-white); color: var(--c-ink); }
.footer-cta .btn-primary:hover { background: var(--c-light); }

.footer-main {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 40px 24px 28px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 32px;
  align-items: start;
}
.footer-brand p {
  font-size: 0.88rem;
  color: var(--c-ink-60);
  margin-top: 10px;
  max-width: 280px;
  line-height: 1.55;
}
.footer-nav ul { display: flex; flex-direction: column; gap: 6px; }
.footer-nav ul li a {
  font-size: 0.88rem;
  color: var(--c-ink);
  padding: 6px 0;
  min-height: 36px;
  display: block;
  line-height: 1.4;
  transition: opacity 0.2s;
}
.footer-nav ul li a:hover { opacity: 0.6; }
.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.footer-copy { font-size: 0.82rem; color: var(--c-ink-60); }
.footer-bottom a { font-size: 0.82rem; color: var(--c-ink); text-decoration: underline; text-underline-offset: 2px; min-height: 36px; display: inline-flex; align-items: center; }

/* ===== Scroll Reveal ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
  .bento-card.reveal {
    transition-delay: calc(var(--stagger, 0) * 80ms);
  }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ===== Privacy / About ===== */
.privacy-header-section { padding: 80px 24px 48px; }
.privacy-header-content h1 {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--c-white);
  line-height: 1.25;
  margin-bottom: 12px;
}
.privacy-header-content .page-date { color: rgba(255,255,255,0.55); }

/* ===== Default / 兜底 ===== */
.default-section {
  max-width: var(--content-max);
  margin: calc(var(--nav-h) + 40px) auto 80px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 32px;
  align-items: start;
}
.default-figure {
  grid-column: 1 / -1;
  background: var(--c-ink);
  border-radius: var(--radius-card);
  padding: 40px 36px 32px;
  margin-bottom: 8px;
}
.default-header small { color: rgba(255,255,255,0.55); }
.default-header h1 {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--c-white);
  line-height: 1.25;
  margin-top: 6px;
}
.default-sidebar {
  background: var(--c-white);
  border-radius: var(--radius-card);
  padding: 24px 20px;
  box-shadow: var(--shadow-card);
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-card.bento-wide { grid-column: span 2; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-bottom { align-items: flex-start; }
}

@media (max-width: 768px) {
  :root { --content-max: 100%; }

  .bento-section {
    grid-template-columns: 1fr;
    padding: 40px 16px;
  }
  .section-sidebar { position: static; }
  .bento-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; }
  .bento-card.bento-wide { grid-column: span 2; }
  .bento-card.bento-tall { grid-row: span 1; }

  .faq-body-section,
  .article-body-section,
  .about-body-section,
  .privacy-body-section {
    grid-template-columns: 1fr;
    padding: 28px 16px 48px;
  }
  .faq-sidebar, .article-sidebar, .about-sidebar, .privacy-sidebar {
    position: static;
    order: 2;
  }
  .faq-content-wrap, .article-content-wrap, .about-content-wrap, .privacy-content-wrap {
    order: 1;
    padding: 24px 20px;
  }

  .related-section, .related-articles-section, .about-faq-section {
    grid-template-columns: 1fr;
    padding: 0 16px 48px;
  }

  .footer-main { grid-template-columns: 1fr; padding: 32px 16px 24px; gap: 24px; }
  .footer-bottom { align-items: flex-start; }

  .hero-content { padding: 0 20px; }
  .hero-h1 { font-size: clamp(1.6rem, 6vw, 2.4rem); }

  .content-figure { padding: 24px 20px; }
  .page-content-section { padding: 0 16px 48px; }

  .default-section { grid-template-columns: 1fr; margin-top: calc(var(--nav-h) + 24px); padding: 0 16px 48px; }
}

@media (max-width: 480px) {
  .bento-grid { grid-template-columns: 1fr; }
  .bento-card.bento-wide { grid-column: span 1; }
  .bento-grid .bento-card { grid-row: span 1; }
  .bento-card-inner { padding: 18px; }

  .faq-hero, .about-banner, .privacy-header-section { padding: 60px 16px 40px; }
  .footer-cta { padding: 48px 16px; }
}
