/* 鸿蒙黑体，自托管的子集化可变字体（wght 40–900，一个文件覆盖正文到大标题）。
 * 站点原来把它写在字体栈第一位，可那是**设备上才有**的字体——访客基本都回退到
 * 苹方/微软雅黑，一个鸿蒙应用的官网看着跟系统默认没两样。产物由 site/build-fonts.py 生成，
 * 改完文案要重跑，否则新字会回退到系统字体。 */
@font-face {
  font-family: "HarmonyOS Sans SC";
  src: url("/assets/fonts/harmonyos-sans-sc.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Vela Player 官网样式
 *
 * 配色直接取自 App 的深色色板（entry/src/main/resources/dark/element/color.json），
 * 站点刻意只做深色一套 —— hero 与特性配图全是深底暖光的实拍/渲染图，
 * 套浅色主题时那些图会像贴上去的补丁。App 侧的深浅双主题不受此影响。
 */

:root {
  color-scheme: dark;

  --bg: #0a0908;            /* 比 App 的 #0A0B0E 再暖一丝，与暖光配图衔接 */
  --bg-soft: #100e0c;
  --surface: #17140f;
  --surface-2: #221d17;
  --text: #f4f1ec;
  --dim: #a89f94;
  --dim-2: #7d766c;
  --accent: #ff7a2f;
  --accent-hi: #ff9640;
  --accent-lo: #e85f0e;
  --hairline: rgba(255, 255, 255, 0.09);
  --hairline-hi: rgba(255, 255, 255, 0.16);

  --radius-s: 8px;          /* 海报圆角 8，与 App 同一口径 */
  --radius-m: 14px;
  --radius-l: 24px;

  --pad: clamp(20px, 5vw, 64px);
  --gap-section: clamp(72px, 11vw, 152px);

  --font: "HarmonyOS Sans SC", "PingFang SC", -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-num: "SF Pro Display", -apple-system, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

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

/* height:auto 不能省：每个 <img> 都带着 width/height 属性（占位防抖），
 * 只写 max-width 时宽度被压、高度还停在属性值上，图就纵向拉长了。 */
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -0.01em; font-weight: 700; }
p { margin: 0; }

/* 不许拆开的词组。浏览器可以在任意两个汉字之间断行，balance 只拉平行长、
 * 管不了词边界，「媒体服/务器」这种拆法只能靠它挡。别滥用——包多了会撑出横向滚动。 */
.nb { white-space: nowrap; }

.wrap { width: min(1180px, 100% - var(--pad) * 2); margin-inline: auto; }
.narrow { width: min(760px, 100% - var(--pad) * 2); margin-inline: auto; }

/* ---------- 顶栏 ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.nav[data-stuck="1"] { border-bottom-color: var(--hairline); }

.nav__in {
  display: flex; align-items: center; gap: 28px;
  height: 64px;
}
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.nav__brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav__brand span { font-weight: 650; font-size: 1.0625rem; letter-spacing: -0.015em; }

.nav__links { display: flex; gap: 26px; }
.nav__links a {
  text-decoration: none; color: var(--dim); font-size: 0.9375rem;
  transition: color 0.2s ease;
}
.nav__links a:hover { color: var(--text); }

@media (max-width: 720px) { .nav__links { display: none; } }

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px;
  font-size: 0.9375rem; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.btn--primary {
  background: linear-gradient(135deg, var(--accent-hi), var(--accent-lo));
  color: #fff;
  box-shadow: 0 8px 28px -10px rgba(255, 122, 47, 0.75);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -10px rgba(255, 122, 47, 0.85); }
.btn--ghost { border-color: var(--hairline-hi); color: var(--text); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--dim-2); }
.btn[aria-disabled="true"] { pointer-events: none; opacity: 0.75; }

/* ---------- Hero ---------- */

/* 首屏占满视口：文案在上、设备图从底部升起并被视口裁掉一截——
 * 露出「下面还有」的那条边，比一屏塞完更有往下看的动机。
 * 用 svh 而不是 vh：移动端地址栏收起时 vh 会突然变大，首屏跟着跳一下。 */
.hero {
  position: relative; overflow: hidden;
  min-height: 100svh;
  display: grid; grid-template-rows: auto 1fr; align-content: start;
  padding-top: clamp(44px, 9vh, 104px);
}

.hero__glow {
  position: absolute; inset: -180px -10% auto -10%; height: 760px;
  background: radial-gradient(ellipse 55% 50% at 50% 50%, rgba(255, 122, 47, 0.26), transparent 68%);
  pointer-events: none;
}

.hero__in { position: relative; display: grid; gap: clamp(36px, 5vw, 60px); }

/* 首屏文案居中：1440 宽下左对齐会把右半屏空出来，而这一屏没有第二栏内容可放 */
.hero__copy { text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 15px 7px 11px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--hairline);
  font-size: 0.8125rem; color: var(--dim); letter-spacing: 0.01em;
  width: fit-content; margin-inline: auto;
}
.eyebrow b { color: var(--accent-hi); font-weight: 650; }

.hero h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.25rem);
  letter-spacing: -0.035em;
  margin: 26px auto 0;
  max-width: 20ch;
  text-wrap: balance;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent-hi), var(--accent-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub {
  margin: 22px auto 0; font-size: clamp(1.0625rem, 1.9vw, 1.3125rem);
  color: var(--dim); max-width: 42ch; line-height: 1.75;
  /* 中文可以在任意两个字之间断行，「片/子」被拆开就是这么来的。
   * balance 会把几行长度拉平，断点跟着挪到词与词之间；不支持的浏览器忽略即可。 */
  text-wrap: balance;
}
.hero__cta {
  display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px;
  align-items: center; justify-content: center;
}
.hero__note { font-size: 0.8125rem; color: var(--dim-2); margin-top: 18px; }

.hero__shot {
  position: relative; overflow: hidden;
  border-radius: var(--radius-l) var(--radius-l) 0 0;
  border: 1px solid var(--hairline); border-bottom: 0;
  box-shadow: 0 -10px 90px -30px rgba(255, 122, 47, 0.35),
              0 40px 90px -40px rgba(0, 0, 0, 0.95),
              0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}
.hero__shot img { width: 100%; }
.hero__shot::after {          /* 底边渐隐进页面，切口不留硬边 */
  content: ""; position: absolute; inset: auto 0 0 0; height: 34%;
  background: linear-gradient(to top, var(--bg) 2%, transparent);
  pointer-events: none;
}

/* 滚动驱动的视差：图随滚动缓缓归位。不支持的浏览器什么都不做，静态一样好看。 */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero__shot img {
      animation: heroRise linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 55%;
    }
    @keyframes heroRise {
      from { transform: scale(1.07) translateY(2.5%); }
      to   { transform: none; }
    }
  }
}

