/* ============================================================
   wzzsl.fun — 门户页样式
   ------------------------------------------------------------
   风格：「墨玉」深色奢石
   近黑基底 + 香槟金强调 + 衬线标题 + 真实材质

   设计立场：华丽不等于高饱和加发光加渐变字。高级感来自四件事 ——
   克制的色彩、考究的字体、可信的材质与深度、有节奏的动效。
   因此本表刻意不含：霓虹发光、彩色渐变文字、自定义光标、粒子背景。

   深色界面的一个关键事实：**阴影几乎不可见**。
   深度必须靠「内高光 + 描边 + 表面明度差」建立，而非投影。

   约束：零外部依赖（无字体文件、无图片、无脚本库）
   ============================================================ */

:root {
  color-scheme: dark;

  /* ---- 表面：四级明度差建立纵深 ---- */
  --bg-base:    #0B0D10;
  --bg-raised:  #13161A;
  --bg-overlay: #1A1E23;

  /* ---- 文本 ---- */
  --text-primary:   #F4F1EA;
  --text-secondary: #A9A296;
  --text-tertiary:  #6E6A62;

  /* ---- 强调：香槟金（饱和度 46%，刻意压低） ---- */
  --gold:        #C8A96A;
  --gold-bright: #E6D2A0;
  --gold-wash:   rgba(200, 169, 106, 0.10);
  --gold-line:   rgba(200, 169, 106, 0.24);

  /* ---- 次强调：暖玉（承接原有墨绿的基因） ---- */
  --jade:      #5E8B7E;
  --jade-wash: rgba(94, 139, 126, 0.12);

  /* ---- 描边 ---- */
  --line-hairline: rgba(244, 241, 234, 0.07);
  --line-strong:   rgba(244, 241, 234, 0.14);

  /* ---- 深色下的"阴影"：内高光 + 极淡外发光 ---- */
  --lift-1: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  --lift-2: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --glow-gold: 0 0 0 1px var(--gold-line), 0 18px 48px rgba(0, 0, 0, 0.55);

  /* ---- 尺度 ---- */
  --radius-sm: 8px;
  --radius:    14px;
  --wrap:      1120px;

  /* ---- 动效：深色界面需要更长时间才不显突兀 ---- */
  --dur-fast:  200ms;
  --dur-base:  340ms;
  --dur-slow:  640ms;
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.65, 0, 0.35, 1);

  /* ---- 字体 ---- */
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC",
                Georgia, "Times New Roman", serif;
  --font-sans:  ui-sans-serif, system-ui, -apple-system, "Segoe UI",
                "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;                 /* 中文行高不低于 1.7 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ============================================================
   材质：噪点
   —— 深色大面积纯色会呈现"塑料感"，极淡的噪点是消除它的关键。
      用内联 SVG feTurbulence，零外部请求。
   ============================================================ */
.grain {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.038;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   背景光晕：纵深与温度
   ============================================================ */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.72;
}

.blob-a {
  width: 620px; height: 620px;
  top: -220px; left: -160px;
  background: radial-gradient(circle, rgba(200, 169, 106, 0.26), transparent 68%);
  animation: drift-a 34s var(--ease-soft) infinite alternate;
}

.blob-b {
  width: 700px; height: 700px;
  top: 22%; right: -260px;
  background: radial-gradient(circle, rgba(94, 139, 126, 0.22), transparent 68%);
  animation: drift-b 42s var(--ease-soft) infinite alternate;
}

.blob-c {
  width: 560px; height: 560px;
  bottom: -200px; left: 30%;
  background: radial-gradient(circle, rgba(138, 112, 56, 0.22), transparent 70%);
  animation: drift-c 38s var(--ease-soft) infinite alternate;
}

@keyframes drift-a { to { transform: translate3d(90px, 70px, 0) scale(1.12); } }
@keyframes drift-b { to { transform: translate3d(-80px, 60px, 0) scale(1.08); } }
@keyframes drift-c { to { transform: translate3d(60px, -70px, 0) scale(1.14); } }

