/* =========================================================
 * 太公奇门官方网站 · 东方宣纸古籍与玄墨金印设计系统
 * 与排盘系统（pan.taigongqimen.com）视觉一脉相承
 * ========================================================= */

:root {
  --bg-paper: #f6f1e6;
  --bg-card: #fdfbf6;
  --bg-elevated: #efe7d6;
  --bg-hover: #e7dcc6;

  --ink-main: #221d1a;
  --ink-sub: #4b4139;
  --ink-muted: #76695d;

  --accent-red: #b83b2a;
  --accent-red-hover: #9d2f20;
  --accent-red-soft: rgba(184, 59, 42, 0.1);
  --accent-jade: #2b5b51;
  --accent-jade-soft: rgba(43, 91, 81, 0.1);
  --accent-gold: #a67c37;
  --accent-gold-soft: rgba(166, 124, 55, 0.13);

  --border-line: #dfd5c2;
  --border-strong: #c4b293;
  --shadow-sm: 0 2px 10px rgba(48, 36, 22, 0.06);
  --shadow-md: 0 12px 32px rgba(48, 36, 22, 0.09);
  --shadow-lg: 0 20px 48px rgba(48, 36, 22, 0.13);

  --font-serif: 'Songti SC', 'STSong', 'Noto Serif CJK SC', 'Source Han Serif SC', 'SimSun', Georgia, serif;
  --font-sans: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', system-ui, -apple-system, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --max-width: 1180px;
}

[data-theme='dark'] {
  --bg-paper: #141210;
  --bg-card: #1e1a17;
  --bg-elevated: #27221e;
  --bg-hover: #312a24;

  --ink-main: #f3ece0;
  --ink-sub: #d2c8ba;
  --ink-muted: #9c9082;

  --accent-red: #e05e4c;
  --accent-red-hover: #ee6f5d;
  --accent-red-soft: rgba(224, 94, 76, 0.16);
  --accent-jade: #5aa897;
  --accent-jade-soft: rgba(90, 168, 151, 0.15);
  --accent-gold: #d9af5f;
  --accent-gold-soft: rgba(217, 175, 95, 0.16);

  --border-line: #383028;
  --border-strong: #55483a;
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 14px 36px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.6);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-paper);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(166, 124, 55, 0.08), transparent 40%),
    radial-gradient(circle at 85% 22%, rgba(184, 59, 42, 0.06), transparent 36%);
  color: var(--ink-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

.serif {
  font-family: var(--font-serif);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 顶部通栏导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 251, 246, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-line);
}

[data-theme='dark'] .site-header {
  background: rgba(30, 26, 23, 0.9);
}

.header-inner {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-seal {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-red);
  color: #fdfbf6;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1.5px rgba(253, 251, 246, 0.35), 0 4px 12px rgba(184, 59, 42, 0.28);
  letter-spacing: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.brand-tagline {
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
}

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

.nav-links a {
  font-size: 14px;
  color: var(--ink-sub);
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a:hover {
  color: var(--accent-red);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-line);
  background: var(--bg-card);
  color: var(--ink-sub);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
  color: var(--ink-main);
}

.mobile-menu-btn {
  display: none;
}

/* ---------- 通用按钮系统 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.22s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-red);
  color: #fdfbf6;
  box-shadow: 0 6px 18px rgba(184, 59, 42, 0.26);
}

.btn-primary:hover {
  background: var(--accent-red-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(184, 59, 42, 0.34);
}

.btn-outline {
  background: var(--bg-card);
  color: var(--ink-main);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-gold);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 9px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: 12px;
}

/* ---------- 首屏 Hero 区 ---------- */
.hero {
  padding: 64px 0 72px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  align-items: center;
  gap: 48px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--accent-gold-soft);
  border: 1px solid rgba(166, 124, 55, 0.28);
  color: var(--accent-gold);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-red);
}

