/* 周易起名大师 官网样式
   资源目录：assets/css/style.css */

:root {
  --paper: #f7f2e9;
  --paper-deep: #efe6d8;
  --card: #fffdf9;
  --ink: #23201d;
  --ink-soft: #6b6157;
  --ink-faint: #9a8f82;
  --line: #e2d7c5;
  --brand: #c8342f;
  --brand-deep: #9c2420;
  --gold: #b08a4a;
  --gold-soft: #d9bd8a;
  --shadow-sm: 0 2px 10px rgba(60, 42, 24, .07);
  --shadow-md: 0 14px 40px rgba(60, 42, 24, .12);
  --shadow-lg: 0 30px 70px rgba(48, 32, 18, .22);
  --radius: 18px;
  --serif: "Songti SC", "STSong", "SimSun", "Source Han Serif SC", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.28; margin: 0; letter-spacing: .5px; }

p { margin: 0; }

ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  background: rgba(247, 242, 233, .88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.site-header.is-stuck { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }

.nav-inner { display: flex; align-items: center; gap: 20px; height: 68px; }

.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 19px; font-weight: 700; letter-spacing: 1px; }

.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: var(--shadow-sm); }

.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14.5px;
  color: var(--ink-soft);
  transition: color .2s ease, background .2s ease;
}

.nav-links a:hover { color: var(--ink); background: rgba(176, 138, 74, .12); }
.nav-links a.is-active { color: var(--brand); background: rgba(200, 52, 47, .09); font-weight: 600; }
.nav-links .btn { display: none; }

.nav-cta { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
  padding: 0;
}

.nav-toggle span { display: block; width: 18px; height: 2px; margin: 3px auto; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }

.nav-toggle.is-open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 15px; font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
}

.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 24px rgba(200, 52, 47, .28); }
.btn-primary:hover { background: var(--brand-deep); transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: 14px; }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--brand); transform: translateY(-2px); }

.btn-light { background: #fff; color: var(--brand-deep); }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 0, 0, .18); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 148px 0 84px;
  overflow: hidden;
  background:
    radial-gradient(1100px 520px at 78% 8%, rgba(217, 189, 138, .34), transparent 62%),
    linear-gradient(180deg, #fbf7ef 0%, var(--paper) 62%, var(--paper-deep) 100%);
}

.hero::after {
  content: "易";
  position: absolute;
  right: -4%;
  top: 6%;
  font-family: var(--serif);
  font-size: 460px;
  line-height: 1;
  color: rgba(176, 138, 74, .07);
  pointer-events: none;
}

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  background: rgba(255, 253, 249, .8);
  color: var(--gold);
  font-size: 13px; letter-spacing: 2px;
}

.hero h1 { font-size: 46px; margin: 22px 0 0; letter-spacing: 2px; }
.hero h1 em { font-style: normal; color: var(--brand); }

.lede { margin-top: 18px; font-size: 17px; color: var(--ink-soft); max-width: 30em; }

.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 24px; }

