/* ─────────────────────────────────────────────
   DevTTL — 移动应用与游戏工作室
   ───────────────────────────────────────────── */

:root {
  color-scheme: dark;

  --bg:      #0A0E17;
  --bg-2:    #0E1320;
  --panel:   rgba(255, 255, 255, .035);
  --panel-2: rgba(255, 255, 255, .06);
  --line:    rgba(255, 255, 255, .1);
  --line-2:  rgba(255, 255, 255, .18);

  --text:    #EEF1F7;
  --muted:   #98A2B8;

  --accent:  #8A6DFF;
  --accent-fill: #6E4DF0;
  --accent-2:#35D6C0;

  --sans: Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system,
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Consolas, monospace;

  --gutter: clamp(20px, 4vw, 56px);
  --page: 1280px;
  --bar: 66px;

  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 26px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }

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

/* ── HUD 底纹 ────────────────────────────────
   一层固定网格，压在内容之下。遮罩是关键：满屏等强度的网格会显得廉价，
   让它从中上部向四周淡出，只留隐约的经纬感。
   ───────────────────────────────────────────── */

.hud {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(138, 109, 255, .085) 1px, transparent 1px),
    linear-gradient(90deg, rgba(138, 109, 255, .085) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 92% 68% at 50% 18%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 92% 68% at 50% 18%, #000 0%, transparent 78%);
}

/* 隐私页是长文阅读场景，网格再退一步。 */
.hud--quiet {
  background-image:
    linear-gradient(rgba(138, 109, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(138, 109, 255, .05) 1px, transparent 1px);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--r-sm);
  font-size: .9rem;
  font-weight: 600;
}
.skip:focus { left: 12px; top: 12px; }

/* ── 顶栏 ─────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 14, 23, .72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

/* 滚动进度：顶栏下沿一条细线。支持滚动时间线的浏览器用纯 CSS 绑定到
   文档滚动；不支持的由 main.js 写 --scroll，两条路径互不干扰。 */
.topbar__progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: calc(var(--scroll, 0) * 100%);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(138, 109, 255, .55);
  transform-origin: left center;
  pointer-events: none;
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .topbar__progress {
      width: 100%;
      /* scaleX 驱动进度，不触发重排。 */
      transform: scaleX(0);
      animation: progress-grow linear both;
      animation-timeline: scroll(root block);
    }
    @keyframes progress-grow {
      from { transform: scaleX(0); }
      to   { transform: scaleX(1); }
    }
  }
}

.topbar__inner {
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--bar);
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -.015em;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.wordmark::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, .18);
}

.nav {
  margin-left: auto;
  display: flex;
  gap: 2px;
  font-size: .875rem;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 8px clamp(9px, 1.2vw, 14px);
  border-radius: 999px;
  white-space: nowrap;
  transition: color .18s ease, background-color .18s ease;
}
.nav a:hover { color: var(--text); background: var(--panel-2); }

.nav a[aria-current="true"] {
  color: var(--text);
  background: var(--panel-2);
}

/* 语言切换 */

.langs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-size: .78rem;
}

.langs a {
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
  transition: color .18s ease, background-color .18s ease;
}
.langs a:hover { color: var(--text); }

.langs a.is-current {
  color: var(--text);
  background: var(--panel-2);
  font-weight: 600;
}

.topbar__mail {
  display: none;
  font-size: .82rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease;
}
.topbar__mail:hover { color: var(--accent); }

@media (min-width: 1180px) {
  .topbar__mail { display: block; }
}

@media (max-width: 860px) {
  .topbar__inner {
    flex-wrap: wrap;
    height: auto;
    padding-block: 12px 11px;
    row-gap: 10px;
    column-gap: 12px;
  }
  .wordmark { order: 1; }
  .langs { order: 2; margin-left: auto; }
  /* Five links no longer fit a 320px row, so the nav scrolls sideways
     instead of wrapping or squeezing the labels. */
  .nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 2px;
    font-size: .82rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 7px 10px; flex: 0 0 auto; }
  html { scroll-padding-top: 124px; }
}

