/* ============================================================
   牛剑轻咨询 · 全局样式
   设计风格：极简白底 + 砖红强调 + 衬线大字 + 精致卡片
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --white:   #ffffff;
  --paper:   #f9f8f5;
  --light:   #f2f0eb;
  --border:  #e8e4dd;
  --muted:   #999490;
  --text:    #2c2a27;
  --dark:    #1a1815;
  --accent:  #c8401a;
  --accent2: #e05528;
  --gold:    #b8923a;
  --font-serif: 'Noto Serif SC', 'SimSun', Georgia, serif;
  --font-sans:  'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --radius:  12px;
  --shadow:  0 2px 20px rgba(0,0,0,.07);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.12);
  --transition: .25s ease;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--white);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4,h5 {
  font-family: var(--font-serif);
  line-height: 1.35;
  font-weight: 600;
  color: var(--dark);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* --- Typography Scale --- */
.display   { font-size: clamp(2.4rem, 5vw, 4.2rem); letter-spacing: -.02em; }
.headline  { font-size: clamp(1.8rem, 3vw, 2.8rem); }
.title     { font-size: clamp(1.3rem, 2vw, 1.8rem); }
.subtitle  { font-size: 1.1rem; color: var(--muted); }
.body-lg   { font-size: 1.1rem; line-height: 1.85; }
.label     { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* --- Layout Helpers --- */
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; }
.section-sm { padding: 64px 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.flex   { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mt-64 { margin-top: 64px; }
.gap-8  { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

/* --- Navigation --- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 64px;
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.15rem; font-weight: 700;
  color: var(--dark);
  letter-spacing: .02em;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex; gap: 36px;
}
.nav-links a {
  font-size: .9rem; color: var(--text);
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1.5px; background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-cta {
  background: var(--accent); color: var(--white);
  padding: 8px 20px; border-radius: 6px;
  font-size: .9rem; font-weight: 500;
  transition: background var(--transition), transform var(--transition);
}
.nav-cta:hover { background: var(--accent2); transform: translateY(-1px); }
.nav-mobile-btn { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-mobile-btn span { display: block; width: 24px; height: 2px; background: var(--dark); border-radius: 2px; transition: var(--transition); }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 8px;
  font-size: .95rem; font-weight: 500; cursor: pointer;
  border: none; transition: all var(--transition);
  font-family: var(--font-sans);
  text-decoration: none;
}
.btn-primary {
  background: var(--accent); color: var(--white);
}
.btn-primary:hover { background: var(--accent2); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(200,64,26,.35); }
.btn-outline {
  background: transparent; color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); color: var(--white); }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-white {
  background: var(--white); color: var(--accent);
  font-weight: 600;
}
.btn-white:hover { background: var(--paper); }
.btn-lg { padding: 16px 36px; font-size: 1rem; }
.btn-sm { padding: 8px 18px; font-size: .85rem; }

/* --- Card --- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.card-paper { background: var(--paper); border: none; }
.card-dark  { background: var(--dark); color: var(--white); border: none; }
.card-dark h2, .card-dark h3, .card-dark h4 { color: var(--white); }

/* --- Section Headers --- */
.section-header { margin-bottom: 64px; }
.section-header .label { margin-bottom: 12px; }
.section-header h2 { margin-bottom: 16px; }
.section-header p { max-width: 600px; color: var(--muted); font-size: 1.05rem; }
.section-header.text-center p { margin: 0 auto; }

/* --- Hero --- */
.hero {
  padding-top: 140px; padding-bottom: 100px;
  background: var(--paper);
}
.hero-eyebrow {
  display: inline-block;
  background: rgba(200,64,26,.08);
  color: var(--accent);
  padding: 6px 16px; border-radius: 20px;
  font-size: .85rem; font-weight: 500;
  margin-bottom: 24px;
}
.hero h1 { margin-bottom: 20px; }
.hero .lead {
  font-size: 1.15rem; color: var(--muted);
  margin-bottom: 40px;
  max-width: 560px;
  line-height: 1.9;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-img-wrap {
  border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* --- Tag / Badge --- */
.tag {
  display: inline-block;
  background: var(--light); color: var(--muted);
  padding: 4px 12px; border-radius: 20px;
  font-size: .8rem;
}
.tag-accent { background: rgba(200,64,26,.1); color: var(--accent); }
.tag-gold   { background: rgba(184,146,58,.1); color: var(--gold); }

/* --- Divider --- */
.divider { border: none; border-top: 1px solid var(--border); margin: 48px 0; }
.divider-sm { margin: 24px 0; }

/* --- Accordion --- */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.accordion-header {
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-serif);
  font-size: 1.05rem; font-weight: 600; color: var(--dark);
  text-align: left;
  transition: background var(--transition);
}
.accordion-header:hover { background: var(--paper); }
.accordion-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition), background var(--transition);
  font-style: normal;
}
.accordion-item.open .accordion-icon { transform: rotate(45deg); background: var(--accent); color: white; }
.accordion-body {
  max-height: 0; overflow: hidden;
  transition: max-height .4s ease, padding .3s ease;
  padding: 0 24px;
}
.accordion-item.open .accordion-body {
  max-height: 800px;
  padding: 0 24px 24px;
}

/* --- Stats --- */
.stat-item { text-align: center; }
.stat-num {
  font-family: var(--font-serif);
  font-size: 2.8rem; font-weight: 700;
  color: var(--accent); line-height: 1;
}
.stat-label { color: var(--muted); font-size: .9rem; margin-top: 6px; }

/* --- Price Tag --- */
.price {
  font-family: var(--font-serif);
  font-size: 1.6rem; font-weight: 700;
  color: var(--accent);
}
.price-free { color: var(--gold); }

/* --- Testimonial --- */
.testimonial {
  background: var(--paper);
  border-left: 4px solid var(--accent);
  padding: 24px 28px;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.testimonial p { font-style: italic; color: var(--text); font-size: 1.05rem; }
.testimonial cite { font-size: .85rem; color: var(--muted); margin-top: 12px; display: block; }

/* --- FAQ --- */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 20px 0;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  font-size: 1rem; font-weight: 600; color: var(--dark);
  text-align: left; font-family: var(--font-sans);
}
.faq-icon { flex-shrink: 0; font-size: 1.2rem; color: var(--muted); transition: transform var(--transition); }
.faq-item.open .faq-icon { transform: rotate(45deg); color: var(--accent); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .4s ease, padding .3s ease;
  color: var(--muted); line-height: 1.8;
}
.faq-item.open .faq-a { max-height: 400px; padding-bottom: 20px; }

/* --- CTA Band --- */
.cta-band {
  background: var(--dark); color: var(--white);
  padding: 80px 0; text-align: center;
}
.cta-band h2, .cta-band h3 { color: var(--white); }
.cta-band p { color: rgba(255,255,255,.65); max-width: 560px; margin: 16px auto 36px; font-size: 1.05rem; }
.cta-band .flex-center { gap: 16px; flex-wrap: wrap; }

/* --- Footer --- */
.footer {
  background: var(--dark); color: rgba(255,255,255,.5);
  padding: 60px 0 32px;
}
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .nav-logo { color: var(--white); font-size: 1.2rem; margin-bottom: 12px; }
.footer-brand p { font-size: .9rem; line-height: 1.7; max-width: 260px; }
.footer-col h4 { color: rgba(255,255,255,.9); font-size: .9rem; margin-bottom: 16px; font-family: var(--font-sans); font-weight: 600; }
.footer-col a { display: block; font-size: .85rem; margin-bottom: 10px; transition: color var(--transition); }
.footer-col a:hover { color: rgba(255,255,255,.9); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: .8rem;
}
.footer-slogan { color: rgba(255,255,255,.4); font-size: .8rem; }

/* --- Progress Bar (top reading) --- */
#progress-bar {
  position: fixed; top: 0; left: 0; z-index: 2000;
  height: 3px; background: var(--accent);
  width: 0%; transition: width .1s;
}

/* --- Back to Top --- */
#back-top {
  position: fixed; bottom: 32px; right: 32px; z-index: 999;
  width: 44px; height: 44px;
  background: var(--accent); color: white;
  border: none; border-radius: 50%;
  cursor: pointer; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(200,64,26,.4);
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}
#back-top.show { opacity: 1; pointer-events: auto; }
#back-top:hover { transform: translateY(-3px); }