.hero-points li { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink-soft); }
.hero-points svg { width: 16px; height: 16px; color: var(--brand); flex: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.hero-note { margin-top: 14px; font-size: 13px; color: var(--ink-faint); }

/* ---------- 手机外观 ---------- */
.phone {
  position: relative;
  width: min(320px, 78vw);
  margin: 0 auto;
  padding: 12px;
  border-radius: 44px;
  background: linear-gradient(160deg, #3a332d, #14110f);
  box-shadow: var(--shadow-lg);
}

.phone .screen { border-radius: 32px; overflow: hidden; background: #fff; }
.phone .screen img { width: 100%; }

.hero-visual { position: relative; }
.hero-visual .phone { transform: rotate(-2.5deg); }

.float-chip {
  position: absolute;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  font-size: 13px;
}
.float-chip strong { display: block; font-size: 17px; font-family: var(--serif); color: var(--brand); line-height: 1.2; }
.float-chip.is-a { left: -6%; top: 16%; }
.float-chip.is-b { right: -4%; bottom: 18%; }

/* ---------- 数据条 ---------- */
.stats { background: var(--ink); color: #f3ece1; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255, 255, 255, .1); }
.stat { background: var(--ink); padding: 30px 20px; text-align: center; }
.stat b { display: block; font-family: var(--serif); font-size: 30px; color: var(--gold-soft); letter-spacing: 1px; }
.stat span { font-size: 13.5px; color: rgba(243, 236, 225, .72); }

/* ---------- 通用区块 ---------- */
.section { padding: 92px 0; }
.section.tint { background: linear-gradient(180deg, #fffdf9, #f9f4ec); }

.section-head { max-width: 640px; margin-bottom: 46px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: 34px; letter-spacing: 2px; margin-top: 12px; }
.section-head p { margin-top: 14px; color: var(--ink-soft); }

.kicker { font-size: 12.5px; letter-spacing: 4px; color: var(--gold); text-transform: uppercase; }
.kicker::before { content: ""; display: inline-block; width: 26px; height: 1px; background: var(--gold); vertical-align: middle; margin-right: 10px; }
.section-head.center .kicker::after { content: ""; display: inline-block; width: 26px; height: 1px; background: var(--gold); vertical-align: middle; margin-left: 10px; }

/* ---------- 功能卡片 ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px 30px;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--gold-soft); }

.feature-icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(200, 52, 47, .12), rgba(176, 138, 74, .18));
  color: var(--brand);
  margin-bottom: 18px;
}
.feature-icon svg { width: 24px; height: 24px; }

.feature h3 { font-size: 20px; letter-spacing: 1px; }
.feature p { margin-top: 10px; font-size: 14.8px; color: var(--ink-soft); }

.feature-tag { display: inline-block; margin-top: 14px; font-size: 12.5px; color: var(--gold); border: 1px dashed var(--gold-soft); border-radius: 999px; padding: 2px 10px; }

/* ---------- 图文两栏 ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .82fr); gap: 60px; align-items: center; }
.split + .split { margin-top: 76px; }
.split.reverse .split-media { order: -1; }

.split-media { position: relative; }
.split-media .phone { transform: rotate(2deg); }
.split.reverse .split-media .phone { transform: rotate(-2deg); }

.split-body h2 { font-size: 31px; letter-spacing: 1.5px; }
.split-body > p { margin-top: 14px; color: var(--ink-soft); }

.check-list { margin-top: 26px; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.check-list svg { width: 20px; height: 20px; flex: none; color: var(--brand); margin-top: 4px; }
.check-list strong { display: block; font-size: 15.5px; }
.check-list span { color: var(--ink-soft); font-size: 14.3px; }

/* 评分权重条 */
.weights { margin-top: 28px; display: grid; gap: 14px; }
.weight-row { display: grid; grid-template-columns: 88px 1fr 46px; align-items: center; gap: 12px; font-size: 14px; }
.weight-bar { height: 8px; border-radius: 999px; background: rgba(176, 138, 74, .18); overflow: hidden; }
.weight-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--gold)); width: 0; transition: width 1.1s cubic-bezier(.22, .8, .3, 1); }
.weight-row b { font-family: var(--serif); color: var(--brand); text-align: right; }

/* 深色高分模式带 */
.band {
  position: relative;
  background:
    radial-gradient(760px 420px at 12% 0%, rgba(200, 52, 47, .55), transparent 60%),
    linear-gradient(150deg, #2c2320, #17120f 60%, #241a16);
  color: #f4ece1;
  overflow: hidden;
}
.band::after {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(217, 189, 138, .07) 0 1px, transparent 1px 16px);
  pointer-events: none;
}
.band .section-head h2, .band .split-body h2 { color: #fbf5ea; }
.band .kicker { color: var(--gold-soft); }
.band .kicker::before, .band .kicker::after { background: var(--gold-soft); }
.band .split-body > p, .band .check-list span { color: rgba(244, 236, 225, .74); }
.band .check-list strong { color: #fbf5ea; }
.band .check-list svg { color: var(--gold-soft); }
.band .phone { box-shadow: 0 30px 70px rgba(0, 0, 0, .5); }
.band .weight-bar { background: rgba(255, 255, 255, .12); }
.band .weight-row b { color: var(--gold-soft); }
.band .weight-fill { background: linear-gradient(90deg, var(--gold), var(--gold-soft)); }

.pill-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.pill { border: 1px solid rgba(217, 189, 138, .45); color: var(--gold-soft); border-radius: 999px; padding: 6px 14px; font-size: 13px; }

.note-card {
  margin-top: 28px;
  border-left: 3px solid var(--gold);
  background: rgba(255, 255, 255, .06);
  padding: 14px 18px;
  border-radius: 0 12px 12px 0;
  font-size: 14px;
  color: rgba(244, 236, 225, .82);
}

/* ---------- 界面预览 ---------- */
.gallery { position: relative; }
.gallery-track {
  display: flex; gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 4px 26px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.gallery-track::-webkit-scrollbar { height: 6px; }
.gallery-track::-webkit-scrollbar-thumb { background: var(--gold-soft); border-radius: 999px; }
.gallery-track::-webkit-scrollbar-track { background: rgba(176, 138, 74, .12); border-radius: 999px; }

.shot { flex: 0 0 232px; scroll-snap-align: start; }
.shot-frame { border-radius: 26px; overflow: hidden; border: 6px solid #23201d; box-shadow: var(--shadow-md); background: #23201d; }
.shot-frame img { width: 100%; }
.shot-cap { margin-top: 12px; text-align: center; font-size: 14px; color: var(--ink-soft); }
.shot-cap b { display: block; font-family: var(--serif); font-size: 16px; color: var(--ink); letter-spacing: 1px; }

.gallery-nav { display: flex; gap: 10px; justify-content: center; margin-top: 6px; }
.round-btn {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card);
  cursor: pointer; display: grid; place-items: center; color: var(--ink);
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.round-btn:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }
.round-btn svg { width: 18px; height: 18px; }

/* ---------- 流程 ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; counter-reset: step; }
.step {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--serif);
  font-size: 34px;
  color: rgba(200, 52, 47, .18);
  letter-spacing: 1px;
}
.step h3 { font-size: 19px; margin-top: 6px; }
.step p { margin-top: 10px; font-size: 14.6px; color: var(--ink-soft); }

/* ---------- 服务清单 ---------- */
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.service {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 26px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  transition: transform .2s ease, border-color .2s ease;
}
.service:hover { transform: translateY(-5px); border-color: var(--gold-soft); }
.service svg { width: 26px; height: 26px; color: var(--brand); }
.service b { font-family: var(--serif); font-size: 17px; letter-spacing: 1px; }
.service span { font-size: 13.4px; color: var(--ink-soft); }

/* ---------- 评价 ---------- */
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.review { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: relative; }
.review::before { content: "”"; position: absolute; right: 20px; top: 2px; font-family: var(--serif); font-size: 60px; color: rgba(176, 138, 74, .22); }
.review p { font-size: 14.8px; color: var(--ink-soft); }
.review footer { margin-top: 16px; display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-faint); }
.review footer b { color: var(--ink); font-family: var(--serif); letter-spacing: 1px; }
.stars { display: inline-flex; gap: 2px; color: var(--gold); margin-bottom: 12px; }
.stars svg { width: 15px; height: 15px; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line); background: transparent; }
.faq-q {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 4px;
  background: none; border: 0; cursor: pointer;
  font-family: var(--serif); font-size: 18px; color: var(--ink);
  text-align: left; letter-spacing: .5px;
}
.faq-q .mark { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: transform .25s ease, background .2s ease, color .2s ease; color: var(--brand); }
.faq-q .mark::before { content: "+"; font-size: 17px; line-height: 1; }
.faq-item.is-open .faq-q .mark { background: var(--brand); color: #fff; transform: rotate(45deg); border-color: var(--brand); }
.faq-a { overflow: hidden; max-height: 0; transition: max-height .32s ease; }
.faq-a p { padding: 0 4px 22px; font-size: 15px; color: var(--ink-soft); }

/* ---------- 下载 ---------- */
.download-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center;
  background: linear-gradient(140deg, #fbf7ef, #f1e5d2);
  border: 1px solid var(--gold-soft);
  border-radius: 26px;
  padding: 44px;
  box-shadow: var(--shadow-md);
}
.download-card h2 { font-size: 30px; letter-spacing: 1.5px; }
.download-card p { margin-top: 12px; color: var(--ink-soft); max-width: 40em; }
.qr-box { text-align: center; }
.qr-box img { width: 156px; margin: 0 auto; border-radius: 14px; border: 6px solid #fff; box-shadow: var(--shadow-sm); }
.qr-box span { display: block; margin-top: 10px; font-size: 13px; color: var(--ink-soft); }

.app-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 18px; font-size: 13.5px; color: var(--ink-faint); }

/* ---------- 页脚 ---------- */
.site-footer { background: #1b1714; color: #cfc5b7; padding: 62px 0 0; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 34px; padding-bottom: 42px; }
.footer-brand { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: 20px; color: #f6efe3; letter-spacing: 1.5px; }
.footer-brand img { width: 44px; height: 44px; border-radius: 12px; }
.footer-about { margin-top: 16px; font-size: 14px; color: rgba(207, 197, 183, .78); max-width: 34em; }
.footer-col h4 { font-family: var(--serif); font-size: 16px; color: #f6efe3; margin: 0 0 16px; letter-spacing: 2px; }
.footer-col li { margin-bottom: 10px; font-size: 14px; }
.footer-col a { color: rgba(207, 197, 183, .82); transition: color .2s ease; }
.footer-col a:hover { color: var(--gold-soft); }
.footer-warn { font-size: 12.8px; line-height: 1.8; color: rgba(207, 197, 183, .6); border-top: 1px solid rgba(255, 255, 255, .08); padding: 22px 0; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 20px 0 30px; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 13px; color: rgba(207, 197, 183, .72); }
.footer-bottom a:hover { color: var(--gold-soft); }
.footer-bottom .sep { opacity: .38; }

/* ---------- 滚动动效 ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
.no-motion .reveal { opacity: 1; transform: none; transition: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .hero h1 { font-size: 39px; }
  .feature-grid, .review-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split-media { max-width: 340px; margin: 0 auto; }
  .split.reverse .split-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .float-chip.is-a { left: 0; }
  .float-chip.is-b { right: 0; }
}

@media (max-width: 860px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: block; }
  .site-header.is-open .nav-links {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; left: 0; right: 0; top: 68px;
    background: #fbf7ef; border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px; box-shadow: var(--shadow-md);
  }
  .site-header.is-open .nav-links a { padding: 12px 6px; border-radius: 10px; font-size: 15.5px; }
  .site-header.is-open .nav-links .btn { display: inline-flex; margin-top: 8px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero { padding-top: 124px; }
  .hero::after { font-size: 300px; top: auto; bottom: -6%; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .download-card { grid-template-columns: 1fr; text-align: center; padding: 34px 26px; }
  .download-card p { margin-left: auto; margin-right: auto; }
  .btn-row, .app-meta { justify-content: center; }
}

@media (max-width: 640px) {
  .section { padding: 66px 0; }
  .container { padding: 0 18px; }
  .hero h1 { font-size: 32px; letter-spacing: 1px; }
  .section-head h2, .split-body h2, .download-card h2 { font-size: 26px; }
  .feature-grid, .review-grid, .steps, .service-grid { grid-template-columns: 1fr; }
  .shot { flex: 0 0 196px; }
  .gallery-nav { display: none; }
  .float-chip { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-bottom .sep { display: none; }
  .footer-bottom { gap: 4px 12px; }
  .stat b { font-size: 25px; }
  .weight-row { grid-template-columns: 76px 1fr 42px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .weight-fill { transition: none; }
}
