/* ============================================================================
   blackhole.css — 首屏黑洞层 + 新页脚（2026-11-18）

   1) 首屏背景由 WebGL 黑洞接管（见 assets/js/blackhole.js）：画布铺满 .nl-plate，
      ::after 遮罩从「压暗整张照片」改成「左边压、右边放洞」，好让左侧标题读得清、
      右半边留给吸积盘。
   2) 拿不到 WebGL2 / 上下文丢失 → .nl-plate--fallback：纯 CSS 静态渐变兜底，
      看上去仍是同一个洞，只是不动。
   3) 页脚照着参考站 的骨架重排（顶部细线 + 居中短杠 + 品牌栏 + 三列链接
      + 大字标 + 版权），不用 Tailwind，颜色全部走 --nl-* token。
   ========================================================================== */

/* ── 1. 首屏底板 ─────────────────────────────────────────────────────────── */
.nl-plate--blackhole {
  background-color: #05060b;
  /* 画布是 WebGL 的直接目标：不要让它被父级的 filter/backdrop 拉进离屏合成 */
  contain: paint;
}
/* 参考站是整张照片 + 通体压暗；这里是黑洞，只需要左半边可读 + 顶部/底部收边 */
.nl-plate--blackhole::after {
  background:
    linear-gradient(
      180deg,
      rgba(4, 5, 10, 0.62) 0%,
      rgba(4, 5, 10, 0.06) 22%,
      rgba(4, 5, 10, 0) 62%,
      rgba(4, 5, 10, 0.78) 100%
    ),
    linear-gradient(
      96deg,
      rgba(4, 5, 10, 0.9) 0%,
      rgba(4, 5, 10, 0.66) 30%,
      rgba(4, 5, 10, 0.2) 56%,
      rgba(4, 5, 10, 0) 74%
    );
}
.nl-plate__canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 900ms cubic-bezier(0.22, 1, 0.36, 1);
}
/* 首帧画出来之前不亮，避免闪一下白/黑底 */
.nl-plate--ready .nl-plate__canvas {
  opacity: 1;
}

