/* ============================================================
   京鳞子商城官网 · 全站样式
   分三段：1 设计令牌  2 站点 chrome（落地页与协议页共用）
          3 协议内容页  4 官网落地页
   ============================================================ */

/* ============================================================
   1. 设计令牌 + 基础
   ============================================================ */
:root {
  /* 品牌色取自 App 图标 assets/app_ic_launcher.png 的红色菱形 */
  --brand:       #C9182B;
  --brand-deep:  #8E0F1E;
  --brand-tint:  #FDF5F4;
  --ink-deep:    #2A0E12;

  --ink:         #1C1616;
  --ink-2:       #6E6161;
  --line:        #EDE2E0;

  --radius:      14px;
  --shell:       1160px;
  --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.7;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
dd { margin: 0; }

.shell { max-width: var(--shell); margin: 0 auto; padding-left: 28px; padding-right: 28px; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

/* ============================================================
   2. 站点 chrome —— index.html 与 agreement/*.html 共用
   ============================================================ */
.site-top { background: #fff; border-bottom: 1px solid var(--line); }

.site-top-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; }
.brand-name { font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: .06em; }

.site-nav { display: flex; gap: 28px; }
.nav-link { font-size: 15px; color: var(--ink-2); transition: color .2s; }
.nav-link:hover { color: var(--brand); }

.site-bottom { background: var(--ink-deep); color: rgba(255, 255, 255, .62); }

.spec { border-bottom: 1px solid rgba(255, 255, 255, .1); }
.spec-list { padding-top: 18px; padding-bottom: 18px; display: flex; flex-wrap: wrap; gap: 8px 44px; }
.spec-item { display: flex; align-items: baseline; gap: 10px; }
.spec-item dt { font-size: 12px; color: rgba(255, 255, 255, .42); white-space: nowrap; }
.spec-item dd { font-family: var(--mono); font-size: 12.5px; color: rgba(255, 255, 255, .88); letter-spacing: .02em; }

.legal {
  padding-top: 16px;
  padding-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 26px;
  font-size: 13px;
}
.legal a { color: rgba(255, 255, 255, .78); transition: color .2s; }
.legal a:hover { color: #fff; }

/* ============================================================
   3. 协议内容页 —— agreement/ys.html、agreement/yh.html
   ============================================================ */
.agreement-page { padding: 40px 0 96px; background: var(--brand-tint); }

.back-link { display: inline-block; margin-bottom: 22px; color: var(--ink-2); font-size: 14px; }
.back-link:hover { color: var(--brand); }

.article {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 56px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(42, 14, 18, .06);
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink);
  overflow-wrap: break-word;
}
.article p { margin-bottom: 12px; }
.article img { max-width: 100%; margin: 12px auto; }
.article h1, .article h2, .article h3,
.article h4, .article h5, .article h6 { margin: 20px 0 12px; color: var(--brand-deep); }
.article table { border-collapse: collapse; width: 100%; margin: 12px 0; }
.article td, .article th { border: 1px solid var(--line); padding: 8px 12px; }

/* 协议正文里的外链（如第三方 SDK 隐私政策）必须看得出是链接 */
.article a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.article a:hover { color: var(--brand-deep); }

/* ============================================================
   4. 官网落地页 —— index.html
   ============================================================ */
body.landing {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: var(--brand-tint);
}

body.landing main { flex: 1; display: flex; flex-direction: column; }

.landing-center {
  flex: 1;
  min-height: 560px;
  display: flex;
  align-items: center;
  position: relative;
  background-color: var(--brand-tint);
  /* 菱形格纹：呼应 App 图标的菱形轮廓，压到极低对比 */
  background-image:
    repeating-linear-gradient(45deg, rgba(201, 24, 43, .07) 0 1px, transparent 1px 76px),
    repeating-linear-gradient(-45deg, rgba(201, 24, 43, .07) 0 1px, transparent 1px 76px);
}

.landing-grid {
  width: 100%;
  padding-top: 52px;
  padding-bottom: 56px;
  display: grid;
  grid-template-columns: 1.06fr 1fr;
  align-items: center;
  gap: 56px;
}

/* min-width:0 —— grid 子项默认 min-width:auto，长文案会把布局撑破 */
.pitch { min-width: 0; }

.pitch-title {
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: .05em;
  color: var(--ink);
}
.pitch-slogan { margin-top: 16px; font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-2); }

.pitch-badge {
  display: inline-block;
  margin-top: 18px;
  padding: 9px 20px;
  border: 1px solid rgba(201, 24, 43, .32);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: var(--brand);
  font-size: 14px;
}

/* --- 应用截图轮播 --- */
.shots {
  --shot-w: clamp(160px, 17vw, 236px);
  --shot-step: calc(var(--shot-w) * .62);
  --shot-ratio: 1.778;   /* 截图高宽比 1920/1080；换别的比例只改这里 */
}

.shots-stage {
  position: relative;
  /* 图高 + 阴影余量；--shot-ratio 变了自动跟随 */
  height: calc(var(--shot-w) * var(--shot-ratio) + 52px);
  /* mask 只做视觉淡出、不阻止布局溢出，必须配 overflow:hidden
     否则绝对定位的侧边截图会把整个文档撑宽，导致页面横向滚动 */
  overflow: hidden;
  /* 两侧渐隐，避免边上截图被硬切 */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 13%, #000 87%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 13%, #000 87%, transparent 100%);
}

.shot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--shot-w);
  margin: 0;
  opacity: .48;
  transform: translate(-50%, -50%) translateX(calc(var(--o, 0) * var(--shot-step))) scale(.84);
  transition: transform .55s cubic-bezier(.22, .61, .36, 1), opacity .55s ease;
}
.shot[data-offset="0"] { opacity: 1; transform: translate(-50%, -50%) scale(1); z-index: 2; }
.shot[data-offset="2"], .shot[data-offset="-2"] { opacity: 0; }

