/* =====================================================
   base.css —— 变量 / 重置 / 排版 / 通用组件
   森策数字 Sence · 活力撞色 · 新海报纸质感
   ===================================================== */

:root {
  /* 色板 */
  --paper: #F6F1E6;
  --paper-2: #EDE6D4;
  --ink: #14120E;
  --ink-soft: #57523F;
  --lime: #C9F73A;
  --orange: #FF4D1F;
  --blue: #2E4BFF;
  --pink: #FF7AB8;

  /* 字体 */
  --font-cn: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Anton", "Noto Sans SC", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  /* 尺寸 */
  --container: min(1200px, 92vw);
  --nav-h: 76px;
  --radius: 18px;
  --line: 2px solid var(--ink);

  /* 阴影（硬投影） */
  --shadow-ink: 6px 6px 0 var(--ink);
  --shadow-lime: 6px 6px 0 var(--lime);
  --shadow-orange: 6px 6px 0 var(--orange);
}

/* ---------- 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-padding-top: calc(var(--nav-h) + 12px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font-cn);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  min-height: 100vh;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
strong, b { font-weight: 700; }
em { font-style: normal; }

::selection { background: var(--lime); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 滚动条 */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb {
  background: var(--ink);
  border: 3px solid var(--paper);
  border-radius: 8px;
}

/* ---------- 工具 ---------- */
.container { width: var(--container); margin-inline: auto; }

.skip-link {
  position: fixed;
  top: -100px; left: 16px;
  z-index: 4000;
  padding: 10px 18px;
  background: var(--ink); color: var(--paper);
  border-radius: 0 0 10px 10px;
  font-weight: 700;
  transition: top .25s;
}
.skip-link:focus { top: 0; }

/* 高亮标记（荧光笔） */
mark {
  background: linear-gradient(transparent 58%, var(--lime) 58%, var(--lime) 94%, transparent 94%);
  color: inherit;
  padding-inline: 2px;
}
.process mark { background-image: linear-gradient(transparent 58%, var(--orange) 58%, var(--orange) 94%, transparent 94%); }

/* 呼吸圆点 */
.pulse-dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 0 rgba(255, 77, 31, .5);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  70%  { box-shadow: 0 0 0 9px rgba(255, 77, 31, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 77, 31, 0); }
}

/* 胶囊标签 */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border: var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-weight: 700;
  font-size: .85rem;
}
.chip--live { background: var(--lime); }

/* ---------- 噪点纹理 ---------- */
.noise {
  position: fixed; inset: 0;
  z-index: 1200;
  pointer-events: none;
  opacity: .05;
  background-image: 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.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/></svg>");
}

/* ---------- 阅读进度条 ---------- */
.progress-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  z-index: 2200;
  pointer-events: none;
}
.progress-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--lime), var(--orange));
}

/* ---------- 自定义光标（仅精确指针设备） ---------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  z-index: 3000;
  pointer-events: none;
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity .3s;
}
body.has-cursor .cursor-dot,
body.has-cursor .cursor-ring { opacity: 1; }
body.has-cursor { cursor: none; }
body.has-cursor a,
body.has-cursor button,
body.has-cursor [data-cursor] { cursor: none; }

.cursor-dot {
  width: 8px; height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #fff;
}
.cursor-ring {
  width: 38px; height: 38px;
  margin: -19px 0 0 -19px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  transition: opacity .3s, width .25s, height .25s, margin .25s;
}
body.cursor-hover .cursor-ring {
  width: 58px; height: 58px;
  margin: -29px 0 0 -29px;
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 34px;
  z-index: 2500;
  transform: translate(-50%, 20px);
  padding: 12px 26px;
  background: var(--ink);
  color: var(--lime);
  font-weight: 700;
  border-radius: 999px;
  border: 2px solid var(--lime);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 32px;
  border: var(--line);
  border-radius: 999px;
  font-weight: 900;
  font-size: 1rem;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s;
  will-change: transform;
}
.btn--sm { padding: 10px 22px; font-size: .9rem; }
.btn--lg { padding: 18px 40px; font-size: 1.1rem; }

.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-lime);
}

.btn--orange { background: var(--orange); color: var(--ink); }
.btn--orange:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-ink);
}

/* 好价导流按钮：荧光绿，最跳眼 */
.btn--deal { background: var(--lime); color: var(--ink); }
.btn--deal:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-orange);
}

.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-orange);
}
.process .btn--ghost { color: var(--paper); }
.process .btn--ghost:hover { background: var(--lime); color: var(--ink); }

/* ---------- 滚动入场 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.2, .65, .25, 1), transform .8s cubic-bezier(.2, .65, .25, 1);
  transition-delay: var(--d, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 装饰星 ---------- */
.deco {
  position: absolute;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1;
  pointer-events: none;
  animation: float 5s ease-in-out infinite;
}
.deco--about {
  right: 4%;
  top: 12%;
  color: var(--orange);
  transform: rotate(15deg);
}
@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -14px; }
}

/* ---------- 通用：减少动态 ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; }
  .pulse-dot, .deco { animation: none; }
  * { scroll-behavior: auto !important; }
}
