/* 页面表层：只引用 tokens 变量；字号阶跃（非 clamp）。单主题 colorful。 */

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes phone-float {
  from {
    transform: rotate(-6deg) translate(-8%, 12px);
  }
  to {
    transform: rotate(-6deg) translate(-8%, 0);
  }
}

@keyframes wash-shift {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 100% 50%;
  }
}

.hero {
  background: linear-gradient(
    135deg,
    var(--color-hero-from) 0%,
    var(--color-hero-via) 48%,
    var(--color-hero-to) 100%
  );
  background-size: 160% 160%;
  animation: wash-shift 14s ease-in-out infinite alternate;
  height: var(--hero-min-h);
  min-height: var(--hero-min-h);
  max-height: var(--hero-min-h);
  display: flex;
  align-items: stretch;
  overflow: hidden;
  color: var(--color-text-on-deep);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-block: 32px 0;
  width: 100%;
  min-width: 0;
  height: 100%;
}

.hero__copy {
  min-width: 0;
  max-width: 36rem;
  animation: hero-rise 0.7s ease-out both;
}

.hero h1,
.page-hero h1,
.band h2,
.section-head h2 {
  margin: 0;
  font-size: var(--h1-size);
  line-height: var(--h1-lh);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  overflow-wrap: normal;
  word-break: keep-all;
}

/* 首屏标语：限制行宽 + balance，避免「…消息必」/「达」孤字 */
.hero h1 {
  max-width: 11.5em;
  text-wrap: balance;
}

@supports not (text-wrap: balance) {
  .hero h1 {
    max-width: 9.5em;
  }
}

.hero h1,
.hero__lead {
  color: var(--color-text-on-deep);
}

.band h2,
.section-head h2,
.feature-split h2,
.feature-detail h2,
.download-card__title {
  font-size: var(--h2-size);
  line-height: var(--h2-lh);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero__lead,
.band__lead,
.lead {
  margin: 1rem 0 0;
  color: var(--color-text-primary);
  font-size: 1.0625rem;
  line-height: 1.45;
  max-width: 36rem;
}

.hero__lead {
  color: rgba(255, 255, 255, 0.94);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.25rem;
  background: var(--color-cta-bg);
  color: var(--color-cta-fg);
  text-decoration: none;
  border-radius: var(--radius-cta);
  font-weight: 700;
  border: 1px solid var(--color-cta-bg);
  box-shadow: 0 8px 20px var(--color-shadow);
}

.cta:hover,
.cta:focus-visible {
  background: var(--color-cta-hover);
  border-color: var(--color-cta-hover);
  color: var(--color-cta-fg);
}

.cta--secondary {
  background: var(--color-cta-secondary-bg);
  color: var(--color-cta-secondary-fg);
  border-color: var(--color-cta-secondary-border);
  box-shadow: 0 4px 14px var(--color-shadow);
}

.cta--secondary:hover,
.cta--secondary:focus-visible {
  color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  background: var(--color-cta-secondary-bg);
}

/*
 * 首屏 CTA 主次：
 * 主「下载」——金黄实心、发光+投影漂浮感（height 50 / pad 14×28 / 17px）
 * 次「了解特性」——浅描边降噪、矮一档（height 40 / pad 8×16 / 14px），不用橙实心
 */
.cta--primary-hero {
  min-height: 50px;
  height: 50px;
  padding: 14px 28px;
  font-size: 17px;
  line-height: 1;
  background: linear-gradient(180deg, var(--color-cta-hero-bg) 0%, var(--color-cta-hero-bg-2) 100%);
  color: var(--color-cta-hero-fg);
  border-color: var(--color-cta-hero-edge);
  box-shadow:
    inset 0 1px 0 var(--color-cta-hero-edge),
    0 8px 32px 0 var(--color-cta-hero-glow),
    0 18px 36px -2px var(--color-cta-hero-shadow);
  transform: translateY(0);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.cta--primary-hero:hover,
.cta--primary-hero:focus-visible {
  background: linear-gradient(180deg, var(--color-cta-hero-hover) 0%, var(--color-cta-hero-hover-2) 100%);
  border-color: var(--color-cta-hero-edge);
  color: var(--color-cta-hero-fg);
  box-shadow:
    inset 0 1px 0 var(--color-cta-hero-edge),
    0 12px 40px 2px var(--color-cta-hero-glow),
    0 22px 40px -2px var(--color-cta-hero-shadow);
  transform: translateY(-2px);
}

.cta--secondary-hero {
  min-height: 40px;
  height: 40px;
  padding: 8px 16px;
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-brand-white);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: none;
  align-self: center;
}

.cta--secondary-hero:hover,
.cta--secondary-hero:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--color-brand-white);
  color: var(--color-brand-white);
}

