/* ============================================================
   AI Mac 小屏幕 — 官网样式
   复古麦金塔 (Classic Macintosh) 风格
   ============================================================ */

:root {
  --bg:        #e7e4dc;
  --bg-alt:    #dedbd1;
  --window:    #f5f3ee;
  --white:     #ffffff;
  --ink:       #17150f;
  --muted:     #6d6a60;
  --faint:     #97948a;
  --line:      #cbc7bb;
  --border:    #1a1810;
  --green:     #1fa838;
  --green-lit: #35d24a;
  --green-dim: #d7f0d3;
  --blue:      #2b6fff;
  --amber:     #e5a81c;
  --amber2:    #e59a1c;
  --red:       #e5432b;
  --shadow:    rgba(23,21,15,.16);

  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;

  --maxw: 1120px;
  --radius: 6px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 20% -10%, #f0eee7 0%, transparent 45%),
    radial-gradient(circle at 90% 0%, #eceae2 0%, transparent 40%);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

/* ---------- 通用容器 ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 600;
  margin: 0 0 14px;
}

section { padding: 88px 0; }

.section-head { max-width: 680px; margin-bottom: 52px; }
.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0 0 16px;
  font-weight: 800;
}
.section-head p { font-size: 18px; color: var(--muted); margin: 0; }

/* ============================================================
   经典 Mac 窗口卡片
   ============================================================ */
.win {
  background: var(--window);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 5px 6px 0 var(--shadow);
  overflow: hidden;
}
.win-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 30px;
  padding: 0 10px;
  border-bottom: 2px solid var(--border);
  background: var(--white);
  position: relative;
}
/* 标题栏横条纹（麦金塔标志性） */
.win-bar::before {
  content: "";
  position: absolute;
  left: 40px; right: 14px; top: 50%;
  transform: translateY(-50%);
  height: 12px;
  background: repeating-linear-gradient(
    to bottom, var(--border) 0 1px, transparent 1px 3px);
  opacity: .55;
  z-index: 0;
}
.win-close {
  width: 13px; height: 13px;
  border: 2px solid var(--border);
  border-radius: 2px;
  background: var(--white);
  flex: none;
  z-index: 1;
}
.win-title {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  background: var(--white);
  padding: 0 8px;
  z-index: 1;
  position: relative;
  letter-spacing: .02em;
}
.win-body { padding: 22px; }

/* ============================================================
   顶部导航
   ============================================================ */
header.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(231,228,220,.82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 2px solid var(--border);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  height: 58px; padding: 0 24px;
  display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -.01em; }
.brand .mac {
  width: 26px; height: 30px; flex: none;
  border: 2px solid var(--border); border-radius: 4px;
  background: var(--white);
  position: relative;
}
.brand .mac::before {
  content: ""; position: absolute; inset: 3px 3px 9px;
  border: 1.5px solid var(--border); border-radius: 1px;
  background: var(--green-dim);
}
.brand .mac::after {
  content: ""; position: absolute; left: 6px; right: 6px; bottom: 3px;
  height: 3px; border-radius: 2px; background: var(--border);
}
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a {
  text-decoration: none; font-size: 14px; font-weight: 600;
  color: var(--muted); padding: 7px 12px; border-radius: 5px;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-alt); }
.nav-cta {
  font-family: var(--sans);
  border: 2px solid var(--border) !important;
  color: var(--ink) !important;
  background: var(--green-lit);
  box-shadow: 2px 2px 0 var(--shadow);
}
.nav-cta:hover { background: var(--green-lit) !important; transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--shadow); }
.nav-toggle { display: none; }

/* ============================================================
   Hero
   ============================================================ */
.hero { padding: 72px 0 60px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(36px, 5.5vw, 62px);
  line-height: 1.04;
  letter-spacing: -.03em;
  margin: 14px 0 20px;
  font-weight: 850;
}
.hero h1 .hl {
  background: linear-gradient(transparent 62%, var(--green-lit) 62%);
  padding: 0 2px;
}
.hero .lede { font-size: 19px; color: var(--muted); margin: 0 0 30px; max-width: 30em; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 15px; font-weight: 700;
  text-decoration: none; cursor: pointer;
  padding: 12px 20px;
  border: 2px solid var(--border); border-radius: var(--radius);
  background: var(--white); color: var(--ink);
  box-shadow: 3px 3px 0 var(--shadow);
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--shadow); }
.btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--shadow); }
.btn-primary { background: var(--green-lit); }
.btn-ghost { background: var(--white); }
.btn .ico { font-size: 16px; line-height: 1; }

