/* ==========================================================
   欣忆医疗 IMedxy · 移动端官网样式
   公众号内嵌，移动优先，单页滚动
   ========================================================== */

/* ---------- 基础重置 ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
section[id] { scroll-margin-top: 64px; }
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Helvetica Neue", "Hiragino Sans GB", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #1F2937;
  background: #F8FAFC;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; }
ul { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4, h5, p { margin: 0; }

/* ---------- 颜色变量 ---------- */
:root {
  --primary: #0F3A8C;
  --primary-bright: #1E5BD6;
  --primary-soft: #EBF2FF;
  --accent: #06B6D4;
  --accent-soft: #ECFEFF;
  --warm: #FB923C;
  --warm-soft: #FFF7ED;
  --text: #1F2937;
  --text-soft: #6B7280;
  --text-mute: #9CA3AF;
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --border: #E5E7EB;
  --shadow-sm: 0 1px 2px rgba(15, 58, 140, 0.04), 0 2px 6px rgba(15, 58, 140, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 58, 140, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 58, 140, 0.12);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --container: 720px;
}

/* ---------- 通用容器 ---------- */
.section {
  padding: 56px 20px;
  position: relative;
}
.section + .section {
  border-top: 1px solid #EEF2F7;
}
.section-inner {
  max-width: var(--container);
  margin: 0 auto;
}
.section-head {
  text-align: center;
  margin-bottom: 32px;
}
.section-kicker {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--primary-bright);
  font-weight: 700;
  background: var(--primary-soft);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.section-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  line-height: 1.3;
  margin-bottom: 10px;
}
.section-lead {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
  max-width: 32em;
  margin: 0 auto;
}

/* ---------- 顶部导航 ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-cn { font-weight: 800; font-size: 16px; color: var(--primary); letter-spacing: 1px; }
.brand-en { font-size: 11px; color: var(--text-mute); letter-spacing: 1px; margin-top: 2px; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: var(--primary);
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-menu {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 8px 20px 16px;
  display: none;
  flex-direction: column;
  gap: 2px;
  max-height: calc(100vh - 56px);
  overflow-y: auto;
}
.nav-menu.open { display: flex; }
.nav-menu a {
  display: block;
  padding: 12px 4px;
  font-size: 15px;
  color: var(--text);
  border-bottom: 1px solid #F3F4F6;
}
.nav-menu a:last-child { border-bottom: none; }
.nav-menu a:active { background: var(--primary-soft); color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 96px 20px 32px;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(ellipse at top right, rgba(6, 182, 212, 0.35) 0%, transparent 55%),
    linear-gradient(135deg, #0F3A8C 0%, #1E5BD6 50%, #0EA5E9 100%);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.25) 0%, transparent 50%);
  pointer-events: none;
}
.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -60px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -40px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  text-align: center;
}
.hero-tag {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 2px;
  padding: 5px 14px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  margin-bottom: 18px;
  backdrop-filter: blur(6px);
}
.hero-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.3;
  margin-bottom: 16px;
}
.hero-title .accent {
  background: linear-gradient(90deg, #06B6D4, #FBBF24);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subtitle {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255,255,255,0.88);
  margin-bottom: 28px;
  max-width: 32em;
  margin-left: auto;
  margin-right: auto;
}
.hero-subtitle strong {
  color: #FBBF24;
  font-weight: 700;
}
.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.btn-primary:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }
.btn-ghost {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
}
.btn-ghost:hover { background: rgba(255,255,255,0.18); }
.btn-block { width: 100%; }
.section .btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-bright) 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(30, 91, 214, 0.25);
}

/* ---------- 数据条 ---------- */
.hero-stats {
  position: relative;
  max-width: var(--container);
  margin: 32px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-md);
  padding: 18px 8px;
}
.stat {
  text-align: center;
  color: #fff;
}
.stat-num {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #FBBF24, #06B6D4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}
.stat-label {
  font-size: 11px;
  color: rgba(255,255,255,0.78);
  margin-top: 4px;
}

/* ---------- 关于我们 ---------- */
.about-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #EEF2F7;
}
.about-lead {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  text-align: center;
  margin-bottom: 24px;
}
.about-lead strong {
  color: var(--primary);
  font-weight: 700;
}
.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.feature {
  background: linear-gradient(135deg, var(--primary-soft) 0%, #fff 100%);
  border: 1px solid #EEF2F7;
  border-radius: var(--radius-md);
  padding: 16px;
}
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.feature p {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.5;
}

/* ---------- 三位一体 ---------- */
.section-solution {
  background:
    radial-gradient(ellipse at top, var(--primary-soft) 0%, transparent 60%),
    var(--bg);
}
.tri-wheel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  position: relative;
}
.tri-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #EEF2F7;
  position: relative;
  overflow: hidden;
}
.tri-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}
.tri-card-1::before { background: linear-gradient(90deg, #1E5BD6, #06B6D4); }
.tri-card-2::before { background: linear-gradient(90deg, #06B6D4, #10B981); }
.tri-card-3::before { background: linear-gradient(90deg, #FB923C, #FBBF24); }

.tri-num {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 32px;
  font-weight: 900;
  color: var(--primary-soft);
  letter-spacing: -1px;
}
.tri-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}
.tri-card p {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.7;
  margin-bottom: 12px;
}
.tri-list li {
  position: relative;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 4px;
}
.tri-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}
.tri-card-1 .tri-list li::before { background: #1E5BD6; }
.tri-card-2 .tri-list li::before { background: #06B6D4; }
.tri-card-3 .tri-list li::before { background: #FB923C; }

.tri-center { display: none; }

/* ---------- 项目 ---------- */
.project-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 8px;
  margin-bottom: 18px;
  scrollbar-width: none;
}
.project-tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0;
  height: 32px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--card);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.tab.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-bright) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 10px rgba(30, 91, 214, 0.25);
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 32px;
}
.project-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  border: 1px solid #EEF2F7;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}
.project-card.hide { display: none; }
.project-card:active { transform: scale(0.99); }
.project-num {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--primary-bright);
  background: var(--primary-soft);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}
.project-card h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
  line-height: 1.4;
}
.project-tagline {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.7;
  margin-bottom: 14px;
}
.project-target {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(90deg, var(--accent-soft), transparent);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  margin-bottom: 10px;
}
.target-label {
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 1px;
}
.target-val {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}
.project-value {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}
.project-value strong {
  color: var(--warm);
  font-weight: 700;
}

/* 服务 & 合作 */
.service-block, .collab-block {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  border: 1px solid #EEF2F7;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.service-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 18px;
  position: relative;
  padding-left: 12px;
}
.service-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 2px;
}
.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.service-item {
  padding: 14px 16px;
  background: linear-gradient(90deg, var(--primary-soft), #fff);
  border-radius: var(--radius-sm);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid #EEF2F7;
}
.service-icon {
  font-size: 22px;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(15, 58, 140, 0.08);
}
.service-item h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.service-item p {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.6;
}

.collab-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.collab-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #DBE5F5;
}
.collab-note {
  font-size: 12px;
  color: var(--text-soft);
  text-align: center;
  margin-top: 8px;
}

