/* ============================================================
   花哪儿了 · 官网
   token 全部来自 assets/css/app.css 的 :root / [data-theme="dark"]，
   官网不另调一版。改之前先改 App。
   ============================================================ */

/* ---------- 1. token ---------- */
:root {
  --brand: #4F7CFF;
  --brand-2: #7C5CFF;
  --brand-soft: rgba(79, 124, 255, .12);
  --brand-grad: linear-gradient(135deg, #5B8CFF 0%, #7C5CFF 55%, #A56CFF 100%);
  --accent: #FF7A45;
  --income: #14B87A;
  --expense: #FF5A5F;

  --bg: #F4F6FB;
  --bg-2: #EDF0F8;
  --card: #FFFFFF;
  --text: #141A24;
  --text-2: #5A6478;
  --text-3: #8D97AB;
  --line: rgba(20, 30, 60, .08);
  --line-2: rgba(20, 30, 60, .12);

  --shadow-sm: 0 1px 2px rgba(20, 30, 60, .05), 0 1px 3px rgba(20, 30, 60, .04);
  --shadow: 0 2px 8px rgba(20, 30, 60, .06), 0 8px 24px rgba(20, 30, 60, .05);
  --shadow-lg: 0 12px 40px rgba(20, 30, 60, .14);

  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;

  --ease: cubic-bezier(.32, .72, 0, 1);
  --wrap: 1080px;
  --sec-y: 120px;
}

/* 深色：值取自 app.css 的 [data-theme="dark"] */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #6E96FF;
    --brand-2: #9B7CFF;
    --brand-soft: rgba(110, 150, 255, .16);
    --brand-grad: linear-gradient(135deg, #4A6FE0 0%, #6B4FE8 55%, #8B5CE8 100%);
    --income: #2FD69A;
    --expense: #FF6B70;

    --bg: #0C0F15;
    --bg-2: #131722;
    --card: #171C27;
    --text: #EDF1F8;
    --text-2: #A3AEC2;
    --text-3: #6F7B91;
    --line: rgba(255, 255, 255, .07);
    --line-2: rgba(255, 255, 255, .12);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 2px 10px rgba(0, 0, 0, .35), 0 10px 30px rgba(0, 0, 0, .28);
    --shadow-lg: 0 16px 50px rgba(0, 0, 0, .55);
  }
}
:root[data-theme="dark"] {
  --brand: #6E96FF;
  --brand-2: #9B7CFF;
  --brand-soft: rgba(110, 150, 255, .16);
  --brand-grad: linear-gradient(135deg, #4A6FE0 0%, #6B4FE8 55%, #8B5CE8 100%);
  --income: #2FD69A;
  --expense: #FF6B70;

  --bg: #0C0F15;
  --bg-2: #131722;
  --card: #171C27;
  --text: #EDF1F8;
  --text-2: #A3AEC2;
  --text-3: #6F7B91;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 2px 10px rgba(0, 0, 0, .35), 0 10px 30px rgba(0, 0, 0, .28);
  --shadow-lg: 0 16px 50px rgba(0, 0, 0, .55);
}

/* ---------- 2. 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
    "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei",
    "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.sec { padding: var(--sec-y) 0; }

.sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 3. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.btn--primary {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 8px 22px rgba(79, 124, 255, .32);
}
.btn--ghost {
  background: var(--card);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.btn--sm { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 11px; }
.btn--wide { width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); }
  .btn--primary:hover { box-shadow: 0 12px 28px rgba(79, 124, 255, .4); }
}

/* ---------- 4. 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 56px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .2s linear, backdrop-filter .2s linear;
}
.topbar.is-stuck {
  border-bottom-color: var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.topbar__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.brand img { width: 26px; height: 26px; border-radius: 8px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-size: 14.5px; color: var(--text-2); }
.nav a:hover { color: var(--text); }
.nav .btn { color: #fff; }
.topbar__cta { display: none; }

/* ---------- 5. S1 Hero ---------- */
.hero { padding-top: 64px; padding-bottom: 0; }   /* 底部不留白，让手机真的越界到下一屏 */
.hero__in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: center;
  gap: 72px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.hero__sub {
  margin-top: 22px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-2);
  max-width: 30em;
}
.hero__cta { margin-top: 34px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero__trust {
  margin-top: 22px;
  font-size: 13px;
  color: var(--text-3);
  letter-spacing: .01em;
}
.hero__note {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: .01em;
}

/* 手机模型：桌面 300×620，屏幕内缩 8px，桌面端下沉 24px 出血 */
.phone {
  position: relative;
  width: 300px;
  height: 620px;
  border-radius: 44px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-lg);
  overflow: hidden;
  z-index: 2;
  margin-bottom: 0;
}
.phone img {
  width: 284px;
  height: 604px;
  margin: 8px 0 0 8px;
  border-radius: 36px;
  object-fit: cover;
  object-position: top center;
}
.phone__fig { position: relative; margin-bottom: -24px; }

