/* ==========================================================================
   魔戒 mojie 官网推广落地页 - 【风格 08 · 圣盔黎明】
   配色体系：晨石灰白底 (#ECEFF1) · 铁灰主字 (#2B333B) · 壁垒蓝点缀 (#4A7BA6) · 晨曦金 (#F2C96B)
   ========================================================================== */

:root {
  --bg-stone: #ECEFF1;           /* 晨石灰白底 */
  --bg-card: #FFFFFF;            /* 白底石基 */
  --bg-card-soft: #F5F7F8;
  --border-stone: #D5DCE0;       /* 石缝细边 */
  --border-stone-light: #E2E8EC;
  --text-main: #2B333B;          /* 铁灰主字 */
  --text-muted: #5D6B78;         /* 灰石次要字 */
  --text-dim: #5A6874;           /* 辅助标注字 (对比度达标 >= 4.5:1) */
  
  --blue-rampart: #4A7BA6;       /* 壁垒蓝点缀 */
  --blue-rampart-hover: #3A688F;
  --blue-rampart-dark: #2C5270;
  --blue-rampart-light: rgba(74, 123, 166, 0.12);
  
  --gold-dawn: #F2C96B;          /* 晨曦金 */
  --gold-dawn-hover: #E5B84C;
  --gold-glow: rgba(242, 201, 107, 0.45);
  --gold-tint: rgba(242, 201, 107, 0.15);
  
  --font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, sans-serif;
  --radius-card: 8px;            /* 圆角 8px */
  --radius-btn: 8px;
  --radius-sm: 6px;
  --radius-pill: 9999px;
  
  /* 方正投影 */
  --shadow-stone: 0 4px 14px rgba(43, 51, 59, 0.08), 0 1px 3px rgba(43, 51, 59, 0.04);
  --shadow-stone-hover: 0 10px 24px rgba(43, 51, 59, 0.12), 0 2px 6px rgba(43, 51, 59, 0.06);
  --shadow-gold-rim: 0 0 16px rgba(242, 201, 107, 0.65), 0 4px 12px rgba(74, 123, 166, 0.35);
  
  --container-max: 1200px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-stone);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  background-color: var(--bg-stone);
  color: var(--text-main);
}

/* 全屏 Canvas 背景：破晓城墙 */
#dawnCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  display: block;
}

.navbar, main, .footer {
  position: relative;
  z-index: 1;
}

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

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section {
  padding: 76px 0;
  position: relative;
}

.section-title-wrap {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 52px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: rgba(74, 123, 166, 0.1);
  color: var(--blue-rampart-dark);
  border: 1px solid rgba(74, 123, 166, 0.3);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.85rem, 3.5vw, 2.45rem);
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* 按钮体系：主按钮壁垒蓝实底白字，悬停晨光镀边 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: var(--radius-btn);
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background: var(--blue-rampart);
  color: #FFFFFF;
  border: 1px solid var(--blue-rampart-hover);
  box-shadow: 0 3px 10px rgba(74, 123, 166, 0.28);
}

.btn-primary:hover {
  background: var(--blue-rampart-hover);
  border-color: var(--gold-dawn);
  box-shadow: var(--shadow-gold-rim);
  transform: translateY(-2px);
  color: #FFFFFF;
}

.btn-outline {
  background: #FFFFFF;
  color: var(--blue-rampart);
  border: 1px solid var(--border-stone);
  box-shadow: 0 2px 6px rgba(43, 51, 59, 0.05);
}

.btn-outline:hover {
  background: #FFFFFF;
  border-color: var(--blue-rampart);
  color: var(--blue-rampart-hover);
  box-shadow: 0 4px 12px rgba(74, 123, 166, 0.2);
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
}

/* 导航栏 */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(236, 239, 241, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-stone);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-main);
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--blue-rampart);
  color: #FFFFFF;
  border: 1px solid var(--blue-rampart-hover);
  box-shadow: 0 3px 10px rgba(74, 123, 166, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  color: var(--blue-rampart);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* 页脚 (Footer) */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border-stone);
  background: #FFFFFF;
  padding: 44px 0 32px;
  position: relative;
  z-index: 2;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
}

.footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
  list-style: none;
}

.footer-nav-link {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
}

