/* Full-width introduction. Shared color, typography, and motion values come from tokens.css. */
html.zero-page { scroll-behavior: auto; }
/* P-01 页面局部样式：只用 tokens。夜空颜色只来自 --night / --night-2 / --star。 */

/* —— 第 0 屏：三种模式由 <html> 上的 zero-on / zero-static / zero-off 控制（boot.js 在首次绘制前写入，intro.js 校正） —— */
.zero { position: relative; height: 150svh; }
.zero-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; color: var(--star); }
.zero-night { position: absolute; inset: 0; background: radial-gradient(120% 90% at 66% 36%, var(--night-2) 0%, var(--night) 62%); }
.zero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.zero-copy { position: absolute; left: 0; right: 0; bottom: 0; padding-bottom: max(56px, calc(env(safe-area-inset-bottom, 0px) + 40px)); will-change: transform, opacity; }
.zero-brand { display: inline-grid; }
.zero-brand h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(2.6rem, 7vw, 5.4rem); letter-spacing: .16em; line-height: 1.1; margin-right: -.16em; text-wrap: nowrap; }
.zero-brand .en { margin-top: 1.2rem; white-space: nowrap; font-family: var(--serif); font-size: clamp(1rem, 1.95vw, 1.45rem); text-transform: uppercase; opacity: .68; }
.zero-brand .en span { display: inline-block; letter-spacing: .5em; margin-right: -.5em; } /* 脚本未运行时的兜底字距 */
.zero-motto { margin-top: 2.2rem; min-height: 1.7em; font-family: var(--serif); font-size: 1.02rem; letter-spacing: .28em; opacity: .8; }
.zero-motto .caret { display: inline-block; width: 1px; height: 1.05em; margin-left: .2em; vertical-align: -.16em; background: currentColor; animation: zero-blink 1.1s steps(1) infinite; }
@keyframes zero-blink { 50% { opacity: 0; } }
/* 「向下滚动」同时是跳过入口：点击平滑滑到最新文章 */
.zero-hint { position: absolute; z-index: 2; right: max(40px, env(safe-area-inset-right, 0px)); bottom: max(56px, calc(env(safe-area-inset-bottom, 0px) + 40px)); display: flex; align-items: center; gap: 12px; padding: 8px 0 8px 8px; font-size: var(--fs-xs); letter-spacing: .2em; color: var(--star); text-decoration: none; opacity: .55; transition: opacity var(--t-mid) var(--ease); }
.zero-hint:hover, .zero-hint:focus-visible { opacity: 1; }
.zero-hint:focus-visible { box-shadow: 0 0 0 2px var(--night), 0 0 0 4px var(--star); border-radius: var(--r-xs); }
@media (max-width: 719px) { .zero-hint { right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); } .zero-hint i { height: 28px; } }
/* 站名光晕：两颗光沿一条倾斜的椭圆轨道相对运行，轨道不可见；转到「前面」时亮而大，转到「后面」时暗而小 */
.zero-brand { position: relative; }
.zero-halo { position: absolute; left: 50%; top: 50%; width: var(--hs, 240px); height: var(--hs, 240px); margin: calc(var(--hs, 240px) / -2) 0 0 calc(var(--hs, 240px) / -2); border-radius: 50%; pointer-events: none; z-index: -1; opacity: 0; will-change: transform, opacity; }
.zero-halo--a { background: radial-gradient(closest-side, color-mix(in oklab, var(--star) 50%, transparent), color-mix(in oklab, var(--star) 14%, transparent) 48%, transparent); }
.zero-halo--b { background: radial-gradient(closest-side, color-mix(in oklab, var(--night-glow) 55%, transparent), color-mix(in oklab, var(--night-glow) 14%, transparent) 48%, transparent); }
.zero-stage { -webkit-user-select: none; user-select: none; }
.zero-hint i { display: block; width: 1px; height: 44px; background: currentColor; transform-origin: top; animation: zero-hint 2.8s var(--ease) infinite; }
@keyframes zero-hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.is-paused .zero-motto .caret, .is-paused .zero-hint i { animation-play-state: paused; }

/* 启用：正文提前上移，压在渐隐中的夜空上，不留空白段 */
.zero-on main { position: relative; z-index: 1; margin-top: -45svh; }
/* 静态替代：一屏静止星轨，不跟随滚动。没有 JS 时同样按静态显示 */
.zero-static .zero, html:not(.js) .zero { height: 92svh; }
.zero-static .zero-stage, html:not(.js) .zero-stage { position: relative; height: 100%; }
html:not(.js) .zero-hint i, html:not(.js) .zero-motto .caret { animation: none; }
.zero-static .zero-hint i, .zero-static .zero-motto .caret { animation: none; }
/* 关闭：不渲染第 0 屏，首页从普通页头开始 */
.zero-off .zero { display: none; }
.home-head { display: none; }
.zero-off .home-head { display: grid; }
.home-head h1 { font-family: var(--serif); font-weight: 600; font-size: var(--fs-2xl); letter-spacing: .16em; }

/* 第 0 屏期间隐藏导航；键盘聚焦到导航时仍会出现，跳到正文链接始终可用。
   I-1：只在脚本可用（html.js）时隐藏，没有 JS 时导航始终可见 */
html.js.zero-on .site-header, html.js.zero-static .site-header { position: fixed; left: 0; right: 0; transform: translateY(calc(-100% - 8px)); transition: transform var(--t-mid) var(--ease); }
.zero-past .site-header, .site-header:focus-within { transform: none !important; }

/* The ordinary homepage masthead is only present when the introduction is disabled. */
.zero-on .pub-home-lead > .pub-head, .zero-static .pub-home-lead > .pub-head, html:not(.js) .pub-home-lead > .pub-head { display: none; }
