/* ===== Flomoplus 官网样式 — UI 参考 regio.pages.dev 设计系统 ===== */

/* ===== 设计变量（Design Tokens） ===== */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-dark: #0b0a14;
  --text: #14121f;
  --text-secondary: #5b5870;
  --text-muted: #8a87a0;
  --text-on-dark: #ffffff;
  --border: rgba(0, 0, 0, 0.08);
  --card-border: rgba(0, 0, 0, 0.06);
  /* 品牌色：灵感紫（indigo-violet） */
  --accent: #6e56f7;
  --accent-strong: #5b43e8;
  --accent-soft: rgba(110, 86, 247, 0.10);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(110, 86, 247, 0.18);
  --max-width: 1100px;
  --transition: 0.2s ease;
}

/* 深色模式跟随系统 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0a14;
    --bg-alt: #14121f;
    --text: #f5f3ff;
    --text-secondary: #a8a3c4;
    --text-muted: #6e6a88;
    --border: rgba(255, 255, 255, 0.10);
    --card-border: rgba(255, 255, 255, 0.08);
    --accent: #8b73ff;
    --accent-strong: #6e56f7;
    --accent-soft: rgba(139, 115, 255, 0.16);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(139, 115, 255, 0.28);
  }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  /* 中文优先字体栈 */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== 导航栏（毛玻璃吸顶） ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
@media (prefers-color-scheme: dark) {
  .nav { background: rgba(11, 10, 20, 0.72); }
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
}
.nav-brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  box-shadow: var(--shadow-sm);
}
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--text-secondary);
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  transition: opacity var(--transition), transform var(--transition);
}
.nav-cta:hover { opacity: 0.9; transform: translateY(-1px); }
@media (max-width: 640px) {
  .nav-links { display: none; }
}

/* ===== 主视觉 Hero ===== */
.hero {
  padding: 100px 24px 80px;
  text-align: center;
}
.hero-inner { max-width: 720px; margin: 0 auto; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 28px;
}
.hero-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.hero-icon {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  margin: 0 auto 28px;
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}
.hero-title {
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 32px;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.hero-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===== 按钮 ===== */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  transition: transform var(--transition), opacity var(--transition), box-shadow var(--transition);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { opacity: 0.92; transform: translateY(-1px); }
.btn-secondary {
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.btn-large { padding: 16px 32px; font-size: 16px; }

/* ===== 通用区块 ===== */
.section { padding: 80px 24px; }
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}
.section-inner { max-width: var(--max-width); margin: 0 auto; }
.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin: 0 0 12px;
}
.section-desc {
  text-align: center;
  color: var(--text-secondary);
  font-size: 17px;
  max-width: 560px;
  margin: 0 auto 48px;
}
.section-dark .section-desc { color: var(--text-muted); }

/* ===== 功能卡片网格 ===== */
.feature-grid {
  display: grid;
  /* 小屏下最小列宽取视口宽度，避免横向溢出 */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
}
.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* ===== 使用步骤 ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step {
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 28px;
}
.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 16px;
}
.step h3 { font-size: 17px; font-weight: 600; margin: 0 0 8px; }
.step p { font-size: 14px; color: var(--text-secondary); margin: 0; }
@media (max-width: 768px) {
  .steps { grid-template-columns: 1fr; }
}

/* ===== 支持的网站标签云 ===== */
.region-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 820px;
  margin: 0 auto;
}
.region-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}
.region-tag:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
}
.region-tag .ico {
  width: 18px; height: 18px;
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
}
.region-tag.popular {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
  font-weight: 600;
}

/* ===== 结尾 CTA ===== */
.cta-block { text-align: center; }
.cta-block h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.cta-block p {
  color: var(--text-muted);
  font-size: 17px;
  margin: 0 0 28px;
}
.cta-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 20px;
}

/* ===== 页脚 ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.footer-brand img { width: 26px; height: 26px; border-radius: 7px; }
.footer-links {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.footer-links a:hover { color: var(--text); }
.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 28px;
}
@media (max-width: 480px) {
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ===== 文档页（隐私 / 条款） ===== */
.doc {
  padding: 80px 24px;
}
.doc-inner {
  max-width: 760px;
  margin: 0 auto;
}
.doc-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}
.doc-back:hover { color: var(--accent); }
.doc-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.doc-date {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 40px;
}
.doc-section { margin-bottom: 36px; }
.doc-section h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.doc-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 20px 0 8px;
}
.doc-section p,
.doc-section li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 10px;
}
.doc-section ul { padding-left: 20px; margin: 0 0 10px; }
.doc-section a { color: var(--accent); }
.doc-section strong { color: var(--text); font-weight: 600; }

/* ===== 响应式适配 ===== */
/* 防止任何子元素导致的横向滚动（clip 不会破坏 sticky） */
html, body { overflow-x: clip; }
img, svg { max-width: 100%; }

/* 平板：缩小区块内边距 */
@media (max-width: 900px) {
  .section { padding: 64px 20px; }
  .section-alt, .section-dark { padding: 64px 20px; }
  .hero { padding: 88px 20px 64px; }
}

/* 手机：进一步压缩间距、缩放标题与图标 */
@media (max-width: 600px) {
  .nav-inner { padding: 10px 16px; gap: 12px; }
  .hero { padding: 64px 18px 48px; }
  .hero-icon { width: 96px; height: 96px; border-radius: 22px; margin-bottom: 22px; }
  .hero-subtitle { font-size: 16px; margin-bottom: 26px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn-primary,
  .hero-actions .btn-secondary { width: 100%; }
  .section { padding: 56px 18px; }
  .section-alt, .section-dark { padding: 56px 18px; }
  .section-title { margin-bottom: 8px; }
  .section-desc { font-size: 15px; margin-bottom: 36px; }
  .feature-card { padding: 22px; }
  .step { padding: 22px; }
  .cta-block .btn-primary { width: 100%; }
  .doc { padding: 56px 18px; }
  .footer { padding: 32px 18px; }
}

/* 超小屏：避免按钮文字换行拥挤 */
@media (max-width: 360px) {
  .hero-title { font-size: 30px; }
  .nav-brand span { display: none; }
}

/* 适配刘海屏安全区 */
@supports (padding: env(safe-area-inset-left)) {
  .nav-inner, .hero, .section, .footer, .doc {
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
  }
}
