/* =========================================================
   欣烨的 100 天复利实验 · styles.css
   极简 / 高级 / 克制；黑底 + 暖琥珀色强调。
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg: #08090b;
  --bg-2: #0d0e11;
  --surface: #111317;
  --surface-2: #16181d;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-glow: rgba(255, 255, 255, 0.22);

  --fg: #f5f5f4;
  --fg-soft: #d6d3d1;
  --fg-muted: #a1a1aa;
  --fg-subtle: #71717a;
  --fg-faint: #52525b;

  --accent: #fbbf24;          /* warm amber */
  --accent-soft: rgba(251, 191, 36, 0.14);
  --accent-strong: #f59e0b;
  --accent-glow: rgba(251, 191, 36, 0.35);

  /* 关键：把系统 UI 字体放最前，确保 Android / iOS / 低端机都能立刻渲染中文 */
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI",
    "Microsoft YaHei", "Source Han Sans CN", "Source Han Sans SC",
    "Noto Sans CJK SC", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Cormorant Garamond", "Times New Roman",
    "Source Han Serif SC", "Source Han Serif CN", "Noto Serif CJK SC",
    "Songti SC", STSong, SimSun, Georgia, serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, "SFMono-Regular",
    Menlo, Monaco, Consolas, "Courier New", monospace;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 30px 60px -30px rgba(0, 0, 0, 0.7);
  --shadow-lift: 0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 50px 100px -40px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(255, 255, 255, 0.05);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-emph: cubic-bezier(0.65, 0, 0.05, 1);

  --max-w: 1180px;
  --pad-x: clamp(20px, 5vw, 56px);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

body::before {
  /* 微弱噪点纹理，增加质感 */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.045 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.55;
  z-index: 1;
  mix-blend-mode: overlay;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

::selection { background: var(--accent); color: #1a1a1a; }

/* ---------- Background layers ---------- */
#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.ambient__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
}
.ambient__blob--1 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.45), transparent 70%);
  top: -120px; left: -160px;
  animation: drift1 22s ease-in-out infinite;
}
.ambient__blob--2 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(120, 100, 220, 0.35), transparent 70%);
  bottom: -180px; right: -180px;
  animation: drift2 26s ease-in-out infinite;
}
@keyframes drift1 {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(40px, 60px) scale(1.1); }
}
@keyframes drift2 {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-60px, -40px) scale(1.15); }
}
/* 移动端 / 节能：降级 ambient blob，避免 iOS Safari 120px blur 卡顿与白屏 */
@media (max-width: 560px) {
  .ambient__blob { filter: blur(60px); opacity: 0.22; animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ambient__blob { animation: none; }
}

/* ---------- Custom cursor (desktop only) ---------- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  mix-blend-mode: difference;
  will-change: transform;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.cursor--dot {
  width: 6px; height: 6px;
  background: #fff;
  transform: translate(-50%, -50%);
}
.cursor--ring {
  width: 38px; height: 38px;
  border: 1px solid #fff;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity 0.3s ease, width 0.25s var(--ease-out),
    height 0.25s var(--ease-out), border-color 0.25s ease;
}
body.cursor-ready .cursor { opacity: 1; }
body.cursor-hover .cursor--ring {
  width: 64px; height: 64px;
  border-color: var(--accent);
}
body.cursor-hover .cursor--dot { opacity: 0; }

@media (pointer: coarse) {
  .cursor { display: none !important; }
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #fde68a);
  z-index: 1000;
  transition: width 0.1s linear;
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad-x);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: padding 0.4s var(--ease-out), background 0.4s ease,
    backdrop-filter 0.4s ease;
}
.nav.is-scrolled {
  padding: 12px var(--pad-x);
  background: rgba(8, 9, 11, 0.6);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fg);
}
.nav__brand-mark {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #f97316);
  color: #18181b;
  font-family: var(--font-serif);
  font-weight: 700;
  font-style: italic;
  font-size: 18px;
}
.nav__brand-text { font-size: 14px; }

/* 返回名片入口（二级页标记） */
.nav__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  margin-right: 14px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  transition: color 0.25s ease, border-color 0.25s ease,
    background 0.25s ease, transform 0.25s ease;
}
.nav__back svg { transition: transform 0.25s var(--ease-out); }
.nav__back:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.nav__back:hover svg { transform: translateX(-3px); }
@media (max-width: 560px) {
  .nav__back { padding: 6px 10px; margin-right: 8px; }
  .nav__back span { display: none; }   /* 移动端只保留箭头 */
}