/* ---------- 案例 ---------- */
.section-cases {
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
}
.case-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 32px;
}
.case-card {
  background: var(--card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid #EEF2F7;
}
.case-cover {
  position: relative;
  padding: 24px 22px;
  color: #fff;
  min-height: 100px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.case-cover-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  letter-spacing: 1px;
}
.case-cover-num {
  font-size: 32px;
  font-weight: 900;
  opacity: 0.5;
  letter-spacing: -1px;
}
.case-body { padding: 20px 22px 24px; }
.case-body h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
  line-height: 1.4;
}
.case-body > p {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 12px;
  line-height: 1.6;
}
.case-points {
  margin-bottom: 12px;
}
.case-points li {
  position: relative;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 5px;
  line-height: 1.6;
}
.case-points li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.case-result {
  padding: 10px 12px;
  background: linear-gradient(90deg, var(--warm-soft), transparent);
  border-left: 3px solid var(--warm);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
}
.case-result strong { color: var(--warm); }

.expert-list {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  border: 1px solid #EEF2F7;
  box-shadow: var(--shadow-sm);
}
.expert-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.expert-card {
  padding: 14px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary);
}
.expert-dept {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.expert-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}
.expert-project {
  font-size: 13px;
  color: var(--primary-bright);
  font-weight: 600;
  margin-bottom: 4px;
}
.expert-tag {
  font-size: 11px;
  color: var(--text-soft);
}

/* ---------- 联系我们 ---------- */
.section-contact {
  background:
    radial-gradient(ellipse at center bottom, var(--primary-soft) 0%, transparent 70%),
    var(--bg);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 22px;
}
.contact-info {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 22px 22px 8px;
  border: 1px solid #EEF2F7;
  box-shadow: var(--shadow-md);
}
.contact-item {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}
.contact-item:last-child { border-bottom: none; }
.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-soft), #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.contact-label {
  font-size: 12px;
  color: var(--text-mute);
  margin-bottom: 2px;
}
.contact-val {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
}
.contact-val-link {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.5px;
}
.contact-val-link:active { opacity: 0.7; }

