/* =========================
   信号大师 · 站点样式（精简合并版）
   ========================= */

/* 主题变量 */
:root {
  --bg: #0b0c10;
  --panel: #111217;
  --muted: #8b90a1;
  --text: #e7e9ef;
  --brand: #ffd54a; /* 主色：明亮黄 */
  --brand-ink: #111217;
  --card: #151724;
  --border: #1e2130;

  /* 自适应字号 */
  --h1: clamp(28px, 5vw, 44px);
  --h2: clamp(20px, 3.4vw, 28px);
  --p : clamp(14px, 1.8vw, 16px);
}

/* 基础 */
* { box-sizing: border-box; }
html,body { height: 100%; }
body {
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg), #0f1020 40%);
}
img { max-width: 100%; height: auto; }

/* 容器与区块 */
.container { width: min(1120px, 94%); margin: 0 auto; }
.section { padding: 72px 0; }
.section.alt { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); }
.section-title { font-size: var(--h2); margin: 0 0 24px; }

/* 头部 */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--panel) 80%, transparent);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display:flex; align-items:center; justify-content:space-between;
  height: 64px; flex-wrap: wrap; gap: 10px;
}
.brand {
  display:flex; align-items:center; gap:10px;
  color: var(--text); text-decoration:none; font-weight:700; letter-spacing:.5px;
}
.nav a { color: var(--text); opacity:.9; text-decoration:none; margin-left:18px; font-size: var(--p); }
.nav a:hover { opacity: 1; }

/* 小屏导航折叠 */
.menu-btn { display: none; }
@media (max-width: 880px) {
  .header-inner { position: relative; } /* 给绝对定位 nav 提供参照 */
  .menu-btn {
    display: inline-flex; align-items:center; justify-content:center;
    width: 40px; height: 40px; margin-left: auto;
    border-radius: 10px; border: 1px solid var(--border);
    background: var(--panel); color: var(--text);
    z-index: 200; /* 确保按钮在下拉层之上 */
  }
  .nav {
    display: none; position: absolute; top: 64px; right: 3%; left: 3%;
    padding: 10px; border: 1px solid var(--border); background: var(--panel);
    border-radius: 12px; box-shadow: 0 10px 24px rgba(0,0,0,.24);
    flex-direction: column; z-index: 150;
  }
  .nav a { margin: 8px 6px; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--panel) 96%, transparent); }
  .nav.open { display: flex; }
}

/* Hero */
.hero { padding: 64px 0 24px; }
.hero-inner { display:grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items:center; }
.hero-info h1 { font-size: var(--h1); margin: 0 0 8px; }
.subtitle { color: var(--muted); margin: 0 0 18px; line-height: 1.6; }
.hero-media img {
  max-width: 380px;   /* 限制最大宽度，可按需要调小/调大 */
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;

  /* 移除外框 */
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.cta { display:flex; gap:12px; }

/* 按钮 */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 10px 16px; border-radius: 12px; border:1px solid var(--border);
  background: var(--panel); color: var(--text); text-decoration:none; font-weight:600;
  transition: transform .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: #e9c235; }
.btn.ghost { background: transparent; }
.btn.w100 { width: 100%; }
.btn-group { display:flex; gap:10px; flex-wrap: wrap; }

/* 栅格与卡片 */
.grid { display:grid; gap: 18px; }
.features { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.screens  { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px;
  box-shadow: 0 8px 16px rgba(0,0,0,.15);
}
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p  { margin: 0; color: var(--muted); }

/* 功能卡片 hover 动效 */
.features .card {
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background-color .25s ease;
  will-change: transform, box-shadow;
}
.features .card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0,0,0,.25);
  border-color: var(--brand);
  /* 若担心 color-mix 兼容，可移除此行 */
  background-color: color-mix(in srgb, var(--card) 92%, var(--brand) 8%);
}
.features .card:hover h3 { color: var(--brand); }
.features .card:hover p  { color: var(--text); }

/* 旧版截图网格（若已换轮播可保留不冲突） */
.screens img {
  max-width: 260px; width: 100%; height: auto;
  border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,.25);
  margin: 0 auto;
}

