/* ============================================================
   格睿科技 - 主样式
   亮色 + 蓝色简约科技风 · Mobile First · 微信浏览器兼容
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  /* 主色 */
  --blue: #2563EB;
  --blue-dark: #1E40AF;
  --sky: #0EA5E9;
  --cyan: #06B6D4;
  --indigo: #4F46E5;
  --violet: #7C3AED;
  --teal: #14B8A6;

  /* 背景 */
  --bg: #FFFFFF;
  --bg-alt: #F8FAFC;
  --bg-contact: #0F172A;

  /* 文字 */
  --text: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;

  /* 边框 */
  --border: #E2E8F0;

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 4px 12px rgba(15, 23, 42, .08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .12);

  /* 间距 */
  --header-h: 64px; /* 固定导航栏高度，scroll-padding 与下拉菜单都以此为基准，避免出现缝隙 */
  --container: 1200px;
  --radius: 14px;
  --radius-lg: 20px;

  /* 渐变 */
  --gradient: linear-gradient(135deg, #3B82F6, #06B6D4);
  --gradient-text: linear-gradient(135deg, #2563EB, #06B6D4);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h); /* 锚点精确停在固定 header 下沿，避免缝隙 */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
               'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent; /* 微信浏览器：去掉点击高亮 */
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: 16px; /* iOS 防聚焦放大 */ }

/* ---------- 通用容器 ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 820px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  transition: all .25s ease;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
}
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, .28); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(37, 99, 235, .38); }
.btn-outline { border: 1.5px solid var(--border); color: var(--text); background: #fff; }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-block { width: 100%; }

/* ============================================================
   1. 导航栏
   ============================================================ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: all .3s ease;
}
.header.scrolled {
  background: rgba(255, 255, 255, .95);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
  .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
  padding-top: env(safe-area-inset-top); /* iOS 刘海屏 */
  padding-bottom: env(safe-area-inset-bottom);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.logo-icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--gradient);
  color: #fff;
  border-radius: 9px;
  font-size: 17px;
}
.logo-text { letter-spacing: -.3px; }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-weight: 500; font-size: 15px; color: var(--text-muted); transition: color .2s; }
.nav-links a:hover { color: var(--blue); }
.nav-links .btn { color: #fff; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  font-size: 22px;
  color: var(--text);
  -webkit-user-select: none; user-select: none;
}

/* ============================================================
   2. Hero
   ============================================================ */
.hero {
  padding: 120px 0 80px;
  background:
    radial-gradient(circle at 90% 10%, rgba(14, 165, 233, .08), transparent 50%),
    radial-gradient(circle at 0% 80%, rgba(37, 99, 235, .08), transparent 50%),
    var(--bg);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(37, 99, 235, .08);
  color: var(--blue);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 22px;
}
.hero-content h1 {
  font-size: 52px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 22px;
}
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-subtitle { font-size: 18px; color: var(--text-muted); margin-bottom: 32px; }
.hero-cta { display: flex; gap: 14px; margin-bottom: 48px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 30px; font-weight: 800; color: var(--blue); }
.hero-stats span { font-size: 13px; color: var(--text-muted); }