/* ============================================================
   跳转链接
   ============================================================ */
.skip {
  position: fixed;
  top: 14px; left: 14px;
  z-index: 20;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--gold);
  color: #14100A;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform var(--dur-fast) var(--ease-out);
}
.skip:focus-visible {
  transform: none;
  outline: 2px solid var(--text-primary);
  outline-offset: 3px;
}

/* ============================================================
   主容器
   ============================================================ */
main {
  position: relative;
  z-index: 1;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
}

/* ============================================================
   首屏
   ============================================================ */
.hero {
  position: relative;
  /* 上限 860px：纯 88dvh 在超高视口下会把首屏拉成一大片空白 */
  min-height: min(88dvh, 860px);
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  align-items: center;
  gap: 64px;
  padding: 96px 0 72px;
}

/* 四角装饰：极细金线，窄屏隐藏 */
.hero-frame { position: absolute; inset: 34px 0; pointer-events: none; }

.corner {
  position: absolute;
  width: 22px; height: 22px;
  border: 0 solid var(--gold-line);
}
.corner-tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.corner-tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.corner-bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.corner-br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

/* ---- eyebrow ---- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 26px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--gold);
}

.eyebrow-line {
  width: 40px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  flex: none;
}

/* ---- 主标题：衬线 + 金属渐变 + 周期性微光扫过 ---- */
h1 {
  margin: 0 0 28px;
  font-family: var(--font-serif);
  font-size: clamp(2.9rem, 7.2vw, 5rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  /* 两层：上层是斜向的白色高光带，下层是垂直的金属明暗 */
  background-image:
    linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.62) 50%, transparent 58%),
    linear-gradient(178deg, #FFFFFF 4%, #F0EADF 38%, #B9AE9A 100%);
  background-size: 260% 100%, 100% 100%;
  background-position: -130% 0, 0 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (prefers-reduced-motion: no-preference) {
  h1 { animation: title-sheen 8s var(--ease-soft) infinite; }
  /* 前 55% 停留，后 45% 扫过 —— 长间隔的微光才显贵气，连续闪烁会变廉价 */
  @keyframes title-sheen {
    0%, 55% { background-position: -130% 0, 0 0; }
    100%    { background-position: 230% 0, 0 0; }
  }
}

h1 .dot,
.footer-main .dot { color: var(--gold); -webkit-text-fill-color: var(--gold); }

/* ---- 说明 ---- */
.intro {
  margin: 0 0 40px;
  max-width: 46ch;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-secondary);
}

/* ---- 操作按钮 ---- */
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  /* 位移由两个变量合成：--bx/--by 来自光标磁吸，--lift 来自悬停抬升。
     用变量而非直接写 transform，两者才能叠加而不是互相覆盖。 */
  transform: translate(var(--bx, 0px), calc(var(--by, 0px) + var(--lift, 0px)));
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) ease,
              background-color var(--dur-base) ease,
              border-color var(--dur-base) ease;
}

.btn svg {
  width: 15px; height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--dur-base) var(--ease-out);
}

.btn-solid {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #17120A;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset,
              0 10px 30px rgba(200, 169, 106, 0.18);
}
.btn-solid:hover {
  --lift: -2px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset,
              0 16px 40px rgba(200, 169, 106, 0.30);
}
.btn-solid:hover svg { transform: translateX(3px); }

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover {
  --lift: -2px;
  border-color: var(--gold-line);
  background: var(--gold-wash);
}
.btn-ghost:hover svg { transform: translate(2px, -2px); }

.btn:active { --lift: 0px; transform: translate(var(--bx, 0px), var(--by, 0px)) scale(0.985); }

.btn:focus-visible,
.card:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---- 首屏侧栏 ---- */
.hero-aside {
  padding: 26px 28px;
  border: 1px solid var(--line-hairline);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  box-shadow: var(--lift-2), 0 24px 60px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}