/* 下载区 */
.download-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.dl .dl-meta { list-style: none; padding:0; margin: 10px 0 14px; color: var(--muted); font-size: 14px; }
.dl .links { list-style: none; padding:0; margin: 6px 0 0; }
.dl .links li { margin: 6px 0; }
.links a { word-break: break-all; }
.note, .tip { padding-top: 12px; margin-top: 12px; color: var(--muted); font-size: 14px; }

/* 页脚 */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { display:flex; align-items:center; justify-content:space-between; min-height: 72px; flex-wrap: wrap; gap: 8px; }
.footer-inner .minor a { color: var(--muted); text-decoration: none; }

/* 文档页（说明书） */
body.doc .doc-main { display:grid; grid-template-columns: 240px 1fr; gap: 20px; width:min(1120px, 92%); margin: 24px auto; }
.doc-toc { position: sticky; top: 84px; height: calc(100dvh - 96px); padding: 12px; border-right: 1px dashed var(--border); }
.doc-toc nav { display:flex; flex-direction:column; gap:8px; }
.doc-toc a { color: var(--muted); text-decoration: none; font-size: 14px; }
.doc-toc a:hover { color: var(--text); }
.doc-content { padding: 4px 8px 24px; }
.doc-content h1, .doc-content h2 { margin-top: 12px; }
.doc-content details { background: var(--card); border:1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.badge { display:inline-block; padding: 2px 8px; border-radius: 999px; border:1px solid var(--border); font-size: 12px; }
.badge.blue { background: #2552f7; }
.badge.amber { background: #f3c040; }

/* —— Carousel + Phone Mockup —— */
.carousel { position: relative; }
.car-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 320px);
  gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 44px;
}
.car-track::-webkit-scrollbar { height: 8px; }
.car-track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }

.phone { scroll-snap-align: center; margin: 0; text-align: center; }
.phone figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }

/* Phone 外观 */
.phone-bezel {
  position: relative; width: min(320px, 80vw); aspect-ratio: 9 / 19.5; margin: 0 auto;
  border-radius: 32px; background: #000; border: 2px solid #222831;
  box-shadow: 0 12px 28px rgba(0,0,0,.35), inset 0 0 0 6px #0d0f14; overflow: hidden;
}
.phone-notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 36%; height: 5.5%; background: #000;
  border-bottom-left-radius: 18px; border-bottom-right-radius: 18px;
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset; z-index: 2;
}
.phone-bezel img {
  position: absolute; inset: 1.6% 2.4% 2.4% 2.4%;
  width: calc(100% - 4.8%); height: calc(100% - 4%);
  object-fit: cover; border-radius: 20px;
}

/* 轮播按钮与圆点 */
.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 999px; border:1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  backdrop-filter: blur(6px); color: var(--text); font-size: 20px;
  line-height: 36px; text-align: center; cursor: pointer; z-index: 5;
}
.car-btn:hover { transform: translateY(-50%) scale(1.05); }
.car-btn.prev { left: 6px; }
.car-btn.next { right: 6px; }

.car-dots { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.car-dots button { width: 8px; height: 8px; border-radius: 999px; border: none; background: var(--border); cursor: pointer; }
.car-dots button[aria-selected="true"] { background: var(--brand); }

/* —— 响应式 —— */
@media (max-width: 960px) {
  .hero { padding: 40px 0 12px; }
  .hero-inner { grid-template-columns: 1fr; }
  .cta { flex-wrap: wrap; }
  body.doc .doc-main { grid-template-columns: 1fr; }
  .doc-toc { position: static; height: auto; border-right: none; padding: 0; }
}

@media (max-width: 480px) {
  .phone-bezel { width: 92vw; }
  .car-track   { grid-auto-columns: 86vw; padding: 8px 40px; }
  .car-btn     { display: none; } /* 小屏手势滑动，隐藏按钮 */
}

/* —— 减少动画偏好 —— */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* —— 说明书通用图片样式 —— */
.doc-figure {
  text-align: center;
  margin: 0 auto 24px;
}

.doc-figure figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.doc-image {
  max-width: 720px;
  width: 100%;
  height: auto;
  border-radius: 16px;                /* 圆角 */
  box-shadow: 0 6px 18px rgba(0,0,0,0.25); /* 可选阴影 */
}