/* Hero 视觉模拟卡 */
.hero-visual { position: relative; }
.hero-card-glow {
  position: absolute;
  inset: -20px;
  background: var(--gradient);
  filter: blur(60px);
  opacity: .25;
  border-radius: 30px;
  z-index: 0;
}
.hero-mockup {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.mockup-bar {
  display: flex;
  gap: 6px;
  padding: 14px 18px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.mockup-bar span { width: 11px; height: 11px; border-radius: 50%; background: #CBD5E1; }
.mockup-bar span:nth-child(1) { background: #F87171; }
.mockup-bar span:nth-child(2) { background: #FBBF24; }
.mockup-bar span:nth-child(3) { background: #34D399; }
.mockup-body { padding: 24px; }
.mockup-line { height: 10px; background: var(--bg-alt); border-radius: 6px; margin-bottom: 14px; }
.mockup-line.w-80 { width: 80%; } .mockup-line.w-60 { width: 60%; }
.mockup-line.w-90 { width: 90%; } .mockup-line.w-50 { width: 50%; }
.mockup-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 18px 0; }
.mockup-grid div { height: 60px; background: linear-gradient(135deg, rgba(37,99,235,.1), rgba(6,182,212,.1)); border-radius: 8px; }

/* ============================================================
   Section 通用
   ============================================================ */
.section { padding: 90px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; margin-bottom: 56px; }
.section-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--blue);
  background: rgba(37, 99, 235, .08);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.section-tag.light { color: #93C5FD; background: rgba(147, 197, 253, .15); }
.section-head h2 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -.6px;
  margin-bottom: 14px;
}
.section-head p { color: var(--text-muted); font-size: 17px; }

/* ============================================================
   3. 服务卡片
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all .3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.card-icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 12px;
  font-size: 22px;
  color: #fff;
  margin-bottom: 20px;
}
.card-icon.blue { background: linear-gradient(135deg, #2563EB, #3B82F6); }
.card-icon.sky { background: linear-gradient(135deg, #0EA5E9, #38BDF8); }
.card-icon.indigo { background: linear-gradient(135deg, #4F46E5, #6366F1); }
.card-icon.cyan { background: linear-gradient(135deg, #06B6D4, #22D3EE); }
.card-icon.violet { background: linear-gradient(135deg, #7C3AED, #8B5CF6); }
.card-icon.teal { background: linear-gradient(135deg, #14B8A6, #2DD4BF); }
.card h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 15px; }

/* ============================================================
   4. 案例
   ============================================================ */
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.case-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all .3s ease;
}
.case-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.case-img {
  height: 200px;
  display: grid; place-items: center;
  color: rgba(255,255,255,.85);
  font-size: 64px;
}
.case-body { padding: 24px; }
.case-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  background: rgba(37, 99, 235, .08);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}
.case-body h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.case-body p { color: var(--text-muted); font-size: 14px; }

/* ============================================================
   5. 核心优势
   ============================================================ */
.feature {
  text-align: center;
  padding: 36px 24px;
}
.feature-icon {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  display: grid; place-items: center;
  background: rgba(37, 99, 235, .08);
  color: var(--blue);
  border-radius: 50%;
  font-size: 24px;
}
.feature h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feature p { color: var(--text-muted); font-size: 14px; }

/* ============================================================
   6. 客户评价
   ============================================================ */
.testimonial {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
}
.stars { color: #FBBF24; margin-bottom: 14px; font-size: 14px; letter-spacing: 2px; }
.testimonial p { color: var(--text); font-size: 15px; margin-bottom: 20px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: var(--gradient);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
}
.testimonial-author strong { display: block; font-size: 15px; }
.testimonial-author span { font-size: 13px; color: var(--text-muted); }

/* ============================================================
   7. 流程时间线
   ============================================================ */
.process-timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  position: relative;
}
.process-step { text-align: center; position: relative; }
.process-num {
  width: 52px; height: 52px;
  margin: 0 auto 18px;
  display: grid; place-items: center;
  background: var(--gradient);
  color: #fff;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .3);
  position: relative;
  z-index: 2;
}
.process-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 26px; left: calc(50% + 30px);
  width: calc(100% - 60px);
  height: 2px;
  background: var(--border);
  z-index: 1;
}
.process-content h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.process-content h3 i { color: var(--blue); margin-right: 6px; }
.process-content p { color: var(--text-muted); font-size: 13px; padding: 0 4px; }

/* ============================================================
   8. 技术栈
   ============================================================ */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.tech-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 10px;
  text-align: center;
  transition: all .3s ease;
}
.tech-item:hover { transform: translateY(-3px); border-color: var(--blue); box-shadow: var(--shadow); }
.tech-item i { font-size: 30px; color: var(--blue); margin-bottom: 10px; display: block; }
.tech-item span { font-size: 13px; font-weight: 600; }

/* ============================================================
   9. FAQ
   ============================================================ */