.shot img {
  width: 100%;
  height: auto;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 20px 44px rgba(42, 14, 18, .16);
}

.shots-dots { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }

.shot-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(201, 24, 43, .22);
  cursor: pointer;
  transition: width .25s, background .25s;
}
.shot-dot:hover { background: rgba(201, 24, 43, .45); }
.shot-dot[aria-current="true"] { width: 22px; background: var(--brand); }

/* --- 内容板块：应用介绍 / 主要服务 --- */
.band { padding: 68px 0; background: #fff; }
.band--alt {
  background: var(--brand-tint);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.band-title { font-size: clamp(23px, 2.3vw, 29px); font-weight: 700; letter-spacing: .04em; color: var(--ink); }
.band-title::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  border-radius: 2px;
  margin-top: 12px;
  background: var(--brand);
}

.band-lead { max-width: 800px; margin-top: 20px; font-size: 15.5px; color: var(--ink-2); }
.band-lead + .band-lead { margin-top: 14px; }

.services { margin-top: 40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.service {
  padding: 26px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(42, 14, 18, .05);
}
.service-icon { width: 32px; height: 32px; margin-bottom: 16px; color: var(--brand); }
.service h3 { font-size: 17px; color: var(--ink); letter-spacing: .03em; }
.service p { margin-top: 10px; font-size: 13.5px; color: var(--ink-2); line-height: 1.75; }

/* ============================================================
   5. 响应式
   ============================================================ */
@media (max-width: 1024px) {
  .landing-grid {
    grid-template-columns: 1fr;
    gap: 44px;
    padding-top: 40px;
    padding-bottom: 48px;
    text-align: center;
  }
  .shots { --shot-w: clamp(150px, 34vw, 208px); }
  .spec-list, .legal { justify-content: center; }
  .services { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .shell { padding-left: 20px; padding-right: 20px; }
  .site-top-inner { height: 58px; }
  .brand-name { font-size: 17px; }
  .article { padding: 32px 20px; }
}

@media (max-width: 560px) {
  .shots { --shot-w: clamp(140px, 46vw, 190px); }
  .band { padding: 48px 0; }
  .services { grid-template-columns: 1fr; gap: 16px; }
  .spec-item { width: 100%; justify-content: space-between; }
  .legal { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