.nav__links {
  display: none;
  gap: 28px;
  font-size: 13px;
  color: var(--fg-muted);
}
.nav__links a {
  position: relative;
  padding: 6px 0;
  transition: color 0.25s ease;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out);
}
.nav__links a:hover { color: var(--fg); }
.nav__links a:hover::after { width: 100%; }

.nav__cta {
  font-size: 13px;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--fg);
  transition: border-color 0.25s ease, color 0.25s ease,
    background 0.25s ease;
}
.nav__cta:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

@media (min-width: 880px) {
  .nav__links { display: inline-flex; }
}
@media (max-width: 560px) {
  .nav__cta { display: none; }
  .nav__brand-text { display: none; }
}

/* ---------- Layout ---------- */
main { position: relative; z-index: 2; }

.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(80px, 12vw, 160px) var(--pad-x);
  position: relative;
}

.section__head { margin-bottom: clamp(40px, 6vw, 72px); }

.section__index {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--fg-subtle);
  margin-bottom: 16px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

.section__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 20px;
  color: var(--fg);
}
.section__title em {
  font-style: italic;
  font-weight: 500;
  color: var(--fg);
}
.section__title em.accent {
  color: var(--accent);
  text-shadow: 0 0 28px var(--accent-glow);
}

.section__lede {
  max-width: 60ch;
  color: var(--fg-muted);
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.7;
  margin: 0;
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(140px, 18vw, 200px) var(--pad-x) clamp(80px, 10vw, 140px);
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  margin-bottom: 28px;
  padding: 6px 12px 6px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  width: fit-content;
}

.dot-pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse 2s infinite;
}
.dot-pulse--mini { width: 6px; height: 6px; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-glow); }
  70%  { box-shadow: 0 0 0 10px rgba(251, 191, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}

.hero__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(44px, 8vw, 96px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 32px;
}
.hero__title em {
  font-style: italic;
  font-weight: 500;
}
.hero__title em.accent {
  color: var(--accent);
  position: relative;
  display: inline-block;
}
.hero__title em.accent::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform-origin: left;
  transform: scaleX(0);
  animation: under 1.2s var(--ease-emph) forwards 0.8s;
}
@keyframes under { to { transform: scaleX(1); } }

.hero__line { display: block; }

.hero__lede {
  font-size: clamp(18px, 2.1vw, 22px);
  color: var(--fg-soft);
  margin: 0 0 24px;
  max-width: 32ch;
  line-height: 1.5;
}
.muted { color: var(--fg-muted); }

.hero__statement {
  font-size: clamp(16px, 1.7vw, 19px);
  color: var(--fg-soft);
  line-height: 1.7;
  max-width: 48ch;
  margin: 0 0 44px;
  padding: 20px 24px;
  border-left: 2px solid var(--accent);
  background: linear-gradient(
    90deg,
    rgba(251, 191, 36, 0.06),
    transparent 60%
  );
  border-radius: 0 var(--radius) var(--radius) 0;
}
.hero__statement strong {
  font-weight: 500;
  color: var(--fg);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 64px;
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease-out),
    background 0.3s ease, border-color 0.3s ease, color 0.3s ease,
    box-shadow 0.3s ease;
  overflow: hidden;
  isolation: isolate;
  will-change: transform;
}
.btn svg { transition: transform 0.3s var(--ease-out); }
.btn:hover svg { transform: translateX(4px); }

.btn--primary {
  background: var(--accent);
  color: #18181b;
  box-shadow: 0 14px 40px -10px var(--accent-glow),
    0 0 0 1px rgba(251, 191, 36, 0.5) inset;
}
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: translateX(-100%);
  transition: transform 0.7s var(--ease-out);
  z-index: -1;
}
.btn--primary:hover::before { transform: translateX(100%); }
.btn--primary:hover {
  background: #fde68a;
  box-shadow: 0 20px 50px -10px var(--accent-glow),
    0 0 0 1px rgba(251, 191, 36, 0.7) inset;
}

