/* ==========================================================================
   享氢福官网 · 样式
   配色与 APP / 后台管理系统保持一致（金色品牌：E8A33D / C8862A / A86F1E）
   ========================================================================== */

:root {
  --gold: #e8a33d;
  --gold-dark: #c8862a;
  --gold-deep: #a86f1e;
  --gold-soft: #fdf3e0;
  --cream: #fffaf2;

  --ink: #1f2430;
  --ink-2: #4b5563;
  --muted: #8b93a1;
  --line: #eceef3;
  --white: #ffffff;
  --green: #07c160;
  --shadow-sm: 0 2px 10px rgba(31, 36, 48, 0.05);
  --shadow: 0 10px 30px rgba(31, 36, 48, 0.08);
  --shadow-lg: 0 24px 60px rgba(168, 111, 30, 0.16);
  --radius: 18px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

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

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.5px;
}
.nav-brand img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(200, 134, 42, 0.3);
}
.nav-brand small {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--gold-deep);
  letter-spacing: 2px;
  line-height: 1;
  margin-top: 2px;
}
.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  font-size: 14px;
  color: var(--ink-2);
  padding: 8px 12px;
  border-radius: 10px;
}
.nav-links a:hover {
  color: var(--gold-deep);
  background: var(--gold-soft);
}
.nav-cta {
  margin-left: 8px;
  padding: 9px 20px !important;
  border-radius: 22px !important;
  color: #fff !important;
  font-weight: 600;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
}
.nav-cta:hover {
  filter: brightness(1.05);
  color: #fff !important;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important;
}
@media (max-width: 720px) {
  .nav-links a:not(.nav-cta) {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 88% -8%, rgba(232, 163, 61, 0.28), transparent 68%),
    radial-gradient(700px 380px at 8% 108%, rgba(232, 163, 61, 0.16), transparent 70%),
    linear-gradient(170deg, #fffdf9 0%, #fdf4e6 100%);
  padding: 62px 0 66px;
}
.hero-in {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 44px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid rgba(232, 163, 61, 0.4);
  color: var(--gold-deep);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}
.hero h1 {
  margin: 18px 0 0;
  font-size: 46px;
  line-height: 1.18;
  letter-spacing: -0.5px;
  font-weight: 800;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--gold), var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.lead {
  margin: 18px 0 0;
  font-size: 16.5px;
  color: var(--ink-2);
  max-width: 30em;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 26px;
  font-size: 13px;
  color: var(--ink-2);
}
.hero-facts span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hero-facts i {
  font-style: normal;
  color: var(--green);
  font-weight: 700;
}
.hero-art {
  position: relative;
}
.hero-art .phone {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 6px solid #fff;
  background: #fff;
  transform: perspective(1200px) rotateY(-7deg) rotateX(2deg);
}
.hero-art .phone img {
  width: 100%;
}
.hero-art .float {
  position: absolute;
  right: -10px;
  bottom: -16px;
  background: #fff;
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.hero-art .float b {
  display: block;
  font-size: 19px;
  color: var(--gold-deep);
}
@media (max-width: 900px) {
  .hero {
    padding: 40px 0 48px;
  }
  .hero-in {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .hero h1 {
    font-size: 33px;
  }
  .hero-art {
    order: -1;
  }
  .hero-art .phone {
    transform: none;
  }
  .hero-art .float {
    right: 8px;
  }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 15px 30px;
  border: 0;
  border-radius: 28px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  box-shadow: 0 10px 24px rgba(200, 134, 42, 0.28);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
  font-family: inherit;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(200, 134, 42, 0.34);
}
.btn:active {
  transform: translateY(0);
  filter: brightness(0.96);
}
.btn.ghost {
  background: #fff;
  color: var(--gold-deep);
  border: 1.5px solid rgba(232, 163, 61, 0.55);
  box-shadow: var(--shadow-sm);
}
.btn.ghost:hover {
  background: var(--gold-soft);
}
.btn.block {
  width: 100%;
}
.btn[disabled],
.btn.is-disabled {
  background: #d7dae1;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* ---------- 通用小节 ---------- */
.section {
  padding: 68px 0;
}
.section.tint {
  background: linear-gradient(180deg, #fffdf9, var(--cream));
}
.sec-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 40px;
}
.sec-head h2 {
  margin: 0;
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.sec-head p {
  margin: 12px 0 0;
  color: var(--ink-2);
  font-size: 15.5px;
}
.sec-head .kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--gold-dark);
  margin-bottom: 10px;
}
@media (max-width: 720px) {
  .section {
    padding: 46px 0;
  }
  .sec-head h2 {
    font-size: 24px;
  }
}

/* ---------- 数据条 ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat b {
  display: block;
  font-size: 27px;
  color: var(--gold-deep);
  font-weight: 800;
  letter-spacing: -0.5px;
}
.stat span {
  font-size: 13px;
  color: var(--muted);
}
@media (max-width: 720px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat b {
    font-size: 23px;
  }
}

/* ---------- 功能卡 ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
/*
  功能卡是 5 张，3 列时会剩最后一行 2 张、右侧空一格很难看。
  这里把第 4 张顶到第 2 列，让最后一行居中（5 张 = 3 + 2 居中）。
  张数变成 6 张时这条规则不生效（:nth-last-child(2) 不再匹配第 4 张），布局自然变成 3+3。
*/
.cards > :nth-child(4):nth-last-child(2) {
  grid-column: 2 / 3;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.18s;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.card .thumb {
  aspect-ratio: 2 / 1;
  background: var(--gold-soft);
}
.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card .body {
  padding: 18px 20px 22px;
  flex: 1;
}
.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}
.card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
}
@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
  /* 两列时上面「顶到第 2 列」的规则会错位，必须撤掉；
     5 张卡的最后一张铺满整行，视觉上比孤零零一格更整齐 */
  .cards > :nth-child(4):nth-last-child(2) {
    grid-column: auto;
  }
  .cards > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}
@media (max-width: 620px) {
  .cards {
    grid-template-columns: 1fr;
  }
  .cards > :last-child:nth-child(odd) {
    grid-column: auto;
  }
}

/* ---------- 步骤 ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  counter-reset: step;
}
.step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -16px;
  left: 22px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(200, 134, 42, 0.32);
}
.step h3 {
  margin: 14px 0 8px;
  font-size: 16.5px;
}
.step p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
}
.step b {
  color: var(--gold-deep);
}
@media (max-width: 820px) {
  .steps {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* ---------- 下载区 ---------- */
.download {
  background:
    radial-gradient(700px 340px at 80% 0%, rgba(232, 163, 61, 0.22), transparent 70%),
    linear-gradient(160deg, #fffdf9, #fbf1e0);
  border-top: 1px solid var(--line);
}
.dl-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 44px;
  align-items: center;
}
.dl-grid h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
}
.dl-grid p {
  color: var(--ink-2);
  margin: 14px 0 0;
  font-size: 15.5px;
}
.dl-meta {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}
.qr-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.qr-box .qr {
  width: 100%;
  max-width: 230px;
  margin: 0 auto;
  image-rendering: pixelated;
}
.qr-box .cap {
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
}
@media (max-width: 860px) {
  .dl-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .dl-grid h2 {
    font-size: 24px;
  }
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 780px;
  margin: 0 auto;
}
.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.faq summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 15px;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '＋';
  float: right;
  color: var(--gold-dark);
  font-weight: 700;
}
.faq details[open] summary::after {
  content: '－';
}
.faq p {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--ink-2);
}