.hero-title {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: clamp(34px, 4.4vw, 52px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: 0.04em;
  color: var(--ink-main);
}

.hero-title .accent {
  color: var(--accent-red);
}

.hero-desc {
  margin: 0 0 30px;
  font-size: 16px;
  color: var(--ink-sub);
  max-width: 560px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 30px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 22px;
  border-top: 1px solid var(--border-line);
  font-size: 13px;
  color: var(--ink-muted);
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.trust-mark {
  color: var(--accent-jade);
  font-weight: 700;
}

/* ---------- 右侧高定九宫罗盘艺术预览卡 ---------- */
.compass-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.compass-card::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(166, 124, 55, 0.24);
  border-radius: 13px;
  pointer-events: none;
}

.compass-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  position: relative;
  z-index: 2;
}

.compass-card-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-main);
}

.compass-pill {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-jade-soft);
  color: var(--accent-jade);
  font-weight: 600;
}

.luoshu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  position: relative;
  z-index: 2;
}

.palace {
  background: var(--bg-paper);
  border: 1px solid var(--border-line);
  border-radius: 10px;
  padding: 12px 10px;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.24s ease;
}

.palace:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.palace-center {
  background: linear-gradient(145deg, var(--accent-red-soft), var(--accent-gold-soft));
  border-color: rgba(184, 59, 42, 0.34);
  align-items: center;
  justify-content: center;
  text-align: center;
}

.palace-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--ink-muted);
}

.palace-gua {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--accent-gold);
}

.palace-star {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-main);
  margin: 4px 0 2px;
}

.palace-star.red {
  color: var(--accent-red);
}

.palace-star.jade {
  color: var(--accent-jade);
}

.palace-foot {
  font-size: 11px;
  color: var(--ink-sub);
  display: flex;
  justify-content: space-between;
}

.center-seal {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-red);
  color: #fdfbf6;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  box-shadow: 0 4px 12px rgba(184, 59, 42, 0.28);
}

.center-note {
  font-size: 11px;
  color: var(--ink-sub);
  font-family: var(--font-serif);
  letter-spacing: 0.1em;
}

.compass-card-footer {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-muted);
  position: relative;
  z-index: 2;
}

.compass-quick-link {
  color: var(--accent-red);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.compass-quick-link:hover {
  text-decoration: underline;
}

/* ---------- 通用区块标题 ---------- */
.section {
  padding: 68px 0;
}

.section-alt {
  background: var(--bg-card);
  border-top: 1px solid var(--border-line);
  border-bottom: 1px solid var(--border-line);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 44px;
}

.section-kicker {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.22em;
  margin-bottom: 10px;
}

.section-title {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ink-main);
}

.section-sub {
  margin: 0;
  font-size: 15px;
  color: var(--ink-sub);
}

/* ---------- 六大核心体系卡片 ---------- */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.section-alt .module-card {
  background: var(--bg-paper);
}

.module-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.module-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.module-num {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-red-soft);
  color: var(--accent-red);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.module-tag {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--ink-sub);
  font-weight: 500;
}

.module-name {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-main);
}

.module-desc {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--ink-sub);
  line-height: 1.72;
}

.module-points {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.module-points li {
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-line);
  color: var(--ink-muted);
  background: var(--bg-card);
}

.module-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-red);
  padding-top: 12px;
  border-top: 1px dashed var(--border-line);
}

.module-link:hover {
  gap: 10px;
}

/* ---------- 师承算法精粹四栏 ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.feature-box {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  position: relative;
}

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-title {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-main);
}

.feature-text {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-sub);
  line-height: 1.72;
}

/* ---------- 三端下载与手机安装中心 ---------- */
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.download-card {
  background: var(--bg-paper);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.download-card.featured {
  border: 1.5px solid var(--accent-red);
  box-shadow: var(--shadow-md);
  position: relative;
}

.featured-ribbon {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-red);
  color: #fdfbf6;
}

.download-os {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-jade);
  margin-bottom: 8px;
}

.download-title {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
}

.download-desc {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--ink-sub);
}

.step-list {
  margin: 0 0 22px;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--ink-sub);
}

.step-list li {
  margin-bottom: 7px;
}

.apk-meta {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 10px;
  text-align: center;
}