.btn--ghost {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.02);
  color: var(--fg);
}
.btn--ghost:hover {
  border-color: var(--fg);
  background: rgba(255, 255, 255, 0.06);
}

.btn--lg { padding: 18px 28px; font-size: 16px; }

/* ---------- Hero status card ---------- */
.hero__status { margin-top: 8px; }
.status-card {
  display: grid;
  gap: 8px;
  padding: 18px 22px;
  max-width: 360px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.status-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
}
.status-card__label {
  font-family: var(--font-mono);
  color: var(--fg-subtle);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
}
.status-card__value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-soft);
}
.mono { font-family: var(--font-mono); }

/* ---------- Hero scroll indicator ---------- */
.hero__scroll {
  position: absolute;
  bottom: 36px;
  left: var(--pad-x);
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.hero__scroll-line {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, var(--fg-subtle), transparent);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scrollLine 2.2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ---------- Section: Advice ---------- */
.advice-card {
  position: relative;
  padding: clamp(36px, 5vw, 60px);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.advice-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    var(--accent-glow),
    transparent 30%,
    transparent 70%,
    rgba(167, 139, 250, 0.3)
  );
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.7;
}

.advice-card__quote {
  margin: 0 0 32px;
  position: relative;
}
.advice-card__mark {
  position: absolute;
  top: -32px; left: -8px;
  font-family: var(--font-serif);
  font-size: 96px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.4;
  font-style: italic;
}
.advice-card__quote p {
  margin: 0 0 8px;
  font-size: clamp(18px, 2.2vw, 22px);
  color: var(--fg);
  line-height: 1.5;
}
.advice-card__quote p.muted { font-size: 15px; }

.advice-card__hint {
  margin: 18px 0 0;
  font-size: 12px;
  color: var(--fg-subtle);
}
.advice-card__hint code {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}

/* ---------- Card grid (Doing) ---------- */
.card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

.card {
  position: relative;
  padding: 28px 26px 32px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
  transform-style: preserve-3d;
  transition: border-color 0.4s ease, transform 0.3s var(--ease-out),
    box-shadow 0.4s ease;
  will-change: transform;
}
.card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-lift);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 50%),
    var(--card-accent, var(--accent)),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  mix-blend-mode: soft-light;
}
.card:hover::before { opacity: 0.25; }

.card__index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--fg-subtle);
  margin-bottom: 18px;
}

.card__icon {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--card-accent, var(--accent));
  margin-bottom: 20px;
  transition: transform 0.5s var(--ease-out), border-color 0.4s ease;
}
.card:hover .card__icon {
  transform: rotate(-6deg) scale(1.05);
  border-color: var(--card-accent, var(--accent));
}

.card__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  color: var(--fg);
}
.card__body {
  margin: 0 0 18px;
  font-size: 14.5px;
  color: var(--fg-muted);
  line-height: 1.65;
}
.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.card__tags span {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--fg-muted);
}

.card__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 40%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 60%
  );
  transform: translateX(-100%);
  transition: transform 0.9s var(--ease-out);
  pointer-events: none;
}
.card:hover .card__shine { transform: translateX(100%); }

/* ---------- Offer list ---------- */
.offer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}
.offer-list__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 24px 4px;
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: padding 0.4s var(--ease-out), color 0.3s ease;
  cursor: pointer;
}
@media (min-width: 720px) {
  .offer-list__item { padding: 32px 8px; }
}
.offer-list__item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(251, 191, 36, 0.06),
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.7s var(--ease-out);
  pointer-events: none;
}
.offer-list__item:hover::before { transform: translateX(0); }
.offer-list__item:hover { padding-left: 20px; }
@media (min-width: 720px) {
  .offer-list__item:hover { padding-left: 28px; }
}

.offer-list__index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-subtle);
  letter-spacing: 0.1em;
}
.offer-list__text {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 500;
  line-height: 1.3;
  color: var(--fg);
}
.offer-list__text em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}
.offer-list__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-subtle);
  letter-spacing: 0.06em;
  text-align: right;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .offer-list__item {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .offer-list__index { grid-row: 1; }
  .offer-list__text { grid-row: 1; grid-column: 2; }
  .offer-list__meta { grid-column: 2; grid-row: 2; text-align: left; }
}

