/* slipcase.online 公共样式：文牒 / Passfolio 与 凝安 / CoagSafe 共用。
   品牌只换 Token：<body class="brand-passfolio"> 奶油 + 淡橘（同 App Wallet v3），<body class="brand-coagsafe"> 暖灰 + 青。
   语言：<html data-lang="zh|en">，内容块用 data-l="zh|en" 标注，见 site.js。 */

.brand-passfolio {
  --bg: #FBF7F1; --surface: #FFFFFF; --fill: #F3ECE2; --line: #F0E8DD;
  --ink: #241D17; --muted: #7B6F63; --faint: #B3A796;
  --accent: #B35F1F; --accent-fill: #F5A962; --on-accent: #3A2210; --accent-soft: #FDEEDD;
  --shadow: 0 18px 40px -18px rgba(70, 40, 15, .45);
}
.brand-coagsafe {
  --bg: #F5F4F0; --surface: #FFFFFF; --fill: #EEEDE8; --line: #E6E4DD;
  --ink: #16191B; --muted: #666C70; --faint: #A3A8AA;
  --accent: #0E7C7B; --accent-fill: #0E7C7B; --on-accent: #FFFFFF; --accent-soft: #DDF0EE;
  --shadow: 0 18px 40px -18px rgba(10, 60, 60, .45);
}
@media (prefers-color-scheme: dark) {
  .brand-passfolio {
    --bg: #14110E; --surface: #1F1B17; --fill: #2A241F; --line: #2C2621;
    --ink: #F6EFE6; --muted: #A89B8D; --faint: #635A51;
    --accent: #F6B477; --accent-fill: #F6B477; --on-accent: #2B1A0B; --accent-soft: rgba(246, 180, 119, .14);
    --shadow: 0 18px 40px -18px rgba(0, 0, 0, .8);
  }
  .brand-coagsafe {
    --bg: #0F1112; --surface: #1A1D1F; --fill: #232729; --line: #2C3133;
    --ink: #F2F3F1; --muted: #9BA3A6; --faint: #5E6669;
    --accent: #3CC6BF; --accent-fill: #3CC6BF; --on-accent: #062221; --accent-soft: #10302F;
    --shadow: 0 18px 40px -18px rgba(0, 0, 0, .8);
  }
}

/* 语言切换（无 JS 时两种都显示，由 head 内联脚本在首帧前设好 data-lang） */
html[data-lang="zh"] [data-l="en"], html[data-lang="en"] [data-l="zh"] { display: none !important; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
a { color: var(--accent); text-underline-offset: 3px; }
/* width / height 属性只用于占位防跳动；实际尺寸一律按比例缩放，否则会被拉成细长条 */
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0; }
p { margin: 0 0 12px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }

/* 顶栏 */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 17px; }
.logo img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a, .lang-toggle {
  color: var(--muted); text-decoration: none; font-size: 15px; padding: 8px 12px; border-radius: 999px;
  min-height: 40px; display: inline-flex; align-items: center; border: 0; background: none; font-family: inherit; cursor: pointer;
}
.nav a:hover, .lang-toggle:hover { color: var(--ink); background: var(--fill); }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.lang-toggle { border: 1px solid var(--line); color: var(--ink); }

/* 首屏 */
/* 只设上下边距：写 padding 简写会把 .wrap 的左右 20px 覆盖掉，手机上内容贴边 */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding-block: 72px 56px; }
.app-mark { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.app-mark img { width: 72px; height: 72px; border-radius: 17px; box-shadow: var(--shadow); }
.app-mark .name { font-size: 15px; color: var(--muted); }
.app-mark .name strong { display: block; color: var(--ink); font-size: 20px; }
.hero h1 { font-size: clamp(36px, 5.6vw, 58px); font-weight: 700; margin-bottom: 18px; text-wrap: balance; }
.section h2, .card h3 { text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: 19px; color: var(--muted); max-width: 34em; margin-bottom: 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px;
  border-radius: 14px; font-weight: 600; text-decoration: none; font-size: 16px;
  background: var(--fill); color: var(--ink); transition: transform .15s ease, opacity .15s ease;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent-fill); color: var(--on-accent); }