/* ---------- 常见问答手风琴 ---------- */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: 12px;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 18px 22px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink-main);
}

.faq-q:hover {
  background: var(--bg-elevated);
}

.faq-icon {
  font-size: 18px;
  color: var(--accent-gold);
  transition: transform 0.22s ease;
  flex-shrink: 0;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-a {
  display: none;
  padding: 0 22px 18px;
  font-size: 14px;
  color: var(--ink-sub);
  line-height: 1.78;
  border-top: 1px dashed var(--border-line);
  padding-top: 14px;
}

.faq-item.open .faq-a {
  display: block;
}

/* ---------- 底部号召横幅与页脚 ---------- */
.cta-banner {
  background: linear-gradient(135deg, #271f1a 0%, #3a261d 55%, #233832 100%);
  color: #f6f1e6;
  border-radius: var(--radius-lg);
  padding: 48px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.cta-banner::before {
  content: '太';
  position: absolute;
  right: 28px;
  bottom: -24px;
  font-family: var(--font-serif);
  font-size: 180px;
  color: rgba(253, 251, 246, 0.05);
  line-height: 1;
  pointer-events: none;
}

.cta-banner h2 {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: 0.06em;
}

.cta-banner p {
  margin: 0 auto 26px;
  max-width: 560px;
  color: rgba(246, 241, 230, 0.84);
  font-size: 15px;
}

.cta-banner-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.cta-banner .btn-outline {
  background: rgba(253, 251, 246, 0.08);
  color: #fdfbf6;
  border-color: rgba(253, 251, 246, 0.34);
}

.cta-banner .btn-outline:hover {
  background: rgba(253, 251, 246, 0.16);
}

.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--border-line);
  background: var(--bg-card);
  padding: 36px 0 30px;
  font-size: 13px;
  color: var(--ink-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-line);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a:hover {
  color: var(--accent-red);
}

.footer-bottom {
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

/* ---------- 移动端抽屉导航 ---------- */
.mobile-drawer {
  display: none;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-line);
  padding: 14px 20px 18px;
}

.mobile-drawer.open {
  display: block;
}

.mobile-drawer a {
  display: block;
  padding: 10px 0;
  font-size: 15px;
  color: var(--ink-main);
  border-bottom: 1px dashed var(--border-line);
}

.mobile-drawer a:last-child {
  border-bottom: 0;
}

/* ---------- 响应式适配 ---------- */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .modules-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .download-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .container {
    padding: 0 14px;
  }
  .header-inner {
    height: 60px;
    gap: 8px;
  }
  .brand {
    gap: 9px;
    min-width: 0;
  }
  .brand-seal {
    width: 34px;
    height: 34px;
    font-size: 18px;
    border-radius: 8px;
  }
  .brand-name {
    font-size: 17px;
    letter-spacing: 0.06em;
  }
  .brand-tagline {
    display: none;
  }
  .nav-links {
    display: none;
  }
  .header-actions {
    gap: 6px;
    flex-shrink: 0;
  }
  .header-actions .btn-sm {
    padding: 7px 11px;
    font-size: 12.5px;
    gap: 4px;
  }
  .icon-btn {
    width: 34px;
    height: 34px;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .hero {
    padding: 34px 0 46px;
  }
  .section {
    padding: 46px 0;
  }
  .modules-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }
  .palace {
    min-height: 78px;
    padding: 9px 7px;
  }
  .palace-star {
    font-size: 14px;
  }
  .cta-banner {
    padding: 36px 20px;
  }
  .hero-actions .btn {
    width: 100%;
  }
}

/* 暂未开放下载的禁用态按钮与页脚链接 */
.btn-disabled,
.btn:disabled {
  background: var(--bg-elevated);
  color: var(--ink-muted);
  border: 1px dashed var(--border-strong);
  cursor: not-allowed;
  opacity: 0.72;
  box-shadow: none;
  pointer-events: none;
  user-select: none;
}

.footer-link-disabled {
  color: var(--ink-muted);
  opacity: 0.62;
  cursor: not-allowed;
  user-select: none;
}