/* --- Animations --- */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* --- Marquee --- */
.marquee-wrap {
  overflow: hidden;
  background: var(--dark); color: rgba(255,255,255,.5);
  padding: 14px 0; border-top: 1px solid rgba(255,255,255,.08);
}
.marquee-track {
  display: flex; gap: 64px; width: max-content;
  animation: marquee 30s linear infinite;
  font-size: .88rem; letter-spacing: .05em;
}
.marquee-track span { color: var(--accent); margin-right: 12px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --- Step Indicator --- */
.steps { display: flex; gap: 0; }
.step {
  flex: 1; position: relative;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.step:not(:last-child)::after {
  content: '';
  position: absolute; top: 20px; left: 50%; right: -50%;
  height: 1px; background: var(--border); z-index: 0;
}
.step-num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; position: relative; z-index: 1;
  margin-bottom: 12px;
}
.step p { font-size: .9rem; color: var(--muted); padding: 0 8px; }

/* --- Table --- */
.service-table {
  width: 100%; border-collapse: collapse;
  font-size: .92rem;
}
.service-table th {
  background: var(--paper);
  padding: 14px 18px; text-align: left;
  font-weight: 600; font-size: .85rem;
  border-bottom: 2px solid var(--border);
  color: var(--muted);
}
.service-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.service-table tr:hover td { background: var(--paper); }

/* === Responsive === */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: 100px; }
  .grid-2.hero-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-mobile-btn { display: flex; }
  .nav-cta { display: none; }
  .section { padding: 64px 0; }
  .section-sm { padding: 40px 0; }
  .steps { flex-direction: column; gap: 24px; }
  .step::after { display: none; }
  /* Hero CTA 垂直堆叠 */
  .hero-cta { flex-direction: column; align-items: stretch !important; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .hero-cta > div { flex-direction: column; gap: 12px !important; }
  /* 首页 Hero 区两列变单列 */
  .hero .grid-2 { grid-template-columns: 1fr !important; }
  .hero .grid-2 > div:last-child { display: none; } /* 移动端隐藏图片 */
  /* 大标题在移动端稍微缩小 */
  .display { font-size: clamp(2rem, 8vw, 3rem); }
  .headline { font-size: clamp(1.5rem, 6vw, 2.2rem); }
  /* 按钮在移动端更容易点击 */
  .btn { min-height: 48px; }
  .btn-lg { padding: 16px 28px; font-size: .95rem; }
  /* 卡片间距压缩 */
  .card { padding: 24px 20px; }
  /* 三条路径卡片底部按钮全宽 */
  .path-card .btn { width: 100%; text-align: center; justify-content: center; }
  /* 诊断页流程图移动端竖排 */
  .diag-steps-flow { flex-direction: column !important; align-items: center; }
  .diag-steps-flow > div { width: 100%; max-width: 280px; }
  .diag-steps-flow > div > div[style*="position:absolute"] { display: none !important; }
  /* 结果雷达图 */
  .result-grid { grid-template-columns: repeat(2, 1fr); }
  /* footer */
  .footer-brand { text-align: center; }
  .footer-col h4 { margin-top: 20px; }
  /* 滚动字幕在移动端依然保持 */
  .marquee-wrap { overflow: hidden; }
  /* 减少过度 padding */
  .container { padding: 0 16px; }
  .quiz-body { padding: 28px 20px; }
  .quiz-progress-header { padding: 16px 20px; }
  .quiz-footer { padding: 16px 20px; }
  /* section header spacing */
  .section-header { margin-bottom: 40px; }
}

/* --- Mobile Nav Open --- */
.nav-links.mobile-open {
  display: flex; flex-direction: column;
  position: fixed; top: 64px; left: 0; right: 0;
  background: white; padding: 24px;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 999;
}
.nav-links.mobile-open a { padding: 12px 0; border-bottom: 1px solid var(--border); }