.btn[aria-disabled="true"] { opacity: .65; pointer-events: none; }
.hero-note { margin-top: 14px; font-size: 14px; color: var(--muted); }

.phones { position: relative; height: 560px; }
.phone {
  position: absolute; width: 250px; border-radius: 38px; overflow: hidden; background: var(--surface);
  border: 6px solid color-mix(in srgb, var(--ink) 88%, transparent); box-shadow: var(--shadow);
}
.phone img { width: 100%; height: auto; aspect-ratio: 552 / 1200; object-fit: cover; }
.phones .phone:nth-child(1) { right: 150px; top: 40px; transform: rotate(-4deg); }
.phones .phone:nth-child(2) { right: 0; top: 0; z-index: 2; }

/* 分节 */
.section { padding: 56px 0; border-top: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 28px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.section h2 { font-size: clamp(26px, 3.6vw, 36px); margin-bottom: 10px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--surface); border-radius: 22px; padding: 22px; }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15.5px; margin: 0; }
.card .icon {
  width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 20px; margin-bottom: 14px;
}

.shots { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 28px; margin: 0 -4px; }
/* 桌面四张正好铺满一行，窄屏保持 200px 起横向滑动 */
.shots figure { margin: 0; flex: 0 0 max(200px, calc((100% - 60px) / 4)); scroll-snap-align: start; }
.nw { white-space: nowrap; }
.shots img { width: 100%; height: auto; aspect-ratio: 552 / 1200; object-fit: cover; border-radius: 26px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.shots figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; text-align: center; }

.promise { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.promise li { list-style: none; background: var(--surface); border-radius: 18px; padding: 16px 18px; }
.promise ul { padding: 0; margin: 0; display: contents; }
.promise strong { display: block; margin-bottom: 2px; }
.promise span { color: var(--muted); font-size: 15.5px; }

/* 常见问题 */
.faq details { background: var(--surface); border-radius: 18px; padding: 0 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; min-height: 56px; display: flex; align-items: center; list-style: none; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; color: var(--accent); font-size: 22px; font-weight: 400; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 18px; color: var(--muted); }

.contact { background: var(--accent-soft); border-radius: 22px; padding: 28px; text-align: center; }
.contact a.mail { font-size: 20px; font-weight: 600; }

/* 法律文本 */
.doc { max-width: 760px; padding: 48px 0 24px; }
.doc h1 { font-size: clamp(30px, 4.4vw, 42px); margin-bottom: 6px; }
.doc .updated { color: var(--muted); font-size: 15px; margin-bottom: 24px; }
.doc h2 { font-size: 21px; margin: 32px 0 10px; }
.doc h3 { font-size: 17px; margin: 20px 0 8px; }
.doc p, .doc li { color: color-mix(in srgb, var(--ink) 82%, var(--muted)); }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 8px; }
.doc .card { margin: 16px 0; }
.doc .card p:last-child { margin-bottom: 0; }

/* 页脚 */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 14px; margin-top: 40px; }
.site-footer .wrap { display: grid; gap: 20px; grid-template-columns: 1fr auto; align-items: start; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.sibling { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink) !important; background: var(--surface); border-radius: 16px; padding: 10px 14px; }
.sibling img { width: 36px; height: 36px; border-radius: 9px; }
.sibling small { display: block; color: var(--muted); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-block: 40px 24px; gap: 32px; }
  .phones { height: 460px; max-width: 420px; width: 100%; margin: 0 auto; }
  .phone { width: 210px; border-radius: 32px; }
  .phones .phone:nth-child(1) { right: auto; left: 0; top: 36px; }
  .phones .phone:nth-child(2) { right: 0; }
  .grid { grid-template-columns: 1fr; }
  .promise { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .nav a.optional { display: none; }
}
@media (max-width: 420px) {
  .phones { height: 400px; }
  .phone { width: 180px; }
}