/* ---------- Progress ---------- */
.progress-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .progress-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
}

.progress-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 22px 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.3s ease, background 0.3s ease;
}
.progress-item:hover {
  border-color: var(--border-glow);
  background: rgba(255, 255, 255, 0.04);
}

.progress-item__check {
  width: 22px; height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #18181b;
}
.progress-item--done {
  border-color: rgba(251, 191, 36, 0.25);
  background: linear-gradient(
    90deg,
    rgba(251, 191, 36, 0.08),
    rgba(255, 255, 255, 0.01)
  );
}

.progress-item__label {
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
}
.progress-item__status {
  font-size: 13px;
  color: var(--fg-muted);
}
.progress-item--done .progress-item__status {
  color: var(--accent);
  font-weight: 500;
}

.progress-item--counter {
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
}
.progress-item--counter .progress-item__label { grid-row: 1; }
.progress-item__counter {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--fg);
  font-weight: 500;
  grid-row: 1;
  grid-column: 2;
}
.progress-bar {
  grid-column: 1 / -1;
  grid-row: 2;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}
.progress-bar__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #fde68a);
  border-radius: inherit;
  transition: width 1.2s var(--ease-emph);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 880px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
  }
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s var(--ease-out);
}
.contact-card:hover {
  border-color: var(--border-glow);
}
.contact-card--link:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.contact-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.contact-card__type {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--fg-subtle);
  text-transform: uppercase;
}
.contact-card__hint {
  font-size: 11px;
  color: var(--fg-subtle);
}

.qr-placeholder {
  position: relative;
  aspect-ratio: 1;
  max-width: 200px;
  margin: 4px auto 0;
  background: #fff;             /* 强制白底，深色主题下也保证扫码识别 */
  border-radius: 12px;
  padding: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
/* 真实二维码 img：按原图比例居中显示在白色方框内（flex 父容器 + margin auto 双保险） */
.qr-placeholder img[data-wechat-qr-img] {
  position: relative;
  z-index: 3;
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center center;
  margin: auto;
}
.qr-placeholder__grid {
  position: absolute;
  inset: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 4px;
}
.qr-placeholder__grid span {
  background: #18181b;
  border-radius: 2px;
}
.qr-placeholder__grid span:nth-child(2),
.qr-placeholder__grid span:nth-child(4),
.qr-placeholder__grid span:nth-child(6),
.qr-placeholder__grid span:nth-child(8) {
  background: transparent;
}
.qr-placeholder__center {
  position: relative;
  z-index: 1;
  width: 40%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: var(--accent);
  border-radius: 8px;
  color: #18181b;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.1em;
}

.contact-card__email {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--fg);
  word-break: break-all;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.contact-card--link:hover .contact-card__email {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.contact-card__statement {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.3vw, 24px);
  line-height: 1.5;
  font-weight: 500;
  color: var(--fg);
  margin: 0;
}
.contact-card__statement em {
  font-style: italic;
  font-weight: 500;
}
.contact-card__statement em.accent { color: var(--accent); }

.contact-card__signature {
  margin-top: auto;
  font-size: 12px;
  color: var(--fg-subtle);
  letter-spacing: 0.1em;
}

.contact-card__note {
  margin: -4px 0 0;
  font-size: 11px;
}
.contact-card__note code {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 2px 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}

/* ---------- Footer ---------- */
.footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 60px var(--pad-x) 40px;
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
}
.footer__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
}
.footer__big {
  margin-top: 40px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(48px, 14vw, 180px);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.08);
  text-stroke: 1px rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  overflow: hidden;
  user-select: none;
}

/* ---------- Reveal animations ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
[data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

[data-split] .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(40%);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 18ms);
}
[data-split].is-in .char {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  [data-split] .char { opacity: 1; transform: none; }
}

/* ---------- Tiny utilities ---------- */
em { font-style: italic; }
code { font-family: var(--font-mono); }

/* =========================================================
   v2 升级：以下全部是「最 senior 前端设计师」级别的特效。
   - WebGL shader 背景 / Spring magnetic / Glitch / Spotlight
   - View Transitions / Konami / Marquee / Loader / Goo
   ========================================================= */

