/* ============================================================
   问道天玑 官网 — 暗夜紫金科技风
   色彩取自 @tianji/design-tokens：
   brand #a67c52 / #c5a059 / #ead2a8，bg #120914，紫 #6C3FA0/#9C6FE0
   ============================================================ */

:root {
  --bg-base: #0d0710;
  --bg-page: #120914;
  --bg-surface: #1e0f1c;
  --bg-elevated: #261422;
  --gold: #a67c52;
  --gold-l: #c5a059;
  --gold-ll: #ead2a8;
  --purple: #6C3FA0;
  --purple-l: #9C6FE0;
  --text-main: #f2e9dc;
  --text-sub: rgba(242, 233, 220, 0.62);
  --text-faint: rgba(242, 233, 220, 0.58);
  --border-gold: rgba(197, 160, 89, 0.22);
  --gradient-cta: linear-gradient(135deg, #a67c52 0%, #c5a059 100%);
  --font-serif: "Source Han Serif SC", "Noto Serif CJK SC", "STZhongsong", "STSong", serif;
  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --nav-h: 64px;
  --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-main);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ======== 星空画布 ======== */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

main, .nav, .footer { position: relative; z-index: 1; }

/* ======== 通用 ======== */
.gold-text {
  background: linear-gradient(120deg, #ead2a8 0%, #c5a059 45%, #a67c52 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 96px 24px;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

.section-head { text-align: center; margin-bottom: 56px; }

.section-eyebrow {
  font-size: 13px;
  letter-spacing: 0.35em;
  color: var(--gold-l);
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 600;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.35;
}

.section-sub {
  margin-top: 16px;
  color: var(--text-sub);
  font-size: 15.5px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.section-sub.left { margin-left: 0; text-align: left; }

/* ======== 按钮 ======== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gradient-cta);
  color: #1a1008;
  box-shadow: 0 6px 24px rgba(197, 160, 89, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(197, 160, 89, 0.42);
}

.btn-ghost {
  background: rgba(197, 160, 89, 0.08);
  color: var(--gold-ll);
  border: 1px solid var(--border-gold);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(197, 160, 89, 0.16);
  transform: translateY(-2px);
}

/* ======== 导航 ======== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.nav.scrolled {
  background: rgba(13, 7, 16, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(197, 160, 89, 0.12), 0 8px 32px rgba(0, 0, 0, 0.4);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }

.nav-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px rgba(197, 160, 89, 0.35), 0 2px 10px rgba(0, 0, 0, 0.5);
}

.nav-name {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold-ll);
}

.nav-links { display: flex; align-items: center; gap: 34px; }

.nav-links a {
  color: var(--text-sub);
  text-decoration: none;
  font-size: 14.5px;
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a:not(.nav-cta):hover { color: var(--gold-ll); }

.nav-links a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 0;
  height: 1.5px;
  background: var(--gradient-cta);
  transition: width 0.25s ease, left 0.25s ease;
}

.nav-links a:not(.nav-cta):hover::after { left: 0; width: 100%; }

.nav-cta {
  padding: 8px 20px;
  border-radius: 999px;
  background: var(--gradient-cta);
  color: #1a1008 !important;
  font-weight: 600;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--gold-l);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ======== Hero ======== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 40px) 24px 80px;
  overflow: hidden;
}

.hero-deco { position: absolute; inset: 0; pointer-events: none; }

.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(108, 63, 160, 0.22) 0%, rgba(166, 124, 82, 0.1) 38%, transparent 68%);
  filter: blur(10px);
}

.bagua-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1px dashed rgba(197, 160, 89, 0.18);
}

.ring-1 {
  width: 640px;
  height: 640px;
  transform: translate(-50%, -50%);
  animation: spin 90s linear infinite;
}

.ring-2 {
  width: 880px;
  height: 880px;
  transform: translate(-50%, -50%);
  border-color: rgba(156, 111, 224, 0.12);
  animation: spin 140s linear infinite reverse;
}

@keyframes spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero-content { position: relative; max-width: 860px; }

.hero-eyebrow {
  font-size: 14px;
  letter-spacing: 0.5em;
  color: var(--gold-l);
  margin-bottom: 22px;
  font-weight: 600;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(38px, 7vw, 68px);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.28;
  text-shadow: 0 4px 40px rgba(108, 63, 160, 0.35);
}

.hero-sub {
  margin: 28px auto 40px;
  max-width: 620px;
  color: var(--text-sub);
  font-size: 16px;
}

.hero-actions {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: clamp(24px, 5vw, 64px);
  margin-top: 64px;
  flex-wrap: wrap;
}

.stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }

.stat b {
  font-family: var(--font-serif);
  font-size: 30px;
  background: linear-gradient(120deg, #ead2a8, #c5a059);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat span { font-size: 13px; color: var(--text-faint); letter-spacing: 0.1em; }

/* ======== 功能卡片 ======== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature-card {
  background: linear-gradient(160deg, rgba(38, 20, 34, 0.72) 0%, rgba(30, 15, 28, 0.5) 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  padding: 30px 26px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(234, 210, 168, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(197, 160, 89, 0.5);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 40px rgba(166, 124, 82, 0.12);
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(166, 124, 82, 0.12);
  border: 1px solid var(--border-gold);
  color: var(--gold-l);
  margin-bottom: 20px;
}

.feature-icon svg { width: 26px; height: 26px; }

.feature-card h3 {
  font-family: var(--font-serif);
  font-size: 19px;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  color: var(--gold-ll);
}

.feature-card p { font-size: 14px; color: var(--text-sub); }

/* ======== AI 区块 ======== */
.ai-section {
  position: relative;
  overflow: hidden; /* 防止装饰圆环在窄屏产生横向溢出 */
}

.ai-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 400px at 18% 50%, rgba(108, 63, 160, 0.14), transparent 70%);
  pointer-events: none;
}

.ai-wrap {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 60px;
  align-items: center;
}

.ai-visual { display: flex; justify-content: center; }

.ai-orb {
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-orb-core {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ead2a8, #c5a059 45%, #6C3FA0 120%);
  box-shadow: 0 0 60px rgba(197, 160, 89, 0.5), 0 0 120px rgba(108, 63, 160, 0.35);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 60px rgba(197, 160, 89, 0.5), 0 0 120px rgba(108, 63, 160, 0.35); }
  50% { transform: scale(1.06); box-shadow: 0 0 80px rgba(197, 160, 89, 0.65), 0 0 160px rgba(108, 63, 160, 0.45); }
}

.ai-orb-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1px solid rgba(197, 160, 89, 0.3);
}

.ai-orb-ring.r1 { width: 180px; height: 180px; transform: translate(-50%, -50%); border-style: dashed; animation: spin 24s linear infinite; }
.ai-orb-ring.r2 { width: 250px; height: 250px; transform: translate(-50%, -50%); border-color: rgba(156, 111, 224, 0.28); animation: spin 38s linear infinite reverse; }
.ai-orb-ring.r3 { width: 320px; height: 320px; transform: translate(-50%, -50%); border-color: rgba(197, 160, 89, 0.15); border-style: dotted; animation: spin 55s linear infinite; }

.ai-text .section-title { text-align: left; }

.ai-points { list-style: none; margin: 28px 0 36px; display: flex; flex-direction: column; gap: 14px; }

.ai-points li { display: flex; align-items: center; gap: 12px; color: var(--text-sub); font-size: 15px; }

.ai-points .dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gradient-cta);
  box-shadow: 0 0 10px rgba(197, 160, 89, 0.7);
}

