/* 多端下载页 · 375 手机稿 / 834 平板稿 / 1440 电脑稿 */

:root {
  --brand: #483f61;
  --ink: #1a1a1a;
  --ink-title: #252032;
  --text-2: #8a8f9c;
  --text-3: #827c90;
  --text-hero-sub: #70697d;
  --text-badge: #6e6293;
  --line: #e5e9f0;
  --line-qr: #e8e3f0;

  --fs-title: 32px;
}

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

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

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* 🔴 `height: auto` 不能省。HTML 上的 width/height 属性是「呈现属性」——
   它是一条真实的 CSS 声明，会把 `aspect-ratio` 顶掉。漏了这条，产品特性图的盒子
   在窄屏下会变成「列宽 × 262」的扁盒：图被 object-fit 居中留白(看着没左对齐)，
   圆角圆的又是盒子而不是图(看着不干净)。1440 下四列正好 262、盒子是方的，
   所以只有窄屏才露馅。 */
img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* 内容宽：375 → 335，1440 → 1120。两端都与稿逐值吻合。 */
.wrap {
  width: min(100% - 40px, 1120px);
  margin-inline: auto;
}

/* ── 顶栏 ───────────────────────────────────────────── */
.topbar {
  box-shadow: inset 0 -1px var(--line);
  background: #fff;
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 56px;
}

.topbar__logo {
  width: 28px;
  height: 28px;
}

.topbar__name {
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}

/* ── 首屏 ───────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background: #fff;
}

.hero__grid {
  position: relative;
  z-index: 1;
  padding-block: 28px 0;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 552px;
}

.hero__intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero__badge {
  margin: 0;
  font-weight: 500;
  font-size: 12px;
  line-height: 18px;
  color: var(--text-badge);
}

.hero__title {
  margin: 0;
  font-weight: 700;
  font-size: var(--fs-title);
  line-height: 1.375;
  color: var(--ink-title);
}

.hero__sub {
  margin: 0;
  font-weight: 400;
  font-size: 14px;
  line-height: 21px;
  color: var(--text-hero-sub);
}

/* 下载按钮。稿上两颗都是 flex:1 —— 160/163 是 375 宽下的结果，不是规格。 */
.dl {
  display: flex;
  gap: 12px;
}

.dl__btn {
  flex: 1 0 0;
  min-width: 0;
  max-width: 208px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-inline: 12px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 14px;
  line-height: 22px;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.dl__btn:hover {
  opacity: 0.9;
}

.dl__btn img {
  width: 24px;
  height: 24px;
  flex: none;
}

.dl__btn--ios {
  background: var(--brand);
  color: #fff;
}

.dl__btn--android {
  background: #fff;
  border: 1.5px solid var(--line);
  color: var(--ink);
}

/* 地址未配置时按钮渲染成 <span>，不可点。 */
.dl__btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.dl__note {
  margin: 0;
  font-size: 12px;
  line-height: 18px;
  color: var(--text-2);
}

/* 手机扫码 —— 给「用电脑看、用手机装」的人。窄屏下扫自己的屏幕没有意义，隐藏。 */
.desktop-entry, .qr {
  display: none;
}
.qr {
  align-items: center;
  gap: 14px;
  width: 378px;
  max-width: 100%;
}

.qr__img {
  width: 88px;
  height: 88px;
  flex: none;
}

.qr__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.qr__main {
  margin: 0;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  color: var(--brand);
}

.qr__guides {
  display: flex;
  flex-wrap: wrap;
  gap: 0 14px;
}
.qr__guides a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--brand);
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
}

/* 小屏首屏的插画出血到两侧。 */
.hero__art {
  display: flex;
  justify-content: center;
  /* 手机首屏的 24 px 下内距在通栏插画之前。 */
  margin-block-start: 24px;
  margin-inline: calc(50% - 50vw);
  padding: 0 calc(50vw - 50%) 1px;
  background: url("img/hero-bg-mobile.svg") center bottom / cover no-repeat;
}

/* 导出图含机身四周的透明阴影，236 px 是整张图的显示宽度。 */
.hero__phone {
  width: 236px;
  height: auto;
}

/* ── 通用分区 ───────────────────────────────────────── */
.section {
  padding-block: 40px;
}

.section--features {
  padding-top: 32px;
}

.section__title {
  margin: 0 0 20px;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
  color: var(--ink);
}

.section__sub {
  margin: 0 0 20px;
  font-weight: 400;
  font-size: 14px;
  line-height: 22px;
  color: var(--text-2);
}

