/* ScreenHop 官网（落地页 / 隐私 / 支持）
   浅色。动效按 Apple 那套来：即时响应、空间一致、可以用弹簧式缓动，
   并且认 prefers-reduced-motion。 */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --ink: #12161c;
  --ink-2: #4d5663;
  --ink-3: #7b8493;
  --line: rgba(18, 22, 28, .09);
  --line-soft: rgba(18, 22, 28, .06);
  --accent: #0a84ff;
  --accent-ink: #0071e3;
  --accent-soft: rgba(10, 132, 255, .10);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;

  /* 动效：Apple 常用的两支缓动 + 一组时长 */
  --ease-out: cubic-bezier(.16, 1, .3, 1);      /* expo-out：进场用 */
  --ease-soft: cubic-bezier(.32, .72, 0, 1);    /* UI 过渡用 */
  --dur: .72s;

  /* 全站一套字号，页面里不再各写各的 */
  --t-h1: clamp(30px, 5.4vw, 50px);
  --t-h2: clamp(22px, 3.1vw, 30px);
  --t-lead: 17px;
  --t-body: 15.5px;
  --t-small: 14px;
  --gap-section: 72px;      /* 段落之间留白 */
  --gap-tight: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 740px; }

/* ── 顶栏 ─────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 30;
  background: rgba(245, 246, 248, .78);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease-soft), background .3s var(--ease-soft);
}
.top.stuck { border-bottom-color: var(--line); background: rgba(245, 246, 248, .9); }
.top__in { display: flex; align-items: center; gap: 22px; height: 58px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; color: var(--accent-ink); }
.brand img { width: 25px; height: 25px; border-radius: 7px; box-shadow: 0 1px 3px rgba(18,22,28,.14); }

/* ── 语言下拉：自绘组件（按钮 + 弹层，行为在 site.js） ── */
.langmenu { position: relative; margin-left: auto; }
.langmenu__btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface);
  color: var(--ink-2); font: 500 13px/1.4 var(--font);
  padding: 6px 11px; cursor: pointer; user-select: none;
  transition: color .18s var(--ease-soft), border-color .18s var(--ease-soft), background .18s var(--ease-soft);
}
.langmenu__btn:hover, .langmenu__btn[aria-expanded="true"] {
  color: var(--ink); border-color: #c3cad4;
}
.langmenu__btn[aria-expanded="true"] { background: #fbfcfe; }
.langmenu__chev { transition: transform .18s var(--ease-soft); }
.langmenu__btn[aria-expanded="true"] .langmenu__chev { transform: rotate(180deg); }
.langmenu__pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  min-width: 176px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 34px rgba(18, 22, 28, .13);
}
.langmenu__item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 7px 11px; border-radius: 8px;
  color: var(--ink-2); font-size: 13.5px;
}
.langmenu__item:hover { background: rgba(18, 22, 28, .05); color: var(--ink); text-decoration: none; }
.langmenu__item.on { color: var(--accent-ink); font-weight: 600; }
.langmenu__item.on::after { content: "✓"; }

/* ── 英雄区 ───────────────────────────────────────────── */
.hero { position: relative; padding: 88px 0 30px; text-align: center; }
.hero::before {
  content: ""; position: absolute; z-index: -1;
  left: 50%; top: -120px; width: 900px; height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(10,132,255,.16), rgba(10,132,255,0) 72%);
  animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: .75; transform: translateX(-50%) scale(1); }
  50%      { opacity: 1;   transform: translateX(-50%) scale(1.06); }
}

.hero h1 {
  margin: 0 auto 20px; max-width: 780px;
  font-size: var(--t-h1);
  line-height: 1.16; letter-spacing: -.028em; font-weight: 700;
}
.hero p.lede {
  margin: 0 auto 30px; max-width: 620px;
  font-size: clamp(17px, 2.2vw, 20px); color: var(--ink-2); line-height: 1.6;
}
.hero .cta { margin: 0 6px; }

