/* ===== 变量与重置 ===== */
:root {
  --primary: #ff6a00;
  --primary-dark: #e55d00;
  --primary-light: #fff4ec;
  --text: #1a1a1a;
  --text-secondary: #5a5a5a;
  --text-muted: #8a8a8a;
  --bg: #ffffff;
  --bg-alt: #f8f9fb;
  --border: #e8e8e8;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.1);
  --header-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --transition: .25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
kbd {
  display: inline-block;
  padding: 2px 6px;
  font-size: .85em;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* ===== 通用 ===== */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--primary);
  margin-bottom: 8px;
}

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

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
}

.section-head p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

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

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255,106,0,.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255,106,0,.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

/* ===== 导航 ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  z-index: 100;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.header.scrolled {
  border-color: var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.nav {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-menu a {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
  background: var(--primary-light);
}

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

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

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  margin-left: auto;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero ===== */
.hero {
  padding: calc(var(--header-h) + 48px) 0 64px;
  background: linear-gradient(180deg, #fff8f3 0%, #fff 60%);
  overflow: hidden;
}

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

.badge {
  display: inline-block;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
}

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

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  font-size: 14px;
  color: var(--text-muted);
}

/* Hero 视觉 */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 320px;
}

.keyboard {
  width: 280px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.kb-top {
  height: 12px;
  background: linear-gradient(90deg, #ff6a00, #ff9a4d);
}

.kb-screen {
  padding: 20px 16px 12px;
  background: #fafafa;
}

.kb-screen .line {
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  margin-bottom: 8px;
}
.kb-screen .line.short { width: 60%; }

.candidates {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  font-size: 14px;
}

.candidates b {
  background: var(--primary);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
}

.candidates span {
  background: #fff;
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--text-secondary);
}

.kb-keys {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 12px 16px 16px;
}

.kb-keys::before {
  content: "";
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

/* 用伪元素模拟按键 */
.kb-keys {
  background-image: repeating-linear-gradient(
    to right,
    #eee 0,
    #eee calc(100% / 7 - 6px),
    transparent calc(100% / 7 - 6px),
    transparent calc(100% / 7)
  );
  background-size: 100% 28px;
  background-repeat: repeat-y;
  height: 100px;
}

.float-card {
  position: absolute;
  padding: 10px 16px;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  animation: float 4s ease-in-out infinite;
}

.float-1 {
  top: 20%;
  left: 0;
  animation-delay: 0s;
}

.float-2 {
  bottom: 25%;
  right: 0;
  animation-delay: 1.5s;
}

.float-card strong { color: var(--primary); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ===== 下载区 ===== */
.download {
  padding: 32px 0 64px;
}

.download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 40px 48px;
  background: linear-gradient(135deg, #fff8f3 0%, #fff 100%);
  border: 1px solid #ffe0cc;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.download-info h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.download-info p {
  color: var(--text-secondary);
  font-size: .95rem;
}

.download-cta {
  text-align: center;
  flex-shrink: 0;
}

.download-cta .hint {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== 功能 ===== */
.features {
  padding: 72px 0;
  background: var(--bg-alt);
}

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

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

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

.icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.icon-blue { background: #e8f0fe; }
.icon-purple { background: #f3e8ff; }
.icon-orange { background: #fff4ec; color: var(--primary); }
.icon-pink { background: #fce7f3; }
.icon-green { background: #e6f7ed; }
.icon-cyan { background: #e0f7fa; }

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 650;
  margin-bottom: 8px;
}

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

/* ===== 产品展示 ===== */
.showcase {
  padding: 72px 0;
}

.window {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.window-bar {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: #f5f5f5;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

.dots {
  display: flex;
  gap: 6px;
  margin-right: 16px;
}

.dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
}

.dots i:nth-child(1) { background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }

.window-bar .title { flex: 1; text-align: center; }
.controls { letter-spacing: 4px; }

.window-body {
  display: grid;
  grid-template-columns: 160px 1fr;
  min-height: 280px;
}

.sidebar {
  padding: 20px 12px;
  background: #fafafa;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.sidebar b {
  padding: 0 10px 12px;
  font-size: 14px;
}

.sidebar span {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: default;
}

.sidebar .active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.panel {
  padding: 24px 28px;
}

.panel h3 {
  font-size: 1.05rem;
  margin-bottom: 20px;
}

.panel label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--text-secondary);
}

.panel .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--text-secondary);
}

.panel select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
}

.btn-save {
  margin-top: 16px;
  padding: 8px 20px;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  font-size: 14px;
  opacity: .7;
}

/* ===== 数据 ===== */
.stats {
  padding: 56px 0;
  background: linear-gradient(135deg, #ff6a00 0%, #ff8c3a 100%);
  color: #fff;
}

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

.stat strong {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1;
}

.stat span {
  font-size: 1.2rem;
  font-weight: 600;
  margin-left: 2px;
}

.stat p {
  margin-top: 8px;
  font-size: 14px;
  opacity: .9;
}

/* ===== FAQ ===== */
.faq {
  padding: 72px 0;
  background: var(--bg-alt);
}

.faq-list {
  max-width: 680px;
  margin: 0 auto;
}

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

.faq-item button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  color: var(--text);
  transition: background var(--transition);
}

.faq-item button:hover {
  background: #fafafa;
}

.plus {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.plus::before,
.plus::after {
  content: "";
  position: absolute;
  background: var(--text-muted);
  transition: transform var(--transition);
}

.plus::before {
  top: 9px;
  left: 3px;
  width: 14px;
  height: 2px;
}

.plus::after {
  top: 3px;
  left: 9px;
  width: 2px;
  height: 14px;
}

.faq-item.open .plus::after {
  transform: rotate(90deg);
  opacity: 0;
}

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

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

.faq-answer p {
  padding: 0 20px 18px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.faq-answer a {
  color: var(--primary);
  font-weight: 500;
}

.faq-answer a:hover {
  text-decoration: underline;
}

/* ===== 底部 CTA ===== */
.cta-bottom {
  padding: 64px 0;
  text-align: center;
  background: #fff;
}

.cta-bottom h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.cta-bottom p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ===== 页脚 ===== */
.footer {
  background: #1a1a1a;
  color: #ccc;
  padding: 48px 0 0;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid #333;
}

.footer-brand .logo {
  color: #fff;
  margin-bottom: 12px;
}

.footer-brand .logo img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.footer-brand p {
  color: #999;
  font-size: 13px;
}

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

.footer-links b {
  display: block;
  color: #fff;
  margin-bottom: 12px;
  font-size: 13px;
}

.footer-links a {
  display: block;
  color: #999;
  margin-bottom: 8px;
  font-size: 13px;
  transition: color var(--transition);
}

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

.copyright {
  padding: 20px 0;
  text-align: center;
  font-size: 12px;
  color: #777;
}

.copyright a {
  color: #999;
}

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

/* ===== 回到顶部 & Toast ===== */
.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 18px;
  box-shadow: 0 4px 16px rgba(255,106,0,.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
  z-index: 50;
}

.back-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-top:hover {
  background: var(--primary-dark);
}

.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 24px;
  background: #1a1a1a;
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  visibility: hidden;
  transition: all .3s ease;
  z-index: 60;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-desc { margin-left: auto; margin-right: auto; }

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

  .hero-meta { justify-content: center; }

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

  .download-card {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .window-body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

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

@media (max-width: 640px) {
  .nav-menu {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: all .3s ease;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu a {
    width: 100%;
    padding: 12px 16px;
  }

  .menu-toggle { display: flex; }

  .nav-cta { display: none; }

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

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

  .hero {
    padding-top: calc(var(--header-h) + 32px);
  }

  .features, .showcase, .faq {
    padding: 56px 0;
  }
}

@media (min-width: 901px) {
  .nav-cta { display: inline-flex; }
}
