/* 官网首页（index.html）的样式。其余页面（隐私、条款、get、changelog…）
   仍用 styles.css，两份互不引用：首页重做时不会碰到合规页。
   调性见 CLAUDE.md「Design Context」：精致、收藏级。紫色 #6C4CE0 是 App 主色，
   只给主操作和少量强调；中性色都带一点紫调，没有纯黑纯白。 */
:root {
  --ink: #1A1730;
  --body: #4C4862;
  --muted: #77728C;
  --primary: #6C4CE0;
  --deep: #4A31B0;
  --bg: #F7F6FA;
  --surface: #FDFCFE;
  --tint: #EFEBFA;
  --line: #E6E3EE;
  --display: Sora, system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 16px;
  --section: clamp(64px, 9vw, 128px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
.wrap { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: var(--gutter); }

/* 小标签：一律中性灰、字距拉开，不用紫色胶囊 */
.kicker { font: 600 12px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* 顶栏 */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 28px; height: 56px; max-width: 1160px; margin-inline: auto; padding-inline: var(--gutter); }
.logo { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; font: 600 19px/1 var(--display); letter-spacing: -.02em; color: var(--ink); }
.logo img { border-radius: 9px; width: 30px; height: 30px; }
.top-link { display: none; font-size: 15px; font-weight: 500; color: var(--body); }
.top-link:hover { color: var(--ink); }
.pill { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px; background: var(--ink); color: var(--surface); font-size: 14px; font-weight: 600; }
.pill:hover { background: var(--primary); }

/* 首屏 */
.hero { padding-block: 40px 0; }
.hero-in { display: flex; flex-direction: column; gap: 24px; }
.hero-copy { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.hero h1 { font: 600 clamp(40px, 6.2vw, 76px)/1.02 var(--display); letter-spacing: -.035em; }
/* 桌面在 own, 后断行；手机让它自然折行，不然会断成三截 */
.hero h1 br { display: none; }
.lead { font-size: 17px; line-height: 1.6; color: var(--body); max-width: 34em; }
.stores { display: flex; gap: 10px; width: 100%; }
.store { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; height: 56px; border-radius: 14px; background: var(--ink); color: var(--surface); font-weight: 600; }
.store:hover { background: #2C2748; }
.store svg { width: 20px; height: 20px; flex: none; }
.store-txt { display: flex; flex-direction: column; align-items: flex-start; font: 600 16px/1.15 var(--sans); }
.store-txt small { font-size: 11px; font-weight: 500; opacity: .78; letter-spacing: .02em; }
/* 按系统分主次（data-os 由 index.html <head> 里的脚本写）。识别不出（Windows 等）
   或脚本没跑时两颗一样，都是深色实心。 */
html[data-os="ios"] .store-ios, html[data-os="mac"] .store-ios, html[data-os="android"] .store-android {
  order: -1; background: var(--primary); box-shadow: 0 10px 24px -8px rgba(108, 76, 224, .55); }
html[data-os="ios"] .store-ios:hover, html[data-os="mac"] .store-ios:hover, html[data-os="android"] .store-android:hover { background: var(--deep); }
html[data-os="ios"] .store-android, html[data-os="mac"] .store-android, html[data-os="android"] .store-ios {
  background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
html[data-os="ios"] .store-android:hover, html[data-os="mac"] .store-android:hover, html[data-os="android"] .store-ios:hover { background: var(--tint); }
.qr-card { display: none; }
/* 数字：一行安静的说明，不做大数字条 */
.stats { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14px; color: var(--muted); }
.stats strong { font: 600 15px/1 var(--display); color: var(--ink); letter-spacing: -.01em; }
.hero-phones { position: relative; align-self: center; width: 260px; height: 508px; }
.hero-phones .phone { position: absolute; filter: drop-shadow(0 24px 40px rgba(26, 23, 48, .18)); }
.phone-front { inset: 0; width: 260px; height: 508px; object-fit: contain; }
.phone-back { display: none; }

/* 通用区块：节奏靠留白，不靠卡片 */
.section { padding-top: var(--section); }
.head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 36px; max-width: 640px; }
.section h2 { font: 600 clamp(30px, 3.6vw, 46px)/1.08 var(--display); letter-spacing: -.03em; }
.head p { font-size: 16px; line-height: 1.6; color: var(--body); }

/* On the shelf：图就是展品，不套卡片框 */
.shelf { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
.shelf::-webkit-scrollbar { display: none; }
.shelf li { flex: 0 0 62%; scroll-snap-align: start; }
.shelf a { display: flex; flex-direction: column; gap: 4px; }
.shelf img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 18px; background: var(--tint); margin-bottom: 10px; transition: transform .5s cubic-bezier(.22, 1, .36, 1); }
.shelf a:hover img { transform: translateY(-4px); }
.shelf strong { font: 600 18px/1.2 var(--display); letter-spacing: -.02em; }
.shelf small { font-size: 13px; color: var(--muted); }

/* Features：三个主打并排（大手机在上），下面一排四个小图。都不套卡片 */
.shows { display: flex; flex-direction: column; gap: 64px; }
.show { display: flex; flex-direction: column; gap: 24px; }
.show-img { order: -1; }
.show-text { display: flex; flex-direction: column; gap: 12px; max-width: 440px; }
.show h3 { font: 600 clamp(24px, 2.4vw, 32px)/1.15 var(--display); letter-spacing: -.025em; }
.show p { font-size: 17px; line-height: 1.6; color: var(--body); }
.show-img { width: 210px; align-self: center; filter: drop-shadow(0 24px 40px rgba(26, 23, 48, .16)); }
/* 手机：四个小功能横向滑动，不再竖着排两行 */
.more { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 64px calc(var(--gutter) * -1) 0; padding: 40px var(--gutter) 8px; scroll-padding-inline: var(--gutter); border-top: 1px solid var(--line); }
.more::-webkit-scrollbar { display: none; }
.more li { flex: 0 0 58%; scroll-snap-align: start; }
.more img { height: 280px; width: auto; margin-bottom: 16px; filter: drop-shadow(0 14px 24px rgba(26, 23, 48, .14)); }
.more h3 { font: 600 17px/1.25 var(--display); letter-spacing: -.02em; margin-bottom: 6px; }
.more p { font-size: 14px; line-height: 1.55; color: var(--body); }

/* Community：四段文字，用细线分隔，不用深色大块和打勾 */
.community { display: grid; gap: 0; border-top: 1px solid var(--line); }
.community li { padding: 22px 0; border-bottom: 1px solid var(--line); }
.community h3 { font: 600 18px/1.25 var(--display); letter-spacing: -.02em; margin-bottom: 6px; }
.community p { font-size: 15px; line-height: 1.6; color: var(--body); }

/* 下载区 */
.cta { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; background: var(--tint); border-radius: 28px; padding: 32px 24px; }
.cta-icon { width: 72px; height: 72px; border-radius: 18px; }
.cta-text { display: flex; flex-direction: column; gap: 8px; }
.cta h2 { font: 600 clamp(30px, 3.6vw, 46px)/1.08 var(--display); letter-spacing: -.03em; }
.cta-text p { font-size: 16px; line-height: 1.6; color: var(--body); }
.cta-stores { display: flex; flex-direction: column; gap: 10px; align-self: stretch; }
.cta .store { flex: none; height: 56px; }  /* .store 的 flex:1 在纵向容器里会把高度压成内容高 */
.cta-qr { display: none; }

/* 页脚。#contact 是 App Store Connect 的 support URL 锚点，别删。 */
.foot { margin-top: var(--section); border-top: 1px solid var(--line); }
.foot-in { display: flex; flex-direction: column; gap: 12px; padding-block: 28px 32px; font-size: 13px; color: var(--muted); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a:hover { color: var(--ink); }

@media (min-width: 640px) {
  .shelf li { flex-basis: 40%; }
  .community { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
}

/* 桌面：向上加宽，不改手机 */
@media (min-width: 900px) {
  :root { --gutter: 32px; }
  .top-in { height: 68px; }
  .logo { font-size: 21px; }
  .logo img { width: 34px; height: 34px; }
  .top-link { display: inline; }
  .pill { height: 40px; padding: 0 20px; font-size: 15px; }

  .hero { padding-block: 24px 0; }
  .hero-in { flex-direction: row; align-items: center; gap: 48px; min-height: 680px; }
  .hero-copy { flex: 1; gap: 26px; }
  .hero h1 br { display: inline; }
  .lead { font-size: 19px; }
  .stores { width: auto; gap: 12px; }
  .store { flex: none; height: 60px; padding: 0 24px; }
  .store-txt { font-size: 18px; }
  .store svg { width: 22px; height: 22px; }
  .qr-card { display: flex; align-items: center; gap: 16px; }
  .qr-card img { width: 88px; height: 88px; border-radius: 12px; background: var(--surface); padding: 6px; box-shadow: inset 0 0 0 1px var(--line); }
  .qr-card strong { display: block; font-size: 15px; font-weight: 600; }
  .qr-card span { display: block; font-size: 13px; line-height: 1.4; color: var(--muted); }
  .hero-phones { flex: 1; align-self: stretch; width: auto; height: auto; }
  .phone-front { inset: auto; left: 10px; top: 80px; width: 300px; height: 586px; transform: rotate(-4deg); }
  .phone-back { display: block; left: 170px; top: 0; width: 280px; height: 546px; object-fit: contain; transform: rotate(5deg); }

  .head { margin-bottom: 48px; }
  .head p { font-size: 17px; }

  .shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; overflow: visible; margin-inline: 0; padding-inline: 0; }
  .shelf strong { font-size: 20px; }

  .shows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
  .show { gap: 28px; }
  .show-img { width: 100%; max-width: 290px; align-self: flex-start; }
  .more { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; overflow: visible; margin: 88px 0 0; padding: 56px 0 0; }
  .more li { flex: none; }
  .more img { height: 300px; }

  .community { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 32px; border-top: 0; }
  .community li { border-bottom: 0; border-top: 1px solid var(--ink); padding: 20px 0 0; }

  .cta { flex-direction: row; align-items: center; gap: 48px; border-radius: 32px; padding: 56px 64px; }
  .cta-icon { width: 112px; height: 112px; border-radius: 26px; flex: none; }
  .cta-text { flex: 1; }
  .cta-stores { flex: none; align-self: auto; width: 220px; gap: 12px; }
  .cta .store { height: 60px; padding: 0 20px; justify-content: flex-start; gap: 12px; }
  .cta-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; background: var(--surface); border-radius: 20px; padding: 12px; }
  .cta-qr span { font-size: 12px; font-weight: 600; color: var(--body); }

  .foot-in { flex-direction: row; align-items: center; justify-content: space-between; padding-block: 32px; font-size: 14px; }
  .foot nav { gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shelf img { transition: none; }
}