/* ---------- 数据条 ---------- */

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--hairline);
  border: 1px solid var(--hairline); border-radius: var(--radius-m);
  overflow: hidden; margin-top: clamp(56px, 8vw, 96px);
}
.stats div { background: var(--bg-soft); padding: 26px 22px; }
.stats dt {
  font-family: var(--font-num);
  font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.1;
  background: linear-gradient(140deg, #fff, var(--accent-hi));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stats dd { margin: 7px 0 0; font-size: 0.875rem; color: var(--dim); line-height: 1.5; }

@media (max-width: 780px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 区块通用 ---------- */

section + section { margin-top: var(--gap-section); }

/* 限宽只加在正文段落上：加在 .sec-head 整体时，62ch 是按 17px 正文算的，
 * 套到 42px 的标题上就成了六百多像素，全宽区块里的标题会白白折成两行。 */
.sec-head .kicker {
  font-size: 0.8125rem; font-weight: 650; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent);
}
.sec-head h2 { font-size: clamp(1.75rem, 3.6vw, 2.625rem); letter-spacing: -0.03em; margin-top: 14px; text-wrap: balance; }
.sec-head p { margin-top: 18px; color: var(--dim); font-size: 1.0625rem; max-width: 58ch; text-wrap: pretty; }

/* 图文对开 */
.split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.split--flip .split__media { order: -1; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }
}

.split__media {
  border-radius: var(--radius-l); overflow: hidden;
  border: 1px solid var(--hairline);
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.85);
}

/* ---------- 全幅展示带 ---------- */