/* ======== 多端下载 ======== */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.platform-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 32px 16px 26px;
  border-radius: var(--radius);
  background: rgba(30, 15, 28, 0.55);
  border: 1px solid rgba(197, 160, 89, 0.14);
  text-decoration: none;
  color: inherit;
  backdrop-filter: blur(8px);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

a.platform-card:hover {
  transform: translateY(-6px);
  border-color: rgba(197, 160, 89, 0.5);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4), 0 0 36px rgba(166, 124, 82, 0.12);
}

.platform-card svg { width: 34px; height: 34px; color: var(--gold-l); }

.platform-card h3 { font-size: 16.5px; letter-spacing: 0.04em; font-family: var(--font-serif); }

.platform-card p { font-size: 12.5px; color: var(--text-faint); }

.platform-link {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--gold-l);
  letter-spacing: 0.04em;
}

.platform-link.coming { color: var(--text-faint); }

.platform-card.featured {
  background: linear-gradient(160deg, rgba(166, 124, 82, 0.18), rgba(108, 63, 160, 0.14));
  border-color: rgba(197, 160, 89, 0.4);
}

/* ======== 合规 ======== */
.compliance-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.comp-card {
  background: rgba(30, 15, 28, 0.5);
  border: 1px solid rgba(197, 160, 89, 0.14);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.comp-card:hover { transform: translateY(-4px); border-color: rgba(197, 160, 89, 0.4); }

.comp-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(108, 63, 160, 0.14);
  border: 1px solid rgba(156, 111, 224, 0.25);
  color: var(--purple-l);
}

