/* ============================================================
   省钱搭子 budgetbuddy.cn — 介绍页 v1.0
   完全沿用 App 自己的浅色暖调（colors_and_type.css 同源 token）：
   奶油底 × 墨绿主色 × 故事奶油 × 暖棕。系统字体、零外链、
   零依赖、克制的动效（只有渐显与 hover）。
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Tokens（App 同源） ---------- */
:root {
  --bg:        #FAF7F0;
  --surface:   #FFFFFF;
  --cream:     #F4EEE1;
  --ink:       #1F1F1F;
  --ink-2:     #6F6A60;
  --ink-3:     #9A9384;
  --line:      #E8E0D2;
  --line-2:    #DCD2BF;

  --green:      #3E5F4D;
  --green-deep: #345140;
  --green-ink:  #2C4536;
  --green-soft: #DDEBDD;

  --story-cream: #FFF4DF;
  --story-ink:   #8A5A2B;
  --story-deep:  #5E3A18;
  --blue-soft:   #E5EEF7;
  --blue-ink:    #3E5573;

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Source Han Sans SC", system-ui, sans-serif;

  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-pill: 999px;
  --shadow-card: 0 2px 10px rgba(60, 45, 25, .05);
  --shadow-float: 0 24px 60px -16px rgba(60, 45, 25, .2);

  --container: 1160px;
  --pad: clamp(20px, 4vw, 40px);
  --section: clamp(80px, 10vw, 132px);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Base ---------- */
body {
  font-family: var(--font);
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}
a, button { touch-action: manipulation; }
::selection { background: var(--green-soft); color: var(--green-ink); }
:focus-visible { outline: 2.5px solid var(--green); outline-offset: 3px; border-radius: 4px; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--pad); }

