/* =====================================================================
   伴侣1代 Companion Gen-1 — 响应式产品页样式
   设计系统：CSS 变量 + Flexbox / Grid + 移动端断点
   ===================================================================== */

:root {
  /* 颜色 */
  --bg: #f6f8fc;
  --bg-alt: #eef2f9;
  --surface: #ffffff;
  --ink: #0f1830;
  --ink-soft: #46506b;
  --ink-muted: #6b7693;
  --line: #e2e8f4;

  --brand: #4f46e5;
  --brand-2: #06b6d4;
  --brand-grad: linear-gradient(120deg, #4f46e5 0%, #06b6d4 100%);
  --accent: #f43f7f;

  --dark: #0b1020;
  --dark-2: #121a33;
  --dark-ink: #e8edff;
  --dark-soft: #aab4d6;

  /* 间距 / 圆角 / 阴影 */
  --maxw: 1160px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(20, 30, 70, 0.08);
  --shadow-lg: 0 24px 60px rgba(20, 30, 70, 0.16);

  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Segoe UI",
    system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px; /* 锚点避开 sticky 头部 */
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }

p { margin: 0 0 1em; }

strong { color: var(--ink); font-weight: 700; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ===================== 头部 / 导航 ===================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.15rem; letter-spacing: .5px;
}
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--brand-grad);
  box-shadow: 0 4px 12px rgba(79, 70, 229, .4);
  display: inline-block;
}
.brand-accent { color: var(--brand); }

.nav-menu {
  display: flex; align-items: center; gap: 4px;
  list-style: none; margin: 0; padding: 0;
}
.nav-menu > li > a {
  display: inline-block; padding: 8px 14px; border-radius: 999px;
  color: var(--ink-soft); font-weight: 600; font-size: .95rem;
  transition: color .2s, background .2s;
}
.nav-menu > li > a:hover { color: var(--brand); background: var(--bg-alt); }
.nav-cta {
  background: var(--brand-grad) !important; color: #fff !important;
  box-shadow: 0 6px 18px rgba(79, 70, 229, .35);
}
.nav-cta:hover { filter: brightness(1.05); }

/* 汉堡按钮 */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 0; border: 0; background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; width: 22px; background: var(--ink);
  border-radius: 2px; transition: transform .25s, opacity .25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===================== Hero ===================== */
.hero {
  position: relative; overflow: hidden;
  color: var(--dark-ink);
  background: radial-gradient(120% 120% at 80% 0%, #1b2550 0%, var(--dark) 60%);
  padding: 96px 0 110px;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.orb { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .55; }
.orb-1 { width: 360px; height: 360px; background: #4f46e5; top: -80px; right: -60px; }
.orb-2 { width: 300px; height: 300px; background: #06b6d4; bottom: -120px; left: -60px; opacity: .4; }
.orb-3 { width: 220px; height: 220px; background: #f43f7f; top: 40%; left: 55%; opacity: .3; }
.grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 40%, transparent 100%);
}
.hero-inner { position: relative; z-index: 1; }
.hero-eyebrow {
  text-transform: uppercase; letter-spacing: 2px; font-size: .8rem;
  color: var(--dark-soft); margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 800; margin: 0 0 18px;
  letter-spacing: -1px;
}
.hero-sub {
  font-size: clamp(1rem, 2.2vw, 1.3rem); color: var(--dark-soft);
  max-width: 640px; margin: 0 0 32px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 48px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 999px; font-weight: 700; font-size: 1rem;
  cursor: pointer; border: 1px solid transparent; transition: transform .15s, box-shadow .2s, filter .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: 0 10px 26px rgba(79,70,229,.4); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: rgba(255,255,255,.08); color: var(--dark-ink); border-color: rgba(255,255,255,.25); }
.btn-ghost:hover { background: rgba(255,255,255,.16); }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  margin: 0; max-width: 720px;
}
.hero-stats div {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-sm); padding: 16px 14px; text-align: center;
}
.hero-stats dt { font-size: clamp(1.4rem, 3.5vw, 2rem); font-weight: 800; color: #fff; }
.hero-stats dd { margin: 4px 0 0; font-size: .85rem; color: var(--dark-soft); }

/* ===================== 通用 Section ===================== */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); }
.section-eyebrow {
  text-transform: uppercase; letter-spacing: 2px; font-size: .8rem;
  font-weight: 700; color: var(--brand); margin: 0 0 10px;
}
.section-title { font-size: clamp(1.7rem, 4vw, 2.6rem); margin: 0 0 14px; }
.section-lead { color: var(--ink-soft); max-width: 720px; margin: 0 0 40px; font-size: 1.05rem; }

/* ===================== 公司简介 ===================== */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.about-text p { color: var(--ink-soft); font-size: 1.05rem; }
.about-pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.about-pills li {
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 18px; font-weight: 600; font-size: .92rem; color: var(--ink);
  box-shadow: var(--shadow);
}

/* ===================== 产品概述 ===================== */
.overview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.info-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.info-card-wide { grid-column: span 3; }
.info-card h3 { font-size: 1rem; color: var(--brand); margin: 0 0 10px; }
.info-card p { margin: 0; color: var(--ink-soft); }
.info-code { font-size: 1.25rem; font-weight: 800; color: var(--ink) !important; }

