/* ==========================================================================
   KYB-Robots · 全站样式表
   零依赖，纯 CSS。所有页面共用这一个文件。
   设计语言：深色底 + 蓝色强调 + 细网格背景 + 玻璃质感卡片
   ========================================================================== */

/* ---------- 1. 设计变量：想改配色只改这里 ---------- */
:root {
  --bg:            #05070d;
  --bg-soft:       #0a0e18;
  --bg-card:       rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.055);

  --border:        rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);

  --text:          #f3f5f9;
  --text-muted:    #b7bfd0;   /* 正文次要文字，对比度已达标 */
  --text-dim:      #8b93a7;   /* 仅用于极小的辅助信息 */

  --brand:         #3b82f6;
  --brand-strong:  #2563eb;
  --brand-soft:    rgba(59, 130, 246, 0.12);
  --brand-border:  rgba(59, 130, 246, 0.35);

  --ok:            #34d399;
  --warn:          #fbbf24;
  --danger:        #f87171;

  --radius:        14px;
  --radius-sm:     10px;
  --radius-lg:     22px;

  --shadow:        0 18px 50px rgba(0, 0, 0, 0.45);

  --container:     1200px;
  --nav-h:         72px;

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

/* ---------- 2. 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
img { height: auto; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3.35rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: clamp(1.12rem, 1.8vw, 1.35rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.1em; color: var(--text-muted); }

ul, ol { color: var(--text-muted); padding-left: 1.15em; }
li { margin-bottom: 0.4em; }

/* 键盘可达性：所有可聚焦元素都有清晰焦点环 */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 屏幕阅读器专用文本 */
.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: 12px; top: -48px; z-index: 200;
  background: var(--brand-strong); color: #fff; padding: 10px 16px;
  border-radius: 8px; transition: top 0.2s;
}
.skip-link:focus { top: 12px; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

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

.section {
  position: relative;
  padding: 84px 0;
  border-top: 1px solid var(--border);
}
.section--flush { border-top: 0; }
.section--soft { background: var(--bg-soft); }

.section-head { max-width: 780px; margin-bottom: 44px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { font-size: 1.05rem; margin-bottom: 0; }

.eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

/* 细网格背景（沿用原站风格） */
.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 45%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 45%, transparent 100%);
}
.glow {
  position: absolute; pointer-events: none; z-index: 0;
  width: 760px; height: 760px; border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.16), transparent 65%);
  filter: blur(20px);
}
.glow--top { top: -340px; left: 50%; transform: translateX(-50%); }
.glow--side { top: 12%; right: -320px; }

.section > .container { position: relative; z-index: 1; }

/* 通用栅格 */
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--sidebar { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; }

/* ---------- 4. 组件：按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem; font-weight: 600; line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.18s, color 0.18s;
  text-decoration: none !important;
}
.btn--primary { background: var(--brand-strong); color: #fff; }
.btn--primary:hover { background: #1d4ed8; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.3); }
.btn--sm { padding: 10px 18px; font-size: 0.88rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ---------- 5. 组件：卡片 ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.card:hover { background: var(--bg-card-hover); border-color: var(--border-strong); }
.card h3 { margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }

.card--link { display: block; color: inherit; text-decoration: none !important; }
.card--link:hover { transform: translateY(-3px); }

.card-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); border: 1px solid var(--brand-border);
  color: var(--brand); font-size: 1.25rem; margin-bottom: 16px;
}

.check-list { list-style: none; padding: 0; margin: 16px 0 0; }
.check-list li {
  position: relative; padding-left: 26px; font-size: 0.93rem;
  color: var(--text-muted);
}
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--ok); font-weight: 700;
}

/* ---------- 6. 组件：数据条 ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px; margin-top: 52px;
}
.stat { padding: 20px 22px; border-left: 2px solid var(--brand-border); }
.stat b { display: block; font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.1; }
.stat span { font-size: 0.85rem; color: var(--text-dim); }

/* ---------- 7. 组件：流程步骤 ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 18px; margin: 0; }
.step-num {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); border: 1px solid var(--brand-border);
  color: var(--brand); font-weight: 700; font-size: 1.05rem;
}
.step-body { padding-top: 6px; }
.step-body h3 { margin-bottom: 6px; font-size: 1.1rem; }
.step-body p { margin-bottom: 0; font-size: 0.95rem; }

/* ---------- 8. 组件：证书 / 徽章 ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 18px 0 0; }
.badges li {
  margin: 0; font-size: 0.82rem; color: var(--text);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  padding: 7px 14px; border-radius: 999px;
}

/* ---------- 9. 组件：图片作品集 ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.gallery figure {
  margin: 0; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--bg-card);
}
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { padding: 12px 16px; font-size: 0.85rem; color: var(--text-muted); }

.media-frame {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--bg-card);
}
.media-frame img { width: 100%; }

/* 视频框：16:9 固定比例，避免加载时页面跳动 */
.media-frame--video video {
  display: block; width: 100%; height: auto;
  aspect-ratio: 16 / 9; object-fit: cover;
  background: #000;
}
.media-frame figcaption {
  padding: 12px 16px; font-size: 0.85rem; color: var(--text-dim);
  border-top: 1px solid var(--border);
}

