/* ============================================
   云图 设计系统（金属反射 + 极简）
   与 app-ios/src/design-system 保持视觉一致
   ============================================ */

:root {
  /* Tokens — 同步 app theme/colors.js */
  --bg: #FFFFFF;
  --surface: #FAFAFC;
  --surface-elevated: #F2F2F7;
  --text: #1C1C1E;
  --text-secondary: #636366;
  --text-tertiary: #AEAEB2;
  --border: #E5E5EA;

  --metal-text: #3A3A3C;
  --metal-highlight: #48484A;
  --metal-light: #9C9CA3;
  --metal-shadow: rgba(28,28,30,0.04);

  --error: #FF3B30;
  --success: #34C759;

  /* Spacing */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 12px;
  --sp-base: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-xxl: 48px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 18px;

  /* Shimmer
     注：app useShimmer 用 cos/sin(137.5°) 数学坐标 → 亮带沿 TL→BR 对角。
     CSS linear-gradient 用 "from top 顺时针" 约定，需 47.5° (= 137.5° - 90°) 才视觉等价。 */
  --shimmer-duration: 550ms;
  --shimmer-angle: 47.5deg;
}

* { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'SF Pro Text', 'SF Pro', -apple-system, BlinkMacSystemFont,
               'Helvetica Neue', 'Segoe UI', Roboto, 'PingFang SC',
               'Microsoft YaHei', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: 'SF Pro Display', 'SF Pro', -apple-system, BlinkMacSystemFont,
               'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 { font-size: 4rem; line-height: 1.05; font-weight: 800; }
h2 { font-size: 2.25rem; line-height: 1.1; font-weight: 800; }
h3 { font-size: 1.25rem; line-height: 1.2; font-weight: 700; }

p { margin: 0; }

a { color: inherit; text-decoration: none; }

/* ========================
   Top bar
   ======================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-base) var(--sp-xl);
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.brand {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'SF Pro Display', sans-serif;
  letter-spacing: -0.02em;
}
.topbar nav {
  display: flex;
  gap: var(--sp-lg);
  align-items: center;
}
.topbar nav a {
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.topbar nav a:hover { color: var(--metal-text); }
.lang-toggle {
  background: transparent;
  border: 1.5px solid var(--metal-highlight);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--metal-text);
  cursor: pointer;
}

/* ========================
   Sections
   ======================== */
main { padding: 0 var(--sp-xl); }

.hero, .features, .pricing, .faq, .download {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--sp-xxl) 0;
}

.hero { text-align: center; padding: 120px 0 80px; }
.hero-title {
  font-size: 6rem;
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-base);
}
.hero-sub {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-xl);
}
.hero-cta { display: flex; gap: var(--sp-md); justify-content: center; flex-wrap: wrap; }

.section-title {
  font-size: 2.25rem;
  margin-bottom: var(--sp-sm);
  text-align: center;
}
.section-sub {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: var(--sp-xl);
}

/* ========================
   Metal frame (核心视觉)
   ============
   等价于 app 里 MetalFrame：单条均匀细线（#9C9CA3 1.5px stroke）
   边线本身不带渐变，金属感来自按下 / hover 时的光斑横扫
   ======================== */
.metal-frame {
  position: relative;
  background: var(--bg);
  border-radius: var(--radius-lg);
  isolation: isolate;
  overflow: hidden;
  border: 1.5px solid var(--metal-highlight);
}
/* Shimmer overlay — JS 触发 .shining 时可见
   宽度 45% 带宽（27.5%-72.5%），单峰 alpha 0.85 — 同步 useShimmer 规范 */