.skip-link {
  position: absolute; left: 16px; top: -52px; z-index: 100;
  background: var(--ink); color: #fff;
  padding: 10px 18px; border-radius: 0 0 12px 12px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  transition: top .2s var(--ease);
}
.skip-link:focus-visible { top: 0; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 240, .82);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav__inner {
  max-width: var(--container); margin-inline: auto;
  padding: 12px var(--pad);
  display: flex; align-items: center; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; letter-spacing: .02em;
  text-decoration: none;
}
.brand img { width: 30px; height: 30px; }
.brand small {
  font-size: 10px; font-weight: 600; letter-spacing: .22em;
  color: var(--ink-3); align-self: flex-end; padding-bottom: 2px;
}
.nav__cta { margin-left: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 24px;
  border: 0; border-radius: var(--r-pill);
  font-size: 15.5px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: background-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn--green { background: var(--green); color: #fff; }
.btn--green:hover { background: var(--green-deep); box-shadow: 0 10px 26px -8px rgba(62, 95, 77, .45); }
.btn--soft { background: var(--green-soft); color: var(--green-ink); }
.btn--soft:hover { background: #CFE3D0; }
.btn--ghost { background: transparent; color: var(--green-ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--green); }
.btn--sm { min-height: 38px; padding: 8px 18px; font-size: 14px; }

/* ---------- 文字 ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700; letter-spacing: .18em;
  color: var(--story-ink);
  margin-bottom: 16px;
}
.eyebrow .px { display: inline-flex; gap: 3px; }
.eyebrow .px i { width: 7px; height: 7px; background: var(--green); }
.eyebrow .px i:nth-child(2) { background: #E8C468; }
.eyebrow .px i:nth-child(3) { background: var(--story-cream); border: 1px solid var(--line-2); }

.h1 {
  font-size: clamp(34px, 5.6vw, 60px);
  line-height: 1.16; font-weight: 800; letter-spacing: .01em;
}
.h2 {
  font-size: clamp(26px, 3.6vw, 42px);
  line-height: 1.22; font-weight: 800; letter-spacing: .01em;
}
.h1 em, .h2 em { font-style: normal; color: var(--green); }
.lede {
  font-size: clamp(15.5px, 1.6vw, 18px); line-height: 1.75;
  color: var(--ink-2); max-width: 34em; margin-top: 18px;
}

.section { padding-top: var(--section); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(48px, 7vw, 96px); overflow: clip; }
.hero__grid {
  display: grid; gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
@media (min-width: 920px) { .hero__grid { grid-template-columns: 1.1fr .9fr; } }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__fine { margin-top: 16px; font-size: 13px; color: var(--ink-3); }

.phone {
  width: min(320px, 78vw);
  margin-inline: auto;
  border-radius: 46px;
  background: #1F1F1F;
  padding: 9px;
  box-shadow: var(--shadow-float);
}
.phone img { border-radius: 38px; width: 100%; height: auto; }
.hero__stage { position: relative; }
.hero__stage::before {
  content: ""; position: absolute; inset: -8% -20%;
  background: radial-gradient(52% 58% at 50% 42%, var(--story-cream) 0%, rgba(255, 244, 223, 0) 72%);
  z-index: -1;
}

/* ---------- 数据条 ---------- */
.stats { margin-top: var(--section); }
.stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  border-block: 1px solid var(--line);
  padding: 28px 0; text-align: center;
}
.stats__grid b { display: block; font-size: clamp(20px, 2.4vw, 28px); font-weight: 800; }
.stats__grid b em { font-style: normal; color: var(--green); }
.stats__grid span { font-size: 13px; color: var(--ink-2); }
@media (max-width: 700px) { .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 18px 10px; } }

/* ---------- 功能区块 ---------- */
.feature__grid {
  display: grid; gap: clamp(36px, 5vw, 80px);
  align-items: center;
}
@media (min-width: 920px) {
  .feature__grid { grid-template-columns: 1fr 1fr; }
  .feature--flip .feature__copy { order: 2; }
}
.feature__points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.feature__points li { display: flex; gap: 10px; font-size: 15px; color: #3D3A33; line-height: 1.6; }
.feature__points svg { flex: 0 0 auto; margin-top: 5px; color: var(--green); }

/* AI 搭子聊天卡（浅色版） */
.chat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  max-width: 460px;
  box-shadow: var(--shadow-card);
  margin-inline: auto;
}
.chat__head {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px;
}
.chat__avatar {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--green-soft); display: grid; place-items: center;
}
.chat__head b { font-size: 15px; display: block; }
.chat__head span { font-size: 12px; color: var(--ink-3); letter-spacing: .08em; }
.chat__stream { display: grid; gap: 10px; }
.bubble {
  max-width: 88%; padding: 11px 15px;
  font-size: 14.5px; line-height: 1.6; border-radius: 15px;
}
.bubble--user { justify-self: end; background: var(--green); color: #fff; border-bottom-right-radius: 5px; }
.bubble--buddy { justify-self: start; background: var(--story-cream); color: var(--story-deep); border-bottom-left-radius: 5px; }
.bubble--buddy b { color: var(--green-ink); }
.chat__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chat__chips span {
  font-size: 12.5px; font-weight: 600; padding: 7px 13px;
  border-radius: var(--r-pill); border: 1px solid var(--line-2); color: var(--ink-2);
}
.chat__chips span:first-child { background: var(--green-soft); color: var(--green-ink); border-color: transparent; }

/* ---------- 下载区 ---------- */
.get { padding-top: var(--section); }
.get__grid {
  display: grid; gap: 18px; margin-top: clamp(28px, 4vw, 44px);
}
@media (min-width: 820px) { .get__grid { grid-template-columns: repeat(3, 1fr); } }
.get__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 24px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: var(--shadow-card);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.get__card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px -12px rgba(60, 45, 25, .18); }
.get__card .tag {
  align-self: flex-start;
  font-size: 11.5px; font-weight: 700; letter-spacing: .14em;
  color: var(--story-ink); background: var(--story-cream);
  padding: 4px 10px; border-radius: var(--r-pill);
  margin-bottom: 6px;
}
.get__card h3 { font-size: 19px; font-weight: 700; }
.get__card p { font-size: 14px; color: var(--ink-2); line-height: 1.65; flex: 1; }
.get__card .btn { margin-top: 14px; }

/* ---------- FAQ ---------- */
.faq { padding-top: var(--section); }
.faq__list { margin-top: clamp(22px, 3vw, 36px); border-top: 1px solid var(--line); max-width: 860px; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 14px;
  padding: 20px 4px;
  font-size: 16.5px; font-weight: 700;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary svg { margin-left: auto; flex: 0 0 auto; color: var(--ink-3); transition: transform .22s var(--ease); }
.faq__item[open] summary svg { transform: rotate(45deg); }
.faq__a { padding: 0 4px 22px; color: var(--ink-2); line-height: 1.8; max-width: 40em; font-size: 15px; }
.faq__a a { color: var(--green); font-weight: 600; }

/* ---------- Footer ---------- */
.footer {
  margin-top: var(--section);
  border-top: 1px solid var(--line);
  padding: 40px 0 34px;
}
.footer__row {
  display: flex; flex-wrap: wrap; gap: 14px 28px;
  align-items: center; justify-content: space-between;
}
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; }
.footer__links a { color: var(--ink-2); text-decoration: none; }
.footer__links a:hover { color: var(--green); }
.footer__legal { margin-top: 18px; font-size: 12.5px; color: var(--ink-3); line-height: 1.8; }

/* ---------- 渐显 ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
html.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
