/* ============ 基础与变量 ============ */
:root {
  --primary: #2f6bff;
  --primary-dark: #1f4fc4;
  --text: #1f2733;
  --text-muted: #5b6675;
  --bg: #ffffff;
  --bg-alt: #f4f7fc;
  --border: #e3e9f2;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(31, 63, 120, 0.1);
  --container: 1140px;
}

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

html { scroll-behavior: smooth; }

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

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

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

/* ============ 按钮 ============ */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { border-color: var(--border); color: var(--text); background: #fff; }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ============ 顶部导航 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.brand-mark { color: var(--primary); margin-right: 4px; }

.nav-menu {
  display: flex;
  gap: 28px;
}
.nav-link {
  font-size: 15px;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--primary); }

/* 汉堡按钮（默认移动端显示） */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s;
}

/* ============ Hero ============ */
.hero {
  background: linear-gradient(135deg, #2f6bff 0%, #6f9bff 55%, #9cc2ff 100%);
  color: #fff;
  padding: 80px 0;
}
.hero-inner { max-width: 720px; }
.hero-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 13px;
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.25;
  margin-bottom: 18px;
}
.hero-desc {
  font-size: clamp(15px, 2vw, 18px);
  opacity: 0.92;
  margin-bottom: 28px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .btn-ghost { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255,255,255,0.4); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, 0.24); color: #fff; }

/* ============ 通用区块 ============ */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-title {
  font-size: clamp(22px, 3vw, 30px);
  text-align: center;
  margin-bottom: 10px;
}
.section-title.left { text-align: left; }
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 36px;
}

/* ============ 卡片网格 ============ */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-4px); }
.card-icon { font-size: 30px; margin-bottom: 14px; }
.card h3 { font-size: 18px; margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 15px; }

/* ============ 关于 + 统计 ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
}
.about-text p { color: var(--text-muted); margin: 16px 0 20px; }
.check-list { display: grid; gap: 10px; }
.check-list li {
  padding-left: 28px;
  position: relative;
  color: var(--text);
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.stat-num {
  display: block;
  font-size: 30px;
  font-weight: 700;
  color: var(--primary);
}
.stat-label { color: var(--text-muted); font-size: 14px; }

/* ============ 案例网格 ============ */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.work-item {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: var(--tone, var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 17px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.work-item:hover { transform: scale(1.02); }

/* ============ 联系表单 ============ */
.contact-wrap { max-width: 680px; }
.contact-form { display: grid; gap: 18px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.contact-form label { display: grid; gap: 8px; font-size: 14px; font-weight: 600; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-tip { font-size: 14px; min-height: 20px; }
.form-tip.ok { color: #1f9d6b; }
.form-tip.err { color: #e0493b; }

/* ============ 页脚 ============ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0;
  background: var(--bg);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  color: var(--text-muted);
  font-size: 14px;
}
.back-top { color: var(--primary); }

/* ============ 平板 (≥768px) ============ */
@media (min-width: 768px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .form-row { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1.1fr 1fr; }
  .work-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { flex-direction: row; justify-content: space-between; }
}

/* ============ 手机端导航展开 ============ */
@media (max-width: 767.98px) {
  .hamburger { display: flex; }

  .nav-menu {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-menu.open { max-height: 320px; }
  .nav-menu li { border-top: 1px solid var(--border); }
  .nav-link {
    display: block;
    padding: 15px 20px;
  }

  .hero { padding: 56px 0; }
  .section { padding: 48px 0; }
}