/* ===================== 核心技术 ===================== */
.tech-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tech-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.tech-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(79,70,229,.4); }
.tech-icon {
  width: 56px; height: 56px; border-radius: 14px; font-size: 1.7rem;
  display: grid; place-items: center; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(79,70,229,.12), rgba(6,182,212,.12));
}
.tech-card h3 { font-size: 1.15rem; margin: 0 0 14px; }
.tech-card ul { margin: 0; padding-left: 0; list-style: none; }
.tech-card li {
  position: relative; padding: 8px 0 8px 18px; color: var(--ink-soft);
  border-top: 1px dashed var(--line); font-size: .95rem;
}
.tech-card li:first-child { border-top: 0; }
.tech-card li::before {
  content: ""; position: absolute; left: 0; top: 16px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand-grad);
}

/* ===================== 功能矩阵 ===================== */
.func-block { margin-bottom: 44px; }
.func-block:last-child { margin-bottom: 0; }
.func-head {
  display: inline-block; font-size: 1.2rem; margin: 0 0 18px;
  padding-bottom: 6px; border-bottom: 3px solid var(--brand-grad);
}
.func-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.func-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 20px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.func-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.func-card h4 { font-size: 1.05rem; color: var(--brand); margin: 0 0 8px; }
.func-card p { margin: 0; color: var(--ink-soft); font-size: .93rem; }

/* ===================== 产品参数表 ===================== */
.spec-table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.spec-table { width: 100%; border-collapse: collapse; background: var(--surface); min-width: 480px; }
.spec-table caption { text-align: left; padding: 0 0 12px; }
.spec-table th, .spec-table td { text-align: left; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.spec-table thead th { background: var(--dark); color: #fff; font-size: .95rem; }
.spec-table tbody th[scope="row"] { width: 38%; color: var(--ink); font-weight: 700; }
.spec-table tbody td { color: var(--ink-soft); }
.spec-table tbody tr:nth-child(even) { background: var(--bg-alt); }
.spec-table tbody tr:hover { background: rgba(79,70,229,.06); }

/* ===================== 应用场景 ===================== */
.scene-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.scene-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 20px; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.scene-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.scene-no {
  font-size: 2rem; font-weight: 800; background: var(--brand-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  display: block; margin-bottom: 10px;
}
.scene-card h3 { font-size: 1.1rem; margin: 0 0 8px; }
.scene-card p { margin: 0; color: var(--ink-soft); font-size: .92rem; }

/* ===================== 企业愿景 ===================== */
.vision {
  position: relative; color: var(--dark-ink);
  background: radial-gradient(120% 120% at 20% 0%, #1b2550 0%, var(--dark) 60%);
}
.vision-inner { text-align: center; max-width: 820px; margin: 0 auto; }
.section-title.light, .section-eyebrow.light { color: #fff; }
.section-eyebrow.light { color: var(--dark-soft); }
.vision-quote {
  font-size: clamp(1.1rem, 2.6vw, 1.55rem); line-height: 1.7; font-weight: 600;
  margin: 0; padding: 0; border: 0; color: #eef2ff;
}

/* ===================== 预约表单 ===================== */
.contact-inner { max-width: 760px; margin: 0 auto; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .92rem; color: var(--ink); }
.field input, .field textarea {
  font-family: inherit; font-size: 1rem; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79,70,229,.15);
}
.field textarea { resize: vertical; }
.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-note { margin: 0; color: var(--brand); font-weight: 600; }
.contact-meta { margin-top: 18px; color: var(--ink-muted); font-size: .85rem; text-align: center; }

/* ===================== 页脚 ===================== */
.site-footer { background: var(--dark); color: var(--dark-soft); padding: 40px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; }
.footer-copy { margin: 0; font-size: .88rem; }
.footer-nav { display: flex; gap: 18px; }
.footer-nav a { color: var(--dark-soft); font-size: .9rem; transition: color .2s; }
.footer-nav a:hover { color: #fff; }

/* ===================== 滚动揭示动画 ===================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .tech-card, .func-card, .scene-card, .info-card { transition: none; }
}

/* ===================== 响应式断点 ===================== */

/* 平板：≤ 1024px */
@media (max-width: 1024px) {
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .func-grid { grid-template-columns: repeat(2, 1fr); }
  .scene-grid { grid-template-columns: repeat(3, 1fr); }
  .overview-grid { grid-template-columns: repeat(2, 1fr); }
  .info-card-wide { grid-column: span 2; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* 手机：≤ 768px */
@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .hero { padding: 72px 0 84px; }

  /* 移动端导航 */
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px;
    max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height .3s ease, opacity .3s ease;
  }
  .nav-menu.is-open { max-height: 460px; opacity: 1; box-shadow: var(--shadow); }
  .nav-menu > li > a { display: block; padding: 12px 14px; border-radius: var(--radius-sm); }
  .nav-cta { text-align: center; margin-top: 6px; }

  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .tech-grid { grid-template-columns: 1fr; }
  .func-grid { grid-template-columns: 1fr; }
  .scene-grid { grid-template-columns: 1fr; }
  .overview-grid { grid-template-columns: 1fr; }
  .info-card-wide { grid-column: span 1; }

  .contact-form { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* 超小屏：≤ 420px */
@media (max-width: 420px) {
  .container { padding: 0 16px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .btn { width: 100%; }
  .hero-actions { flex-direction: column; align-items: stretch; }
}