.svg-defs {
  position: absolute; width: 0; height: 0;
  pointer-events: none;
  overflow: hidden;
}

/* ---------- 1. Loader 入场仪式 ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.8s var(--ease-out), visibility 0.8s;
  /* 安全网：即使 JS 完全失败，CSS 动画也会让 loader 在 3.5s 后强制消失。 */
  animation: loaderAutoExit 0.6s 3.5s var(--ease-out) forwards;
}
@keyframes loaderAutoExit {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}
.loader::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 60%,
    rgba(251, 191, 36, 0.16),
    transparent 60%
  );
  pointer-events: none;
}
.loader.is-done {
  opacity: 0;
  visibility: hidden;
}

.loader__inner {
  display: grid;
  place-items: center;
  gap: 26px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.loader__mark {
  position: relative;
  width: 64px; height: 64px;
  display: grid;
  place-items: center;
  filter: url(#goo);
}
.loader__mark::before,
.loader__mark::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  animation: loaderOrbit 2.4s linear infinite;
}
.loader__mark::after {
  animation-delay: -1.2s;
}
@keyframes loaderOrbit {
  0%   { transform: translate(0, -24px); }
  25%  { transform: translate(24px, 0); }
  50%  { transform: translate(0, 24px); }
  75%  { transform: translate(-24px, 0); }
  100% { transform: translate(0, -24px); }
}
.loader__mark-x {
  position: relative;
  z-index: 2;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: #18181b;
  font-size: 22px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  display: grid;
  place-items: center;
}
.loader__mark-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(251, 191, 36, 0.3);
  animation: loaderRing 1.6s ease-in-out infinite;
}
@keyframes loaderRing {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50%      { transform: scale(1.15); opacity: 0.9; }
}

.loader__counter {
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--fg-muted);
}
.loader__counter [data-loader-num] { color: var(--fg); }

.loader__line {
  width: min(260px, 70vw);
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
.loader__line-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #fde68a);
  box-shadow: 0 0 14px var(--accent-glow);
  transition: width 0.2s linear;
}

.loader__words {
  display: flex;
  gap: 8px;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.loader__words span:not(.muted) {
  animation: loaderWord 1.6s ease-in-out infinite;
}
.loader__words span:nth-child(3) { animation-delay: 0.2s; }
.loader__words span:nth-child(5) { animation-delay: 0.4s; }
.loader__words span:nth-child(7) { animation-delay: 0.6s; }
@keyframes loaderWord {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; color: var(--accent); }
}

/* 整页微动入场（loader 消失后）
   关键：默认 opacity: 1，避免 JS 失败时整页空白。 */
main, .footer, .nav, .hud, .marquee {
  opacity: 1;
}
body:not(.is-ready) main,
body:not(.is-ready) .footer,
body:not(.is-ready) .nav,
body:not(.is-ready) .marquee {
  /* 仅在 JS 正常运行时由 loader 接管入场动画；
     默认完全可见，不依赖 JS。 */
}
body.is-ready main,
body.is-ready .footer,
body.is-ready .nav,
body.is-ready .hud,
body.is-ready .marquee {
  animation: pageEnter 0.9s var(--ease-out) both;
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 2. HUD (右上角控制条) ---------- */
.hud {
  position: fixed;
  /* 下移：避开 .nav（约 76px 高），不再挡 logo / 链接 */
  top: 96px; right: 18px;
  z-index: 110;
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(8, 9, 11, 0.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--border);
}
.hud__btn {
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--fg-muted);
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.hud__btn:hover {
  color: var(--accent);
  background: var(--accent-soft);
}
.hud__btn.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}
.hud__btn:active { transform: scale(0.92); }

@media (max-width: 560px) {
  .hud {
    top: auto; bottom: 18px; right: 18px;
  }
}