/* ── 产品介绍 ───────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 16px;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 20px;
}

.feature__name {
  margin: 0;
  font-weight: 700;
  font-size: 18px;
  line-height: 27px;
  color: var(--brand);
}

.feature__desc {
  margin: 0;
  font-weight: 400;
  font-size: 13px;
  line-height: 20px;
  color: var(--text-3);
}

/* ── 安装步骤 ───────────────────────────────────────── */
.steps {
  display: grid;
  align-items: start;
  gap: 20px;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.step__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.step__no {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  font-weight: 500;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step__name {
  margin: 0;
  flex: 1 0 0;
  min-width: 0;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.3;
  color: var(--ink);
}

.step__desc {
  margin: 0;
  font-weight: 400;
  font-size: 13px;
  line-height: 20px;
  color: var(--text-2);
}

.step__shot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.step__shot img {
  width: 100%;
  max-width: 252px;
  height: auto;
  border-radius: 12px;
}

.step__shot--wide img {
  max-width: 285px;
}

.step__caption {
  margin: 0;
  line-height: 16px;
  font-weight: 500;
  font-size: 13px;
  color: var(--brand);
}

.step__shot--flat img {
  max-width: none;
  border-radius: 10px;
}

/* ── 页尾 ───────────────────────────────────────────── */
.footer {
  box-shadow: inset 0 1px var(--line);
  background: #fff;
  padding-block: 28px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.footer__logo {
  width: 25.6px;
  height: 25.6px;
}

.footer__name {
  font-weight: 700;
  font-size: 16.8px;
  line-height: 26px;
  color: var(--ink);
}

.footer__copy {
  margin: 0;
  font-size: 11px;
  line-height: 17px;
  color: var(--text-3);
}

.guide-line, .footer__notice {
  display: block;
}
.guide-punctuation, .footer__separator, .wide-copy {
  display: none;
}

@media (width <= 768px) {
  .hero__copy, .dl__btn { max-width: none; }
  .step__shot--flat { position: relative; aspect-ratio: 293 / 76; }
  .step:last-child .step__shot--flat { aspect-ratio: 293 / 103; }
  .step__shot--flat img { position: absolute; inset: 0; height: 100%; object-fit: contain; }
}

@media (width > 768px) {
  .wrap { width: min(100% - 96px, 1120px); }
  .topbar__inner { height: 64px; }
  .hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 268px);
    gap: 32px;
    align-items: center;
    min-height: 448px;
    padding-block: 18px;
  }
  .hero__art { margin: 0; padding: 0; background: none; }
  .hero__phone { width: 214px; }
  .hero__title { font-size: 40px; }
  .dl { max-width: 335px; }
  .mobile-device .hero__copy { gap: 26px; }
  .mobile-device .hero__title { font-size: 44px; line-height: 58px; }
  .mobile-device .hero__sub { font-size: 16px; line-height: 24px; }
  .mobile-device .hero__art { height: 406px; align-items: center; }
  /* 导出的底部阴影比顶部多，按画板对齐可见机身的中心。 */
  .mobile-device .hero__phone { width: 236px; transform: translateY(9px); }
  html:not(.mobile-device) {
    .mobile-entry { display: none; }
    .desktop-entry { display: block; }
    .qr, .desktop-download { display: flex; }
    .desktop-download {
      flex: none;
      width: 176px;
      gap: 9px;
      font-size: 16px;
      background: var(--brand);
      color: white;
    }
    .desktop-download img { width: 20px; height: 20px; }
    .hero__grid {
      grid-template-columns: minmax(320px, 418fr) minmax(0, 658fr);
      gap: min(3.2vw, 44px);
      padding-block: 0;
    }
    .hero__copy { gap: 26px; padding-block: 32px; }
    .hero__intro { gap: 10px; }
    .hero__badge { font-size: 13px; line-height: 20px; }
    .hero__sub { font-size: 16px; line-height: 24px; }
    .hero__art {
      position: relative;
      aspect-ratio: 658 / 560;
    }
    .hero__art::before {
      content: "";
      position: absolute;
      inset: 11.07% auto auto 0;
      width: 96.66%;
      aspect-ratio: 636 / 414;
      background: url("img/hero-desktop.png") center / contain no-repeat;
    }
    /* 共享手机 PNG 含透明阴影，以下位置按桌面稿里的可见机身对齐。 */
    .hero__phone { position: absolute; width: 26.8%; left: 72.4%; top: 35.7%; }
    #desktop-downloads .section__title { font-size: 32px; margin: 0; }
  }

  .section { padding-block: 32px; }
  .section--features { padding-block: 24px 32px; }
  .features { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .steps--ios { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .section__title { margin-bottom: 6px; font-size: 28px; line-height: 38px; color: #252033; }
  .section__sub { margin-bottom: 20px; font-size: 15px; line-height: 24px; color: #625d70; }
  .guide-line, .guide-punctuation, .wide-copy { display: inline; }
  .narrow-copy { display: none; }
  .step { padding: 16px 14px; gap: 8px; border-color: #e4dfeb; }
  .step__name { font-weight: 700; font-size: 18px; line-height: 27px; color: #252033; }
  .step__desc { font-size: 14px; line-height: 21px; color: #625d70; }
  .step__no { font-size: 14px; line-height: 22px; }
  .steps--ios .step__desc { min-height: 76px; }
  .step__shot { margin-top: 4px; }
  .steps--ios .step__shot { min-height: 332px; justify-content: center; }
  .steps--ios .step__shot img { max-width: 144px; }
  .steps--ios .step__shot--wide { padding-inline: 7px; gap: 8px; }
  .steps--ios .step__shot--wide img { max-width: 285px; }
  .section--android .step__desc { min-height: 52px; }
  .footer { padding-block: 26px; }
}

/* 宽屏平板沿用平板稿，宽屏电脑才切换到 1440 稿的尺寸。 */
@media (min-width: 1024px) {
  html:not(.mobile-device) {
    .topbar__inner { height: 72px; gap: 12px; }
    .topbar__logo { width: 32px; height: 32px; }
    .topbar__name { font-size: 20px; }
    .hero__grid { min-height: 560px; }
    .hero__copy { align-self: start; padding-block: 68px 32px; }
    .hero__title { font-size: clamp(42px, 4.5vw, 54px); line-height: 1.2593; }
    #desktop-downloads { padding-block: 40px; }
    .section--features { padding-block: 48px; }
    .section:not(.section--features) { padding-block: 24px; }
    .section.section--android { padding-bottom: 52px; }
    .features, .steps { gap: 24px; }
    .section__sub { margin-bottom: 24px; }
    .step { padding: 20px; gap: 8px; }
    .step__desc { font-size: 15px; line-height: 23px; }
    .steps--ios .step__desc { min-height: 70px; }
    .section--android .step__desc { min-height: 48px; }
    .step__shot { margin-top: 8px; }
    .steps--ios .step__shot { min-height: 450px; }
    .steps--ios .step__shot img { max-width: 199px; }
    .steps--ios .step__shot--wide { padding: 0; gap: 14px; }
    .steps--ios .step__shot--wide img { max-width: 285px; }
    .footer { padding-block: 36px 32px; }
    .footer__brand { gap: 10px; margin-bottom: 8px; }
    .footer__logo { width: 28px; height: 28px; }
    .footer__name { font-size: 16px; font-weight: 500; }
    .footer__copy { font-size: 13px; line-height: 16px; color: var(--text-2); }
    .footer__notice, .footer__separator { display: inline; }
  }
}

/* 桌面包在所有电脑上按平台展示，两个 Mac 芯片共用一张卡。 */
#desktop-downloads > .wrap { display: grid; gap: 22px; }
.platforms {
  display: grid;
  grid-template-columns: minmax(0, 270fr) minmax(0, 548fr) minmax(0, 270fr);
  gap: 16px;
}
.platform {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 176px;
  padding: 19px;
  border: 1px solid #e4dfeb;
  border-radius: 18px;
}
.platform h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: #252033;
  font-size: 23px;
  line-height: 32px;
}
.platform__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
}
.platform__icon--windows { background: #edf5ff; }
.platform__icon--ubuntu { background: #fff0e9; }
.platform p { margin: 16px 0 12px; color: #675f76; font-size: 14px; line-height: 24px; }
.platform__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; }
.platform__links > * {
  display: flex;
  flex: 1 1 94px;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  min-height: 44px;
  border-radius: 10px;
  background: #efecf5;
  color: var(--brand);
  font-size: 16px;
  line-height: 22px;
  font-weight: 500;
  text-decoration: none;
}
.platform__links > *::after {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  background: url("img/download-package.svg") center / contain no-repeat;
}
.platform__links > [aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.platform__links a:hover { background: #e4dfeb; }
.platform__icon--macos img { width: 40px; }
.platform__icon--windows img { width: 24px; }
.platform__icon--ubuntu img { width: 26px; }
.mac-guide h3 { margin: 0 0 6px; color: #252033; font-size: 24px; line-height: 34px; }
.mac-guide .section__sub { margin-bottom: 20px; }
.mac-guide__steps {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 24px;
}
#desktop-downloads .step { padding: 19px; gap: 16px; }
.mac-guide__copy { min-height: 80px; }
.mac-guide .step__no { font-weight: 700; }
.mac-guide .step__name { font-size: 17px; line-height: 26px; }
#desktop-downloads .step__desc { margin-top: 8px; font-size: 14px; line-height: 22px; }
.mac-guide__shot { margin-top: auto; overflow: hidden; border-radius: 8px; aspect-ratio: 508 / 276; background: #f6f5f8; }
.mac-guide__shot img { width: 100%; height: 100%; object-fit: cover; }
.mac-guide .step:nth-child(2) img { object-position: center 11.9%; }
.mac-guide .step:last-child img { object-fit: contain; }
@media (min-width: 769px) and (max-width: 1040px) {
  .platforms { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr); }
  .platform { padding: 14px; }
  .platform h3 { gap: 8px; font-size: 19px; }
  .platform__links > * { padding-inline: 8px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