/* ── 首屏 ─────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  top: -30%;
  left: 50%;
  width: min(1100px, 130%);
  aspect-ratio: 1.6;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(124, 92, 255, .22), transparent 68%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  max-width: var(--page);
  margin-inline: auto;
  /* The frame-budget chart used to sit under this and supply the closing
     space; now the hero carries its own bottom padding. */
  padding: clamp(56px, 9vw, 120px) var(--gutter) clamp(56px, 8vw, 104px);
  display: grid;
  gap: clamp(30px, 4vw, 48px);
}

/* 扫描线：一条细光带自上而下扫过首屏。20 秒周期里只有约 1.6 秒在动，
   其余时间停在视野外——常驻的扫描线看久了会晕，也不像真的在扫。 */
.hero__scan {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero__scan::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 180px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(53, 214, 192, .07) 45%,
    rgba(53, 214, 192, .16) 50%,
    rgba(53, 214, 192, .07) 55%,
    transparent
  );
  transform: translateY(-200px);
}

@media (min-width: 940px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr);
    gap: clamp(32px, 5vw, 76px);
    align-items: end;
  }
}

.hero__title {
  display: flex;
  flex-direction: column;
  /* The floor is set by the widest line, not by the Latin one: the CJK
     headlines are eleven full-width characters with no space to break at,
     so at a 320px viewport they need to come down to about 24px to fit
     inside the gutter. */
  font-size: clamp(1.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -.03em;
}

.hero__line {
  display: block;
}

/* The closing line carries the promise, so it gets the accent. */
.hero__title .hero__line:last-child {
  color: var(--accent-2);
}

.hero__side { padding-bottom: .3rem; }

.hero__lede {
  font-size: clamp(1rem, 1.1vw, 1.08rem);
  line-height: 1.8;
  max-width: 34em;
  color: var(--muted);
}

.hero__meta {
  margin-top: 18px;
  font-size: .8rem;
  color: var(--muted);
  font-family: var(--mono);
  letter-spacing: .04em;
}

/* ── 边角括号 ────────────────────────────────
   卡片四角各一对 L 形短线，像仪表盘的取景框。用 8 条 background 渐变画
   出来，只占一个伪元素——::after 已经被高光占用，::before 留给它。
   ───────────────────────────────────────────── */

.cap::before,
.prod::before,
.step::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  --bracket: 13px;
  --bracket-w: 1.5px;
  border-radius: inherit;
  background-image:
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size:
    var(--bracket) var(--bracket-w), var(--bracket-w) var(--bracket),
    var(--bracket) var(--bracket-w), var(--bracket-w) var(--bracket),
    var(--bracket) var(--bracket-w), var(--bracket-w) var(--bracket),
    var(--bracket) var(--bracket-w), var(--bracket-w) var(--bracket);
  background-position:
    left top, left top,
    right top, right top,
    left bottom, left bottom,
    right bottom, right bottom;
  opacity: .5;
  transition: opacity .25s ease, background-size .3s cubic-bezier(.16, 1, .3, 1);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .cap:hover::before,
  .prod:hover::before,
  .step:hover::after {
    --bracket: 22px;
    opacity: 1;
  }
}

/* ── 通用区块 ─────────────────────────────── */

.section {
  border-bottom: 1px solid var(--line);
  padding-block: clamp(56px, 8vw, 112px);
}

.section--panel { background: var(--bg-2); }

.section__inner {
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  /* A child that scrolls sideways (the screenshot row) would otherwise size
     this column to its scroll width and push the whole page wide. */
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 3.5vw, 56px);
}

@media (min-width: 900px) {
  .section__inner {
    grid-template-columns: minmax(140px, 1.2fr) minmax(0, 8.8fr);
    gap: clamp(32px, 4vw, 68px);
  }
}

.rail { align-self: start; }

@media (min-width: 900px) {
  .rail { position: sticky; top: calc(var(--bar) + 30px); }
}

.rail__title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .01em;
}

/* 区块编号：01 .. 04，等宽、小一号、分行显示在标题上方。 */
.rail__num {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.rail__total {
  margin-left: 6px;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--line-2);
}