.faq-list { display: flex; flex-direction: column; gap: 14px; }
.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  transition: border-color .2s;
}
.faq-item[open] { border-color: var(--blue); box-shadow: var(--shadow-sm); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  -webkit-user-select: none; user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { color: var(--blue); transition: transform .3s ease; }
.faq-item[open] summary i { transform: rotate(180deg); }
.faq-answer { padding: 0 24px 20px; color: var(--text-muted); font-size: 15px; line-height: 1.7; }

/* ============================================================
   10. 联系区
   ============================================================ */
.section-contact {
  background:
    radial-gradient(circle at 80% 20%, rgba(14, 165, 233, .15), transparent 50%),
    var(--bg-contact);
  color: #fff;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.contact-info .section-tag { margin-bottom: 18px; }
.contact-info h2 { font-size: 38px; font-weight: 800; margin-bottom: 16px; letter-spacing: -.6px; }
.contact-desc { color: var(--text-light); font-size: 17px; margin-bottom: 32px; }
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.contact-list li { display: flex; align-items: center; gap: 12px; font-size: 16px; color: #CBD5E1; }
.contact-list i { color: var(--sky); width: 20px; text-align: center; font-size: 18px; }
.contact-list a { color: #CBD5E1; transition: color .2s; }
.contact-list a:hover { color: #fff; }

/* 微信二维码 */
.wechat-qr { margin-top: 28px; }
.wechat-qr img {
  width: 160px; height: 160px;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  box-shadow: var(--shadow-lg);
}
.wechat-qr-placeholder {
  width: 160px; height: 160px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  border: 1px dashed rgba(255, 255, 255, .25);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px;
  color: #94A3B8;
}
.wechat-qr-placeholder i { font-size: 36px; color: #22C35E; }
.wechat-qr-placeholder span { font-size: 14px; color: #CBD5E1; }
.wechat-qr-placeholder small { font-size: 11px; color: #64748B; }

.contact-form-wrap { background: #fff; border-radius: var(--radius-lg); padding: 34px; box-shadow: var(--shadow-lg); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.form-group label span { color: #EF4444; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg-alt);
  color: var(--text);
  transition: all .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.form-group textarea { resize: vertical; }
.form-tip { margin-top: 14px; font-size: 14px; text-align: center; min-height: 20px; }
.form-tip.success { color: #16A34A; }
.form-tip.error { color: #DC2626; }
.form-tip.loading { color: var(--text-muted); }
.form-hint { margin-top: 8px; text-align: center; font-size: 12px; color: var(--text-light); }

#submitBtn.loading { opacity: .7; pointer-events: none; }
#submitBtn.loading i { animation: spin 1s linear infinite; }

/* ============================================================
   Footer
   ============================================================ */
.footer { background: #020617; color: #94A3B8; padding-top: 60px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand .logo { margin-bottom: 16px; color: #fff; }
.footer-brand p { font-size: 14px; line-height: 1.7; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 16px; font-weight: 700; }
.footer-col a { display: block; font-size: 14px; padding: 5px 0; color: #94A3B8; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-col a i { width: 18px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 20px 0; }
.footer-bottom p { text-align: center; font-size: 13px; }
.footer-bottom a { color: #64748B; }
.footer-bottom a:hover { color: #fff; }

/* ============================================================
   返回顶部
   ============================================================ */
.back-top {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 48px; height: 48px;
  background: var(--gradient);
  color: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all .3s ease;
  z-index: 900;
}
.back-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* ============================================================
   动画
   ============================================================ */
@keyframes spin { to { transform: rotate(360deg); } }

/* 滚动渐入 */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   响应式：平板（<= 1024px）
   ============================================================ */
@media (max-width: 1024px) {
  .hero-content h1 { font-size: 42px; }
  .section-head h2, .contact-info h2 { font-size: 32px; }
  .card-grid, .case-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-grid { grid-template-columns: repeat(4, 1fr); }
  .process-timeline { grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .process-content p { font-size: 12px; }
}

/* ============================================================
   响应式：手机（<= 640px）—— Mobile First 的核心适配
   ============================================================ */
@media (max-width: 640px) {
  /* 导航：显示汉堡，隐藏桌面菜单 */
  .nav-toggle { display: grid; place-items: center; }
  .nav-links {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    padding: 8px 20px 20px;
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--border);
    transform: translateY(-130%);
    transition: transform .3s ease;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 16px;
  }
  .nav-links .btn { margin-top: 14px; border-bottom: none; }

  /* Hero 单列 */
  .hero { padding: 100px 0 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-content h1 { font-size: 34px; }
  .hero-subtitle { font-size: 16px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .hero-stats { gap: 24px; justify-content: space-between; }
  .hero-stats strong { font-size: 24px; }
  .hero-visual { max-width: 360px; }

  /* Section 缩小内边距 */
  .section { padding: 60px 0; }
  .section-head { margin-bottom: 40px; }
  .section-head h2, .contact-info h2 { font-size: 26px; }
  .section-head p { font-size: 15px; }

  /* 卡片单列 */
  .card-grid, .case-grid { grid-template-columns: 1fr; }
  .card, .case-body { padding: 24px; }
  .tech-grid { grid-template-columns: repeat(3, 1fr); }

  /* 流程时间线转纵向 */
  .process-timeline { grid-template-columns: 1fr; gap: 24px; }
  .process-step { display: flex; gap: 16px; text-align: left; align-items: flex-start; }
  .process-num { margin: 0; flex-shrink: 0; }
  .process-step:not(:last-child)::after { display: none; }
  .process-content h3 { margin-bottom: 4px; }
  .process-content p { font-size: 14px; padding: 0; }

  /* 联系区单列 */
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .contact-form-wrap { padding: 24px 20px; padding-bottom: 28px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }

  /* Footer 单列 */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }

  /* 返回顶部位置调整避开安全区 */
  .back-top {
    right: 16px;
    bottom: calc(20px + env(safe-area-inset-bottom));
  }

  .container { padding: 0 16px; }
}

/* ============================================================
   超小屏（<= 380px）
   ============================================================ */
@media (max-width: 380px) {
  .hero-content h1 { font-size: 28px; }
  .section-head h2, .contact-info h2 { font-size: 23px; }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   无障碍：尊重用户动效偏好
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
