/* ===== 基础变量 ===== */
:root {
  --primary: #007bff;
  --primary-dark: #0062cc;
  --text: #1e293b;
  --text-muted: #64748b;
  --bg: #f8fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 12px 40px rgba(15, 23, 42, 0.14);
  --radius: 16px;
  --header-h: 72px;
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1200px, 100% - 32px);
  margin-inline: auto;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-dark {
  background: #0f172a;
  color: var(--white);
}

.btn-dark:hover {
  background: #1e293b;
}

/* ===== 头部导航 ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.header-inner {
  display: flex;
  align-items: center;
  height: var(--header-h);
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-img {
  height: 38px;
  width: auto;
  display: block;
}

.logo-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.logo-title::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 18px;
  background: var(--border);
  margin-right: 10px;
  vertical-align: middle;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
}

.header-actions {
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ===== Hero ===== */
.hero {
  padding: 64px 0 48px;
  background: linear-gradient(180deg, #eff6ff 0%, var(--bg) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
}

.hero-label {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-content h1 {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #0f172a, #334155);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 28px;
}

.hero-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.featured-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, border-color 0.2s;
  color: var(--text);
}

.featured-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: color-mix(in srgb, var(--card-accent, var(--primary)) 40%, var(--border));
}

.featured-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.featured-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--card-accent, var(--primary));
  margin-bottom: 8px;
}

.featured-body h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
  color: var(--text);
}

.featured-body p {
  font-size: 13px;
  color: var(--text-muted);
  flex: 1;
  line-height: 1.6;
}

.featured-link {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--card-accent, var(--primary));
}

/* ===== 产品网格 ===== */
.products {
  padding: 48px 0 80px;
}

.section-head {
  text-align: center;
  margin-bottom: 40px;
}

.section-head h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-head p {
  color: var(--text-muted);
  font-size: 15px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.product-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
  border-color: #cbd5e1;
}

/* App 图标 */
.app-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--card-accent) 88%, #fff 12%), var(--card-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--card-accent) 28%, transparent);
}

.app-icon i {
  font-size: 22px;
  color: #fff;
  line-height: 1;
}

.app-icon--lg {
  width: 60px;
  height: 60px;
  border-radius: 14px;
}

.app-icon--lg i {
  font-size: 26px;
}

/* 高级配色 */
.tone-brand   { --card-accent: #007AFF; }
.tone-blue    { --card-accent: #4F6BF6; }
.tone-indigo  { --card-accent: #6366C7; }
.tone-violet  { --card-accent: #7C6FD6; }
.tone-purple  { --card-accent: #9B6BB8; }
.tone-lavender{ --card-accent: #8B7EC8; }
.tone-rose    { --card-accent: #C7668A; }
.tone-red     { --card-accent: #C75B5B; }
.tone-orange  { --card-accent: #C87B4A; }
.tone-amber   { --card-accent: #C4924A; }
.tone-olive   { --card-accent: #7A8B6E; }
.tone-green   { --card-accent: #5A9E72; }
.tone-emerald { --card-accent: #4F9E7A; }
.tone-teal    { --card-accent: #3D9A8B; }
.tone-cyan    { --card-accent: #4A9BAA; }
.tone-sky     { --card-accent: #4A8FBF; }
.tone-ocean   { --card-accent: #4F7CAC; }
.tone-steel   { --card-accent: #5B7A9D; }
.tone-slate   { --card-accent: #6B7B8C; }

.card-body {
  padding: 20px 18px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card-body .app-icon {
  margin-bottom: 14px;
}

.card-body h3 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 6px;
  color: var(--text);
}

.card-body p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ===== 页脚 ===== */
.footer {
  background: #0f172a;
  color: #94a3b8;
  padding-top: 56px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand strong {
  display: block;
  font-size: 20px;
  color: white;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.7;
}

.footer-links h4,
.footer-contact h4 {
  color: white;
  font-size: 15px;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 14px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}

.footer-contact p {
  font-size: 14px;
  margin-bottom: 8px;
}

.footer-contact a {
  color: #60a5fa;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
}

.footer-bottom p {
  font-size: 12px;
  text-align: center;
}

/* ===== 浮动栏 ===== */
.float-bar {
  position: fixed;
  right: 16px;
  bottom: 80px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.float-item {
  width: 52px;
  height: 52px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s, box-shadow 0.2s, color 0.2s;
}

.float-item:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-hover);
  color: var(--primary);
}

.float-item svg {
  width: 20px;
  height: 20px;
}

/* ===== 响应式 ===== */
@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
    margin-left: 0;
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    width: 100%;
    padding: 12px 16px;
  }

  .header-actions {
    display: none;
  }

  .hero {
    padding: 40px 0 32px;
  }

  .hero-featured {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .float-bar {
    right: 12px;
    bottom: 24px;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
  }

  .logo-img {
    height: 32px;
  }

  .logo-title {
    font-size: 16px;
  }

  .featured-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* 导航展开时汉堡动画 */
.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