.metal-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    var(--shimmer-angle),
    rgba(255,255,255,0) 27.5%,
    rgba(255,255,255,0.85) 50%,
    rgba(255,255,255,0) 72.5%
  );
  transform: translateX(-150%);
  pointer-events: none;
  opacity: 0;
}
.metal-frame.shining::after {
  animation: shimmer-sweep var(--shimmer-duration) cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes shimmer-sweep {
  0%   { transform: translateX(-150%); opacity: 1; }
  75%  { transform: translateX(150%);  opacity: 1; }
  100% { transform: translateX(150%);  opacity: 0; }
}

/* Metal text shimmer (h1 / brand) */
.metal-text {
  position: relative;
  display: inline-block;
  color: var(--metal-text);
  isolation: isolate;
}
.metal-text::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    var(--shimmer-angle),
    rgba(255,255,255,0) 27.5%,
    rgba(255,255,255,0.85) 50%,
    rgba(255,255,255,0) 72.5%
  );
  transform: translateX(-150%);
  pointer-events: none;
  opacity: 0;
}
.metal-text.shining::after {
  animation: shimmer-sweep var(--shimmer-duration) cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ========================
   Buttons
   ======================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-md) var(--sp-xl);
  background: var(--bg);
  color: var(--metal-text);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  min-width: 160px;
  min-height: 50px;
  text-align: center;
  transition: transform 100ms ease;
}
.btn.ghost { background: transparent; }

/* ========================
   Features — 单列居中，匹配 app WelcomeScreen 的 feature row
   ======================== */
.features {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
  max-width: 560px;
  margin: 0 auto;
  padding: var(--sp-xxl) var(--sp-base);
}
.feature-card {
  display: flex;
  align-items: center;
  gap: var(--sp-base);
  padding: var(--sp-md) var(--sp-base);
  background: transparent;
}
.feature-icon { font-size: 2rem; flex-shrink: 0; width: 44px; text-align: center; }
.feature-body h3 { font-size: 1rem; font-weight: 700; margin-bottom: 2px; }
.feature-body p { font-size: 0.9rem; color: var(--text-secondary); }
sup { font-size: 0.65em; vertical-align: super; }

/* ========================
   Pricing
   ======================== */
.pricing-tabs {
  display: flex;
  justify-content: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-lg);
}
.region-btn {
  padding: var(--sp-sm) var(--sp-base);
  border: 1.5px solid var(--metal-highlight);
  background: var(--bg);
  color: var(--metal-text);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
}
.region-btn.active {
  background: var(--metal-text);
  color: white;
  border-color: var(--metal-text);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
}
.price-card {
  padding: var(--sp-xl);
  background: var(--bg);
  text-align: center;
  position: relative;
}
.price-card.highlight { background: var(--surface); }
.badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--metal-text);
  color: white;
  padding: 2px 12px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}
.price-card h3 { margin-bottom: var(--sp-md); }
.price {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: 'SF Pro Display', sans-serif;
  margin-bottom: 0;
}
.price-sub { color: var(--text-secondary); margin-bottom: var(--sp-base); }
.price-card ul { list-style: none; padding: 0; text-align: left; max-width: 200px; margin: 0 auto; }
.price-card li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 4px 0;
}
.price-card li::before { content: '· '; color: var(--metal-light); }

.pricing-foot {
  text-align: center;
  margin-top: var(--sp-xl);
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

/* ========================
   FAQ
   ======================== */
.faq details {
  background: var(--bg);
  margin-bottom: var(--sp-md);
  padding: var(--sp-base) var(--sp-lg);
  cursor: pointer;
}
.faq summary {
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  position: relative;
  padding-right: 24px;
  color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--metal-light);
  font-size: 1.4rem;
  transition: transform 200ms;
}
.faq details[open] summary::after { content: '−'; }
.faq details p {
  margin-top: var(--sp-md);
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ========================
   Download
   ======================== */
.download { text-align: center; }
.download p { color: var(--text-secondary); margin-bottom: var(--sp-xl); }
.download-cta { display: flex; gap: var(--sp-md); justify-content: center; }

/* ========================
   Footer
   ======================== */
footer {
  margin-top: var(--sp-xxl);
  padding: var(--sp-xl) var(--sp-xl);
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-md);
}
.footer-brand { font-size: 1rem; font-weight: 600; }
.footer-inner nav { display: flex; gap: var(--sp-base); }
.footer-inner nav a { color: var(--text-secondary); font-size: 0.85rem; }
.footer-inner nav a:hover { color: var(--metal-text); }
.footer-copy { color: var(--text-tertiary); font-size: 0.8rem; }

/* ========================
   Responsive
   ======================== */
@media (max-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 1.75rem; }
  .hero-title { font-size: 4rem; }
  .hero-sub { font-size: 1rem; }
  main { padding: 0 var(--sp-base); }
  .topbar { padding: var(--sp-md) var(--sp-base); }
  .topbar nav { gap: var(--sp-md); }
  .features { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}
