/* ============================================================
   盒子猫官网 · 基础层
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 24px);
  background: var(--bg);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "HarmonyOS Sans SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--tx);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--t-mid) var(--ease), color var(--t-mid) var(--ease);
}

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

h1, h2, h3, h4, h5 {
  margin: 0;
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--tx);
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}
a:hover { color: var(--brand-d); }

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}
button:disabled { cursor: not-allowed; opacity: .5; }

::selection { background: var(--brand); color: #fff; }

/* ---- 焦点可见（键盘可达性）---- */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip-link {
  position: absolute;
  left: 50%;
  top: -60px;
  transform: translateX(-50%);
  z-index: 200;
  padding: 10px 20px;
  background: var(--brand);
  color: #fff;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: 0; color: #fff; }

.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;
}

/* ---- 容器 ---- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---- 区块 ---- */
.sec {
  padding-block: var(--sec-y);
  position: relative;
}
.sec--tight { padding-block: calc(var(--sec-y) * .72); }
.sec--alt { background: var(--surface); }

.sec-head { max-width: 780px; margin-bottom: 52px; }
.sec-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--brand);
  background: var(--brand-l);
  border-radius: var(--r-pill);
  padding: 6px 14px;
  margin-bottom: 20px;
}
.eyebrow::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.eyebrow--gold { color: var(--gold); background: var(--gold-l); }

.h2 {
  font-size: clamp(24px, 3.1vw, 36px);
  line-height: 1.24;
  letter-spacing: -.02em;
}
.sec-head p {
  margin-top: 18px;
  font-size: 16.5px;
  line-height: 1.78;
  color: var(--tx-2);
}

.h3 { font-size: 19px; font-weight: 650; }
.lead { font-size: 17.5px; line-height: 1.8; color: var(--tx-2); }
.small { font-size: 14px; line-height: 1.7; }
.muted { color: var(--tx-3); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.num { font-variant-numeric: tabular-nums; }

/* ---- 图标 ---- */
.ico {
  width: 24px; height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ico--sm { width: 18px; height: 18px; }
.ico--lg { width: 28px; height: 28px; }

.ico-tile {
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--brand-l);
  color: var(--brand);
  flex: none;
  transition: transform var(--t-mid) var(--ease-out), background-color var(--t-mid) var(--ease);
}

/* ---- 按钮 ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: var(--r-pill);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform var(--t-fast) var(--ease-out),
              box-shadow var(--t-mid) var(--ease),
              background-color var(--t-mid) var(--ease),
              border-color var(--t-mid) var(--ease),
              color var(--t-mid) var(--ease);
}
.btn .ico { width: 18px; height: 18px; stroke-width: 2.2; }

.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--sh-brand);
}
.btn--primary:hover {
  background: var(--brand-d);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(43, 92, 230, .3);
}
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: var(--surface);
  color: var(--tx);
  border-color: var(--line);
  box-shadow: var(--sh-xs);
}
.btn--ghost:hover {
  color: var(--brand);
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--sh-sm);
}

.btn--lg { padding: 16px 32px; font-size: 16.5px; }
.btn--block { width: 100%; }

/* 主按钮内光扫过（仅指针设备）*/
@media (hover: hover) and (pointer: fine) {
  .btn--primary::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
    transform: translateX(-130%);
    transition: transform .62s var(--ease-out);
    pointer-events: none;
  }
  .btn--primary:hover::after { transform: translateX(130%); }
}

/* ---- 小标签 ---- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  color: var(--tx-2);
  line-height: 1.6;
}
.chip--brand { background: var(--brand-l); color: var(--brand); }
.chip--gold { background: var(--gold-l); color: var(--gold); }

/* ---- 卡片 ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 28px;
  position: relative;
  transition: transform var(--t-mid) var(--ease-out),
              box-shadow var(--t-mid) var(--ease),
              border-color var(--t-mid) var(--ease);
}
.card--hover:hover {
  transform: translateY(-6px);
  box-shadow: var(--sh-md);
  border-color: var(--line);
}

/* 光标跟随光斑（由 JS 写入 --mx/--my） */
.card--spot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%),
              rgba(43, 92, 230, .09), transparent 62%);
  opacity: 0;
  transition: opacity var(--t-mid) var(--ease);
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .card--spot:hover::before { opacity: 1; }
}

/* ---- 通用列表勾选项 ---- */
.ticks { display: grid; gap: 9px; margin-top: 18px; }
.ticks li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 14.5px;
  color: var(--tx-2);
  line-height: 1.65;
}
.ticks .ico {
  width: 17px; height: 17px;
  color: var(--brand);
  stroke-width: 2.6;
  margin-top: 4px;
}

/* ---- 滚动揭示 ----
   渐进增强：仅当 JS 可用（<html> 带 .js）时元素才初始隐藏。
   不执行 JS 的爬虫（如百度蜘蛛）看到的是可见内容，不影响收录与排名。 */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .62s var(--ease-out), transform .62s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
