/* ============================================================
   小猪妞科技官网 - 样式表 v3
   风格：克制、编辑感、可信。暖白底 + 墨色文字 + 深蓝点缀
   更新：字号上调（适配中年老板受众）、对比度修正、锚点偏移、
        移动菜单无 JS 兜底、focus 样式、清理死代码
   ============================================================ */

:root {
  --ink: #23272E;
  --muted: #5B6470;         /* 对比度 ≥ 5:1 */
  --line: #E5E7EB;
  --bg: #FAFAF7;
  --card: #FFFFFF;
  --accent: #2B5B84;        /* 深蓝：主强调色 */
  --accent-dark: #214664;
  --dark: #1C2B36;          /* 深色区背景 */
  --dark-line: rgba(255, 255, 255, 0.1);
  --radius: 12px;
  --shadow: 0 1px 3px rgba(23, 30, 38, 0.06), 0 8px 24px rgba(23, 30, 38, 0.05);
  --nav-h: 68px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  /* 锚点跳转时给 sticky 导航留出空间 */
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

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

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

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 780px; }

/* ---------- 可访问性：跳过链接 / 焦点样式 ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  color: var(--accent);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 300;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 导航栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.nav { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 40px; height: 40px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-logo.small { width: 36px; height: 36px; border-radius: 8px; }
.brand-text { font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.brand-text small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0.5px; }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 15px; color: var(--muted); font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--accent); }
.nav-links .nav-cta {
  background: var(--accent); color: #fff;
  padding: 8px 20px; border-radius: 8px;
}
.nav-links .nav-cta:hover { background: var(--accent-dark); color: #fff; }

/* 汉堡按钮：默认隐藏（桌面不需要；无 JS 时也隐藏，让菜单保持可见） */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: 0.3s; }

/* ---------- Hero ---------- */
.hero { background: var(--bg); border-bottom: 1px solid var(--line); }
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 56px;
  padding: 84px 24px 88px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
  border: 1px solid var(--line);
  background: #fff;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: 40px; /* 老浏览器兜底 */
  font-size: clamp(34px, 4.6vw, 50px);
  line-height: 1.35; /* 中文标题行高放宽 */
  font-weight: 800;
  letter-spacing: 0.5px;
}

.hero-sub { margin-top: 20px; font-size: 16.5px; color: var(--muted); max-width: 440px; }

.hero-cta { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 8px;
  font-size: 15.5px;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-trust {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}
.hero-trust li { font-size: 14px; color: var(--muted); }
.hero-trust li::before { content: "✓"; color: var(--accent); margin-right: 6px; font-weight: 700; }

.hero-photo img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* ---------- 通用区块 ---------- */
.section { padding: 76px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark {
  background: var(--dark);
  color: #fff;
  border: 0;
}

.section-head { margin-bottom: 44px; }
.section-head::before {
  content: "";
  display: block;
  width: 32px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 16px;
}
.section-head h2 { font-size: clamp(24px, 3vw, 31px); font-weight: 800; letter-spacing: 0.5px; }
.section-desc { margin-top: 10px; color: var(--muted); font-size: 15.5px; }
.section-dark .section-desc { color: rgba(255, 255, 255, 0.65); }
.section-dark .section-head h2 { color: #fff; }

/* ---------- 服务（编辑式列表） ---------- */
.service-list { border-top: 1px solid var(--line); }
.service-item {
  display: flex;
  gap: 28px;
  padding: 34px 4px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s;
}
.service-item:hover { background: #fff; }
.service-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  line-height: 1.4;
  min-width: 44px;
}
.service-body h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.service-body p { color: var(--muted); font-size: 15px; max-width: 640px; }

/* ---------- 行业场景 ---------- */
.industry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.industry-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s;
}
.industry-card:hover { transform: translateY(-3px); }
.industry-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: 1px solid var(--line); }
.industry-card figcaption { padding: 22px 24px 26px; }
.industry-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.industry-card p { font-size: 14.5px; color: var(--muted); }

.section-note { margin-top: 22px; font-size: 14.5px; color: var(--muted); }

/* ---------- 技术能力 ---------- */
.tech-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tech-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.tech-item h3 { font-size: 17.5px; font-weight: 700; margin-bottom: 8px; padding-left: 12px; border-left: 3px solid var(--accent); }
.tech-item p { font-size: 14.5px; color: var(--muted); }

/* ---------- 怎么做（auto-fit：任何宽度都不挤） ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
}
.step-dot {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.step h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.step p { font-size: 14.5px; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 4px;
  font-size: 16px;
  font-weight: 600;
  position: relative;
  padding-right: 32px;
  transition: color 0.2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--accent);
  font-weight: 400;
  transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item summary:hover { color: var(--accent); }
.faq-item p { padding: 0 4px 20px; font-size: 15px; color: var(--muted); max-width: 680px; }

/* ---------- 关于我们 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.about-text p { font-size: 15.5px; color: var(--muted); margin-bottom: 14px; }
.about-text strong { color: var(--ink); }
.about-photo img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ---------- 联系我们 ---------- */
.contact-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--dark-line);
  border-radius: var(--radius);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.2s, border-color 0.2s;
}
a.contact-item:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.25); }
.contact-label { font-size: 12.5px; color: rgba(255, 255, 255, 0.55); letter-spacing: 1px; }
.contact-value { font-size: 17px; font-weight: 600; color: #fff; overflow-wrap: anywhere; }

.qr-wrap {
  width: 112px; height: 112px;
  margin-top: 10px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.qr-wrap img { width: 100%; height: 100%; object-fit: cover; }
.qr-fallback {
  display: none;
  width: 100%; height: 100%;
  flex-direction: column;
  align-items: center; justify-content: center;
  font-size: 13px;
  color: var(--muted);
  text-align: center; line-height: 1.5;
}

/* ---------- 页脚 ---------- */
.site-footer { background: #16222E; color: rgba(255, 255, 255, 0.6); padding: 40px 0 32px; }
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--dark-line);
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-name { font-size: 14.5px; font-weight: 600; color: #fff; }
.footer-site { font-size: 12.5px; color: rgba(255, 255, 255, 0.55); } /* ≥5:1 对比度 */
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; font-size: 14px; }
.footer-links a:hover { color: #fff; }
.footer-icp { padding-top: 22px; font-size: 12.5px; display: flex; flex-direction: column; gap: 5px; }
.footer-icp a { color: rgba(255, 255, 255, 0.65); }
.footer-icp a:hover { color: #fff; }

/* ---------- 响应式 ---------- */
@media (max-width: 920px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; padding: 56px 24px 64px; }
  .hero-photo img { aspect-ratio: 16 / 9; }
  .industry-grid { grid-template-columns: 1fr; }
  .tech-list { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  /* 联系区：3 列 → 2 列（避免断崖） */
  .contact-list { grid-template-columns: repeat(2, 1fr); }

  /* 移动端导航：
     有 JS → 默认隐藏，点汉堡展开；无 JS → 常驻显示（渐进增强） */
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 24px 22px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 28px rgba(23, 30, 38, 0.1);
  }
  .js .nav-links { display: none; }
  .js .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--line); }
  .nav-links li:last-child { border-bottom: 0; }
  .nav-links a { display: block; padding: 13px 4px; font-size: 16px; }
  .nav-links .nav-cta { text-align: center; margin-top: 12px; }

  .js .nav-toggle { display: block; }
  .js .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .js .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .js .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 560px) {
  .section { padding: 56px 0; }
  .contact-list { grid-template-columns: 1fr; }
  .service-item { gap: 16px; padding: 26px 0; }
  .hero h1 { font-size: 32px; }
}