/* ── 能力（bento 网格） ─────────────────────── */

.body--bento { display: grid; gap: clamp(12px, 1.4vw, 18px); }

@media (min-width: 880px) {
  .body--bento { grid-template-columns: repeat(12, 1fr); }
  .cap:nth-child(1) { grid-column: span 7; }
  .cap:nth-child(2) { grid-column: span 5; }
  .cap:nth-child(3),
  .cap:nth-child(4),
  .cap:nth-child(5) { grid-column: span 4; }
}

.cap {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(22px, 2.4vw, 30px);
  overflow: hidden;
  transition: border-color .2s ease, background-color .2s ease;
}

.cap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 100% 0%, rgba(124, 92, 255, .12), transparent 62%);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}

.cap:hover { border-color: var(--line-2); }
.cap:hover::after { opacity: 1; }

@media (min-width: 880px) {
  .cap:nth-child(1) { padding: clamp(26px, 3vw, 38px); }
  .cap:nth-child(1) h3 { font-size: clamp(1.35rem, 1.9vw, 1.7rem); }
}

.cap h3 {
  position: relative;
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -.015em;
  margin-bottom: 9px;
}

.cap p {
  position: relative;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.78;
  max-width: 40em;
}

/* ── 产品 ─────────────────────────────────── */

.body__lede {
  max-width: 46em;
  margin-bottom: clamp(16px, 2vw, 24px);
  color: var(--muted);
  font-size: .96rem;
  line-height: 1.85;
}

.prod-note {
  margin-bottom: clamp(14px, 1.6vw, 18px);
  padding: 10px 14px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.6;
}

.grid--products {
  display: grid;
  gap: clamp(12px, 1.4vw, 18px);
}

@media (min-width: 700px) {
  .grid--products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
  .grid--products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.prod {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(20px, 2.2vw, 26px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color .2s ease;
}

.prod::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 100% 0%, rgba(124, 92, 255, .12), transparent 62%);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}

.prod:hover { border-color: var(--line-2); }
.prod:hover::after { opacity: 1; }

.prod__icon {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
}

/* Placeholder icons are drawn from CSS, so no fake art has to be committed.
   Kept for entries added before their real artwork exists. */
