/* ════════════════════════════════════════════════════════════
   IB Mate 官网 — 参照 Kimi 开放平台风格重做
   黑 Hero + 白正文 · 左对齐标题 · 纹理卡头 · 线性图标 · 黑页脚
   ════════════════════════════════════════════════════════════ */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f6f6;
  --card: #ffffff;
  --ink: #111111;
  --ink-2: #555555;
  --ink-3: #999999;
  --border: #e8e8e8;
  --border-2: #dcdcdc;
  --dark: #0a0a0a;
  --dark-2: #141414;
  --dark-ink: #ededed;
  --dark-ink-2: #9a9a9a;
  --accent: #2f6fdd;   /* 极少量使用：品牌名/链接 */
  --radius: 14px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.05);
  --shadow-md: 0 12px 40px rgba(0,0,0,.08);
  --shadow-lg: 0 30px 80px rgba(0,0,0,.35);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 48px; }

::selection { background: rgba(0,0,0,.14); }

/* ── 纹理（SVG 噪声生成，零外部资源） ─────────────────────── */
.texture {
  background-color: #23262d;
  background-image:
    linear-gradient(135deg, rgba(255,255,255,.06), rgba(0,0,0,.22)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
  background-blend-mode: overlay;
}
.texture.t2 { background-color: #2a2e37; }
.texture.t3 { background-color: #1e2126; }

/* ── 按钮 ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .16s cubic-bezier(.2,.7,.3,1), box-shadow .16s, background .16s, border-color .16s, color .16s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-sm { padding: 8px 18px; font-size: 13.5px; }
.btn-lg { padding: 14px 28px; font-size: 15.5px; }
.btn-block { width: 100%; padding: 13px 20px; font-size: 15px; border-radius: 10px; }

/* 反色胶囊（导航用，随导航主题翻转） */
.btn-invert { background: #fff; color: #111; }
.btn-invert:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255,255,255,.18); }
#nav.light .btn-invert { background: #111; color: #fff; }
#nav.light .btn-invert:hover { box-shadow: 0 6px 18px rgba(0,0,0,.2); }

.btn-light { background: #fff; color: #111; }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(255,255,255,.2); }
.btn-dark { background: #111; color: #fff; }
.btn-dark:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0,0,0,.22); }
.btn-soft { background: var(--bg-soft); color: var(--ink); border-color: var(--border); }
.btn-soft:hover { border-color: var(--border-2); transform: translateY(-1px); }

/* ── 导航（默认深色，滚出 Hero 后 .light） ────────────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  color: var(--dark-ink);
  background: rgba(10,10,10,.82);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: background .25s, color .25s, border-color .25s;
}
#nav.light {
  color: var(--ink);
  background: rgba(255,255,255,.85);
  border-bottom-color: var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.brand img { height: 28px; width: auto; }
#nav .brand img { display: none; }   /* 深色导航只留文字标，反白 logo 会变实心色块 */
#nav.light .brand img { display: block; }
.brand-name em { font-style: normal; font-weight: 600; color: var(--accent); margin-left: 2px; }
.nav-links { display: flex; gap: 30px; font-size: 14px; }
.nav-links a { opacity: .75; transition: opacity .15s; }
.nav-links a:hover { opacity: 1; }

/* ── Hero（黑） ───────────────────────────────────────────── */
.hero { background: var(--dark); color: var(--dark-ink); padding: 64px 0 0; }
.announce {
  padding: 11px 0; font-size: 13.5px; text-align: center;
  color: var(--dark-ink-2);
  background: rgba(255,255,255,.05);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.announce a { color: var(--dark-ink); text-decoration: underline; text-underline-offset: 3px; }
.announce a:hover { color: #fff; }

.hero-grid {
  display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px;
  align-items: center;
  padding-top: 96px; padding-bottom: 40px;
  min-height: 560px;
}
.hero-chip {
  display: inline-block; padding: 7px 16px; margin-bottom: 26px;
  font-size: 13px; color: var(--dark-ink);
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
}
.hero h1 {
  font-size: clamp(40px, 5vw, 62px);
  font-weight: 800; letter-spacing: -.03em; line-height: 1.18;
  color: #fff;
}
.hero .sub { margin-top: 24px; font-size: 16px; color: var(--dark-ink-2); line-height: 1.9; }
.hero-cta { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }

.hero-foot { padding: 34px 48px 44px; border-top: 1px solid rgba(255,255,255,.07); }
.hero-foot p { font-size: 14px; color: var(--dark-ink-2); }
.hero-keywords { margin-top: 8px; letter-spacing: .06em; }

/* Hero 3D 截图组 */
.hero-shots { position: relative; perspective: 1500px; height: 460px; }
.shot { border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-lg); }
.shot img { width: 100%; }
.shot-main {
  position: absolute; right: 0; top: 50%; width: 88%;
  background: #16181c; border: 1px solid rgba(255,255,255,.12);
  transform: translateY(-50%) rotateY(-16deg) rotateX(5deg) rotateZ(1.5deg);
  transform-style: preserve-3d;
  transition: transform .5s cubic-bezier(.2,.7,.3,1);
}
.hero-shots:hover .shot-main { transform: translateY(-50%) rotateY(-8deg) rotateX(2deg) rotateZ(0deg); }
.shot-back {
  position: absolute; width: 46%; opacity: .55;
  border: 1px solid rgba(255,255,255,.08);
}
.shot-l { left: -6%; top: 4%; transform: rotateY(-16deg) rotateZ(-4deg); }
.shot-r { left: 2%; bottom: 2%; transform: rotateY(-16deg) rotateZ(3deg); }

.bf-bar {
  display: flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px;
  background: rgba(255,255,255,.05); border-bottom: 1px solid rgba(255,255,255,.08);
}
.bf-bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.18); }
.bf-bar span {
  margin-left: 10px; flex: 1;
  font-size: 11px; color: var(--dark-ink-2);
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  border-radius: 6px; padding: 2px 10px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── 正文通用 ─────────────────────────────────────────────── */
.section { padding: 110px 0; }
.section-head { margin-bottom: 56px; }
.section-head h2 {
  font-size: clamp(30px, 3.6vw, 42px);
  font-weight: 800; letter-spacing: -.03em; line-height: 1.2;
}
.section-head p { margin-top: 14px; color: var(--ink-3); font-size: 15.5px; }

/* ── 核心能力 3 卡 ────────────────────────────────────────── */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.mcard {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease;
}
.mcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.mcard-head {
  height: 190px; display: flex; align-items: center; justify-content: center;
}
.mcard-head span {
  font-size: 30px; font-weight: 800; letter-spacing: -.01em; color: #fff;
  text-shadow: 0 2px 14px rgba(0,0,0,.4);
}
.mcard-body { padding: 26px 26px 20px; }
.mcard-body h3 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.mcard-body p { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.mcard-rows { border-top: 1px solid var(--border); padding: 8px 26px 18px; }
.mrow {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 11px 0; border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.mrow:last-child { border-bottom: none; }
.mrow span { color: var(--ink-3); flex-shrink: 0; }
.mrow b { font-weight: 600; text-align: right; }

/* ── 全套工具容器 ─────────────────────────────────────────── */
.tools-box {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 20px; padding: 20px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px;
}
.tool {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 20px 18px; border-radius: 12px;
  transition: background .18s;
}
.tool:hover { background: #fff; box-shadow: var(--shadow-sm); }
.tool-icon {
  flex-shrink: 0; width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  color: var(--ink);
}
.tool-icon svg { width: 21px; height: 21px; }
.tool b { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.tool p { margin-top: 3px; font-size: 13px; color: var(--ink-3); }

/* ── 截图画廊 ─────────────────────────────────────────────── */
.gallery { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.gallery .section-head { margin-bottom: 40px; }
.gallery-track {
  display: flex; gap: 20px;
  padding: 6px 48px 24px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  cursor: grab;
  scrollbar-width: thin; scrollbar-color: var(--border-2) transparent;
}
.gallery-track.dragging { cursor: grabbing; scroll-snap-type: none; }
.gallery-track::-webkit-scrollbar { height: 6px; }
.gallery-track::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
.g-item {
  flex: 0 0 min(500px, 80vw); scroll-snap-align: center;
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border); background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
  cursor: zoom-in;
}
.g-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.g-item img { width: 100%; aspect-ratio: 16/10; object-fit: cover; object-position: top left; }
.g-item figcaption {
  padding: 11px 16px; font-size: 13px; color: var(--ink-2);
  border-top: 1px solid var(--border);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── 快速开始卡 ───────────────────────────────────────────── */
.cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.cards-2.single { grid-template-columns: minmax(0, 520px); justify-content: center; }
.scard {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease;
}
.scard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.scard-head {
  height: 170px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  color: #fff;
}
.scard-head svg { width: 34px; height: 34px; opacity: .92; }
.scard-head span { font-size: 24px; font-weight: 800; letter-spacing: .01em; text-shadow: 0 2px 14px rgba(0,0,0,.4); }
.scard-body { padding: 28px 30px 30px; text-align: center; }
.scard-body h3 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.scard-sub { margin-top: 6px; font-size: 13.5px; color: var(--ink-3); }
.scard-body ul {
  margin: 22px 0 26px; padding: 22px 0 0;
  border-top: 1px solid var(--border);
  list-style: none; text-align: center;
}
.scard-body li { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.scard-body li:first-child { margin-top: 0; }
.scard-body li::before { content: "·"; margin-right: 8px; color: var(--ink-3); }

/* ── FAQ ──────────────────────────────────────────────────── */
.faq { background: var(--bg); }
.faq-wrap { max-width: 860px; }
.faq .section-head { margin-bottom: 36px; }
.faq-list { display: grid; gap: 12px; }
.faq-list details {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 0 24px;
  transition: border-color .2s;
}
.faq-list details[open] { border-color: var(--border-2); }
.faq-list summary {
  list-style: none; cursor: pointer;
  padding: 19px 0; font-weight: 600; font-size: 15px;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; font-size: 21px; font-weight: 300; color: var(--ink-3);
  transition: transform .25s ease;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { padding: 0 0 19px; font-size: 14px; color: var(--ink-2); }

/* ── 页脚（黑） ───────────────────────────────────────────── */
footer { background: var(--dark); color: var(--dark-ink-2); padding: 72px 0 0; }
.foot-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 64px;
}
.foot-wordmark { display: block; font-size: 34px; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.foot-brand > span:last-child { display: block; margin-top: 10px; font-size: 13.5px; }
.foot-col h5 { font-size: 14px; font-weight: 700; color: var(--dark-ink); margin-bottom: 16px; }
.foot-col a { display: block; margin-top: 11px; font-size: 13.5px; transition: color .15s; }
.foot-col a:hover { color: var(--dark-ink); }
.foot-copy {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 26px; padding-bottom: 10px;
  text-align: center; font-size: 13px;
}
/* 备案号：监管要求主页底部中央悬挂并链接工信部备案系统，位置与文案勿动 */
.foot-beian { text-align: center; font-size: 13px; padding-bottom: 30px; }
.foot-beian a { color: var(--dark-ink-2); transition: color .15s; }
.foot-beian a:hover { color: var(--dark-ink); }

/* ── 回到顶部 ─────────────────────────────────────────────── */
#toTop {
  position: fixed; right: 26px; bottom: 26px; z-index: 40;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border-2); background: var(--card);
  color: var(--ink-2); font-size: 18px; cursor: pointer;
  box-shadow: var(--shadow-sm);
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .25s, transform .25s, box-shadow .2s;
}
#toTop.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
#toTop:hover { box-shadow: var(--shadow-md); }

/* ── Lightbox ─────────────────────────────────────────────── */
#lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.9);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .28s ease;
}
#lightbox.open { opacity: 1; pointer-events: auto; }
#lightbox figure { max-width: min(1200px, 92vw); text-align: center; }
#lightbox img {
  max-width: 100%; max-height: 82vh; border-radius: 10px;
  box-shadow: 0 30px 90px rgba(0,0,0,.5);
  transform: scale(.96); transition: transform .28s ease;
}
#lightbox.open img { transform: scale(1); }
#lightbox figcaption { margin-top: 14px; color: #aaa; font-size: 13.5px; }
#lightbox button {
  position: absolute; border: none; background: rgba(255,255,255,.1);
  color: #fff; cursor: pointer; border-radius: 50%;
  width: 44px; height: 44px; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
#lightbox button:hover { background: rgba(255,255,255,.22); }
.lb-close { top: 22px; right: 22px; font-size: 16px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); font-size: 26px; }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); font-size: 26px; }

/* ── 滚动 reveal ──────────────────────────────────────────── */
[data-reveal] {
  opacity: 0; transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
}
[data-reveal].revealed { opacity: 1; transform: translateY(0); }

/* ── 响应式 ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .wrap { padding: 0 28px; }
  .hero-foot { padding: 30px 28px 38px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; min-height: 0; padding-top: 72px; }
  .hero-shots { height: 380px; max-width: 640px; }
  .cards-3 { grid-template-columns: 1fr; }
  .cards-2 { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .nav-links { display: none; }
  .hero-grid { padding-top: 56px; }
  .hero-shots { height: 300px; }
  .shot-l, .shot-r { display: none; }
  .shot-main { width: 100%; transform: translateY(-50%); }
  .section { padding: 76px 0; }
  .section-head { margin-bottom: 40px; }
  .tools-box { grid-template-columns: 1fr; padding: 12px; }
  .gallery-track { padding: 6px 20px 18px; }
  .foot-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ── 动效降级 ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