.cta--on-hero {
  background: var(--color-brand-white);
  color: var(--color-brand-blue-ink);
  border-color: transparent;
}

.cta--on-hero:hover,
.cta--on-hero:focus-visible {
  background: var(--color-brand-highlight);
  color: var(--color-brand-blue-ink);
  border-color: transparent;
}

.cta--mark {
  background: var(--color-cta-mark-bg);
  border-color: var(--color-cta-mark-bg);
  color: var(--color-cta-mark-fg);
  box-shadow: 0 8px 20px rgba(160, 88, 16, 0.28);
}

.cta--mark:hover,
.cta--mark:focus-visible {
  background: var(--color-cta-mark-hover);
  border-color: var(--color-cta-mark-hover);
  color: var(--color-cta-mark-fg);
}

.hero__phones {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 0;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  padding-bottom: 0;
  overflow: hidden;
  animation: hero-rise 0.85s ease-out 0.12s both;
}

.phone {
  width: min(240px, 58vw);
  height: auto;
  max-width: 46%;
  filter: drop-shadow(0 24px 40px var(--color-shadow));
}

.phone--back {
  transform: rotate(-10deg) translate(8%, 6%);
  z-index: 1;
  opacity: 0.96;
}

.phone--front {
  transform: rotate(-6deg) translate(-8%, 0);
  z-index: 2;
  margin-left: -12%;
  animation: phone-float 3.6s ease-in-out 0.8s infinite alternate;
}

.band {
  padding-block: 72px;
  background: var(--color-page-bg);
}

.band--tint {
  background: linear-gradient(
    180deg,
    var(--color-wash-sky) 0%,
    var(--color-wash-mist) 100%
  );
}

.band--surface {
  background: var(--color-surface);
}

.band--deep {
  background: linear-gradient(
    120deg,
    var(--color-brand-navy) 0%,
    var(--color-band-deep) 100%
  );
  color: var(--color-text-on-deep);
}

.band--deep h2,
.band--deep .band__lead,
.band--deep .section-head h2 {
  color: var(--color-text-on-deep);
}

.band--accent {
  background: linear-gradient(
    90deg,
    var(--color-brand-orange-deep) 0%,
    var(--color-brand-orange-mid) 100%
  );
  color: var(--color-text-on-deep);
}

.section-head {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2.5rem;
}

.section-head .band__lead {
  margin-inline: auto;
}

.feature-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

.feature-card {
  min-width: 0;
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 20px;
  background: var(--color-surface);
  box-shadow: 0 10px 28px rgba(10, 70, 140, 0.08);
}

.feature-card:nth-child(2n) {
  background: linear-gradient(
    160deg,
    var(--color-wash-mist) 0%,
    var(--color-wash-cyan) 100%
  );
}

.feature-card:nth-child(3n) {
  background: linear-gradient(
    160deg,
    var(--color-wash-warm) 0%,
    var(--color-wash-mist) 100%
  );
}

.feature-card__art {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
}

.feature-card__art img {
  width: 100%;
  height: auto;
  border-radius: 24px;
}

.feature-card h2 {
  margin: 0;
  font-size: var(--h2-size);
  line-height: var(--h2-lh);
  font-weight: 800;
}

.feature-card p {
  margin: 0;
  color: var(--color-text-secondary);
}

.feature-split {
  display: grid;
  gap: 2rem;
  align-items: center;
  margin: 0 0 4rem;
  min-width: 0;
  padding: 1.5rem;
  border-radius: 24px;
  background: var(--color-surface);
}

.feature-split:nth-child(even) {
  background: linear-gradient(
    120deg,
    var(--color-wash-sky) 0%,
    var(--color-surface) 70%
  );
}

.feature-split:last-child {
  margin-bottom: 0;
}

.feature-split__art {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
}

.feature-split__art img {
  width: 100%;
  height: auto;
  border-radius: 24px;
}

.feature-split h2 {
  margin: 0 0 0.75rem;
}

.feature-split p {
  margin: 0 0 0.75rem;
  color: var(--color-text-secondary);
}

.feature-how {
  color: var(--color-text-primary);
}

.feature-how__label {
  color: var(--color-mark);
  font-weight: 700;
}

.page {
  padding-block: 48px 72px;
  min-width: 0;
}