.prod__icon--blank {
  display: block;
  background:
    linear-gradient(145deg, var(--accent), var(--accent-fill));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.prod__icon--blank[style*="--i:1"] { background: linear-gradient(145deg, var(--accent-2), #1F9E8D); }
.prod__icon--blank[style*="--i:2"] { background: linear-gradient(145deg, #4C6FFF, #2C3F9E); }

.prod__head {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.prod__name {
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -.015em;
}

.prod__genre {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--muted);
}

.prod__tagline {
  position: relative;
  flex: 1;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.78;
}

.prod__links {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Self-drawn store buttons. Replace with the official Apple/Google badges
   before launch — both have brand rules this deliberately does not meet. */
.store {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
  color: var(--text);
  transition: background-color .18s ease, border-color .18s ease;
}
a.store:hover { background: var(--panel-2); border-color: var(--accent); }

.store__arrow { color: var(--muted); font-size: .9em; }

.store--soon {
  color: var(--muted);
  border-style: dashed;
  font-weight: 500;
  cursor: default;
}

.prod--placeholder { border-style: dashed; }
.prod--placeholder:hover { border-color: var(--line); }

/* ── 方法 ─────────────────────────────────── */

.steps {
  counter-reset: step;
  display: grid;
  gap: clamp(14px, 1.6vw, 20px);
}

@media (min-width: 880px) {
  .steps { grid-template-columns: 1fr 1fr; }
}

.step {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: clamp(20px, 2.3vw, 28px);
  transition: border-color .2s ease;
}
.step:hover { border-color: var(--line-2); }

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .1em;
}

.step h3 {
  font-size: 1.06rem;
  font-weight: 650;
  letter-spacing: -.015em;
  line-height: 1.45;
}

.step p {
  margin-top: 8px;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.78;
  max-width: 34em;
}

/* ── 团队 ─────────────────────────────────── */

.body--prose { max-width: 46em; }

.about__lead {
  font-size: clamp(1.12rem, 1.7vw, 1.4rem);
  font-weight: 600;
  line-height: 1.62;
  letter-spacing: -.02em;
}

.body--prose > p + p {
  margin-top: 1.05em;
  color: var(--muted);
  line-height: 1.85;
}

/* ── 联系 ─────────────────────────────────── */

.contact {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 9vw, 132px) var(--gutter);
}

.contact::before {
  content: "";
  position: absolute;
  bottom: -55%;
  left: 50%;
  width: min(900px, 120%);
  aspect-ratio: 1.5;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(124, 92, 255, .2), transparent 70%);
  pointer-events: none;
}

.contact__inner {
  position: relative;
  max-width: var(--page);
  margin-inline: auto;
}

.contact__title {
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.03em;
  text-wrap: balance;
}

.contact__lede {
  margin-top: 20px;
  max-width: 40em;
  color: var(--muted);
  font-size: .96rem;
  line-height: 1.85;
}

.contact__mail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(26px, 3.6vw, 40px);
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--accent-fill);
  color: #fff;
  font-size: clamp(.98rem, 1.3vw, 1.1rem);
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
  box-shadow: 0 10px 34px rgba(110, 77, 240, .38);
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.contact__mail:hover {
  transform: translateY(-2px);
  background: #7C5CFF;
  box-shadow: 0 14px 40px rgba(124, 92, 255, .46);
}
.contact__mail:active { transform: translateY(0); }

/* ── 应用页 ───────────────────────────────── */

.crumb {
  font-size: .82rem;
  color: var(--muted);
}
.crumb a {
  text-decoration: none;
  transition: color .18s ease;
}
.crumb a:hover { color: var(--text); }
.crumb a::before { content: "← "; }

.app-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.app-hero::before {
  content: "";
  position: absolute;
  top: -40%;
  left: 12%;
  width: min(900px, 110%);
  aspect-ratio: 1.5;
  background: radial-gradient(ellipse at center, rgba(124, 92, 255, .2), transparent 68%);
  pointer-events: none;
}

.app-hero__inner {
  position: relative;
  max-width: var(--page);
  margin-inline: auto;
  padding: clamp(36px, 5vw, 64px) var(--gutter) clamp(40px, 5vw, 68px);
}

.app-hero__main {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 30px);
  margin-top: clamp(22px, 3vw, 34px);
}

.app-hero__icon {
  width: clamp(72px, 8vw, 88px);
  height: clamp(72px, 8vw, 88px);
  border-radius: 20px;
  flex: 0 0 auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.app-hero__name {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.03em;
  text-wrap: balance;
}

.app-hero__tagline {
  margin-top: 12px;
  max-width: 32em;
  color: var(--muted);
  font-size: clamp(.98rem, 1.15vw, 1.08rem);
  line-height: 1.75;
}

.app-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 0;
  margin-top: clamp(26px, 3.4vw, 38px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.app-meta > div {
  padding-right: clamp(20px, 3vw, 40px);
  margin-right: clamp(20px, 3vw, 40px);
  border-right: 1px solid var(--line);
}
.app-meta > div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }

.app-meta dt {
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .05em;
  text-transform: uppercase;
  font-family: var(--mono);
}

.app-meta dd {
  margin-top: 3px;
  font-size: .9rem;
  font-weight: 500;
}

.app-meta .mono {
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--muted);
}

.app-stores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(22px, 3vw, 32px);
}

.store--lg { padding: 11px 22px; font-size: .9rem; }

@media (max-width: 560px) {
  .app-hero__main { align-items: flex-start; }
  .app-meta > div { border-right: 0; margin-right: 0; padding-right: 0; width: 50%; }
}

/* 功能清单 */

.ticks {
  display: grid;
  gap: clamp(12px, 1.4vw, 16px);
}

@media (min-width: 760px) {
  .ticks { grid-template-columns: 1fr 1fr; }
}