/* 主按钮：按下立刻有回应（Apple 的响应性规矩） */
.cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  padding: 12px 22px; border-radius: 12px;
  font-size: 17px; font-weight: 600;
  border: 0; cursor: pointer;
  box-shadow: 0 6px 18px rgba(10,132,255,.24);
  transition: transform .18s var(--ease-soft), box-shadow .18s var(--ease-soft), background .18s var(--ease-soft);
}
.cta:hover { background: var(--accent-ink); text-decoration: none; transform: translateY(-1px); box-shadow: 0 10px 26px rgba(10,132,255,.28); }
.cta:active { transform: scale(.975); box-shadow: 0 3px 10px rgba(10,132,255,.22); }
.cta.ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); box-shadow: none;
}
.cta.ghost:hover { background: var(--surface); box-shadow: 0 6px 18px rgba(18,22,28,.08); }

/* ── 「落点」演示：真像素 + 一拍的动效 ─────────────────── */
.demo { position: relative; margin: 56px auto 0; max-width: 800px; }
.demo__stage {
  position: relative; width: 740px; height: 208px; margin: 0 auto;
}
.demo__stage img {
  position: absolute; top: 0; width: 370px; height: 208px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(18, 22, 28, .12);
}
.demo__stage img.a { left: 0; }
.demo__stage img.b { left: 370px; }

/* 目标屏的彩虹描边：落屏那一下闪一圈 */
.demo__ring {
  position: absolute; left: 366px; top: -4px; width: 378px; height: 216px;
  border-radius: 14px; padding: 4px; opacity: 0;
  background: conic-gradient(from var(--spin), #ff375f, #ff7ab6, #bf5af2, #7d5cff,
                             #0a84ff, #32d0ff, #ffd60a, #ff9f0a, #ff375f);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
}
@property --spin { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

/* 指针：从左边那块屏跳到右边那块屏 */
.demo__cursor {
  position: absolute; left: 185px; top: 104px; width: 20px; height: 20px;
  margin: -10px 0 0 -10px;
  animation: hop 3.2s var(--ease-out) infinite;
}
.demo__cursor svg { width: 100%; height: 100%; filter: drop-shadow(0 1px 2px rgba(0,0,0,.28)); }

/* 落点的白光晕 */
.demo__halo {
  position: absolute; left: 555px; top: 104px; width: 0; height: 0;
  animation: halo 3.2s var(--ease-out) infinite;
}
.demo__halo::before {
  content: ""; position: absolute; left: -34px; top: -34px;
  width: 68px; height: 68px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.95);
  box-shadow: 0 0 18px rgba(255,255,255,.9), 0 0 0 1px rgba(18,22,28,.10);
}

/* 一拍 = 3.2s：0.22s 待机 → 0.16s 飞行 → 1.5s 落点 → 淡出复位 */
@keyframes hop {
  0%, 6.8%   { transform: translate(0, 0); }
  11.9%      { transform: translate(370px, 0); }
  92%, 100%  { transform: translate(370px, 0); opacity: 1; }
  96%, 100%  { opacity: 0; }
}
@keyframes halo {
  0%, 11.9%   { opacity: 0; transform: scale(.25); }
  13%         { opacity: 1; }
  35%         { opacity: 0; transform: scale(1.5); }
  100%        { opacity: 0; transform: scale(1.5); }
}
.demo__ring { animation: ringflash 3.2s var(--ease-out) infinite; }
@keyframes ringflash {
  0%, 11.9%  { opacity: 0; --spin: 0deg; }
  13%        { opacity: 1; }
  30%        { opacity: 0; }
  100%       { opacity: 0; --spin: 260deg; }
}

.demo__cap { margin: 14px 0 0; color: var(--ink-3); font-size: 14px; }

/* ── 卖点 ─────────────────────────────────────────────── */
.feature { padding: var(--gap-section) 0 0; }
.feature h2 {
  margin: 0 0 12px; font-size: var(--t-h2);
  line-height: 1.3; letter-spacing: -.02em; font-weight: 700;
}
.feature p { margin: 0 0 30px; color: var(--ink-2); max-width: 640px; font-size: var(--t-lead); }
.feature .shot { max-width: 760px; margin: 0; }
.feature .shot img {
  width: 100%; display: block; border-radius: 12px;
  box-shadow: 0 12px 34px rgba(18, 22, 28, .10);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.feature .shot:hover img { transform: scale(1.012); box-shadow: 0 20px 46px rgba(18, 22, 28, .14); }

/* 事实条 */
.strip {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(212px, 1fr));
  margin: 34px 0 0;
}
.strip div {
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); padding: 18px 20px;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.strip div:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(18,22,28,.07); }
.strip b { display: block; font-size: var(--t-body); margin-bottom: 4px; }
.strip span { color: var(--ink-3); font-size: var(--t-small); line-height: 1.55; }

