/* ==========================================================================
   blocks.css —— 页头导航 + 首屏（含下载面板、封面堆叠）
   组件级断点紧跟组件定义，避免被后加载的同优先级规则静默盖掉。
   ========================================================================== */

/* ---------------- 页头 ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 9, 16, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  padding-block: var(--sp-3);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex: none;
}

.brand__logo {
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  margin-inline-start: auto;
}

.nav__link {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: color 0.16s ease;
}

.nav__link:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  padding: var(--sp-2);
  margin-inline-start: auto;
  color: var(--text);
  border-radius: var(--r-sm);
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.nav-toggle__bar + .nav-toggle__bar {
  margin-top: 5px;
}

@media (max-width: 900px) {
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--sp-2) var(--sp-5) var(--sp-4);
    background: var(--bg-alt);
    border-bottom: 1px solid var(--line);
  }

  .nav.is-open {
    display: flex;
  }

  .nav__link {
    padding-block: var(--sp-3);
    border-bottom: 1px solid var(--line);
    font-size: var(--fs-body);
  }

  .nav__link:last-child {
    border-bottom: 0;
  }

  .nav-toggle {
    display: block;
  }

  .site-header__cta {
    display: none;
  }

  .brand .tag {
    display: none;
  }
}

/* ---------------- 首屏 ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--sp-9) var(--sp-8);
  background:
    radial-gradient(120% 90% at 80% -10%, rgba(232, 255, 59, 0.16),
      rgba(59, 232, 216, 0.07) 44%, transparent 72%),
    var(--bg);
}

.hero__halftone {
  position: absolute;
  inset: 0 0 auto auto;
  width: min(640px, 52%);
  height: 100%;
  background-image: radial-gradient(circle, rgba(59, 232, 216, 0.2) 1.5px,
      transparent 1.6px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 76%);
  mask-image: linear-gradient(to bottom, #000, transparent 76%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 520px;
  align-items: center;
  gap: var(--sp-8);
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-4);
}

.hero__kicker {
  display: inline-flex;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  background: var(--neon);
  color: var(--ink);
  font-size: var(--fs-xs);
  font-weight: 700;
}

.hero__title {
  font-size: var(--fs-display);
  line-height: 1.06;
}

.hero__rule {
  width: min(240px, 62%);
  height: 8px;
  margin-top: calc(var(--sp-3) * -1);
  border-radius: 4px;
  background: var(--pink);
}

.hero__lead {
  max-width: var(--w-prose);
  color: var(--text-muted);
  font-size: var(--fs-lead);
  line-height: 1.8;
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--cyan);
}

.hero__aside {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  min-width: 0;
}

/* 封面堆叠：容器按 520×480 定比例，卡位全部用百分比，缩放时不变形 */
.stack {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  aspect-ratio: 520 / 480;
}

.stack__item {
  position: absolute;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--surface-2);
  box-shadow: 0 24px 50px -26px rgba(0, 0, 0, 0.95);
}

.stack__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stack__item--b1 {
  left: 7.7%;
  top: 4.2%;
  width: 28.8%;
  height: 41.7%;
  transform: rotate(-12deg);
}

.stack__item--b2 {
  left: 63.5%;
  top: 2.1%;
  width: 28.8%;
  height: 41.7%;
  transform: rotate(10deg);
}

.stack__item--main {
  left: 28.8%;
  top: 12.5%;
  width: 42.3%;
  height: 61%;
  border-radius: var(--r-lg);
}

.stack__note {
  margin-inline: auto;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  line-height: 1.6;
}

/* ---------------- 双端下载面板 ---------------- */
.panel {
  grid-column: 1 / -1;
  padding: var(--sp-5);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-float);
}

.panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-4);
  margin-bottom: var(--sp-4);
}

.panel__title {
  font-size: 1.1875rem;
}

.panel__hint {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.dl-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
}

.dl-card {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: 1.375rem 1.5rem;
  border-radius: var(--r-lg);
}

.dl-card--android {
  background: var(--neon);
  color: var(--ink);
}

.dl-card--ios {
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

.dl-card__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: var(--r-md);
}

.dl-card--android .dl-card__icon {
  background: var(--ink);
  color: var(--neon);
}

.dl-card--ios .dl-card__icon {
  background: var(--pink);
  color: var(--ink);
}

.dl-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  margin-inline-end: auto;
}

.dl-card__name {
  font-size: 1.125rem;
  font-weight: 900;
  line-height: 1.35;
}

.dl-card__meta {
  font-size: var(--fs-xs);
  line-height: 1.5;
}

.dl-card--android .dl-card__meta {
  color: var(--ink-soft);
}

.dl-card--ios .dl-card__meta {
  color: var(--text-muted);
}

.panel__note {
  margin-top: var(--sp-4);
  color: var(--text-muted);
  font-size: var(--fs-xs);
}

@media (max-width: 1080px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-7);
  }

  .hero__aside {
    order: 2;
  }

  .panel {
    order: 3;
  }
}

@media (max-width: 620px) {
  .hero {
    padding-block: var(--sp-7) var(--sp-7);
  }

  .hero__halftone {
    width: 100%;
    opacity: 0.5;
  }

  .dl-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .dl-card {
    flex-wrap: wrap;
    padding: var(--sp-4);
  }

  .dl-card .btn {
    width: 100%;
  }
}