.footer-nav-link:hover {
  color: var(--blue-rampart);
  background: var(--bg-card-soft);
}

.footer-copyright {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* 二级单页通用样式 (about, terms, privacy, sitemap, wiki) */
.subpage-container {
  max-width: 900px;
  margin: 40px auto 80px;
  padding: 0 24px;
}

.subpage-card {
  background: var(--bg-card);
  border: 1px solid var(--border-stone);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-stone);
  padding: 48px 40px;
}

.subpage-header {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-stone-light);
}

.subpage-header h1 {
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 10px;
}

.subpage-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.subpage-content h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 32px 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.subpage-content h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--blue-rampart);
  border-radius: 2px;
}

.subpage-content p {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

.subpage-content ul, .subpage-content ol {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin: 12px 0 20px 24px;
}

.subpage-content li {
  margin-bottom: 8px;
}

.alert-box {
  background: #FFF5F5;
  border: 1px solid #FED7D7;
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin: 20px 0;
  color: #C53030;
  font-size: 0.92rem;
}

.success-box {
  background: #F0FFF4;
  border: 1px solid #C6F6D5;
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin: 20px 0;
  color: #22543D;
  font-size: 0.92rem;
}

.sitemap-tree {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.sitemap-node {
  background: var(--bg-card-soft);
  border: 1px solid var(--border-stone);
  border-radius: var(--radius-card);
  padding: 24px;
}

.sitemap-node h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 14px;
}

.sitemap-node ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sitemap-node li {
  margin-bottom: 10px;
}

.sitemap-node a {
  color: var(--blue-rampart);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.92rem;
  transition: var(--transition);
}

.sitemap-node a:hover {
  color: var(--blue-rampart-hover);
  text-decoration: underline;
}

/* ==========================================================================
   常见问题解答 (FAQ) 组件规范 - 原生 details/summary，全站响应式
   ========================================================================== */
.faq-list {
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: #FFFFFF;
  border: 1px solid var(--border-stone);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-stone);
  overflow: hidden;
  transition: var(--transition);
  margin-bottom: 12px;
}

.faq-item[open] {
  border-color: var(--blue-rampart);
}

.faq-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-toggle-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card-soft);
  color: var(--text-muted);
  transition: transform 0.25s ease;
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
  margin-left: 12px;
}

.faq-item[open] .faq-toggle-icon {
  transform: rotate(45deg);
  background: var(--blue-rampart);
  color: #ffffff;
}

.faq-content {
  padding: 0 20px 16px 20px;
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.75;
  border-top: 1px solid var(--border-stone-light);
  padding-top: 12px;
}

/* 针对文章内 FAQ 容器的专门样式增强 */
.article-faq-wrap {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px dashed var(--border-stone);
}

.article-faq-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* SEO 内链文本高亮样式 */
.seo-internal-link {
  color: var(--blue-rampart);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: var(--transition);
  padding: 1px 4px;
  border-radius: 3px;
}

.seo-internal-link:hover {
  background: rgba(74, 123, 166, 0.12);
  color: var(--blue-rampart-dark);
}

/* 键盘访问无障碍跳转与焦点轮廓 */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  padding: 12px 20px;
  background: var(--blue-rampart);
  color: #FFFFFF;
  font-weight: 700;
  border-radius: var(--radius-btn);
  box-shadow: var(--shadow-stone);
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
  outline: 3px solid var(--gold-dawn);
}

:focus-visible {
  outline: 3px solid var(--blue-rampart);
  outline-offset: 2px;
}

/* 吸顶导航锚点位移补偿：确保标题不被 72px 导航栏遮挡 */
section[id], article[id], div[id] {
  scroll-margin-top: 86px;
}

/* 网站地图跨列响应式辅助类 */
.sitemap-node-wide {
  grid-column: span 2;
}

/* 遵循用户的系统减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  #dawnCanvas {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .subpage-card {
    padding: 28px 20px;
  }
  .sitemap-tree {
    grid-template-columns: 1fr;
  }
  .sitemap-node-wide {
    grid-column: span 1 !important;
  }
  .faq-summary {
    padding: 14px 16px;
    font-size: 0.96rem;
  }
  .faq-content {
    padding: 0 16px 14px 16px;
    font-size: 0.9rem;
  }
}