/* ---------- 6. S2 三个不一样 ---------- */
.sec--why { border-top: 1px solid var(--line); }
.sec__head { max-width: 640px; }
.eyebrow {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 14px;
}
h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -.015em;
}
.why {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-top: 56px;
}
.why__ic {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand);
  margin-bottom: 18px;
}
.why h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.why p { font-size: 15px; color: var(--text-2); line-height: 1.75; }
.why small {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.6;
}

/* ---------- 7. S3 功能六格 ---------- */
.grid6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 26px;
}
.card__ic { color: var(--brand); margin-bottom: 18px; }
.card h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.card p { font-size: 14.5px; line-height: 1.7; color: var(--text-2); }
.card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em;
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--bg-2);
  color: var(--text);
}
.card small {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-3);
}

/* ---------- 8. S4 情侣 ---------- */
.sec--couple {
  background: color-mix(in srgb, var(--brand) 6%, var(--bg));
  text-align: center;
}
.sec--couple .sec__head { margin: 0 auto; }
.sec--couple h2 { max-width: 18ch; margin: 0 auto; }
.sec__sub {
  margin-top: 16px;
  max-width: 34em;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--text-2);
}
.couple__lead {
  margin: 20px auto 0;
  max-width: 34em;
  font-size: 15.5px;
  color: var(--text-2);
  line-height: 1.8;
}
.couple3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
  text-align: left;
}
.couple3 h3 { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.couple3 p { font-size: 14px; line-height: 1.75; color: var(--text-2); }

/* 通栏：四边出血、无圆角、12% 遮罩压白字 */
.banner {
  position: relative;
  width: 100vw;
  margin: 88px 0 0;
  height: clamp(300px, 37vw, 540px);
  overflow: hidden;
  background: #2a2350;
}
.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(12, 14, 30, .12);
}
.banner figcaption {
  position: absolute;
  left: max(24px, calc((100vw - var(--wrap)) / 2 + 24px));
  top: 40px;
  z-index: 1;
  margin: 0;
  max-width: 22em;
  text-align: left;
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 500;
  line-height: 1.6;
  color: #fff;
  text-shadow: 0 1px 12px rgba(10, 12, 30, .35);
}

/* 接下来 窄条 */
.next {
  margin: 0 auto;
  max-width: 720px;
  padding: 18px 24px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-2);
}
.sec--couple .next { margin-top: 40px; }
.next b { color: var(--text); font-weight: 600; }

/* ---------- 9. S5 安装 ---------- */
.install {
  display: grid;
  grid-template-columns: 1fr 1fr 220px;
  gap: 20px;
  margin-top: 48px;
  align-items: start;
}
.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  text-align: left;
}
.pcard__badge {
  position: absolute;
  top: -10px;
  right: 18px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
}
.pcard h3 { font-size: 17px; font-weight: 600; }
.pcard__sub { margin-top: 6px; font-size: 13px; color: var(--text-3); }
.pcard .btn { margin-top: 20px; }
.pcard__cost {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-3);
}
.pcard details { margin-top: 18px; }
.pcard summary {
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-2);
  list-style: none;
}
.pcard summary::-webkit-details-marker { display: none; }
.pcard summary::after { content: " ▾"; font-size: 11px; color: var(--text-3); }
.pcard details[open] summary::after { content: " ▴"; }
.steps {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  counter-reset: s;
}
.steps li {
  position: relative;
  padding-left: 30px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-2);
  counter-increment: s;
}
.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
  display: grid;
  place-items: center;
}
.ios-shots { display: flex; gap: 6px; margin-top: 14px; }
.ios-shots img { width: 33%; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); }

.qr { text-align: center; }
.qr img { width: 180px; margin: 0 auto; border-radius: 8px; background: #fff; padding: 8px; }
.qr p { margin-top: 12px; font-size: 12px; color: var(--text-3); line-height: 1.6; }

.hint {
  display: none;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
}
.is-wechat .hint { display: block; }
.is-wechat .pcard .btn { opacity: .45; pointer-events: none; }

.pcard__url {
  margin-top: 12px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text-2);
  word-break: break-all;
}
.pcard__url a { border-bottom: 1px solid var(--line-2); }

/* 桌面专属：触屏设备上不渲染 */
.desk-zip, .desk-note { display: none; }
@media (hover: hover) and (pointer: fine) {
  .desk-zip { display: inline; }
  .desk-note { display: inline; font-size: 11px; color: var(--text-3); }
}

.install__util {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 26px;
  font-size: 13px;
  color: var(--text-2);
}
.copy {
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.copy[disabled] { opacity: .6; }
.desk-zip { color: var(--text-2); border-bottom: 1px dashed var(--line-2); }
.desk-zip:hover { color: var(--text); }

/* 从 zip 版跳回来时的对比条 */
.compare {
  display: none;
  margin-top: 24px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  font-size: 13.5px;
  line-height: 1.65;
}
.compare.is-on { display: block; }

/* ---------- 10. S6 FAQ ---------- */
.faq { margin-top: 44px; max-width: 780px; border-top: 1px solid var(--line); }
.faq--bare { margin-top: 34px; max-width: 748px; border-top: 0; }

/* ---------- 9.5 「装不上？」大气泡：默认全展开，不做折叠 ---------- */
.bubble {
  position: relative;
  margin-top: 52px;
  padding: 34px 36px 36px;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--brand) 6.5%, var(--card));
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
}
.bubble h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.bubble ul {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 40px;
}
.bubble li {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
}
.bubble b {
  display: block;
  margin-bottom: 4px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}