/* 图片来源标注：AI 生成图必须如实标明，不可当作实拍照片使用 */
.media-note {
  margin: 0; padding: 10px 14px; font-size: 0.76rem; color: var(--text-dim);
  border-top: 1px solid var(--border); background: var(--bg-card);
}

/* ---------- 10. 组件：表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: rgba(255,255,255,0.04); font-weight: 600; color: var(--text); }
td { color: var(--text-muted); }
tr:last-child td { border-bottom: 0; }

/* ---------- 11. 组件：提示框 ---------- */
.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
}
.callout--warn { border-left-color: var(--warn); }
.callout h2, .callout h3 { font-size: 1rem; margin-bottom: 8px; }
.callout p:last-child { margin-bottom: 0; }

/* ---------- 12. 组件：FAQ（原生 details，无 JS 也能用） ---------- */
.faq { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq details { border-bottom: 1px solid var(--border); background: var(--bg-card); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  cursor: pointer; padding: 20px 24px; font-weight: 600; color: var(--text);
  list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details[open] summary { color: var(--brand); }
.faq .faq-answer { padding: 0 24px 22px; color: var(--text-muted); font-size: 0.95rem; }
.faq .faq-answer p:last-child { margin-bottom: 0; }

/* ---------- 13. 组件：表单 ---------- */
.form-grid { display: grid; gap: 18px; }
.form-row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field label { display: block; font-size: 0.88rem; color: var(--text-muted); margin-bottom: 8px; }
.req { color: var(--brand); }

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  padding: 13px 15px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit; font-size: 0.95rem;
  transition: border-color 0.18s, background 0.18s;
}
input::placeholder, textarea::placeholder { color: #6b7385; }
input:focus, select:focus, textarea:focus {
  border-color: var(--brand); background: rgba(0,0,0,0.6); outline: none;
}
select { appearance: none; cursor: pointer; }
textarea { resize: vertical; min-height: 130px; }

.field-hint { font-size: 0.8rem; color: var(--text-dim); margin: 8px 0 0; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 0.82rem; color: var(--text-dim); }
.consent input { width: 16px; height: 16px; margin-top: 3px; flex: 0 0 auto; accent-color: var(--brand); }
.consent a { color: var(--brand); }

/* 蜜罐字段：真人看不见 */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { border-radius: var(--radius-sm); padding: 14px 18px; font-size: 0.9rem; border: 1px solid; }
.alert--error { color: #fecaca; background: rgba(248,113,113,0.1); border-color: rgba(248,113,113,0.35); }
.alert--ok    { color: #bbf7d0; background: rgba(52,211,153,0.1); border-color: rgba(52,211,153,0.35); }

/* 表单提交成功后的展示块 */
.form-success { text-align: center; padding: 12px 4px; }
.form-success .tick {
  width: 58px; height: 58px; margin: 0 auto 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(52,211,153,0.14); color: var(--ok); font-size: 1.5rem;
}

/* ---------- 14. 导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(5, 7, 13, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.site-header.is-scrolled { border-bottom-color: var(--border); background: rgba(5,7,13,0.94); }

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

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand), #7c3aed);
  color: #fff; font-weight: 800; font-size: 1.1rem;
}
.brand-name { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand-sub { display: block; font-size: 0.68rem; color: var(--text-dim); font-weight: 500; letter-spacing: 0.06em; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links li { margin: 0; }
.nav-links a {
  display: block; padding: 9px 14px; border-radius: 8px;
  color: var(--text-muted); font-size: 0.92rem; font-weight: 500; text-decoration: none !important;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-links a[aria-current="page"] { color: var(--text); background: rgba(255,255,255,0.08); }

.nav-cta { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px; border-radius: 10px;
  background: transparent; border: 1px solid var(--border-strong);
  color: var(--text); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle:hover { background: rgba(255,255,255,0.06); }

/* ---------- 15. 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 60px 0 28px;
  font-size: 0.92rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 34px; }
.site-footer h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim); margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: var(--text-muted); text-decoration: none !important; }
.site-footer a:hover { color: var(--brand); }
/* 社交账号：JS 按 config.js 自动生成，未配置时整行隐藏 */
.footer-social { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 0; }
.footer-social .social-link { font-size: 0.92rem; white-space: nowrap; }
.footer-social .social-link::after { content: " ↗"; font-size: 0.8em; opacity: 0.7; }
.footer-bottom {
  margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  color: var(--text-dim); font-size: 0.84rem;
}
.footer-bottom p { margin: 0; color: var(--text-dim); }

/* ---------- 16. 面包屑 ---------- */
.breadcrumbs { font-size: 0.84rem; color: var(--text-dim); margin-bottom: 18px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.breadcrumbs li::after { content: "/"; margin-left: 8px; color: var(--border-strong); }
.breadcrumbs li:last-child::after { content: ""; }

/* ---------- 17. 页面头部（内页通用） ---------- */
.page-hero { padding: 64px 0 52px; border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }
.page-hero h1 { max-width: 900px; }
.page-hero .lead { font-size: 1.1rem; max-width: 760px; }

.lead { font-size: 1.1rem; color: var(--text-muted); }

/* ---------- 18. CTA 区块 ---------- */
.cta-band {
  border: 1px solid var(--brand-border);
  background: linear-gradient(140deg, rgba(59,130,246,0.14), rgba(124,58,237,0.08));
  border-radius: var(--radius-lg);
  padding: 46px;
  display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between;
}
.cta-band h2 { margin-bottom: 8px; }
.cta-band p { margin-bottom: 0; max-width: 620px; }

/* ---------- 19. 滚动进场动画 ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 20. 语言切换 ---------- */
.lang-switch { font-size: 0.85rem; }

/* ---------- 21. 响应式 ---------- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--sidebar { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: rgba(7, 10, 18, 0.99);
    border-bottom: 1px solid var(--border);
    padding: 14px 20px 22px;
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 14px 12px; font-size: 1rem; }
  .nav-cta .btn { display: none; }
  .nav-cta .btn.btn--always { display: inline-flex; }
}

@media (max-width: 760px) {
  .section { padding: 62px 0; }
  .grid--2, .grid--3, .grid--4, .form-row-2 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 16px; }
  .cta-band { padding: 30px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .steps li { grid-template-columns: 44px 1fr; gap: 14px; }
  .step-num { width: 44px; height: 44px; font-size: 0.95rem; }
  .page-hero { padding: 44px 0 36px; }
}

/* ------------------------------------------------------------------
   2026-11-02: 产品实拍图库（竖版照片 + 手机竖屏视频）
   .gallery 默认按 4:3 横版裁切，会切掉竖版产品图的上下部分，
   所以这里用 contain 保留完整构图。
   ------------------------------------------------------------------ */
.gallery--portrait img {
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: #0d1117;
}
.gallery--vertical {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 620px;
}
.gallery--vertical video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: #000;
}
@media (max-width: 720px) {
  .gallery--vertical { grid-template-columns: 1fr; max-width: none; }
}
