/**
 * App 下载页：首屏品牌 + CTA，扫码双通道，说明与安全提示
 */

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

@keyframes download-orb {
  0%,
  100% {
    transform: scale(1) translate(0, 0);
  }
  50% {
    transform: scale(1.06) translate(4%, -3%);
  }
}

.download-page {
  overflow: hidden;
}

/* —— Hero —— */
.download-hero {
  position: relative;
  padding: 56px 0 48px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 80% at 85% 20%, rgba(227, 85, 25, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 60% at 10% 90%, rgba(227, 85, 25, 0.06), transparent 50%),
    #ffffff;
}

.download-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 40px;
  align-items: center;
}

.download-hero-copy {
  animation: download-rise 0.55s ease both;
}

.download-hero-brand {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--color-primary, #e35519);
}

.download-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--color-text-primary);
}

.download-hero-sub {
  margin: 0 0 28px;
  max-width: 34em;
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text-secondary);
}

.download-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.download-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.download-store-btn--apple {
  background: var(--color-primary, #e35519);
  color: #fff;
  box-shadow: 0 8px 22px rgba(227, 85, 25, 0.28);
}

.download-store-btn--apple:hover {
  background: var(--color-primary-hover, #f06a32);
  transform: translateY(-1px);
}

.download-store-btn--apple:active {
  transform: translateY(0);
}

.download-store-btn--google {
  background: #ffffff;
  color: var(--color-text-primary);
  border: 1px solid rgba(31, 31, 31, 0.1);
}

.download-store-btn--google:hover {
  border-color: rgba(227, 85, 25, 0.35);
  color: var(--color-primary, #e35519);
  transform: translateY(-1px);
}

.download-store-btn--google:active {
  transform: translateY(0);
}

.download-store-btn__icon {
  display: inline-flex;
  line-height: 0;
}

.download-store-btn__icon .g-icon {
  width: 20px;
  height: 20px;
}

.download-store-btn--google .download-store-btn__icon .g-icon {
  width: 22px;
  height: 22px;
  transform: translateX(0.5px);
}

.download-hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  animation: download-rise 0.65s ease 0.08s both;
}

.download-hero-orb {
  position: absolute;
  width: min(280px, 70%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.9), rgba(227, 85, 25, 0.18) 55%, rgba(227, 85, 25, 0.05) 100%);
  animation: download-orb 8s ease-in-out infinite;
}

.download-hero-logo {
  position: relative;
  z-index: 1;
  width: 148px;
  height: 148px;
  border-radius: 36px;
  object-fit: cover;
  box-shadow: 0 18px 40px rgba(227, 85, 25, 0.2);
}

/* —— Scan —— */
.download-scan {
  padding: 40px 0 56px;
  background: #ffffff;
}

.download-scan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid rgba(31, 31, 31, 0.08);
  border-bottom: 1px solid rgba(31, 31, 31, 0.08);
}

.download-channel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 8px 32px 0;
}

.download-channel:last-child {
  padding-left: 36px;
  padding-right: 0;
  border-left: 1px solid rgba(31, 31, 31, 0.08);
}

.qr-frame {
  width: 168px;
  height: 168px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s ease;
  overflow: hidden;
  line-height: 0;
}

.qr-frame canvas,
.qr-frame svg,
.qr-frame img {
  display: block;
  width: 100%;
  height: 100%;
}

.download-channel.is-revealed .qr-frame {
  opacity: 1;
}

.download-channel-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.download-channel-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  flex-shrink: 0;
}

.download-channel-icon .g-icon {
  width: 22px;
  height: 22px;
}

.download-channel-icon[data-g-icon="googlePlayFill"] .g-icon {
  width: 24px;
  height: 24px;
  transform: translateX(1px);
}

.download-channel-meta h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
}

.download-channel-meta p {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

.download-channel-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}

.download-channel-link:hover {
  text-decoration: underline;
}

/* —— Guide —— */
.download-guide {
  padding: 48px 0 56px;
  background:
    linear-gradient(180deg, rgba(227, 85, 25, 0.04) 0%, rgba(255, 255, 255, 0) 100%);
}

.download-guide-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: start;
}

.download-steps h2,
.download-safe h2 {
  margin: 0 0 18px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.download-step-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: dl-step;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.download-step-list li {
  position: relative;
  padding-left: 44px;
  color: var(--color-text-secondary);
  font-size: 15px;
  line-height: 1.6;
  counter-increment: dl-step;
}

.download-step-list li::before {
  content: counter(dl-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 700;
  line-height: 28px;
  text-align: center;
}

.download-safe {
  padding: 22px 24px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(31, 31, 31, 0.08);
}

.download-safe-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.download-safe-list li {
  position: relative;
  padding-left: 16px;
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.download-safe-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
}

/* —— Disclaimer —— */
.download-disclaimer {
  padding: 40px 0 56px;
  border-top: 1px solid rgba(31, 31, 31, 0.06);
}

.download-disclaimer h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.download-disclaimer p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.65;
  max-width: 52em;
}

.download-disclaimer ol {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.7;
  max-width: 52em;
}

@media (max-width: 900px) {
  .download-hero-grid,
  .download-guide-grid {
    grid-template-columns: 1fr;
  }

  .download-hero-visual {
    min-height: 180px;
    order: -1;
  }

  .download-hero-logo {
    width: 112px;
    height: 112px;
    border-radius: 28px;
  }

  .download-hero-orb {
    animation: none;
  }

  .download-hero-copy,
  .download-hero-visual {
    animation-duration: 0.45s;
  }

  .download-hero-visual {
    animation-delay: 0s;
  }

  .download-hero {
    padding: 66px 0 32px;
    text-align: center;
  }

  .download-hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .download-hero-actions {
    justify-content: center;
  }

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

  .download-channel,
  .download-channel:last-child {
    padding: 24px 0;
    border-left: 0;
    align-items: center;
    text-align: center;
  }

  .download-channel:first-child {
    border-bottom: 1px solid rgba(31, 31, 31, 0.08);
  }

  .download-channel-meta {
    flex-direction: column;
  }

  .download-guide-grid {
    gap: 28px;
  }
}

@media (max-width: 480px) {
  .download-store-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .download-hero-copy,
  .download-hero-visual,
  .download-hero-orb {
    animation: none;
  }

  .qr-frame,
  .download-channel.is-revealed .qr-frame {
    opacity: 1;
    transition: none;
  }
}