.aside-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-hairline);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--gold);
}

.pulse {
  position: relative;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--jade);
  flex: none;
}
.pulse::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid var(--jade);
  animation: pulse 2.6s var(--ease-soft) infinite;
}
@keyframes pulse {
  0%   { transform: scale(0.7); opacity: 0.9; }
  100% { transform: scale(2.1); opacity: 0; }
}

.stack { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }

.stack li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-hairline);
}
.stack li:last-child { border-bottom: none; padding-bottom: 0; }

.stack-key { font-size: 0.75rem; color: var(--text-tertiary); white-space: nowrap; }
.stack-val { font-size: 0.8125rem; font-weight: 500; color: var(--text-primary); text-align: right; }

/* ============================================================
   区块标题
   ============================================================ */
section { margin-bottom: 96px; }

.section-head {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 30px;
}

/* 大号衬线序号：编辑感的来源 */
.section-num {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--gold);
  opacity: 0.30;
  flex: none;
}

.section-title h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.section-note {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

/* 金色渐变细线：横向铺满剩余空间 */
.section-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-line), transparent);
}

/* ============================================================
   卡片
   ============================================================ */
.bento {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  border: 1px solid rgba(200, 169, 106, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(200, 169, 106, 0.055), rgba(255, 255, 255, 0.012) 42%, rgba(255, 255, 255, 0.006)),
    rgba(255, 255, 255, 0.022);
  box-shadow: var(--lift-2), 0 18px 44px rgba(0, 0, 0, 0.38);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease-out),
              border-color var(--dur-base) ease,
              box-shadow var(--dur-base) ease;
}

/* 缩略图：顶到卡片边缘，形成"展品"的第一印象。
   用固定高度而非 aspect-ratio —— 同一排的卡片宽度不同（7/5 跨度），
   按比例算出的高度会不一致，导致同排卡片的标题与标签错位。 */
.card-thumb {
  position: relative;
  display: block;
  height: clamp(180px, 19vw, 230px);
  overflow: hidden;
  background: #0F1216;
  border-bottom: 1px solid rgba(200, 169, 106, 0.14);
}

/* 顶部常驻金线：让每张卡片都有"被镶边"的观感 */
.card-thumb::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  z-index: 2;
  background: linear-gradient(90deg, transparent, rgba(200, 169, 106, 0.42), transparent);
  pointer-events: none;
}

/* 悬停时的扫描光带：自上而下扫过缩略图 */
.card-thumb::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 46%;
  top: 0;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
    transparent,
    rgba(200, 169, 106, 0.22) 50%,
    transparent);
  transform: translateY(-100%);
}

.card:hover .card-thumb::after {
  opacity: 1;
  animation: thumb-scan 1.8s var(--ease-soft) infinite;
}
@keyframes thumb-scan {
  from { transform: translateY(-100%); }
  to   { transform: translateY(320%); }
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  /* 略降亮度并轻微去饱和，让亮色子站截图融入深色版面，
     悬停时恢复原貌 */
  filter: saturate(0.88) brightness(0.92);
  /* scale 留出余量，供 --px/--py 的视差位移使用而不露边 */
  transform: scale(1.06) translate(var(--px, 0px), var(--py, 0px));
  transition: transform var(--dur-slow) var(--ease-out),
              filter var(--dur-base) ease;
}

.card:hover .card-thumb img {
  transform: scale(1.085) translate(var(--px, 0px), var(--py, 0px));
  filter: saturate(1) brightness(1);
}

.card-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 24px 24px;
  flex: 1;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* 悬停时旋转的金色描边。
   用 conic-gradient + mask 做「只描边不填充」，需要 @property
   声明 --angle 才能被动画插值（否则角度是离散值，无法平滑旋转）。 */
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--angle),
    transparent 0%, rgba(200, 169, 106, 0.78) 10%, transparent 24%,
    transparent 50%, rgba(200, 169, 106, 0.42) 60%, transparent 74%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) ease;
  z-index: 2;
}