.ticks li {
  position: relative;
  list-style: none;
  padding: 16px 20px 16px 46px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: .93rem;
  line-height: 1.7;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 24px;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(53, 214, 192, .14);
}

/* 截图 */

.shots {
  display: flex;
  gap: clamp(12px, 1.6vw, 20px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
  /* Let the row bleed to the gutter edge on narrow screens so the last
     shot is not clipped mid-frame. */
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
}
.shots::-webkit-scrollbar { display: none; }

.shot {
  flex: 0 0 auto;
  width: clamp(180px, 46vw, 240px);
  scroll-snap-align: start;
}

.shot img {
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .35);
}

.shot figcaption {
  margin-top: 10px;
  font-size: .82rem;
  line-height: 1.6;
  color: var(--muted);
}

@media (min-width: 900px) {
  .shots {
    margin-inline: 0;
    padding-inline: 0;
  }
}

/* 应用页的产品卡片：标题是指向详情页的链接 */
.prod__name a {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .25s ease;
}
.prod__name a:hover { background-size: 100% 1px; }

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

/* The secondary action sits beside the mail button without competing. */
.contact__alt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(26px, 3.6vw, 40px);
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease;
}
.contact__alt:hover { background: var(--panel-2); border-color: var(--accent); }

/* ── 法律页 ───────────────────────────────── */

.legal-page {
  padding: clamp(36px, 5vw, 64px) 0 clamp(56px, 8vw, 104px);
}

.legal-page__inner {
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.legal__head {
  max-width: 46em;
  margin-top: clamp(20px, 3vw, 30px);
  padding-bottom: clamp(24px, 3.4vw, 36px);
  border-bottom: 1px solid var(--line);
}

.legal__head h1 {
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.legal__meta {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--muted);
  letter-spacing: .03em;
}

.legal__head > p:not(.legal__meta) {
  margin-top: 18px;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.85;
}

.legal__layout {
  display: grid;
  gap: clamp(28px, 4vw, 64px);
  margin-top: clamp(28px, 4vw, 48px);
  /* The chip row scrolls on its own; without this the grid column grows to
     the row's content width and pushes the page sideways. */
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 980px) {
  .legal__layout {
    grid-template-columns: minmax(200px, 1fr) minmax(0, 3.4fr);
    align-items: start;
  }
  .legal__toc { min-width: 0; }
  .legal__toc { position: sticky; top: calc(var(--bar) + 28px); }
}

.legal__toc {
  font-size: .82rem;
  line-height: 1.5;
}

.legal__toc-title {
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}

.legal__toc ol {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--line);
}

.legal__toc a {
  display: block;
  padding: 6px 0 6px 14px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
  transition: color .18s ease, border-color .18s ease;
}
.legal__toc a:hover { color: var(--text); border-left-color: var(--accent); }