.comp-icon svg { width: 26px; height: 26px; }

.comp-card h3 { font-size: 16.5px; font-family: var(--font-serif); letter-spacing: 0.05em; margin-bottom: 10px; color: var(--gold-ll); }

.comp-card p { font-size: 13px; color: var(--text-sub); }

.disclaimer {
  margin-top: 48px;
  padding: 20px 28px;
  text-align: center;
  font-size: 13px;
  color: var(--text-faint);
  border: 1px dashed rgba(197, 160, 89, 0.25);
  border-radius: 12px;
  background: rgba(197, 160, 89, 0.04);
}

/* ======== 页脚 ======== */
.footer {
  border-top: 1px solid rgba(197, 160, 89, 0.14);
  background: rgba(13, 7, 16, 0.85);
  backdrop-filter: blur(12px);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer-brand { display: flex; align-items: center; gap: 14px; }

.footer-logo { width: 44px; height: 44px; border-radius: 11px; box-shadow: 0 0 0 1px rgba(197, 160, 89, 0.3); }

.footer-name { font-family: var(--font-serif); font-size: 20px; font-weight: 700; letter-spacing: 0.12em; color: var(--gold-ll); text-align: left; }

.footer-slogan { font-size: 12.5px; color: var(--text-faint); letter-spacing: 0.08em; text-align: left; }

.footer-links { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; }

.footer-links a {
  color: var(--text-sub);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-links a:hover { color: var(--gold-ll); }

.footer-meta { font-size: 13px; color: var(--text-faint); display: flex; flex-direction: column; gap: 6px; }

.footer-beian {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-beian a { color: var(--text-faint); text-decoration: none; transition: color 0.2s ease; }

.footer-beian a:hover { color: var(--gold-l); }

/* ======== 滚动进场动效 ======== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .bagua-ring, .ai-orb-ring, .ai-orb-core { animation: none; }
}

/* ======== 响应式 ======== */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .platform-grid { grid-template-columns: repeat(3, 1fr); }
  .compliance-grid { grid-template-columns: repeat(2, 1fr); }
  .ai-wrap { grid-template-columns: 1fr; gap: 40px; }
  .ai-text { text-align: center; }
  .ai-text .section-title, .ai-text .section-sub { text-align: center; margin-left: auto; }
  .ai-points { align-items: center; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(13, 7, 16, 0.96);
    backdrop-filter: blur(16px);
    padding: 8px 0 16px;
    border-bottom: 1px solid rgba(197, 160, 89, 0.14);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .nav-links.open { opacity: 1; transform: translateY(0); pointer-events: auto; }

  .nav-links a { padding: 13px 0; width: 100%; text-align: center; }

  .nav-links a:not(.nav-cta)::after { display: none; }

  .nav-cta { width: calc(100% - 48px); margin: 8px 24px 0; }

  .nav-toggle { display: flex; }

  .section { padding: 64px 20px; }

  .feature-grid { grid-template-columns: 1fr; }

  .platform-grid { grid-template-columns: repeat(2, 1fr); }

  .compliance-grid { grid-template-columns: 1fr; }

  .hero { min-height: 92vh; }

  .ring-1 { width: 420px; height: 420px; }
  .ring-2 { width: 560px; height: 560px; }

  .hero-stats { gap: 20px; margin-top: 48px; }

  .stat b { font-size: 24px; }
}

@media (max-width: 420px) {
  .platform-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  /* 小屏收窄 AI 装饰圆环，避免视觉重心偏移 */
  .ai-orb { width: 250px; height: 250px; }
  .ai-orb-core { width: 96px; height: 96px; }
  .ai-orb-ring.r1 { width: 140px; height: 140px; }
  .ai-orb-ring.r2 { width: 195px; height: 195px; }
  .ai-orb-ring.r3 { width: 250px; height: 250px; }
}