.page-hero {
  margin-bottom: 2rem;
  max-width: 40rem;
}

.page-hero__art {
  width: min(420px, 100%);
  margin: 1.5rem 0 0;
  aspect-ratio: 1 / 1;
}

.page-hero__art img {
  width: 100%;
  height: auto;
  border-radius: 24px;
}

.draft-notice {
  margin: 0 0 0.75rem;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--color-mark);
  background: var(--color-band-bg);
  color: var(--color-text-primary);
  font-weight: 700;
}

.legal-effective {
  margin: 0 0 1.5rem;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.legal-body,
.contact-line {
  margin: 0 0 1.25rem;
  color: var(--color-text-secondary);
}

.contact-line__label {
  margin-right: 0.5rem;
  color: var(--color-text-tertiary);
}

.section-title {
  margin: 2rem 0 0.75rem;
  font-size: var(--h2-size);
  line-height: var(--h2-lh);
  font-weight: 800;
}

.faq-list {
  margin: 0;
}

.faq-item {
  margin: 0 0 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-divider);
}

.faq-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.faq-item dt {
  margin: 0 0 0.35rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.faq-item dd {
  margin: 0;
  color: var(--color-text-secondary);
}

.fact-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--color-text-secondary);
}

.fact-list li {
  margin-bottom: 0.85rem;
}

.page--error {
  text-align: center;
  padding-block: 72px;
}

.page--error .error-code {
  margin: 0;
  font-size: 4rem;
  font-weight: 800;
  color: var(--color-brand-navy);
  line-height: 1;
}

.page--error .page-hero__art {
  margin-inline: auto;
}

/* Download cards */
.channel-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0 0 1.75rem;
}

.channel-switch__label {
  color: var(--color-text-secondary);
  margin-right: 0.25rem;
}

.channel-switch__link {
  color: var(--color-link);
  text-decoration: none;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius-cta);
}

.channel-switch__link.is-active {
  color: var(--color-accent);
  border-color: var(--color-accent);
  font-weight: 700;
}

.download-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.download-card {
  padding: 1.25rem;
  border: 1px solid var(--color-divider);
  border-radius: 12px;
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  box-shadow: 0 8px 20px rgba(10, 70, 140, 0.06);
  /* 查询容器：按卡内容宽（非视口）降档标题。Chrome 105+ / Safari 16+；不支持时标题保持 --h2-size。 */
  container-type: inline-size;
}

.download-card__heading {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.download-card__title {
  margin: 0;
  color: var(--color-text-primary);
  /* Windows 40px 实测 191px ⇒ 宽/字号 ≈ 4.78。20cqi 在 ≥200px 卡上贴回 --h2-size（40px）。
   * cqi 无效时整条声明丢弃，回退到 grouped 规则的 --h2-size。 */
  font-size: min(var(--h2-size), 20cqi);
  line-height: 1.1;
}

/* 无 cqi 的容器查询浏览器（Chrome 105–107）离散档：阈值按 Windows 191px@40px 反推，Chrome 实测微调。 */
@container (max-width: 190px) {
  .download-card__title {
    font-size: 1.875rem; /* 30px → Windows 实测 ≈144px；1440 卡内容 150px */
    line-height: 1.1;
  }
}

@container (max-width: 145px) {
  .download-card__title {
    font-size: 1.625rem; /* 26px → Windows 实测 124px；1280 卡内容 134px */
    line-height: 1.1;
  }
}

.download-card__subtitle {
  margin: 0;
  color: var(--color-text-tertiary);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  white-space: nowrap;
}

.download-card__status {
  margin: 0;
  font-weight: 700;
}

.download-card__status.is-available {
  color: var(--color-accent);
}

.download-card__status.is-soon {
  color: var(--color-text-secondary);
}

.download-card__status.is-recruiting {
  color: var(--color-mark);
}

.download-card__meta {
  margin: 0;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr;
}

.download-card__meta dt {
  margin: 0;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

.download-card__meta dd {
  margin: 0.125rem 0 0;
  color: var(--color-text-primary);
  word-break: break-word;
}

.download-card__howto {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
}

.download-card .cta,
.download-card .cta--disabled {
  align-self: flex-start;
  margin-top: auto;
}

.cta--ghost {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-divider);
  box-shadow: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
}

.cta--ghost:hover,
.cta--ghost:focus-visible {
  background: transparent;
  color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

/* column-reverse：DOM 里主按钮在前，视觉上贴卡片底部，与另外三张卡的按钮同基线。 */
.download-card__actions {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: auto;
}

/* 窄卡（4 列内容约 150–190px）：撑满卡内宽，字号收到 0.8125rem，长文案最多 2 行。禁止 nowrap。 */
.download-card__actions .cta {
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 0;
  justify-content: center;
  text-align: center;
  white-space: normal;
  overflow-wrap: break-word;
  font-size: 0.8125rem;
  line-height: 1.2;
  padding-inline: 0.5rem;
}

/* 下载按钮与市场入口同一行；窄卡折行，不把卡片撑出横向滚动。留白 ≥ 徽章高度的 1/4（40px → 10px）。 */
.download-card__primary-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: auto;
}

.download-card__actions .download-card__primary-row {
  margin-top: 0;
}

.download-card .download-card__primary-row > .cta,
.download-card .download-card__primary-row > .cta--disabled {
  width: auto;
  max-width: 100%;
  min-width: 0;
  align-self: center;
  margin-top: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.store-entry {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.35rem;
  box-sizing: border-box;
  min-height: 44px;
  min-width: 44px;
  max-width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--color-surface);
  color: var(--color-link);
  text-decoration: none;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-cta);
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
}