.hero-badges { display: flex; flex-wrap: wrap; gap: 18px 26px; margin-top: 30px; }
.hero-badges span {
  font-family: var(--mono); font-size: 12.5px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 7px;
}
.hero-badges b { color: var(--ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; box-shadow: 0 0 0 3px var(--green-dim); }

.hero-photo .win-body { padding: 0; background: #d9d6cd; }
.hero-photo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.hero-cap {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  padding: 10px 14px; border-top: 2px solid var(--border); background: var(--white);
  display: flex; justify-content: space-between; gap: 10px;
}

/* ============================================================
   信任条 / 参数
   ============================================================ */
.spec-strip { background: var(--border); color: #f2f0e8; padding: 0; }
.spec-strip .wrap { display: grid; grid-template-columns: repeat(4,1fr); }
.spec-strip .cell { padding: 26px 24px; border-right: 1px solid rgba(255,255,255,.14); }
.spec-strip .cell:last-child { border-right: 0; }
.spec-strip .k { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #b8d8ba; margin-bottom: 6px; }
.spec-strip .v { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.spec-strip .v small { font-size: 13px; font-weight: 600; color: #cfccc2; }

/* ============================================================
   功能特性
   ============================================================ */
.features { background: var(--bg-alt); border-top: 2px solid var(--border); border-bottom: 2px solid var(--border); }
.feat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 26px; }
.feat-card .win-body { padding: 0; background: #17150f; }
.feat-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.feat-text { padding: 20px 4px 0; }
.feat-text h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.01em; }
.feat-text p { margin: 0; color: var(--muted); font-size: 15px; }
.feat-tag {
  display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--green); background: var(--green-dim);
  border: 1.5px solid var(--green); border-radius: 4px;
  padding: 2px 8px; margin-bottom: 12px;
}

/* 音乐聚焦横幅 */
.spotlight { margin-top: 26px; }
.spotlight .win-body { display: grid; grid-template-columns: 1fr 1fr; padding: 0; }
.spotlight .sl-photo { background: #17150f; }
.spotlight .sl-photo img { width: 100%; height: 100%; aspect-ratio: 4/3; object-fit: cover; }
.spotlight .sl-copy { padding: 34px 36px; display: flex; flex-direction: column; justify-content: center; }
.spotlight .sl-copy h3 { margin: 0 0 12px; font-size: 24px; letter-spacing: -.01em; }
.spotlight .sl-copy p { margin: 0 0 16px; color: var(--muted); font-size: 15.5px; }
.spotlight .sl-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.spotlight .sl-meta span {
  font-family: var(--mono); font-size: 12px; color: var(--ink);
  background: var(--green-dim); border: 1.5px solid var(--green);
  border-radius: 4px; padding: 3px 10px;
}
@media (max-width: 720px) {
  .spotlight .win-body { grid-template-columns: 1fr; }
  .spotlight .sl-photo img { aspect-ratio: 4/3; }
}

/* 工作原理 · 系统合影 */
.how-hero { margin-bottom: 40px; }
.how-hero .win-body { padding: 0; background: #17150f; position: relative; }
.how-hero img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.how-hero .hh-cap {
  font-family: var(--mono); font-size: 12.5px; color: var(--muted);
  padding: 12px 16px; border-top: 2px solid var(--border); background: var(--white);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.how-hero .hh-cap .pill {
  font-weight: 700; color: var(--green); background: var(--green-dim);
  border: 1.5px solid var(--green); border-radius: 4px; padding: 1px 8px; letter-spacing: .04em;
}

/* 次要功能小格 */
.mini-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: 30px; }
.mini {
  background: var(--window); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: 3px 3px 0 var(--shadow);
}
.mini .em { font-size: 22px; margin-bottom: 10px; }
.mini h4 { margin: 0 0 6px; font-size: 16px; }
.mini p { margin: 0; font-size: 14px; color: var(--muted); }

/* ============================================================
   工作原理
   ============================================================ */
.how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: stretch; }
.arch { display: grid; gap: 16px; }
.arch-node {
  background: var(--window); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: 3px 3px 0 var(--shadow); position: relative;
}
.arch-node .role { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--green); margin-bottom: 6px; }
.arch-node h4 { margin: 0 0 6px; font-size: 17px; }
.arch-node p { margin: 0; font-size: 14.5px; color: var(--muted); }
.arch-flow { text-align: center; font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: .1em; }
.how-points { display: grid; gap: 14px; align-content: start; }
.how-points li {
  list-style: none; padding-left: 30px; position: relative;
  font-size: 15.5px; color: var(--ink);
}
.how-points ul { margin: 0; padding: 0; display: grid; gap: 14px; }
.how-points li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 20px; height: 20px; border: 2px solid var(--border); border-radius: 4px;
  background: var(--green-lit); color: var(--border); font-size: 12px; font-weight: 900;
  display: grid; place-items: center; line-height: 1;
}
.how-points li b { display: block; }
.how-points li span { color: var(--muted); font-size: 14px; }
.no-key {
  margin-top: 24px; padding: 18px 20px;
  border: 2px dashed var(--border); border-radius: var(--radius);
  background: var(--green-dim); font-size: 14.5px;
}
.no-key b { font-weight: 800; }

/* ============================================================
   刷机教程 (timeline)
   ============================================================ */
.flash { background: var(--bg-alt); border-top: 2px solid var(--border); }
.steps { position: relative; margin-top: 10px; }
.steps::before {
  content: ""; position: absolute; left: 21px; top: 8px; bottom: 40px;
  width: 2px; background: var(--border);
}
.step { position: relative; padding: 0 0 40px 66px; }
.step:last-child { padding-bottom: 0; }
.step-num {
  position: absolute; left: 0; top: 0;
  width: 44px; height: 44px;
  border: 2px solid var(--border); border-radius: 50%;
  background: var(--green-lit); color: var(--border);
  font-weight: 900; font-size: 18px;
  display: grid; place-items: center;
  box-shadow: 3px 3px 0 var(--shadow); z-index: 1;
}
.step h3 { margin: 6px 0 10px; font-size: 22px; letter-spacing: -.01em; }
.step > p { margin: 0 0 14px; color: var(--muted); font-size: 15.5px; max-width: 62ch; }
.step .note {
  font-size: 13.5px; color: var(--muted);
  border-left: 3px solid var(--green); padding: 4px 0 4px 14px; margin: 14px 0 0;
}
.step .warn {
  font-size: 13.5px; border-left: 3px solid var(--red);
  padding: 8px 0 8px 14px; margin: 14px 0 0; color: var(--ink);
  background: #fbe9e5; border-radius: 0 4px 4px 0;
}
.step .warn b { color: var(--red); }

/* 代码块 */
.code {
  position: relative; background: #17150f; color: #eae7dc;
  border: 2px solid var(--border); border-radius: var(--radius);
  font-family: var(--mono); font-size: 13.5px; line-height: 1.7;
  margin: 14px 0 0; box-shadow: 3px 3px 0 var(--shadow); overflow: hidden;
}
.code-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-bottom: 1px solid #33302a;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #9c988c;
  background: #201e17;
}
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; }
.code .c-cmt { color: #7c8a6e; }
.code .c-cmd { color: #7fe08a; }
.code .c-str { color: #e5c07b; }
.copy-btn {
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em;
  color: #cfccc2; background: #2c291f; border: 1px solid #464236;
  border-radius: 4px; padding: 3px 9px; cursor: pointer;
}
.copy-btn:hover { background: #383428; color: #fff; }
.copy-btn.ok { color: var(--green-lit); border-color: var(--green); }

/* 接线表 */
.table-scroll { overflow-x: auto; margin: 14px 0 0; border: 2px solid var(--border); border-radius: var(--radius); box-shadow: 3px 3px 0 var(--shadow); }
table.pins { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--window); min-width: 520px; }
table.pins th, table.pins td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
table.pins thead th { background: var(--border); color: #f2f0e8; font-family: var(--mono); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
table.pins td.mono, table.pins th.mono { font-family: var(--mono); }
table.pins tr:last-child td { border-bottom: 0; }
table.pins td .gpio { color: var(--green); font-weight: 700; }

/* ============================================================
   开源资源 CTA
   ============================================================ */
.oss-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.oss-card {
  background: var(--window); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 30px; box-shadow: 5px 6px 0 var(--shadow);
  display: flex; flex-direction: column; gap: 12px;
}
.oss-card .em { font-size: 30px; }
.oss-card h3 { margin: 0; font-size: 22px; }
.oss-card p { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }
.oss-card .url { font-family: var(--mono); font-size: 12.5px; color: var(--green); word-break: break-all; }
.oss-card .btn { align-self: flex-start; margin-top: 4px; }

/* ============================================================
   Footer
   ============================================================ */
footer {
  border-top: 2px solid var(--border);
  background: var(--border); color: #cfccc2;
  padding: 44px 0 40px;
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
footer .f-brand { display: flex; align-items: center; gap: 11px; color: #f2f0e8; font-weight: 800; }
footer .f-brand .mac { width: 24px; height: 27px; border-color: #cfccc2; }
footer .f-brand .mac::before { border-color: #cfccc2; background: transparent; }
footer .f-brand .mac::after { background: #cfccc2; }
footer a { color: #cfccc2; text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; }
footer .f-links { display: flex; gap: 26px; flex-wrap: wrap; font-size: 14px; }
footer .f-note { width: 100%; font-size: 12.5px; color: #928e83; font-family: var(--mono); margin-top: 8px; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .feat-grid { grid-template-columns: 1fr; }
  .mini-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .oss-grid { grid-template-columns: 1fr; }
  .spec-strip .wrap { grid-template-columns: 1fr 1fr; }
  .spec-strip .cell:nth-child(2) { border-right: 0; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 58px; left: 0; right: 0;
    background: var(--window); border-bottom: 2px solid var(--border);
    padding: 12px 16px; gap: 4px;
  }
  .nav-toggle {
    display: inline-grid; place-items: center; margin-left: auto;
    width: 40px; height: 34px; border: 2px solid var(--border); border-radius: 5px;
    background: var(--white); cursor: pointer; font-size: 16px;
  }
}
@media (max-width: 560px) {
  section { padding: 60px 0; }
  .spec-strip .wrap { grid-template-columns: 1fr; }
  .spec-strip .cell { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.14); }
  .step { padding-left: 54px; }
  .steps::before { left: 17px; }
  .step-num { width: 36px; height: 36px; font-size: 15px; }
}