/* Below the breakpoint the contents list is a scrollable chip row. */
@media (max-width: 979px) {
  .legal__toc ol {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    border-left: 0;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .legal__toc ol::-webkit-scrollbar { display: none; }
  .legal__toc a {
    padding: 6px 12px;
    margin-left: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    white-space: nowrap;
    flex: 0 0 auto;
  }
  .legal__toc a:hover { border-color: var(--accent); }
}

.legal {
  max-width: 44em;
}

.legal__section {
  padding-top: clamp(20px, 2.6vw, 30px);
  scroll-margin-top: calc(var(--bar) + 26px);
}
.legal__section + .legal__section {
  margin-top: clamp(20px, 2.6vw, 30px);
  border-top: 1px solid var(--line);
}

.legal__section h2 {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  font-weight: 650;
  letter-spacing: -.012em;
  line-height: 1.4;
  margin-bottom: 14px;
}

.legal p {
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.85;
}
.legal p + p,
.legal p + ul,
.legal p + dl,
.legal ul + p,
.legal dl + p { margin-top: 12px; }

.legal a {
  color: var(--text);
  text-decoration-color: var(--line-2);
  text-underline-offset: 3px;
  transition: text-decoration-color .18s ease;
}
.legal a:hover { text-decoration-color: var(--accent); }

.legal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-list li {
  position: relative;
  list-style: none;
  padding-left: 18px;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.8;
}
.legal-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.legal-dl {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
}

.legal-dl > div {
  display: grid;
  gap: 2px;
  grid-template-columns: minmax(90px, 140px) 1fr;
  font-size: .92rem;
}
.legal-dl dt { color: var(--muted); }
.legal-dl dd { margin: 0; color: var(--text); }

@media (max-width: 520px) {
  .legal-dl > div { grid-template-columns: 1fr; }
}

/* ── 页脚 ─────────────────────────────────── */

.footer {
  border-top: 1px solid var(--line);
  padding: 26px var(--gutter);
}

.footer__inner {
  max-width: var(--page);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 28px;
  font-size: .8rem;
  color: var(--muted);
}

.footer a {
  display: inline-block;
  padding-block: 4px;
  text-decoration: none;
  transition: color .18s ease;
}
.footer a:hover { color: var(--text); }

/* ── 404 ─────────────────────────────────── */

.nf {
  min-height: 100dvh;
  max-width: var(--page);
  margin-inline: auto;
  padding: clamp(72px, 14vw, 180px) var(--gutter) clamp(48px, 8vw, 96px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.nf__code {
  font-family: var(--mono);
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--line-2);
}

.nf__title {
  margin-top: clamp(18px, 3vw, 28px);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -.02em;
}

.nf__lede {
  margin-top: 14px;
  max-width: 34em;
  color: var(--muted);
  font-size: .96rem;
  line-height: 1.85;
}

.nf__link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  margin-top: clamp(26px, 3.6vw, 40px);
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--accent-fill);
  color: #fff;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
  box-shadow: 0 10px 34px rgba(110, 77, 240, .38);
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.nf__link:hover {
  transform: translateY(-2px);
  background: #7C5CFF;
  box-shadow: 0 14px 40px rgba(124, 92, 255, .46);
}
.nf__link:active { transform: translateY(0); }

.nf__langs {
  margin-top: clamp(28px, 4vw, 44px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: .82rem;
  color: var(--muted);
}

.nf__langs a {
  margin-inline: 6px;
  text-decoration: none;
  transition: color .18s ease;
}
.nf__langs a:hover { color: var(--text); }

@media (max-width: 560px) {
  .nf__link { align-self: stretch; justify-content: center; }
}

/* ── 动效 ─────────────────────────────────────
   全部动效都收在 prefers-reduced-motion: no-preference 里。这一层的
   元素默认就是可见的，动画只是把它"补"进去，所以脚本没跑、或浏览器
   不认某个特性时，内容照常显示，不会留一屏透明。
   ───────────────────────────────────────────── */

/* 跨页切换：浏览器原生交叉淡入，一行就够，不支持时无副作用。 */
@view-transition { navigation: auto; }

/* 悬停位移：只在真有指针的设备上做，触屏不会留下粘住的悬停态。 */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .prod,
  .cap,
  .step,
  .shot {
    transition: border-color .2s ease, background-color .2s ease,
                transform .3s cubic-bezier(.16, 1, .3, 1);
  }
  .prod:hover,
  .cap:hover,
  .step:hover { transform: translateY(-3px); }

  .shot img { transition: transform .35s cubic-bezier(.16, 1, .3, 1), border-color .2s ease; }
  .shot:hover img { transform: translateY(-4px); border-color: var(--line-2); }

  /* 商店按钮的箭头顺着方向走：出去的外链向右上，站内的"详情"向右。 */
  .store__arrow { transition: transform .2s cubic-bezier(.16, 1, .3, 1); }
  a.store:hover .store__arrow { transform: translate(2px, -2px); }
  a.store:hover .store__arrow--right { transform: translateX(3px); }

  .ticks li { transition: border-color .2s ease, transform .25s cubic-bezier(.16, 1, .3, 1); }
  .ticks li:hover { transform: translateY(-2px); border-color: var(--line-2); }

  /* ── 指针响应 ───────────────────────────────
     main.js 把指针位置写进 --mx / --my，这里只负责用它。坐标默认落在
     卡片中心，所以没有指针时高光是静止的，不会空转。 */
  .cap,
  .prod,
  .step {
    --mx: 50%;
    --my: 50%;
  }

  .cap::after,
  .prod::after {
    background: radial-gradient(
      240px circle at var(--mx) var(--my),
      rgba(138, 109, 255, .22),
      transparent 62%
    );
  }

  /* 跟随指针的暖光，和现有的角标高光叠在一起。 */
  .cap:hover::before,
  .prod:hover::before {
    background-color: rgba(138, 109, 255, .03);
  }

  /* 3D 倾斜：幅度压在 4° 以内，超过就开始像廉价的产品展示页。 */
  .prod,
  .cap {
    transform-style: preserve-3d;
    will-change: transform;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__line {
    animation: line-in .7s cubic-bezier(.16, 1, .3, 1) backwards;
    animation-delay: calc(var(--n, 0) * 70ms);
  }

  @keyframes line-in {
    from { opacity: 0; transform: translateY(.32em); }
  }

  /* 首屏的光晕缓慢漂移，让静态页面有一点呼吸。 */
  .hero::before {
    animation: drift 26s ease-in-out infinite alternate;
  }
  @keyframes drift {
    from { transform: translateX(-50%) translateY(-2%) scale(1); opacity: .85; }
    to   { transform: translateX(-46%) translateY(3%) scale(1.08); opacity: 1; }
  }

  /* 联系区的按钮光晕同理，周期更长。 */
  .contact::before { animation: drift 32s ease-in-out infinite alternate-reverse; }

  /* 扫描线：8% 的时间在扫，其余时间停在下方视野外。 */
  .hero__scan::before {
    animation: scan 20s cubic-bezier(.4, 0, .6, 1) infinite;
  }
  @keyframes scan {
    0%   { transform: translateY(-220px); }
    8%   { transform: translateY(calc(100vh + 60px)); }
    100% { transform: translateY(calc(100vh + 60px)); }
  }

  /* ── 滚动入场 ───────────────────────────────
     支持 animation-timeline 的浏览器走纯 CSS 滚动时间线：动画进度直接
     绑定滚动位置，不占主线程，也不会在快速滚动时掉帧。 */
  @supports (animation-timeline: view()) {
    [data-reveal] {
      animation: reveal-in linear both;
      animation-timeline: view();
      /* 略微错峰，同一行的卡片不会整齐划一地一起出现。 */
      animation-range: entry calc(2% + var(--i, 0) * 3%) cover calc(40% + var(--i, 0) * 3%);
    }
    .rail__title[data-reveal] {
      animation-range: entry 2% cover 30%;
    }
  }

  /* 入场动画用 translate，而不是 transform。
     transform 留给悬停位移和指针倾斜——三条规则各占一个独立属性，
     否则滚动时间线的动画会一直压着悬停状态，卡片永远浮不起来。 */
  @keyframes reveal-in {
    from { opacity: 0; translate: 0 18px; }
    to   { opacity: 1; translate: 0 0; }
  }
}

/* 没有滚动时间线的浏览器（Safari、旧 Firefox）走这条：main.js 先给
   <html> 加上 .reveal-js，再用 IntersectionObserver 逐个点亮。类名由脚本
   添加，所以脚本没跑时下面这些规则完全不生效。
   @supports not 让两条路径在同一引擎里互斥：支持滚动时间线时这段整块不
   生效，即使脚本判断出错也不会出现"动画和过渡同时作用"的打架。 */
@supports not (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal-js [data-reveal] {
      opacity: 0;
      translate: 0 18px;
      transition: opacity .6s cubic-bezier(.16, 1, .3, 1),
                  translate .6s cubic-bezier(.16, 1, .3, 1);
      transition-delay: min(calc(var(--i, 0) * 60ms), 300ms);
    }
    .reveal-js [data-reveal].is-in {
      opacity: 1;
      translate: 0 0;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; animation-delay: 0s !important; }
  /* 减弱动态时，入场元素一律直接可见。 */
  [data-reveal] { opacity: 1 !important; translate: none !important; }
}