/* 出血到视口两边，上下渐隐进页面底色 —— 区块之间的一次「换气」，
 * 也是全站唯一让画面占满整屏宽度的地方。 */
.showcase {
  position: relative; overflow: hidden;
  height: min(74vh, 660px);
  margin-top: var(--gap-section);
}
/* object-position 取偏上：这张图上排海报清晰、下排本就渐隐，
 * 居中取会把暗的那半端到画面中央，再叠上底部的渐隐就剩一片黑。 */
.showcase > img { width: 100%; height: 100%; object-fit: cover; object-position: center 34%; }
.showcase::before, .showcase::after {
  content: ""; position: absolute; left: 0; right: 0; height: 22%;
  pointer-events: none;
}
.showcase::before { top: 0; background: linear-gradient(to bottom, var(--bg), transparent); }
.showcase::after { bottom: 0; background: linear-gradient(to top, var(--bg), transparent); }

.showcase__copy {
  position: absolute; inset: 0; display: grid; place-content: center;
  text-align: center; padding: 0 var(--pad);
}
/* 文字底下的径向暗斑。海报墙换成真海报之后画面亮了一大截，白字直接压上去糊成一片；
 * 整体调暗又会把海报本身的说服力压没，所以只暗中间这一块。 */
.showcase__copy::before {
  content: ""; position: absolute; inset: -10%;
  background: radial-gradient(ellipse 44% 46% at 50% 50%,
              rgba(10, 9, 8, .90) 18%, rgba(10, 9, 8, .55) 52%, transparent 76%);
  pointer-events: none;
}
.showcase__copy > * { position: relative; }
.showcase__copy h2 {
  font-size: clamp(1.75rem, 4.4vw, 3.25rem); letter-spacing: -0.035em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95), 0 6px 44px rgba(0, 0, 0, 0.8);
}
.showcase__copy p {
  margin: 20px auto 0; max-width: 40ch; color: #e6ded4;
  font-size: clamp(1rem, 1.7vw, 1.1875rem);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 4px 28px rgba(0, 0, 0, 0.85);
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .showcase > img {
      animation: showcasePan linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }
    @keyframes showcasePan {
      from { transform: scale(1.16) translateY(-2%); }
      to   { transform: scale(1.02) translateY(2%); }
    }
  }
}

/* ---------- 源标签墙 ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 28px; }
.chip {
  padding: 8px 15px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--hairline);
  font-size: 0.875rem; color: var(--text); letter-spacing: 0.005em;
}
.chip--soft { color: var(--dim); background: transparent; }

/* ---------- 特性卡片网格 ---------- */

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 46px; }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }

.card {
  padding: 30px 28px 32px; border-radius: var(--radius-m);
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--hairline);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.card:hover { border-color: var(--hairline-hi); transform: translateY(-3px); }
.card__icon {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center; margin-bottom: 20px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent-hi);
}
.card__icon svg { width: 21px; height: 21px; }
.card h3 { font-size: 1.125rem; letter-spacing: -0.015em; }
.card p { margin-top: 11px; color: var(--dim); font-size: 0.9375rem; line-height: 1.7; }

/* ---------- 设备形态 ---------- */

.devices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 46px; }
@media (max-width: 900px) { .devices { grid-template-columns: repeat(2, 1fr); } }

.device {
  padding: 26px 24px 28px; border-radius: var(--radius-m);
  border: 1px solid var(--hairline); background: var(--bg-soft);
}
.device svg { width: 26px; height: 26px; color: var(--accent-hi); }
.device h3 { font-size: 1rem; margin-top: 16px; }
.device p { margin-top: 9px; font-size: 0.875rem; color: var(--dim); line-height: 1.65; }

/* ---------- 截图廊 ---------- */

.gallery {
  display: flex; gap: 18px; margin-top: 46px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 18px; scrollbar-width: thin;
  scrollbar-color: var(--surface-2) transparent;
  /* 出血到视口边缘，让"还有更多"这件事在窄屏上看得出来 */
  margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad);
}
.gallery figure { margin: 0; flex: 0 0 auto; width: 258px; scroll-snap-align: center; }
/* 折叠屏展开态是 8:9 的宽图，塞进 258 的竖图槽位里会缩成一条 —— 单独给宽度 */
.gallery figure.wide { width: 430px; }
.gallery img {
  width: 100%; border-radius: var(--radius-m);
  border: 1px solid var(--hairline);
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.9);
}
.gallery figcaption { margin-top: 13px; font-size: 0.8125rem; color: var(--dim); }