/* ---------- 3. 彩蛋 Toast ---------- */
.toast {
  position: fixed;
  left: 50%; top: 32px;
  transform: translate(-50%, -200%);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  background: linear-gradient(
    180deg,
    rgba(20, 20, 24, 0.96),
    rgba(20, 20, 24, 0.86)
  );
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(251, 191, 36, 0.2);
  transition: transform 0.6s var(--ease-emph), opacity 0.6s;
  opacity: 0;
  max-width: calc(100vw - 32px);
}
.toast.is-on {
  transform: translate(-50%, 0);
  opacity: 1;
}
.toast__icon {
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #18181b;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.toast__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}
.toast__body strong {
  color: var(--fg);
  font-weight: 600;
}
.toast__body span {
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

/* ---------- 4. Spotlight 蒙版（聚光灯模式） ---------- */
.spotlight {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: radial-gradient(
    240px circle at var(--spot-x, 50%) var(--spot-y, 50%),
    transparent 0%,
    transparent 30%,
    rgba(0, 0, 0, 0.6) 60%,
    rgba(0, 0, 0, 0.92) 100%
  );
}
body.is-spotlight .spotlight { opacity: 1; }
body.is-spotlight #shader-canvas,
body.is-spotlight #particle-canvas,
body.is-spotlight .ambient { opacity: 0.3; }

/* ---------- 5. WebGL shader canvas ---------- */
#shader-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* 默认可见。Shader 启动失败时 JS 会 display:none。 */
  opacity: 1;
}

/* ---------- 6. 鼠标轨迹 canvas ---------- */
#trail-canvas {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* ---------- 7. Marquee 滚动文字带 ---------- */
.marquee {
  position: relative;
  margin: 0 auto;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.015),
    rgba(255, 255, 255, 0.005)
  );
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    90deg, transparent, #000 8%, #000 92%, transparent
  );
          mask-image: linear-gradient(
    90deg, transparent, #000 8%, #000 92%, transparent
  );
}
.marquee--big { padding: 28px 0; }
.marquee__track {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  white-space: nowrap;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(22px, 4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg-soft);
  will-change: transform;
  animation: marqueeRoll 38s linear infinite;
}
.marquee--reverse .marquee__track {
  animation-direction: reverse;
  animation-duration: 46s;
}
.marquee__accent {
  color: var(--accent);
  font-style: italic;
}
.marquee__dot {
  color: var(--accent);
  font-size: 0.5em;
  display: inline-block;
  transform: translateY(-0.3em);
}
@keyframes marqueeRoll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ---------- 8. Glitch / Chromatic aberration（hero 标题） ---------- */
.hero__title {
  position: relative;
  isolation: isolate;
}
.hero__title-ghost {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  margin: 0;
  font-style: normal;
  opacity: 0;
  transition: opacity 0.25s ease;
  mix-blend-mode: screen;
}
.hero__title-ghost--r { color: #ff3b3b; transform: translate(2px, 0); }
.hero__title-ghost--g { color: #00e0c2; transform: translate(-2px, 0); }
.hero__title-ghost .hero__line { display: block; }
.hero__title-ghost em { font-style: italic; }

.hero__title.is-glitch .hero__title-ghost--r {
  opacity: 0.85;
  animation: glitchR 0.6s steps(2, end);
}
.hero__title.is-glitch .hero__title-ghost--g {
  opacity: 0.85;
  animation: glitchG 0.6s steps(2, end);
}
@keyframes glitchR {
  0%   { transform: translate(3px, 0); clip-path: inset(0 0 60% 0); }
  20%  { transform: translate(-3px, 1px); clip-path: inset(30% 0 30% 0); }
  40%  { transform: translate(4px, -1px); clip-path: inset(60% 0 0 0); }
  60%  { transform: translate(-2px, 0); clip-path: inset(0 0 40% 0); }
  80%  { transform: translate(3px, 0); clip-path: inset(40% 0 20% 0); }
  100% { transform: translate(2px, 0); clip-path: inset(0 0 60% 0); }
}
@keyframes glitchG {
  0%   { transform: translate(-3px, 0); clip-path: inset(0 0 50% 0); }
  20%  { transform: translate(3px, -1px); clip-path: inset(50% 0 0 0); }
  40%  { transform: translate(-4px, 1px); clip-path: inset(10% 0 70% 0); }
  60%  { transform: translate(2px, 0); clip-path: inset(70% 0 10% 0); }
  80%  { transform: translate(-3px, 0); clip-path: inset(30% 0 30% 0); }
  100% { transform: translate(-2px, 0); clip-path: inset(0 0 50% 0); }
}

/* ---------- 9. Brand mark (goo + dot) ---------- */
.nav__brand-mark {
  position: relative;
  background: transparent;
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
}
.nav__brand-mark-bg {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #f97316);
}
.nav__brand-mark-letter {
  position: relative;
  z-index: 2;
  font-family: var(--font-serif);
  font-weight: 700;
  font-style: italic;
  color: #18181b;
  font-size: 18px;
  line-height: 1;
}
.nav__brand-mark-dot {
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  right: -2px; bottom: -2px;
  transition: transform 0.6s var(--ease-emph);
}
.nav__brand:hover .nav__brand-mark-dot {
  transform: translate(-6px, -32px) scale(0.9);
}

/* ---------- 10. 颜色主题切换（Light mode） ---------- */
body[data-theme="light"] {
  --bg: #faf9f6;
  --bg-2: #f3f1ec;
  --surface: #ffffff;
  --surface-2: #f5f3ee;
  --border: rgba(20, 20, 20, 0.08);
  --border-strong: rgba(20, 20, 20, 0.18);
  --border-glow: rgba(20, 20, 20, 0.28);

  --fg: #18181b;
  --fg-soft: #27272a;
  --fg-muted: #52525b;
  --fg-subtle: #71717a;
  --fg-faint: #a1a1aa;

  --accent: #c2410c;
  --accent-soft: rgba(194, 65, 12, 0.1);
  --accent-strong: #9a3412;
  --accent-glow: rgba(194, 65, 12, 0.28);

  /* 兜底：强制 body 自身背景，跳过 var resolve 链中可能的覆盖。
     注意：color 不能 !important，否则会强行下传给 .btn--primary 等
     有自身 color 的元素，造成橙底深字看不清。 */
  background: #faf9f6 !important;
}
html:has(body[data-theme="light"]){ background: #faf9f6; }
/* 主按钮浅色态：橙底配白字，避免低对比 */
body[data-theme="light"] .btn--primary{
  color: #ffffff;
}
/* 浅色态正文层级：因为 :root --fg 仍是深色态值，强制覆盖 */
body[data-theme="light"] .hero__title,
body[data-theme="light"] .hero__line,
body[data-theme="light"] .hero__title .char,
body[data-theme="light"] .section__title,
body[data-theme="light"] h1,
body[data-theme="light"] h2,
body[data-theme="light"] h3,
body[data-theme="light"] h4,
body[data-theme="light"] p,
body[data-theme="light"] li,
body[data-theme="light"] .mono,
body[data-theme="light"] .lede,
body[data-theme="light"] .nav__brand,
body[data-theme="light"] .nav__brand-text,
body[data-theme="light"] .nav__cta{
  color: #18181b;
}
/* 浅色态强调色仍要走 --accent（橙色），不能被上面覆盖 */
body[data-theme="light"] .accent,
body[data-theme="light"] em.accent,
body[data-theme="light"] .hero__title em.accent{
  color: var(--accent);
}
/* 浅色态柔色文字 */
body[data-theme="light"] .muted,
body[data-theme="light"] .text-muted,
body[data-theme="light"] .section__lede,
body[data-theme="light"] .progress-item__label{
  color: #52525b;
}
body[data-theme="light"]::before { mix-blend-mode: multiply; opacity: 0.35; }
body[data-theme="light"] .nav__brand-mark-letter { color: #faf9f6; }
body[data-theme="light"] .footer__big {
  -webkit-text-stroke-color: rgba(20, 20, 20, 0.1);
}
body[data-theme="light"] .qr-placeholder { background: #18181b; }
body[data-theme="light"] .qr-placeholder__grid span { background: #fafaf9; }
body[data-theme="light"] .qr-placeholder__center { background: var(--accent); color: #fafaf9; }

/* ---------- 白天模式：彻底关 dark-only 特效 ----------
   原因：works.html 是 dark-first 设计，shader / RGB ghost / 自定义光标
   在浅色背景下会变成"撕裂残影 + 脏污笔触"，必须屏蔽。
   逻辑等同于 light 态自动 is-fx-low，但不动 JS 状态。 */
body[data-theme="light"] #shader-canvas,
body[data-theme="light"] #particle-canvas,
body[data-theme="light"] #trail-canvas,
body[data-theme="light"] .hero__title-ghost,
body[data-theme="light"] .card::after,
body[data-theme="light"] .cursor,
body[data-theme="light"] .cursor--dot,
body[data-theme="light"] .cursor--ring {
  display: none !important;
}
body[data-theme="light"] [data-tilt] { transform: none !important; }
/* hero 主标题：浅色态恢复纯色，无叠加 */
body[data-theme="light"] .hero__title em.accent { color: var(--accent); }

/* View Transitions API — 主题切换时圆形展开 */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.6s;
}
::view-transition-old(root) {
  animation-name: themeOut;
  z-index: 1;
}
::view-transition-new(root) {
  animation-name: themeIn;
  z-index: 2;
}
@keyframes themeOut {
  to { opacity: 0; }
}
@keyframes themeIn {
  from {
    clip-path: circle(0% at var(--tx, 90%) var(--ty, 5%));
  }
  to {
    clip-path: circle(150% at var(--tx, 90%) var(--ty, 5%));
  }
}

/* ---------- 11. Konami / 复利模式：彩色 conic 边框旋转 ---------- */
body.is-konami .card,
body.is-konami .advice-card,
body.is-konami .contact-card,
body.is-konami .progress-item--counter {
  position: relative;
}
body.is-konami .card::after,
body.is-konami .advice-card::after,
body.is-konami .contact-card::after,
body.is-konami .progress-item--counter::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--angle, 0deg),
    var(--accent),
    #a78bfa,
    #34d399,
    #fbbf24,
    var(--accent)
  );
  z-index: -1;
  opacity: 0.6;
  filter: blur(8px);
  animation: konamiSpin 4s linear infinite;
}
@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes konamiSpin {
  to { --angle: 360deg; }
}

/* ---------- 12. Hero title hover 状态加强 ---------- */
.hero__title em.accent {
  position: relative;
  transition: filter 0.4s ease;
}
.hero__title:hover em.accent {
  filter: drop-shadow(0 0 24px var(--accent-glow));
}

/* ---------- 13. Card 内置 conic 旋转边框（hover 时显示） ---------- */
.card {
  background-clip: padding-box;
}
.card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--angle, 0deg),
    transparent 60%,
    var(--card-accent, var(--accent)),
    transparent
  );
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  animation: konamiSpin 6s linear infinite;
}
.card:hover::after { opacity: 1; }