.card:hover::before {
  opacity: 1;
  animation: border-spin 3.6s linear infinite;
}
@keyframes border-spin { to { --angle: 360deg; } }

/* 光标跟随的光泽：深色卡片上"有光扫过"是质感的核心 */
.card-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 0%),
    rgba(200, 169, 106, 0.13),
    transparent 62%
  );
  transition: opacity var(--dur-base) ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-line);
  box-shadow: var(--lift-2), var(--glow-gold);
}
.card:hover .card-sheen { opacity: 1; }

/* 顶部金线：悬停时从左展开 */
.card::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  height: 1px;
  width: 0;
  background: linear-gradient(90deg, var(--gold), transparent);
  transition: width var(--dur-slow) var(--ease-out);
}
.card:hover::after { width: 100%; }

.card:active { transform: translateY(-1px) scale(0.995); }

.card-icon {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex: none;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(200, 169, 106, 0.26), rgba(200, 169, 106, 0.09));
  box-shadow: inset 0 0 0 1px rgba(200, 169, 106, 0.38),
              inset 0 1px 0 rgba(255, 255, 255, 0.10),
              0 6px 18px rgba(0, 0, 0, 0.30);
  color: var(--gold-bright);
  transition: transform var(--dur-base) var(--ease-out),
              color var(--dur-base) ease,
              box-shadow var(--dur-base) ease;
}
.card:hover .card-icon {
  transform: translateY(-2px) rotate(-3deg);
  color: #F6E7BE;
  box-shadow: inset 0 0 0 1px rgba(200, 169, 106, 0.62),
              inset 0 1px 0 rgba(255, 255, 255, 0.16),
              0 10px 26px rgba(200, 169, 106, 0.22);
}

.card-icon svg {
  width: 20px; height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.1875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  flex: 1;
  min-width: 0;
}

.card-desc {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--text-secondary);
  min-height: 3.5em;         /* 预留两行，保证标签横向对齐 */
}

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }

.tags em {
  font-style: normal;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--gold);
  background: var(--gold-wash);
  box-shadow: inset 0 0 0 1px var(--gold-line);
  padding: 3px 10px;
  border-radius: 999px;
}