/* ── 2. 无 WebGL 时的静态兜底：同一个洞，只是不动 ────────────────────────── */
.nl-plate--fallback {
  background-color: #05060b;
  background-image:
    radial-gradient(
      1.6px 1.6px at 18% 24%,
      rgba(236, 245, 255, 0.86) 50%,
      rgba(236, 245, 255, 0) 51%
    ),
    radial-gradient(
      1.4px 1.4px at 62% 12%,
      rgba(200, 231, 255, 0.7) 50%,
      rgba(200, 231, 255, 0) 51%
    ),
    radial-gradient(
      1.2px 1.2px at 84% 62%,
      rgba(255, 219, 240, 0.66) 50%,
      rgba(255, 219, 240, 0) 51%
    ),
    radial-gradient(
      1.2px 1.2px at 32% 78%,
      rgba(214, 220, 255, 0.5) 50%,
      rgba(214, 220, 255, 0) 51%
    ),
    /* 吸积盘：一圈被压扁的亮环，颜色就是着色器里那三个 brand tint */
      radial-gradient(
        38% 13% at 71% 45%,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(89, 219, 238, 0.72) 18%,
        rgba(252, 115, 191, 0.44) 42%,
        rgba(107, 76, 255, 0.22) 66%,
        rgba(5, 6, 11, 0) 88%
      ),
    /* 洞本体：中心纯黑，外圈一层极淡的晕 */
      radial-gradient(
        22% 22% at 71% 45%,
        #000 0%,
        #000 62%,
        rgba(0, 0, 0, 0.55) 78%,
        rgba(0, 0, 0, 0) 100%
      ),
    radial-gradient(120% 100% at 50% 0%, #0a1020 0%, #05060b 58%, #03040a 100%);
  background-repeat: no-repeat;
  background-size: cover;
}
/* 移动端洞心在上方（uCenter=[0,.2]），兜底图跟着挪 */
@media (max-width: 1023px) {
  .nl-plate--fallback {
    background-image:
      radial-gradient(
        1.6px 1.6px at 22% 16%,
        rgba(236, 245, 255, 0.86) 50%,
        rgba(236, 245, 255, 0) 51%
      ),
      radial-gradient(
        1.2px 1.2px at 74% 30%,
        rgba(255, 219, 240, 0.6) 50%,
        rgba(255, 219, 240, 0) 51%
      ),
      radial-gradient(
        46% 11% at 50% 34%,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(89, 219, 238, 0.72) 18%,
        rgba(252, 115, 191, 0.44) 42%,
        rgba(107, 76, 255, 0.22) 66%,
        rgba(5, 6, 11, 0) 88%
      ),
      radial-gradient(
        26% 18% at 50% 32%,
        #000 0%,
        #000 62%,
        rgba(0, 0, 0, 0.55) 78%,
        rgba(0, 0, 0, 0) 100%
      ),
      radial-gradient(120% 100% at 50% 0%, #0a1020 0%, #05060b 58%, #03040a 100%);
  }
}

/* 黑洞上手之后，首屏不再需要 scene.js 那层满屏粒子当底纹（两套 WebGL 同时跑没必要） */
html.nl-bh-on #gl-scene-root {
  display: none !important;
}

/* ── 3. 页脚 ─────────────────────────────────────────────────────────────── */
.nl-foot {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 72rem; /* 参考站 max-w-6xl */
  margin: 0 auto;
  padding: 4rem 1.5rem 2rem; /* pt-16 px-6 pb-8 */
  border-top: 1px solid var(--nl-line-soft);
  background-image: radial-gradient(
    35% 128px at 50% 0%,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0)
  );
  background-repeat: no-repeat;
  color: var(--nl-fg-soft);
}
@media (min-width: 1024px) {
  .nl-foot {
    padding: 8rem 2rem 2rem; /* lg:pt-32 lg:px-8 */
  }
}
/* 压在那道分隔线上的一小截圆头短杠（参考站 h-1.5 w-8 -translate-y-1/2） */
.nl-foot__rule {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2rem;
  height: 0.375rem;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: var(--nl-fg);
}
.nl-foot__cols {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
}
@media (min-width: 1280px) {
  .nl-foot__cols {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

/* 品牌栏：图标 + 字标一行，下面一句，再下面一条竖排入口 */
.nl-foot__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
@media (min-width: 768px) {
  .nl-foot__brand {
    max-width: 20rem;
  }
}
.nl-foot__lockup {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.nl-foot__lockup-icon {
  display: block;
  width: 28px;
  height: 28px;
  filter: invert(1);
  opacity: 0.92;
}
.nl-foot__word {
  display: block;
  width: auto;
  height: 13px;
  filter: invert(1) brightness(1.08);
}
html.light .nl-foot__lockup-icon,
html[data-theme="light"] .nl-foot__lockup-icon {
  filter: brightness(0) saturate(100%);
}
html.light .nl-foot__word,
html[data-theme="light"] .nl-foot__word {
  filter: brightness(0);
}
.nl-foot__tagline {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--nl-fg-faint);
}
.nl-foot__tagline--dim {
  margin-top: 0.25rem;
}

/* 三列链接 */
.nl-foot__groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
  margin-top: 2rem;
}
@media (min-width: 640px) {
  .nl-foot__groups {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4rem;
  }
}
@media (min-width: 1280px) {
  .nl-foot__groups {
    margin-top: 0;
  }
}
.nl-foot__group h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--nl-fg);
}
.nl-foot__list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--nl-fg-faint);
}
.nl-foot__list li + li {
  margin-top: 0.5rem;
}
.nl-foot__list a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.nl-foot__list a:hover {
  color: var(--nl-fg);
}

/* 下半截：细线 + 版权 + 大字标 */
.nl-foot__bottom {
  width: 100%;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--nl-line-soft);
}
@media (min-width: 768px) {
  .nl-foot__bottom {
    padding-top: 2rem;
  }
}
.nl-foot__copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--nl-fg-faint);
}
/* 参考站那块是内联 SVG 写的 NEW API 渐变字（两层描边 + 自描边动画）；我们照同一套
   结构换成 wl.ax，只在桌面显示，当作页脚最后一个大件。 */