/* ---------- 14. Section 标题用 SVG distortion filter（subtle） ---------- */
.section__title em.accent,
.hero__title em.accent {
  /* 暂时只对 accent 字使用，hover 时增强 */
}

/* ---------- 15. data-scramble 字符渲染 ---------- */
[data-scramble] .char-s {
  display: inline-block;
  transition: opacity 0.15s ease;
}

/* ---------- 16. Section 滚动驱动（现代浏览器） ---------- */
@supports (animation-timeline: view()) {
  [data-reveal] {
    animation: revealIn linear both;
    animation-timeline: view();
    animation-range: entry 5% cover 30%;
  }
  @keyframes revealIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ---------- 17. 视觉细节：所有 a/button 焦点态 ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 8px;
}

/* ---------- 18. 顶部 nav 在 spotlight 模式下淡化 ---------- */
body.is-spotlight .nav,
body.is-spotlight .hud,
body.is-spotlight .marquee {
  opacity: 0.3;
}

/* ---------- 19. 移动端：降级处理 ---------- */
@media (max-width: 560px) {
  .marquee__track { font-size: clamp(18px, 5vw, 26px); }
  .marquee { padding: 14px 0; }
  .marquee--big { padding: 18px 0; }
  .hud { padding: 4px; }
  .hud__btn { width: 32px; height: 32px; }
}

/* ---------- 20. 特效降级模式 ---------- */
body.is-fx-low #shader-canvas,
body.is-fx-low #particle-canvas,
body.is-fx-low #trail-canvas,
body.is-fx-low .ambient,
body.is-fx-low .hero__title-ghost,
body.is-fx-low .card::after {
  display: none !important;
}
body.is-fx-low [data-tilt] { transform: none !important; }
