/* 省心伴官网基础样式：色彩与字体、按钮、导航、首屏、页尾、手机吸底条。
   标题字体为 Noto Serif SC SemiBold（思源宋体，SIL OFL 1.1）按页面用字裁出的子集，
   改动标题文案后运行 scripts/subset_font.py 重新生成，见 README。 */
@font-face { font-family: "XS Serif"; src: url("fonts/serif-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --paper: #f8f5ef;
  --paper-2: #f1ebe1;
  --ink: #1c1a17;
  --ink-2: #5e5850;
  --ink-3: #7a736a;
  --line: #e4ddd1;
  --light: #fcb44d;
  --light-soft: #fdf0dc;
  --amber: #8a4f0c;
  --dusk: #1f1b16;
  --dusk-2: #2a251e;
  --dusk-line: #3a342b;
  --dusk-ink-2: #b8ae9f;
  --serif: "XS Serif", "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", sans-serif;
  --wrap: 1280px;
  --gutter: 48px;
  --radius: 20px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.8 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
p, h1, h2, h3, h4, summary, small { text-wrap: pretty; }
button { font: inherit; color: inherit; }
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
svg.i.fill { fill: currentColor; stroke: none; }
.wrap { max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding-inline: var(--gutter); }
.eyebrow { font-size: 14px; letter-spacing: .18em; color: var(--amber); font-weight: 600; }
.h2 { font: 600 52px/1.28 var(--serif); letter-spacing: .02em; margin-top: 18px; }
.lead { color: var(--ink-2); margin-top: 20px; max-width: 34em; }
.section { padding-block: 128px; }
.badge { display: inline-block; font-size: 12px; line-height: 1; padding: 6px 9px; border-radius: 999px; background: rgba(252,180,77,.16); color: var(--light); font-weight: 600; letter-spacing: .04em; vertical-align: 2px; }

/* 按钮：橙底配墨色字，沿用 App 主按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px; border-radius: 999px; font: 600 16px/1 var(--sans); white-space: nowrap; border: 0; cursor: pointer; }
.btn-light { background: var(--light); color: var(--ink); }
.btn-ghost { border: 1.5px solid rgba(255,255,255,.72); color: #fff; }
.btn-line { border: 1.5px solid var(--ink); color: var(--ink); background: transparent; }

/* 导航 */
.head { position: absolute; inset: 0 0 auto; z-index: 20; color: #fff; }
.head-in { display: flex; align-items: center; height: 84px; gap: 48px; }
.brand { display: flex; align-items: center; gap: 12px; font: 600 22px/1 var(--serif); letter-spacing: .06em; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav { display: flex; gap: 36px; margin-left: auto; font-size: 15px; opacity: .92; }
.head.dark { color: var(--ink); }
.head .btn { min-height: 42px; padding: 0 20px; font-size: 15px; }
.menu { display: none; background: none; border: 0; }

/* 首屏 */
.hero { position: relative; height: 900px; min-height: 640px; overflow: hidden; background: #2b2216; color: #fff; }
.hero-photo { position: absolute; inset: 0; }
.hero-photo picture, .hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; }
.hero-photo::after { content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(16,13,9,.70) 0%, rgba(16,13,9,.46) 34%, rgba(16,13,9,0) 60%),
    linear-gradient(180deg, rgba(16,13,9,.34) 0%, rgba(16,13,9,0) 18%, rgba(16,13,9,0) 70%, rgba(16,13,9,.42) 100%); }
/* 细颗粒：照片原件只有 1672×941，高清屏上略软，颗粒让软焦显得自然 */
.grain { position: absolute; inset: 0; opacity: .07; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.hero-copy { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; padding-top: 40px; }
.hero-tags { font-size: 15px; letter-spacing: .24em; color: rgba(255,255,255,.82); }
.hero h1 { font: 600 88px/1.2 var(--serif); letter-spacing: .04em; margin-top: 26px; text-shadow: 0 2px 24px rgba(0,0,0,.18); }
.hero h1 span { display: block; }
.hero-text { max-width: 27em; margin-top: 30px; font-size: 18px; line-height: 1.85; color: rgba(255,255,255,.9); }
.hero-actions { display: flex; gap: 16px; margin-top: 40px; }
.hero-platforms { position: absolute; z-index: 2; left: 0; right: 0; bottom: 44px; }
/* 平台按钮：形似应用商店徽章，状态文字来自 release.js */
.badges { display: flex; flex-wrap: wrap; gap: 12px; }
.badge-btn { display: inline-flex; align-items: center; gap: 12px; min-width: 176px; padding: 11px 20px 11px 16px; border-radius: 14px; background: rgba(18,14,9,.42); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: #fff; transition: background .2s ease, border-color .2s ease; }
.badge-btn:hover { background: rgba(18,14,9,.6); border-color: rgba(255,255,255,.4); }
.badge-btn svg.i { width: 26px; height: 26px; --eye: #2b2216; }
.badge-btn span { display: flex; flex-direction: column; line-height: 1.25; }
.badge-btn small { font-size: 12px; color: rgba(255,255,255,.72); letter-spacing: .04em; }
.badge-btn b { font-size: 17px; font-weight: 600; letter-spacing: .01em; }
.hero-body, .wrap-title { display: contents; }

/* 首屏动效：data-stage 0→3；亮度用叠加层透明度实现，不对大图做 filter 动画 */
.hero-photo { transform: scale(1.06); transition: transform 1.6s cubic-bezier(.2,.7,.2,1); }
.hero-photo::before { content: ""; position: absolute; inset: 0; z-index: 1; background: #fff6e4; opacity: .16; transition: opacity 1.6s ease-out; pointer-events: none; }
.hero .rise { opacity: 0; transform: translateY(12px); transition: opacity .7s ease-out, transform .7s cubic-bezier(.2,.7,.2,1); }
.hero:not([data-stage="0"]) .hero-photo { transform: scale(1); }
.hero:not([data-stage="0"]) .hero-photo::before { opacity: 0; }
.hero[data-stage="2"] .rise.r1, .hero[data-stage="3"] .rise { opacity: 1; transform: none; }
.hero[data-stage="2"] .rise.r1 { transition-delay: var(--d, 0ms); }
.still *, .still *::before, .still *::after { transition: none !important; }

/* 页尾：深色分栏 */
.foot { background: var(--dusk); color: var(--dusk-ink-2); padding-block: 80px 36px; font-size: 14px; }
.foot-cols { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr) 1.4fr; gap: 40px; padding-bottom: 56px; border-bottom: 1px solid var(--dusk-line); }
.foot-brand .brand { color: var(--paper); font-size: 22px; }
.foot-brand p { margin-top: 20px; font: 600 18px/1.5 var(--serif); color: var(--paper); }
.foot-brand small { display: block; margin-top: 6px; font-size: 13px; }
.foot h4 { font-size: 14px; font-weight: 600; color: var(--paper); letter-spacing: .06em; margin-bottom: 18px; }
.foot nav { display: flex; flex-direction: column; gap: 12px; }
.foot nav a:hover, .foot-base a:hover { color: var(--paper); }
.foot-contact a { display: block; font-size: 18px; font-weight: 600; color: var(--light); }
.foot-contact small { display: block; margin-top: 8px; font-size: 13px; }
.foot-base { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding-top: 28px; font-size: 13px; }
.foot-legal { margin-left: auto; display: flex; gap: 24px; }
.dock { display: none; }

@media (max-width: 760px) {
  :root { --gutter: 20px; --radius: 18px; }
  body { font-size: 16px; line-height: 1.75; }
  .section { padding-block: 80px; }
  .h2 { font-size: 30px; line-height: 1.38; margin-top: 12px; }
  .eyebrow { font-size: 13px; }
  .lead { margin-top: 14px; }
  .wide-only { display: none; }
  .head-in { height: 60px; gap: 12px; }
  .brand { font-size: 19px; gap: 10px; }
  .brand img { width: 30px; height: 30px; border-radius: 8px; }
  .head .btn { margin-left: auto; min-height: 36px; padding: 0 16px; font-size: 14px; }
  .menu { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; color: inherit; }
  .nav { display: none; }
  .head.open { position: fixed; background: var(--paper); color: var(--ink); box-shadow: 0 12px 30px -20px rgba(0,0,0,.4); }
  .head.open .nav { display: flex; flex-direction: column; gap: 0; position: absolute; top: 60px; left: 0; right: 0; background: var(--paper); padding: 4px var(--gutter) 20px; font-size: 18px; opacity: 1; }
  .head.open .nav a { padding: 14px 0; border-top: 1px solid var(--line); }
  .hero { display: grid; grid-template-columns: 100%; height: auto; min-height: 0; background: var(--paper); color: var(--ink); }
  .hero-photo { grid-area: 1 / 1; position: relative; height: 66svh; min-height: 500px; max-height: 600px; transform: none; background: #2b2216; }
  .hero-photo::before { display: none; }
  .hero-photo picture, .hero-photo img { object-position: 50% 40%; }
  .hero-photo::after { background: linear-gradient(180deg, rgba(16,13,9,.42) 0%, rgba(16,13,9,0) 16%, rgba(16,13,9,0) 64%, rgba(16,13,9,.66) 100%); }
  /* 手机首屏只做淡入，不做缩放 */
  .hero-photo picture { opacity: 0; transition: opacity 1s ease-out; }
  .hero:not([data-stage="0"]) .hero-photo { transform: none; }
  .hero:not([data-stage="0"]) .hero-photo picture { opacity: 1; }
  .hero .rise { transform: none; }
  .hero-copy { display: contents; }
  .wrap-title { display: block; grid-area: 1 / 1; align-self: end; position: relative; z-index: 3; padding: 0 var(--gutter) 26px; color: #fff; }
  .hero-tags { font-size: 12px; letter-spacing: .2em; }
  .hero h1 { font-size: 40px; line-height: 1.28; margin-top: 10px; }
  .hero-body { display: block; grid-row: 2; padding: 26px var(--gutter) 8px; }
  .hero-text { font-size: 16px; margin-top: 0; color: var(--ink-2); }
  .hero-actions { margin-top: 24px; gap: 12px; }
  .hero-actions .btn { flex: 1; min-height: 50px; padding: 0 12px; font-size: 15px; }
  .btn-ghost { border-color: var(--ink); color: var(--ink); }
  .hero-platforms { position: static; grid-row: 3; padding: 20px var(--gutter) 0; }
  .hero-platforms .wrap { padding-inline: 0; }
  .badges { gap: 8px; flex-wrap: nowrap; }
  .badge-btn { flex: 1; min-width: 0; padding: 8px 8px; gap: 6px; border-radius: 12px; background: #fff; border-color: var(--line); color: var(--ink); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .badge-btn svg.i { width: 18px; height: 18px; --eye: #fff; }
  .badge-btn small { font-size: 11px; color: var(--ink-3); }
  .badge-btn b { font-size: 13px; white-space: nowrap; }
  .foot { padding-block: 56px 28px; }
  .foot-cols { grid-template-columns: 1fr 1fr; gap: 32px 20px; padding-bottom: 36px; }
  .foot-brand, .foot-contact { grid-column: 1 / -1; }
  .foot-base { flex-direction: column; align-items: flex-start; gap: 6px; }
  .foot-legal { margin-left: 0; }
  .dock { display: flex; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; gap: 12px; align-items: center; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: rgba(248,245,239,.94); backdrop-filter: blur(12px); border-top: 1px solid var(--line); opacity: 0; pointer-events: none; transition: opacity .3s ease; }
  .dock.show { opacity: 1; pointer-events: auto; }
  .dock img { width: 40px; height: 40px; border-radius: 10px; }
  .dock div { flex: 1; font-size: 13px; line-height: 1.4; color: var(--ink-3); }
  .dock div b { display: block; font-size: 15px; color: var(--ink); }
  .dock .btn { min-height: 44px; padding: 0 18px; font-size: 15px; }
  [data-export] .dock { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-photo, .hero-photo picture, .hero .rise, .dock { transition: none !important; transform: none !important; opacity: 1; }
  .hero-photo::before { opacity: 0 !important; }
  .dock { opacity: 0; }
  .dock.show { opacity: 1; }
}
