/* 打字通官网样式表 - 轻量、移动优先 */

/* CSS 变量 */
:root {
  --primary: #2c3e50;
  --primary-light: #3d566e;
  --accent: #27ae60;
  --accent-hover: #219150;
  --text: #1f2937;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-card: #f1f5f9;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --radius-lg: 20px;
  --max-width: 1200px;
}

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

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

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

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4, p {
  margin: 0;
}

/* 工具类 */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto 48px;
}

/* 导航栏 */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary);
}

.logo img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: var(--shadow-sm);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 28px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

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

.nav-cta {
  display: none;
  background: var(--primary);
  color: #fff;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.nav-cta:hover {
  background: var(--primary-light);
}

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: var(--primary);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px 24px;
  box-shadow: var(--shadow-lg);
}

.mobile-menu.open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 500;
}

.mobile-menu a:last-child {
  border-bottom: none;
}

/* Hero 首屏 */
.hero {
  position: relative;
  padding: 60px 0 80px;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
  overflow: hidden;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(39, 174, 96, 0.1);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero-desc {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 540px;
  line-height: 1.7;
}

.hero-cta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 28px;
  max-width: 760px;
}

.hero-cta .btn {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  font-size: 0.95rem;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(39, 174, 96, 0.35);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 18px rgba(39, 174, 96, 0.4);
}

.btn-secondary {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-soft);
  border-color: #cbd5e1;
}

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

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat strong {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.hero-stat span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* 手机 mockup */
.phone-mockup {
  position: relative;
  justify-self: center;
  width: 280px;
  height: 560px;
  background: var(--primary);
  border-radius: 40px;
  padding: 12px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,0.05);
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: #f8fafc;
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  height: 24px;
  background: var(--primary);
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-notch::after {
  content: "";
  width: 80px;
  height: 16px;
  background: #1a252f;
  border-radius: 0 0 12px 12px;
}

.phone-header {
  background: var(--primary);
  color: #fff;
  padding: 16px;
}

.phone-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.phone-header p {
  font-size: 0.75rem;
  opacity: 0.85;
}

.phone-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 12px;
}

.phone-stat {
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.phone-stat strong {
  display: block;
  font-size: 1.1rem;
  color: var(--primary);
}

.phone-stat span {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.phone-section {
  padding: 0 12px;
  margin-bottom: 10px;
}

.phone-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

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

.phone-card {
  background: #fff;
  border-radius: 10px;
  padding: 10px 4px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.phone-card-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
  font-size: 0.85rem;
}

.phone-card-label {
  font-size: 0.65rem;
  color: var(--text);
  font-weight: 600;
}

/* 功能卡片 */
.features {
  background: var(--bg-soft);
}

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

.feature-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 18px;
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 平台下载 */
.platforms {
  background: #fff;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.platform-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s;
}

.platform-card:hover {
  background: #fff;
  border-color: var(--accent);
}

.platform-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

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

.platform-info {
  flex: 1;
  min-width: 0;
}

.platform-info h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.platform-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.platform-arrow {
  color: var(--text-muted);
}

/* 社会认同 / 数据条 */
.social-proof {
  background: var(--primary);
  color: #fff;
  padding: 60px 0;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 32px;
  text-align: center;
}

.social-item strong {
  display: block;
  font-size: 2.25rem;
  font-weight: 900;
  margin-bottom: 6px;
}

.social-item span {
  font-size: 0.95rem;
  opacity: 0.85;
}

.review-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 40px;
}

.review-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 20px;
  text-align: left;
  backdrop-filter: blur(4px);
}

.review-card p {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 12px;
  opacity: 0.95;
}

.review-author {
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0.75;
}

/* FAQ */
.faq {
  background: var(--bg-soft);
}

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

.faq-item {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  text-align: left;
}

.faq-question svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 12px;
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 300px;
}

.faq-answer p {
  padding: 0 22px 18px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* 小程序弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 320px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.2s;
}

.modal-overlay.open .modal {
  transform: scale(1);
}

.modal img {
  width: 180px;
  height: 180px;
  margin: 0 auto 16px;
  border-radius: 8px;
}

.modal h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.modal p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.modal-close {
  background: var(--bg-card);
  color: var(--text);
  padding: 10px 24px;
  border-radius: 20px;
  font-weight: 600;
}

/* 页脚 */
.footer {
  background: var(--primary);
  color: #fff;
  padding: 48px 0 32px;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.footer-desc {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 320px;
}

.footer-links h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.footer-links a {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
}

.footer-bottom p {
  margin: 6px 0;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: underline;
}

.footer-bottom a:hover {
  color: #fff;
}

.footer-icp {
  font-size: 0.8rem;
}

.footer-report {
  font-size: 0.8rem;
}

/* 动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate {
  animation: fadeInUp 0.6s ease forwards;
}

/* 响应式 */
@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .social-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

@media (min-width: 520px) {
  .hero-cta {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .nav-links,
  .nav-cta {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
  }

  .hero {
    padding: 80px 0 100px;
  }

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

  .review-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1100px) {
  .phone-mockup {
    width: 300px;
    height: 600px;
  }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