/* ── 步骤条 ───────────────────────────────────────────── */
.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 30px; }
.step { border-top: 2px solid var(--accent-soft); padding-top: 14px; }
.step b { display: block; font-size: var(--t-body); margin-bottom: 4px; }
.step span { color: var(--ink-3); font-size: var(--t-body); line-height: 1.55; }

/* ── 收尾 CTA ─────────────────────────────────────────── */
.close {
  margin-top: var(--gap-section); padding: 56px 0 88px; text-align: center;
  border-top: 1px solid var(--line);
}
.close__icon {
  width: 64px; height: 64px; border-radius: 15px; margin: 0 auto 22px; display: block;
  box-shadow: 0 8px 22px rgba(18, 22, 28, .16);
}
.close h2 { margin: 0 0 12px; font-size: var(--t-h2); letter-spacing: -.022em; font-weight: 700; }
.close p { margin: 0 auto 26px; color: var(--ink-2); font-size: var(--t-lead); max-width: 520px; }

/* ── 正文页（隐私 / 支持）─────────────────────────────── */
.doc { padding: 56px 0 80px; }
.doc h1 { margin: 0 0 8px; font-size: clamp(26px, 4vw, 34px); letter-spacing: -.022em; }
.doc .meta { color: var(--ink-3); font-size: 15px; margin: 0 0 34px; }
.doc h2 { margin: 40px 0 10px; font-size: clamp(18px, 2.4vw, 21px); letter-spacing: -.012em; font-weight: 650; }
.doc h3 { margin: 26px 0 6px; font-size: var(--t-lead); font-weight: 600; }
.doc p, .doc li { color: var(--ink-2); font-size: var(--t-lead); }
.doc ul { padding-left: 22px; }
.doc li { margin: 5px 0; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc .callout {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: 12px;
  padding: 18px 20px; margin: 18px 0;
  box-shadow: 0 6px 18px rgba(18,22,28,.05);
}
.doc .callout p { margin: 0; color: var(--ink); }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: var(--t-body); }
.doc th, .doc td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.doc th { color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.doc code {
  background: var(--surface); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 6px; font-size: 14px;
}
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 34px 0; }

/* ── 页脚 ─────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); padding: 30px 0 44px; color: var(--ink-3); font-size: 14px; }
.foot__in { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.foot .sp { margin-left: auto; }

/* ── 进场：滚动到才出现 ─────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* 页面一进来先出现，不等滚动 */
.rise { animation: rise .85s var(--ease-out) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 820px) {
  .demo__stage { transform: scale(.58); transform-origin: top center; margin-bottom: -88px; }
}

/* 窄屏：品牌缩小一点，下拉本身不受宽度影响 */
@media (max-width: 640px) {
  .top__in { gap: 12px; }
  .brand { font-size: 15px; gap: 7px; }
  .brand img { width: 22px; height: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .rise { opacity: 1 !important; transform: none !important; transition: none !important; animation: none !important; }
  .demo__cursor, .demo__halo, .demo__ring, .hero::before { animation: none !important; }
  .demo__cursor { transform: translate(370px, 0); }
  .demo__halo { opacity: .9; transform: scale(1.2); }
  .feature .shot:hover img { transform: none; }
}