.card-arrow {
  flex: none;
  color: var(--text-tertiary);
  transition: color var(--dur-base) ease, transform var(--dur-base) var(--ease-out);
}
.card-arrow svg {
  width: 17px; height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card:hover .card-arrow { color: var(--gold); transform: translate(3px, -3px); }

/* ============================================================
   页脚
   ============================================================ */
footer {
  padding: 56px 0 72px;
  text-align: center;
}

.footer-rule {
  display: block;
  width: 120px; height: 1px;
  margin: 0 auto 32px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.footer-main {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.footer-note {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.8;
  color: var(--text-tertiary);
}
.footer-note a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.footer-note a:hover { color: var(--gold); border-color: var(--gold-line); }

/* ============================================================
   入场编排
   —— 纯 CSS，不依赖脚本。fill-mode 用 backwards：
      both 会锁死 transform 使悬停失效，backwards 结束后交还控制权。
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .eyebrow, .intro, .hero-actions, .hero-aside {
    animation: rise var(--dur-slow) var(--ease-out) backwards;
  }
  .eyebrow      { animation-delay: 0ms; }
  .intro        { animation-delay: 180ms; }
  .hero-actions { animation-delay: 270ms; }
  .hero-aside   { animation-delay: 360ms; }

  /* h1 同时承载入场与微光两个动画 —— 分开写会互相覆盖，
     同一声明里并列才能共存 */
  h1 {
    animation:
      rise var(--dur-slow) var(--ease-out) 90ms backwards,
      title-sheen 8s var(--ease-soft) 1.6s infinite;
  }

  @keyframes rise {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ============================================================
   环境光与装饰
   ============================================================ */

/* ---- 跟随光标的金色氛围光 ----
   刻意做「滞后」：transform 有 500ms 缓动，光斑跟不上光标，
   这种延迟感是高级感的来源之一。完全跟手反而显得廉价。 */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 640px; height: 640px;
  margin: -320px 0 0 -320px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  background: radial-gradient(circle,
    rgba(200, 169, 106, 0.13) 0%,
    rgba(200, 169, 106, 0.05) 38%,
    transparent 66%);
  transition: opacity 900ms ease, transform 520ms cubic-bezier(0.22, 0.9, 0.3, 1);
  will-change: transform;
}
.cursor-glow.is-on { opacity: 1; }

/* ---- 首屏装饰圆环 ---- */
.hero-rings {
  position: absolute;
  top: 50%; left: 62%;
  width: 0; height: 0;
  pointer-events: none;
  z-index: -1;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(200, 169, 106, 0.10);
  transform: translate(-50%, -50%);
}

.ring-a {
  width: 460px; height: 460px;
  border-style: dashed;
  border-color: rgba(200, 169, 106, 0.09);
  animation: spin 68s linear infinite;
}
.ring-b {
  width: 660px; height: 660px;
  border-color: rgba(200, 169, 106, 0.055);
  animation: spin 96s linear infinite reverse;
}
.ring-c {
  width: 300px; height: 300px;
  border-color: rgba(94, 139, 126, 0.09);
  animation: spin 52s linear infinite;
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* ---- 技术栈跑马灯 ---- */
.marquee {
  position: relative;
  overflow: hidden;
  margin: 8px 0 76px;
  padding: 16px 0;
  border-top: 1px solid var(--line-hairline);
  border-bottom: 1px solid var(--line-hairline);
  /* 两侧渐隐，避免文字被硬切 */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 34s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes marquee-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-right: 26px;
  flex: none;
}

.marquee em {
  font-style: normal;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color var(--dur-base) ease;
}
.marquee i {
  font-style: normal;
  color: var(--gold);
  opacity: 0.5;
}
.marquee:hover em { color: var(--gold); }

/* ============================================================
   滚动驱动的特效
   ------------------------------------------------------------
   使用原生 CSS 滚动时间轴（animation-timeline），不用 JS 观察器。

   这个选择有实际理由：观察器方案必须先把元素设为 opacity:0，
   一旦观察器不触发（脚本被拦、渲染时机异常），内容就永久隐藏 ——
   本页早先踩过这个坑。滚动时间轴写在 @supports 里，
   不支持时元素保持默认可见，天然安全。
   ============================================================ */

/* ---- 顶部滚动进度条 ---- */
.progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  z-index: 30;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg,
    var(--gold-deep), var(--gold), var(--gold-bright), var(--gold));
  box-shadow: 0 0 12px rgba(200, 169, 106, 0.45);
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .progress {
      animation: progress-grow linear;
      animation-timeline: scroll(root);
    }
    @keyframes progress-grow {
      from { transform: scaleX(0); }
      to   { transform: scaleX(1); }
    }
  }
}

/* ---- 区块与卡片随滚动进入 ---- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {

    .section-num {
      animation: num-in linear both;
      animation-timeline: view();
      animation-range: entry 10% entry 65%;
    }
    @keyframes num-in {
      from { opacity: 0; transform: translateX(-28px); }
      to   { opacity: 0.30; transform: translateX(0); }
    }

    .section-title {
      animation: title-in linear both;
      animation-timeline: view();
      animation-range: entry 14% entry 70%;
    }
    @keyframes title-in {
      from { opacity: 0; transform: translateY(20px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    /* 金线从右向左展开 */
    .section-rule {
      transform-origin: 0 50%;
      animation: rule-in linear both;
      animation-timeline: view();
      animation-range: entry 18% entry 78%;
    }
    @keyframes rule-in {
      from { transform: scaleX(0); opacity: 0; }
      to   { transform: scaleX(1); opacity: 1; }
    }

    /* 卡片：进入视口时浮现。不设错峰 —— 滚动位置本身
       就让靠下的卡片更晚进入，这是滚动驱动动画的正确行为。 */
    .card {
      animation: card-rise linear both;
      animation-timeline: view();
      animation-range: entry 2% entry 52%;
    }
    @keyframes card-rise {
      from { opacity: 0; transform: translateY(30px) scale(0.985); }
      to   { opacity: 1; transform: translateY(0) scale(1); }
    }

    /* 首屏四角装饰：随页面上移缓缓淡出，形成纵深 */
    .hero-frame {
      animation: frame-out linear both;
      animation-timeline: scroll(root);
      animation-range: 0 420px;
    }
    @keyframes frame-out {
      from { opacity: 1; transform: translateY(0); }
      to   { opacity: 0; transform: translateY(-40px); }
    }
  }
}

