/* ============================================================
   纸飞机 Telegram 下载站 — 样式表
   目录：static/css/style.css
   配色对齐 Telegram 官方品牌蓝
   ============================================================ */

/* ---------- 设计变量 ---------- */
:root {
  --blue: #2aabee;
  --blue-deep: #229ed9;
  --blue-dark: #1878b5;
  --ink: #17212b;
  --ink-soft: #3b4b5a;
  --muted: #5f7181;
  --line: #dcebf5;
  --bg: #f7fbfe;
  --bg-soft: #eef7fd;
  --white: #ffffff;
  --shadow-sm: 0 2px 10px rgba(23, 65, 96, 0.08);
  --shadow-md: 0 12px 32px rgba(23, 65, 96, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1180px;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Helvetica Neue", Arial, sans-serif;
}

/* ---------- 基础重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--blue-deep);
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: min(var(--maxw), 100% - 40px);
  margin: 0 auto;
}

/* ---------- 通用区块 ---------- */
.section {
  padding: 72px 0;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 44px;
  text-align: center;
}

.section-head .eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--blue-deep);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 14px;
}

.section-head p {
  color: var(--muted);
  font-size: 16px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;
  padding: 13px 26px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(42, 171, 238, 0.32);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(42, 171, 238, 0.4);
}

.btn-ghost {
  background: var(--white);
  color: var(--blue-deep);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: var(--bg-soft);
  transform: translateY(-2px);
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.brand img {
  width: 36px;
  height: 36px;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-name span {
  color: var(--blue-deep);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--blue-deep);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-actions .btn {
  padding: 10px 20px;
  font-size: 14px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  position: relative;
  transition: transform 0.2s ease;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 64px 0 72px;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(42, 171, 238, 0.16), transparent 60%),
    radial-gradient(700px 400px at -10% 30%, rgba(34, 158, 217, 0.1), transparent 55%),
    var(--bg);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-dark);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
}

.hero h1 {
  font-size: clamp(32px, 4.6vw, 48px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 30px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 36px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
}

.stat .num {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
}

.stat .label {
  font-size: 13px;
  color: var(--muted);
}

.hero-media {
  position: relative;
}

.hero-media img {
  width: 100%;
  border-radius: 24px;
  box-shadow: var(--shadow-md);
}

.hero-float {
  position: absolute;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}

.hero-float .ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-deep);
}

.hero-float.f1 {
  top: 8%;
  left: -6%;
}

.hero-float.f2 {
  bottom: 10%;
  right: -4%;
}

/* ---------- 平台下载卡片 ---------- */
.platforms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.platform-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.platform-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(42, 171, 238, 0.4);
}

.platform-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.platform-ico {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-deep);
  flex-shrink: 0;
}

.platform-ico svg {
  width: 26px;
  height: 26px;
}

.platform-top h3 {
  font-size: 18px;
  font-weight: 700;
}

.platform-meta {
  font-size: 13px;
  color: var(--muted);
}

.platform-desc {
  font-size: 14px;
  color: var(--ink-soft);
  flex: 1;
}

.platform-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 12px;
  color: var(--blue-dark);
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 4px 10px;
}

.platform-card .btn {
  width: 100%;
}

/* ---------- 功能特性 ---------- */
.features {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  background: var(--bg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.feature-ico {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.feature-ico svg {
  width: 24px;
  height: 24px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- 亮点条 ---------- */
.highlights {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.highlight {
  text-align: center;
  padding: 28px 18px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
}

.highlight .num {
  font-size: 28px;
  font-weight: 800;
  color: var(--blue-deep);
  margin-bottom: 6px;
}

.highlight .label {
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------- 更新日志 ---------- */
.changelog {
  max-width: 760px;
  margin: 0 auto;
}

.log-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.log-item:last-child {
  border-bottom: none;
}

.log-version {
  font-weight: 700;
  color: var(--blue-deep);
}

.log-date {
  font-size: 13px;
  color: var(--muted);
}

.log-body h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.log-body p {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
}

.faq-q .arrow {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--blue-deep);
  transition: transform 0.2s ease;
}

.faq-item.open .arrow {
  transform: rotate(180deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
}

.faq-a-inner {
  padding: 0 24px 20px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- 步骤 ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}

.step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 12px;
}

.step h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.step p {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- CTA 横幅 ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  border-radius: 26px;
  padding: 52px 32px;
  text-align: center;
  color: var(--white);
}

.cta-banner h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  margin-bottom: 14px;
}

.cta-banner p {
  opacity: 0.92;
  max-width: 520px;
  margin: 0 auto 28px;
}

.cta-banner .btn-white {
  background: var(--white);
  color: var(--blue-deep);
}

.cta-banner .btn-white:hover {
  transform: translateY(-2px);
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: #0f1c26;
  color: #c4d4df;
  padding: 56px 0 28px;
  margin-top: 72px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-brand img {
  width: 32px;
  height: 32px;
}

.footer-brand .brand-name {
  color: var(--white);
}

.footer-about {
  font-size: 14px;
  line-height: 1.7;
  max-width: 320px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 15px;
  margin-bottom: 16px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: #c4d4df;
  font-size: 14px;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: #8ba3b3;
}

/* ---------- 回到顶部 ---------- */
.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--blue-deep);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 90;
}

.back-top.show {
  opacity: 1;
  visibility: visible;
}

.back-top:hover {
  transform: translateY(-3px);
}

/* ---------- 滚动淡入 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 响应式：平板 ---------- */
@media (max-width: 960px) {
  .platforms,
  .feature-grid,
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .highlights {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-media {
    max-width: 560px;
    margin: 0 auto;
  }

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

  .hero-float.f1 {
    left: 0;
  }

  .hero-float.f2 {
    right: 0;
  }
}

/* ---------- 响应式：手机 ---------- */
@media (max-width: 640px) {
  .section {
    padding: 52px 0;
  }

  .nav-links,
  .nav-actions .btn-ghost {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links.open {
    display: flex;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 16px 20px;
    box-shadow: var(--shadow-md);
  }

  .nav-links.open a {
    padding: 12px 0;
    width: 100%;
  }

  .platforms,
  .feature-grid,
  .steps,
  .highlights {
    grid-template-columns: 1fr;
  }

  .log-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .hero-stats {
    gap: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-float {
    display: none;
  }
}

/* ---------- 无障碍：减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  * {
    transition: none !important;
  }
}