/* ---------- 页脚 ---------- */
.foot {
  background: #241f1a;
  color: #b9b1a6;
  padding: 40px 0 34px;
  font-size: 13px;
}
.foot-in {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}
.foot .fb {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f0e7d9;
  font-weight: 700;
  font-size: 15px;
}
.foot .fb img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.foot a:hover {
  color: var(--gold);
}
.foot .icp {
  color: #857c70;
  font-size: 12px;
  margin-top: 14px;
}

/* ==========================================================================
   扫码落地页（/d/<邀请码>）
   ========================================================================== */
.scan {
  min-height: 100vh;
  background:
    radial-gradient(700px 360px at 50% -6%, rgba(232, 163, 61, 0.3), transparent 70%),
    linear-gradient(180deg, #fffdf9, #fdf4e6 60%, #fff 100%);
  padding: 0 0 44px;
}
.scan-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 0 4px;
}
.scan-top img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(200, 134, 42, 0.3);
}
.scan-top b {
  font-size: 17px;
  letter-spacing: 0.5px;
}
/* 扫码页不放顶部导航（那是首页的东西，链接到首页锚点会跳空），
   只在右上角留一个回官网的入口 */
.scan-home {
  margin-left: auto;
  font-size: 13px;
  color: var(--gold-deep);
  border: 1px solid rgba(232, 163, 61, 0.5);
  background: #fff;
  border-radius: 16px;
  padding: 5px 14px;
}
.scan-home:active {
  background: var(--gold-soft);
}
.scan-card {
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 26px 22px;
  margin-top: 14px;
}
.scan-hello {
  text-align: center;
  font-size: 15px;
  color: var(--ink-2);
}
.scan-hello b {
  color: var(--gold-deep);
  font-size: 17px;
}
.invite {
  margin-top: 20px;
  background: linear-gradient(160deg, #fffaf0, #fdf0da);
  border: 1px dashed rgba(200, 134, 42, 0.5);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
}
.invite .lb {
  font-size: 12px;
  color: var(--gold-deep);
  letter-spacing: 1px;
}
.invite .val {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--gold-deep);
  margin: 6px 0 2px;
  word-break: break-all;
}
.invite .cp {
  margin-top: 8px;
  border: 1px solid var(--gold);
  background: #fff;
  color: var(--gold-deep);
  border-radius: 18px;
  padding: 6px 18px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.invite .cp:active {
  background: var(--gold-soft);
}
.scan-actions {
  margin-top: 20px;
}
.scan-note {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
.scan-steps {
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  margin-top: 16px;
}
.scan-steps h2 {
  margin: 0 0 12px;
  font-size: 15px;
}
.scan-steps ol {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  color: var(--ink-2);
}
.scan-steps li {
  margin-bottom: 9px;
}
.scan-steps li b {
  color: var(--gold-deep);
}
.tip {
  border-radius: 14px;
  padding: 15px 17px;
  font-size: 13.5px;
  margin-top: 16px;
  line-height: 1.7;
}
.tip.warn {
  background: #fff8e6;
  border: 1px solid #f0d9a8;
  color: #8a6614;
}
.tip.info {
  background: #eef4ff;
  border: 1px solid #cfdffb;
  color: #2b4a86;
}
.tip b {
  color: inherit;
  font-weight: 700;
}
.tip img {
  width: 148px;
  height: 148px;
  margin: 10px auto 0;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
}
.scan-foot {
  text-align: center;
  font-size: 12px;
  color: #b3b9c2;
  margin-top: 24px;
  line-height: 1.9;
}

/* 扫码页的 body：给整体一个暖底，避免 iOS 橡皮筋回弹时露出白边 */
body.scan-body {
  background: #fdf4e6;
}

/* ---------- 微信遮罩 ---------- */
/* z-index 拉到接近上限：顶部导航是 sticky + backdrop-filter，
   曾经出现遮罩没盖住导航的情况，这里用极端值彻底排除层级竞争 */
.wx-mask {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: rgba(20, 18, 15, 0.9);
  color: #fff;
  padding: 22px;
  display: none;
}
.wx-mask .arrow {
  font-size: 34px;
  text-align: right;
  line-height: 1;
  animation: wxBounce 1.1s infinite;
}
@keyframes wxBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
.wx-mask h3 {
  margin: 18px 0 10px;
  font-size: 20px;
}
.wx-mask p {
  margin: 0;
  font-size: 14.5px;
  color: #d8d2c8;
  line-height: 1.8;
}
.wx-mask .hl {
  color: var(--gold);
  font-weight: 700;
}

/* ---------- 平台可见性（JS 给 <html> 加 plat-* 类） ---------- */
.only-android,
.only-ios,
.only-wechat,
.only-desktop {
  display: none;
}
html.plat-android .only-android,
html.plat-ios .only-ios,
html.plat-wechat .only-wechat,
html.plat-desktop .only-desktop {
  display: block;
}
html.plat-wechat .wx-mask {
  display: block;
}
/* 微信里整页都被引导遮罩盖住，顶部导航没有意义（点不到），直接藏掉 */
html.plat-wechat .nav {
  display: none;
}
/* 没有 JS 时按最保守的形态展示：安卓下载 + 说明 */
html.plat-unknown .only-android {
  display: block;
}

/* ---------- 提示条 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 42px;
  transform: translateX(-50%) translateY(24px);
  background: rgba(31, 36, 48, 0.92);
  color: #fff;
  padding: 11px 22px;
  border-radius: 22px;
  font-size: 13.5px;
  opacity: 0;
  transition: 0.25s;
  pointer-events: none;
  z-index: 1000;
  max-width: 84vw;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- 服务协议 / 隐私 ---------- */
.doc {
  padding: 40px 0 70px;
}
.doc h1 {
  font-size: 26px;
  margin: 0 0 6px;
}
.doc .meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 26px;
}
.doc h2 {
  font-size: 17px;
  margin: 28px 0 10px;
  color: var(--gold-deep);
}
.doc p,
.doc li {
  font-size: 14.5px;
  color: var(--ink-2);
}
.doc pre {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink-2);
  margin: 0;
  line-height: 1.9;
}