.nl-foot__big {
  display: none;
}
@media (min-width: 768px) {
  .nl-foot__big {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 20rem;
  }
  .nl-foot__mark {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    color: var(--nl-fg);
  }
  .nl-foot__mark-ghost,
  .nl-foot__mark-tint {
    font-family: Helvetica, Arial, "Helvetica Neue", sans-serif;
    font-weight: 700;
    font-size: 72px;
    fill: transparent;
    stroke-width: 0.3;
    stroke-linejoin: round;
  }
  /* 第一层：只有 22% 前景色细描边，靠 dashoffset 1000→0 把自己画出来
     （原站实测约 3.1s、近似 linear，这里照抄节奏） */
  .nl-foot__mark-ghost {
    stroke: currentColor;
    stroke-opacity: 0.22;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 3100ms linear;
  }
  .nl-foot__big.is-drawn .nl-foot__mark-ghost,
  .nl-foot__mark.is-drawn .nl-foot__mark-ghost {
    stroke-dashoffset: 0;
  }
  /* 第二层：品牌三色横向渐变，套一层中心白→边缘黑的径向 mask，
     只让字心透出颜色，四周仍是那根细线 */
  .nl-foot__mark-tint {
    stroke: url(#nlFootGrad);
  }
}
@media (prefers-reduced-motion: reduce) {
  .nl-foot__mark-ghost {
    transition: none;
    stroke-dashoffset: 0;
  }
}

/* 页脚上方那段呼吸位：暗场收尾，别让页脚紧贴最后一屏 */
.nl-foot-wrap {
  position: relative;
  z-index: 10;
}

/* ==========================================================================
   首屏四字排期（2026-11-18）
   参考站首屏的节奏是：一行四字（万有引力）/ 一行四字（万智归一）/
   一句解释 / 两个按钮。我们照这个节奏排：四字行是「舞台字幕」的分量，
   所以比原来那句通栏长标题放大一档、字距拉开，下面跟一行三组四字排比。
   ========================================================================== */
.nl-hero__title--idiom {
  max-width: none;
  font-size: clamp(3.1rem, 9vw, 7.2rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.02;
  /* 字距会把末字之后也撑出一段，往右缩回来视觉才居中 */
  text-indent: 0.1em;
}
.nl-hero__motto {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 0;
  margin: 0;
  font-size: clamp(0.86rem, 1.05vw, 0.98rem);
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--nl-plate-fg-soft);
}
.nl-hero__motto > span + span::before {
  content: "·";
  margin: 0 0.75rem 0 0.6rem;
  opacity: 0.5;
}
@media (max-width: 640px) {
  .nl-hero__title--idiom {
    font-size: clamp(2.7rem, 13.5vw, 3.6rem);
    letter-spacing: 0.08em;
    text-indent: 0.08em;
  }
  .nl-hero__motto {
    letter-spacing: 0.16em;
  }
}
/* ═════════════════════════════════════════════════════════════════════════════
顶栏「透明态」配色（2026-11-18，按 .bg-transparent 判定：实测 header.js 不加 .nl-header--solid，滚动后是换 Tailwind 类 bg-white/70）
首屏底是黑洞（纯黑），而品牌图标/字标在浅色主题下被 extra.css 反成了深色，
登录文字与主题按钮也走 --nl-fg（浅色主题下是近黑）—— 滚动前等于黑底黑字，
什么都看不见。这里按"是否已经变实"分档：
  · 未实（没有 .nl-header--solid，也没有 bg-ink/90）：一律白；
  · 已实：交回主题 token，浅色深字、深色浅字，由 extra.css 管。
!important 是为了压过 extra.css 里 html.light 的 filter 覆盖。
═════════════════════════════════════════════════════════════════════════════ */
header.bg-transparent .nullity-brand__icon,
header.bg-transparent .nullity-wordmark{
  filter: brightness(0) invert(1) !important;
}
header.bg-transparent .nl-nav__link,
header.bg-transparent a[data-nl-auth-desktop],
header.bg-transparent header a[data-nl-auth-desktop]{
  color: #fff !important;
}
header.bg-transparent .nl-burger__box span{
  background: #fff !important;
}
header.bg-transparent .nl-theme{
  color: #fff !important;
  border-color: rgba(255,255,255,.30) !important;
  background: rgba(255,255,255,.10) !important;
}
header.bg-transparent .nl-theme:hover{
  color: #fff !important;
  border-color: rgba(255,255,255,.48) !important;
  background: rgba(255,255,255,.20) !important;
}

/* ═════════════════════════════════════════════════════════════════════════════
顶栏「已实态」反向兜底（2026-11-18 追加）
a11y.css:56 与 spacex.css:765 把 header 里的登录链接、品牌图标写成了无条件白色
（为压在黑洞上），滚动后顶栏变成 bg-white/70 的浅色实底时就成了白纸白字。
这里只在"已经不是透明态"时把颜色交回深色，浅色主题下才生效；深色主题实底本来
就该是白字，不动。
═════════════════════════════════════════════════════════════════════════════ */
html.light header:not(.bg-transparent) .nullity-brand__icon,
html.light header:not(.bg-transparent) .nullity-wordmark{
  filter: brightness(0) saturate(100%) !important;
}
html.light header:not(.bg-transparent) .nl-nav__link,
html.light header:not(.bg-transparent) a[data-nl-auth-desktop]{
  color: #14181a !important;
}
html.light header:not(.bg-transparent) .nl-burger__box span{
  background: #14181a !important;
}
html.light header:not(.bg-transparent) .nl-theme{
  color: #14181a !important;
  border-color: rgba(20,24,26,.18) !important;
  background: rgba(255,255,255,.66) !important;
}
html.light header:not(.bg-transparent) .nl-theme:hover{
  color: #14181a !important;
  border-color: rgba(20,24,26,.34) !important;
  background: rgba(255,255,255,.9) !important;
}


/* 首屏标语的出处行：小一号、低对比，跟主标语同一拍换 */
.nl-hero__cite{
  margin: .35rem 0 0;
  font-size: .78rem;
  letter-spacing: .08em;
  color: color-mix(in srgb, var(--ld-text, #fff) 58%, transparent);
}
html.light .nl-hero__cite{ color: rgba(17,18,20,.55); }

/* ═══ 修复层 21 · 首页顶栏随状态换色（2026-11-18）════════════════════════
   病灶：滚动后顶栏底变成 bg-white/70（浅底），但链接颜色被 a11y.css/spacex.css
   写成无条件 #fff → 浅底白字，什么都看不见。这里按 header 的两个真实状态分派：
   .bg-transparent = 压在黑洞上 → 白字；其余（实底/滚动后）→ 墨字。
   同时给"登录/注册"这类自带白底的胶囊按钮固定深字，避免被上面的规则带白。
   ═══════════════════════════════════════════════════════════════════ */
html.light header.bg-transparent a,
html.light header.bg-transparent button,
html.light header.bg-transparent summary { color: #ffffff !important; }
html.light header.bg-transparent .nullity-brand__icon,
html.light header.bg-transparent img[alt] { filter: brightness(0) invert(1) !important; }
html.light header.bg-transparent .nl-burger span { background: #ffffff !important; }

html.light header:not(.bg-transparent) a,
html.light header:not(.bg-transparent) button,
html.light header:not(.bg-transparent) summary { color: #20252b !important; }
html.light header:not(.bg-transparent) .nullity-brand__icon,
html.light header:not(.bg-transparent) img[alt] { filter: brightness(0) saturate(100%) !important; }
html.light header:not(.bg-transparent) .nl-burger span { background: #20252b !important; }

/* 胶囊按钮自带底色，字色必须与底色配套，不受上面两条影响 */
html.light header a.bg-white,
html.light header a[class*="bg-white"] { color: #101116 !important; }
html.dark header a.bg-white,
html.dark header a[class*="bg-white"] { color: #101116 !important; }

/* FIX-HERO-SLOGAN (2026-11-18)：标语改短句后不再需要宽栏，标题限宽 + 降字号，避免遮住黑洞。 */
#hero .nullity-hero-title,
#hero h1.nullity-hero-title {
  max-width: 16ch !important;
  font-size: clamp(26px, 2.9vw, 44px) !important;
  line-height: 1.14 !important;
  letter-spacing: -0.02em !important;
  text-wrap: balance;
}
@media (max-width: 900px) {
  #hero .nullity-hero-title,
  #hero h1.nullity-hero-title { max-width: 12ch !important; font-size: clamp(24px, 7vw, 36px) !important; }
}

/* FIX-DARK-ONLY + HERO-TAG (2026-11-18)
   1) 落地页（/ 与 /about）只做深色：整个文件里凡是 `html.light` / `html[data-theme="light"]`
      的规则都不会命中（页面 root 恒定 dark），这里再补一层保险，防止旧规则被 !important 带出来。
   2) 首屏加一行"世界上第一座用算力建起来的城市"，用等宽小字+圆点，作为身份声明而不是标语。 */
html.light, html[data-theme="light"] { color-scheme: dark; }
html.light body, html[data-theme="light"] body { background: #0b0d12; color: #edf1f5; }

.nl-hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: clamp(11px, 1.05vw, 13px);
  font-weight: 500;
  letter-spacing: 0.18em;
  color: #edf1f5;
  opacity: 0.72;
}
.nl-hero__tag-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #26bb74;
  box-shadow: 0 0 0 3px rgba(38, 187, 116, 0.16), 0 0 10px rgba(38, 187, 116, 0.55);
}
.nl-hero__sub { max-width: 46ch; }
@media (max-width: 640px) { .nl-hero__sub { max-width: 100%; } }