.store-entry:hover,
.store-entry:focus-visible {
  color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.store-entry__icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  color: currentColor;
}

.store-entry__name {
  min-width: 0;
  white-space: nowrap;
}

/* 官方徽章：不换色、不加滤镜、不裁切；高 40px，宽按原始比例。点击区用 padding 补到 44px。 */
.store-entry--badge,
.store-entry--badge:hover,
.store-entry--badge:focus-visible {
  gap: 0;
  padding: 2px 0;
  background: transparent;
  color: inherit;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.store-entry__badge {
  display: block;
  height: 40px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

.download-card__url {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--color-text-secondary);
  font-family: inherit;
  font-size: 0.8125rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: break-word;
  user-select: text;
}

/* 公开链接文本默认与所有状态均隐藏。 */
.download-card__url[hidden] {
  display: none !important;
}

.download-card__live {
  margin: 0;
  min-height: 1.25rem;
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
}

.cta--disabled {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.75rem 1.25rem;
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-cta);
  font-weight: 700;
  cursor: not-allowed;
  opacity: 0.85;
}

.icon {
  display: block;
  color: var(--color-accent);
  flex-shrink: 0;
}

/* 星与 H1 成一组：行前标记，左对齐、光学贴齐首行 */
.hero__title-group {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  max-width: 100%;
}

.brand-hero-mark {
  width: 40px;
  height: auto;
  flex-shrink: 0;
  margin: 0.12em 0 0;
  filter: drop-shadow(0 8px 16px rgba(0, 40, 100, 0.35));
}

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

  .download-grid {
    grid-template-columns: 1fr 1fr;
  }

  .download-card__meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  /* 与参考物一致：≥1024 全程锁定 680，避免宽屏手机图把 hero 撑高 */
  .hero {
    height: var(--hero-min-h);
    min-height: var(--hero-min-h);
    max-height: var(--hero-min-h);
  }

  .hero__inner {
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    gap: 2rem;
    /* 略加大顶距、收紧底距 → 内容整体下沉，右下留白收窄 */
    padding-block: 56px 20px;
    height: 100%;
  }

  .hero__copy {
    flex: 1 1 48%;
    max-width: 34rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 3.25rem;
  }

  .hero__title-group {
    gap: 0.85rem;
  }

  .brand-hero-mark {
    width: 48px;
    margin-top: 0.18em;
  }

  .hero__phones {
    flex: 1 1 48%;
    min-height: 0;
    align-self: stretch;
    justify-content: flex-end;
    align-items: flex-end;
    padding-bottom: 0;
  }

  .phone {
    /* 250px × 844/390 + 80px padding ≤ 680，宽屏不再抬高 hero */
    width: min(250px, 22vw);
  }

  .feature-split {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }

  .feature-split--flip .feature-split__art {
    order: 2;
  }

  .feature-split--flip .feature-split__copy {
    order: 1;
  }

  .page-with-art {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 380px);
    gap: 2.5rem;
    align-items: start;
  }
}

@media (min-width: 1280px) {
  /* 四列只在够宽时启用：1024 + 侧栏插画会把卡内容压到 ~76px，标题必溢 */
  .download-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero,
  .hero__copy,
  .hero__phones,
  .phone--front {
    animation: none;
  }

  .cta--primary-hero,
  .cta--primary-hero:hover,
  .cta--primary-hero:focus-visible {
    transform: none;
    transition: none;
  }
}