/* ---- 四角装饰绘制入场 ---- */
@media (prefers-reduced-motion: no-preference) {
  .corner {
    animation: corner-in 900ms var(--ease-out) backwards;
  }
  .corner-tl { animation-delay: 480ms; }
  .corner-tr { animation-delay: 560ms; }
  .corner-br { animation-delay: 640ms; }
  .corner-bl { animation-delay: 720ms; }

  @keyframes corner-in {
    from { opacity: 0; transform: scale(0.3); }
    to   { opacity: 1; transform: scale(1); }
  }
}

/* ---- 背景光晕的呼吸 ---- */
@media (prefers-reduced-motion: no-preference) {
  .aurora { animation: aurora-breathe 14s var(--ease-soft) infinite alternate; }
  @keyframes aurora-breathe {
    from { opacity: 0.75; }
    to   { opacity: 1; }
  }
}

/* ============================================================
   响应式
   ============================================================ */
@media (min-width: 780px) {
  .bento > .span-7 { grid-column: span 7; }
  .bento > .span-6 { grid-column: span 6; }
  .bento > .span-5 { grid-column: span 5; }
}

/* 窄屏必须显式归位：12 栏栅格下若不给跨度，
   卡片会各自占 1/12 而挤成多条窄列 */
@media (max-width: 779px) {
  .bento { grid-template-columns: 1fr; }
  .bento > li { grid-column: 1 / -1; }
}

@media (max-width: 1023px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    min-height: 0;
    padding: 76px 0 56px;
  }
  .hero-frame { display: none; }
  .hero-rings { display: none; }
  .intro { max-width: 60ch; }
  .marquee { margin-bottom: 56px; }
}

@media (max-width: 640px) {
  main { padding: 0 20px; }

  .hero { padding: 56px 0 44px; }
  h1 { font-size: clamp(2.3rem, 12vw, 3rem); }
  .intro { font-size: 0.9375rem; }

  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }

  section { margin-bottom: 64px; }

  .section-head { gap: 14px; margin-bottom: 22px; }
  .section-num { font-size: 1.9rem; }
  .section-title h2 { font-size: 1.35rem; }
  .section-rule { display: none; }

  .bento { gap: 14px; }
  .card-inner { padding: 18px 20px 20px; gap: 7px; }
  .card-head { gap: 12px; }
  .card-icon { width: 36px; height: 36px; border-radius: 10px; }
  .card-icon svg { width: 18px; height: 18px; }
  .card-title { font-size: 1.0625rem; }
  .card-arrow { display: none; }

  .marquee { margin: 4px 0 48px; padding: 12px 0; }
  .marquee-group { gap: 18px; padding-right: 18px; }
  .marquee em { font-size: 1.125rem; }

  footer { padding: 40px 0 52px; }
}

/* ============================================================
   降低动效偏好
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
  .pulse::after { display: none; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