@media (max-width: 680px) {
  .bubble { padding: 26px 22px 28px; margin-top: 40px; }
  .bubble ul { grid-template-columns: 1fr; gap: 18px; }
}

.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 19px 0;
  cursor: pointer;
  font-size: 15.5px;
  font-weight: 500;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  color: var(--text-3);
  font-weight: 400;
  transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p {
  padding: 0 0 22px;
  max-width: 640px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-2);
}

/* ---------- 11. S7 数据 ---------- */
.sec--data { border-top: 1px solid var(--line); }
.data { display: grid; grid-template-columns: .85fr 1.15fr; gap: 64px; align-items: start; }
.data ul { display: grid; gap: 18px; margin-top: 28px; }
.data li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-2);
}
.data li b { display: block; color: var(--text); font-weight: 600; }
.data__note { margin-top: 16px; font-size: 11px; color: var(--text-3); }
.data__meta { margin-top: 26px; font-size: 11px; color: var(--text-3); }
.dot { width: 7px; height: 7px; margin-top: 10px; border-radius: 50%; background: var(--brand); }

/* ---------- 12. 页脚 ---------- */
.foot {
  padding: 48px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-3);
}
.foot__in {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
}
.foot__brand { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-2); }
.foot__brand img { width: 22px; height: 22px; border-radius: 6px; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot nav a:hover { color: var(--text); }
.foot__say { text-align: right; }
.foot__meta { margin-top: 26px; text-align: center; color: var(--text-3); }

/* ---------- 13. 入场动效：只 S1 一次 ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero__sub, .hero__cta, .hero__trust {
    opacity: 0;
    transform: translateY(12px);
    animation: rise 260ms var(--ease) forwards;
  }
  .hero h1 { animation-delay: 40ms; }
  .hero__sub { animation-delay: 100ms; }
  .hero__cta { animation-delay: 160ms; }
  .hero__trust { animation-delay: 220ms; }
  @keyframes rise {
    to { opacity: 1; transform: none; }
  }
}

/* ---------- 14. 响应式 ---------- */
@media (max-width: 900px) {
  :root { --sec-y: 72px; }
  .hero { padding-top: 32px; padding-bottom: 72px; }
  .hero__in {
    grid-template-columns: 1fr;
    gap: 44px;
    justify-items: start;
  }
  .hero h1 { max-width: none; }
  .why { grid-template-columns: 1fr; gap: 36px; }
  .grid6 { grid-template-columns: repeat(2, 1fr); }
  .install { grid-template-columns: 1fr 1fr; }
  /* 手机上藏掉二维码：你没法用这台手机扫自己屏幕上这张码。
     它只服务「在电脑上打开这一页」的人。 */
  .qr { display: none; }
  .data { grid-template-columns: 1fr; gap: 40px; }
  .foot__in { grid-template-columns: 1fr; gap: 18px; }
  .foot__say { text-align: left; }
}

@media (max-width: 680px) {
  .couple__lead br, .banner figcaption br { display: none; }
  .nav { gap: 16px; }
  .nav a:not(.btn) { display: none; }
  .grid6 { grid-template-columns: 1fr; gap: 14px; }
  .couple3 { grid-template-columns: 1fr; gap: 14px; }
  .install { grid-template-columns: 1fr; }
  .phone { width: 240px; height: 496px; border-radius: 34px; margin-bottom: 0; }
  .phone img { width: 224px; height: 480px; border-radius: 28px; }
  .hero__cta { width: 100%; }
  .hero__cta .btn { flex: 1 1 auto; }
  .banner figcaption { bottom: 24px; }
}

@media (max-width: 360px) {
  .wrap { padding: 0 18px; }
  .btn { padding: 0 18px; }
}


/* ---------- 15. 文档页（隐私 / 更新日志） ---------- */
.doc { max-width: 680px; padding: 72px 0 96px; }
.doc h1 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -.02em;
}
.doc__meta { margin-top: 12px; font-size: 13px; color: var(--text-3); }
.doc h2 {
  margin-top: 44px;
  font-size: 19px;
  line-height: 1.5;
  font-weight: 600;
}
.doc p, .doc li { margin-top: 12px; font-size: 15px; line-height: 1.85; color: var(--text-2); }
.doc ul { margin-top: 12px; display: grid; gap: 8px; }
.doc li { margin-top: 0; padding-left: 16px; position: relative; }
.doc li::before {
  content: "";
  position: absolute; left: 0; top: .8em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--text-3);
}
.doc b { color: var(--text); font-weight: 600; }
.doc a { color: var(--brand); border-bottom: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.doc__back { margin-top: 56px; font-size: 14px; }