.contact-qr {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 22px 22px 18px;
  border: 1px solid #EEF2F7;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.qr-frame {
  position: relative;
  width: 200px;
  height: 200px;
  padding: 10px;
  background: #fff;
  border-radius: var(--radius-md);
  border: 2px solid var(--primary-soft);
  margin-bottom: 14px;
  box-shadow: 0 8px 22px rgba(15, 58, 140, 0.12);
}
.qr-frame::before,
.qr-frame::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 3px solid var(--primary-bright);
}
.qr-frame::before {
  top: -2px; left: -2px;
  border-right: none; border-bottom: none;
  border-top-left-radius: 14px;
}
.qr-frame::after {
  bottom: -2px; right: -2px;
  border-left: none; border-top: none;
  border-bottom-right-radius: 14px;
}
.qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.qr-tip {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.7;
  margin: 0;
}
.qr-tip strong {
  color: var(--primary);
  font-size: 14px;
  display: block;
  margin-bottom: 2px;
}

.contact-cta {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-outline {
  background: #fff;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  box-shadow: 0 4px 10px rgba(15, 58, 140, 0.08);
}
.btn-outline:hover { background: var(--primary-soft); }

@media (min-width: 560px) {
  .contact-grid { grid-template-columns: 1.2fr 1fr; align-items: stretch; }
  .qr-frame { width: 220px; height: 220px; }
}

/* ---------- 底部 ---------- */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.7);
  padding: 32px 20px 60px;
  text-align: center;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
}
.footer-brand {
  margin-bottom: 12px;
}
.footer-brand strong {
  display: block;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
}
.footer-brand span {
  font-size: 12px;
}
.footer-meta p {
  font-size: 12px;
  margin: 4px 0;
  opacity: 0.85;
}

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed;
  right: 16px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-bright));
  color: #fff;
  box-shadow: 0 6px 16px rgba(30, 91, 214, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
  z-index: 50;
}
.to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.to-top:active { transform: scale(0.95); }

/* ---------- 响应式 ---------- */
@media (min-width: 560px) {
  .hero-title { font-size: 36px; }
  .hero-stats { padding: 22px 16px; }
  .stat-num { font-size: 26px; }
  .stat-label { font-size: 12px; }
  .section-title { font-size: 30px; }
  .about-features { grid-template-columns: repeat(4, 1fr); }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .expert-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 720px) {
  .section { padding: 72px 32px; }
  .hero { padding: 110px 32px 40px; }
  .hero-title { font-size: 42px; }
  .project-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: none; }
  .nav-menu {
    position: static;
    display: flex !important;
    flex-direction: row;
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    gap: 4px;
  }
  .nav-menu a {
    padding: 8px 14px;
    border: none;
    font-size: 14px;
    border-radius: 999px;
    font-weight: 500;
  }
  .nav-menu a:hover { background: var(--primary-soft); color: var(--primary); }
}

/* 动效 */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.section { animation: fadeUp 0.6s ease-out both; }
.section:nth-child(2) { animation-delay: 0.05s; }
.section:nth-child(3) { animation-delay: 0.1s; }

/* 卡片入场动画 —— 在视口内才触发，外层 fallback 到可见状态 */
.reveal { opacity: 1; }
.reveal:not(.in-view) { opacity: 0; transform: translateY(12px); transition: none; }
.reveal.in-view {
  animation: fadeUp 0.5s ease-out both;
}
.project-grid .reveal:nth-child(1).in-view { animation-delay: 0.02s; }
.project-grid .reveal:nth-child(2).in-view { animation-delay: 0.06s; }
.project-grid .reveal:nth-child(3).in-view { animation-delay: 0.10s; }
.project-grid .reveal:nth-child(4).in-view { animation-delay: 0.14s; }
.project-grid .reveal:nth-child(5).in-view { animation-delay: 0.18s; }
.project-grid .reveal:nth-child(6).in-view { animation-delay: 0.22s; }
.project-grid .reveal:nth-child(7).in-view { animation-delay: 0.26s; }
.project-grid .reveal:nth-child(8).in-view { animation-delay: 0.30s; }
.project-grid .reveal:nth-child(9).in-view { animation-delay: 0.34s; }
.project-grid .reveal:nth-child(10).in-view { animation-delay: 0.38s; }

/* 安全区适配 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .footer { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .to-top { bottom: calc(24px + env(safe-area-inset-bottom)); }
}