/* ---------- FAQ ---------- */

.faq { margin-top: 40px; border-top: 1px solid var(--hairline); }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  cursor: pointer; list-style: none; padding: 22px 40px 22px 0;
  font-weight: 600; font-size: 1.0625rem; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%;
  width: 9px; height: 9px; margin-top: -6px;
  border-right: 2px solid var(--dim); border-bottom: 2px solid var(--dim);
  transform: rotate(45deg); transition: transform 0.25s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq p { padding: 0 0 24px; color: var(--dim); font-size: 0.9375rem; max-width: 76ch; }

/* ---------- 结语 CTA ---------- */

.cta-band {
  margin-top: var(--gap-section);
  border-radius: var(--radius-l); overflow: hidden; position: relative;
  border: 1px solid var(--hairline);
  background: var(--bg-soft);
}
.cta-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.cta-band__in { position: relative; padding: clamp(48px, 8vw, 88px) var(--pad); text-align: center; }
.cta-band h2 { font-size: clamp(1.625rem, 3.4vw, 2.375rem); letter-spacing: -0.03em; }
.cta-band p { margin: 18px auto 0; color: var(--dim); max-width: 52ch; }
.cta-band .btn { margin-top: 32px; }

/* ---------- 页脚 ---------- */

footer {
  margin-top: var(--gap-section);
  border-top: 1px solid var(--hairline);
  padding: 44px 0 60px;
  font-size: 0.875rem; color: var(--dim-2);
}
.foot { display: flex; flex-wrap: wrap; gap: 26px 40px; align-items: flex-start; }
.foot__brand { margin-right: auto; max-width: 34ch; }
.foot__brand img { width: 34px; height: 34px; border-radius: 8px; margin-bottom: 12px; }
.foot nav { display: grid; gap: 10px; }
.foot nav b { color: var(--dim); font-weight: 600; font-size: 0.8125rem; }
.foot a { color: var(--dim); text-decoration: none; }
.foot a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.foot__legal { width: 100%; margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--hairline); line-height: 1.8; }

/* ---------- 正文页（隐私 / 支持） ---------- */

.doc { padding-top: clamp(40px, 6vw, 72px); }
.doc h1 { font-size: clamp(2rem, 4.4vw, 3rem); letter-spacing: -0.03em; }
.doc .updated { margin-top: 14px; color: var(--dim-2); font-size: 0.875rem; }
.doc h2 {
  font-size: 1.3125rem; margin-top: 52px; padding-top: 26px;
  border-top: 1px solid var(--hairline); letter-spacing: -0.02em;
}
.doc h3 { font-size: 1.0625rem; margin-top: 30px; }
.doc p, .doc li { color: var(--dim); font-size: 1rem; line-height: 1.85; }
.doc p { margin-top: 16px; }
.doc ul, .doc ol { margin: 16px 0 0; padding-left: 1.35em; }
.doc li { margin-top: 9px; }
.doc li::marker { color: var(--dim-2); }
.doc strong { color: var(--text); font-weight: 600; }
.doc a { color: var(--accent-hi); text-decoration: none; }
.doc a:hover { text-decoration: underline; text-underline-offset: 3px; }
.doc code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.875em; background: var(--surface-2); padding: 2px 7px;
  border-radius: 5px; color: var(--text);
}
.doc table { width: 100%; border-collapse: collapse; margin-top: 22px; font-size: 0.9375rem; }
.doc th, .doc td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.doc th { color: var(--text); font-weight: 600; font-size: 0.875rem; }
.doc td { color: var(--dim); }
.doc__scroll { overflow-x: auto; }

.callout {
  margin-top: 26px; padding: 20px 24px; border-radius: var(--radius-m);
  background: var(--surface); border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent);
}
.callout p { margin-top: 0; }
.callout p + p { margin-top: 12px; }

/* ---------- 滚动渐显 ---------- */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

.sec-head__cta { margin-top: 26px; }
