/* ═══════════════════════════════════════════════════════════════════════════
   EVENT HORIZON
   ═══════════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000;
  --fg: #f4f1ee;
  --dim: rgba(244, 241, 238, 0.56);
  --dimmer: rgba(244, 241, 238, 0.34);
  --hair: rgba(244, 241, 238, 0.14);
  --accent: rgb(255, 122, 47);

  /* Geist Mono carries every latin glyph and numeral. It has no CJK coverage,
     so the chinese display title falls through to the system CJK faces below —
     that fallback is intentional, not a gap. */
  --f-display: "Geist Mono", "PingFang SC", "Noto Sans SC", ui-monospace, monospace;
  --f-mono: "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, "PingFang SC", "Noto Sans SC", monospace;

  --pad: clamp(20px, 4.4vw, 64px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* the apple-feel spring: quick attack, long silky settle — used for hovers
     and small UI motion (entrances keep --ease) */
  --ease-apple: cubic-bezier(0.28, 0.84, 0.42, 1);
}

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

html {
  background: var(--bg);
  /* 平滑滚动交给 JS：ScrollTrigger 刷新时要先把页面归零再量元素位置，
     CSS 的 smooth 会把那次归零变成一段动画，于是所有 start/end 都被量偏
     一整个滚动距离（缩放窗口后回到顶部，首屏就整块不见了）。 */
  scrollbar-width: none;
  -webkit-text-size-adjust: 100%;
}
html::-webkit-scrollbar { display: none; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-display);
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* 给底部任务栏留出空间，别让它盖住页面最底下的内容 */
  padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
}

body.is-booting { overflow: hidden; height: 100vh; }

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

a { color: inherit; text-decoration: none; }
h1, h2, p, dl, dd, dt, ul, li { margin: 0; padding: 0; }
ul { list-style: none; }

/* ── stage ───────────────────────────────────────────────────────────────── */

#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}
body.is-live #stage { opacity: 1; }

/* readability scrim: dark on the left where the type lives, plus top/bottom */
.fx-scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(100deg, rgba(0,0,0,0.80) 0%, rgba(0,0,0,0.42) 30%, rgba(0,0,0,0) 62%),
    linear-gradient(to bottom, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0) 22%),
    linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 26%);
}

/* hairline frame — the whole page reads as an instrument panel */
.fx-grain {
  position: fixed;
  inset: clamp(10px, 1.5vw, 20px);
  z-index: 6;
  pointer-events: none;
  border: 1px solid rgba(244, 241, 238, 0.07);
  mix-blend-mode: screen;
}

/* ── chrome ──────────────────────────────────────────────────────────────── */

.chrome {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(22px, 3.2vw, 40px) var(--pad);
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  transition: padding 0.6s var(--ease), background 0.6s var(--ease),
              border-color 0.6s var(--ease), backdrop-filter 0.6s var(--ease);
}

/* apple-style frosted glass bar — melts in once you start scrolling */
body.scrolled .chrome {
  padding-top: clamp(12px, 1.6vw, 18px);
  padding-bottom: clamp(12px, 1.6vw, 18px);
  background: rgba(10, 10, 12, 0.52);
  -webkit-backdrop-filter: blur(22px) saturate(1.8);
  backdrop-filter: blur(22px) saturate(1.8);
  border-bottom-color: rgba(244, 241, 238, 0.08);
}

/* ── liquid-glass nav pill — fixed to the bottom of the screen, all devices ── */

.chrome-nav {
  position: fixed;
  left: 50%;
  top: auto;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border-radius: 100px;
  border: 1px solid rgba(244, 241, 238, 0.14);
  background: linear-gradient(135deg,
    rgba(244, 241, 238, 0.11) 0%,
    rgba(244, 241, 238, 0.03) 55%,
    rgba(244, 241, 238, 0.08) 100%);
  -webkit-backdrop-filter: blur(20px) saturate(1.7);
  backdrop-filter: blur(20px) saturate(1.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25),
    0 10px 34px rgba(0, 0, 0, 0.4);
  font-size: 10px;
}
.chrome-nav a {
  padding: 8px 11px;
  border-radius: 100px;
  color: var(--dim);
  letter-spacing: 0.14em;
  white-space: nowrap;
  transition: color 0.4s var(--ease), background 0.4s var(--ease),
              box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}
.chrome-nav a:hover {
  color: var(--fg);
  background: rgba(244, 241, 238, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.chrome-nav a:active { color: var(--accent); }

/* scroll-spy: the section you're in swells up and lights, apple-style */
.chrome-nav a.is-on {
  color: #000;
  background: var(--fg);
  transform: scale(1.14);
  box-shadow: 0 2px 14px rgba(244, 241, 238, 0.25);
}

/* 手机 / 平板：任务栏不藏了，缩一档、可以横滑 */
@media (max-width: 800px) {
  .chrome-nav {
    max-width: calc(100vw - 20px);
    overflow-x: auto;
    scrollbar-width: none;
    gap: 1px;
    padding: 4px;
  }
  .chrome-nav::-webkit-scrollbar { display: none; }
  .chrome-nav a {
    padding: 7px 8.5px;
    font-size: 9px;
    letter-spacing: 0.06em;
  }
  .chrome-nav a.is-on { transform: scale(1.07); }
}

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 20px; height: 20px;
  background: url('../assets/logo-mark.png') center / contain no-repeat;
  filter: drop-shadow(0 0 6px rgba(217, 164, 74, 0.35));
  transition: filter 0.7s var(--ease-apple), transform 0.7s var(--ease-apple);
}
.brand:hover .brand-mark {
  filter: drop-shadow(0 0 12px rgba(217, 164, 74, 0.7));
  transform: rotate(-6deg);
}
.brand-name { letter-spacing: 0.22em; }

.chrome-meta { display: inline-flex; align-items: center; gap: 10px; color: var(--dim); }
.chrome-meta .sep { color: var(--dimmer); }
.dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ── rail ────────────────────────────────────────────────────────────────── */

.rail {
  position: fixed;
  right: var(--pad);
  top: 50%;
  transform: translateY(-50%);
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 15px;
  padding-right: 22px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.rail-item {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  color: var(--dimmer);
  transition: color 0.5s var(--ease-apple);
}
.rail-item b {
  font-weight: 400;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.rail-item i { font-style: normal; font-variant-numeric: tabular-nums; }
.rail-item:hover { color: var(--dim); }
.rail-item:hover b { opacity: 0.7; transform: none; }
.rail-item.is-on { color: var(--accent); }
.rail-item.is-on b { opacity: 1; transform: none; }

.rail-line {
  position: absolute;
  right: 0; top: 2px; bottom: 2px;
  width: 1px;
  background: rgba(244, 241, 238, 0.16);
  overflow: hidden;
}
.rail-fill {
  position: absolute;
  inset: 0 0 auto 0;
  height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
}

/* ── hud ─────────────────────────────────────────────────────────────────── */

.hud {
  position: fixed;
  left: var(--pad);
  bottom: clamp(22px, 3.2vw, 40px);
  z-index: 8;
  display: grid;
  gap: 3px;
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dimmer);
}
.hud-row { display: grid; grid-template-columns: 52px auto; }
.hud-row i { font-style: normal; }
.hud-row b {
  font-weight: 400;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

/* ── chapters ────────────────────────────────────────────────────────────── */

main { position: relative; z-index: 4; }

.chapter { position: relative; height: 240vh; }
#sc0 { height: 300vh; }

.panel {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: grid;
  align-content: center;
  padding: 0 var(--pad);
  padding-right: clamp(var(--pad), 14vw, 200px);
}

.stage {
  grid-area: 1 / 1;
  max-width: min(52ch, 46vw);
  will-change: transform, opacity;
}

/* ── type ────────────────────────────────────────────────────────────────── */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: clamp(20px, 2.4vw, 34px);
}
.eyebrow .idx {
  font-style: normal;
  color: var(--accent);
  padding-right: 3px;
  transition: color 0.7s var(--ease-apple);
}

.display {
  /* 四个汉字必须整体成行：窄视口下一旦折行，0.86 的行高会让上下两行叠在一起。
     字号按视口收敛，保证任何宽度下四个字都放得下。 */
  font-size: clamp(2.6rem, 6vw, 6rem);
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
  font-weight: 200;
  margin: 0 0 clamp(26px, 3vw, 46px);
}
.ln { display: block; overflow: hidden; padding-bottom: 0.06em; }
.ln > span { display: block; }

.title {
  /* 与首屏标题同一路数：更小更细。行高必须 > 1，中文多行标题在 0.98 下会上下相碰 */
  font-size: clamp(1.7rem, 3.6vw, 3.4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 200;
  margin-bottom: clamp(22px, 2.6vw, 38px);
}

.lead {
  font-size: clamp(14.5px, 1.02vw, 17.5px);
  line-height: 1.66;
  color: var(--dim);
  max-width: 44ch;
  font-weight: 400;
}
.lead.dim { color: var(--dimmer); margin-top: 14px; }
.hero-lead { max-width: 38ch; }

.specs {
  margin-top: clamp(30px, 3.6vw, 52px);
  display: grid;
  gap: 0;
  border-top: 1px solid var(--hair);
  max-width: 40ch;
}
.specs > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--hair);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.specs dt { color: var(--dimmer); }
.specs dd { color: var(--fg); opacity: 0.82; }
.specs sub { font-size: 0.8em; }

/* 联系链接：下划线从左扫入，整行轻微提亮 */
.specs > div { transition: background 0.4s var(--ease-apple), padding-left 0.4s var(--ease-apple); }
.specs > div:hover { background: rgba(244, 241, 238, 0.03); padding-left: 8px; }
.spec-link {
  position: relative;
  color: inherit;
  transition: color 0.4s var(--ease-apple);
}
.spec-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-apple);
}
.spec-link:hover { color: var(--accent); }
.spec-link:hover::after { transform: scaleX(1); }

.cue {
  margin-top: clamp(34px, 4vw, 60px);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--dim);
}
.cue-line {
  width: 48px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  position: relative;
  overflow: hidden;
}
.cue-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  animation: sweep 2.4s var(--ease) infinite;
}
@keyframes sweep {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

/* ── outro ───────────────────────────────────────────────────────────────── */

.outro {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(80px, 11vh, 130px) var(--pad) 0;
}
.outro::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.72) 26%, rgba(0,0,0,0.88) 100%);
  pointer-events: none;
}
.outro-inner, .foot { position: relative; }
.outro-inner { max-width: 94ch; }
.outro-title { font-size: clamp(1.7rem, 3.6vw, 3.4rem); }  /* 与章节标题同一尺度 */
.outro-lead { max-width: 52ch; }

.ledger {
  margin-top: clamp(30px, 4vw, 56px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border-top: 1px solid var(--hair);
}
.ledger li {
  display: grid;
  gap: 7px;
  align-content: start;
  padding: 15px 18px 17px 0;
  border-bottom: 1px solid var(--hair);
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.ledger i { font-style: normal; color: var(--dimmer); }
.ledger b { font-weight: 400; color: var(--fg); opacity: 0.85; }

.backtop {
  margin-top: clamp(32px, 4vw, 56px);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 14px 22px;
  border: 1px solid var(--hair);
  border-radius: 100px;
  transition: color 0.4s var(--ease-apple), border-color 0.4s var(--ease-apple), gap 0.4s var(--ease-apple);
}
.backtop svg {
  width: 13px; height: 13px;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.backtop:hover { color: var(--accent); border-color: var(--accent); gap: 18px; }

/* ── marquee：业务范围无限滚动带 ─────────────────────────────────────────── */

.marquee {
  margin-top: clamp(30px, 4vw, 52px);
  overflow: hidden;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  padding: 13px 0;
  -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: inline-flex;
  align-items: center;
  gap: 26px;
  white-space: nowrap;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dimmer);
  animation: marquee 26s linear infinite;
  will-change: transform;
}
.marquee-track i {
  font-style: normal;
  color: var(--accent);
  animation: pulse 2.6s var(--ease) infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; color: var(--dim); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.foot {
  margin-top: auto;
  padding: 24px 0 clamp(26px, 3.4vw, 40px);
  border-top: 1px solid var(--hair);
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dimmer);
}

/* ── landing（首屏：黑洞 + 进入主页）─────────────────────────────────────── */

.landing {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding: 0 var(--pad);
  position: relative;
  z-index: 4;
}
.landing-inner { max-width: min(52ch, 60vw); }

.enter {
  position: fixed;
  right: var(--pad);
  bottom: clamp(22px, 3.2vw, 40px);
  z-index: 9;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg);
  padding: 16px 28px;
  border: 1px solid rgba(244, 241, 238, 0.22);
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: color 0.45s var(--ease-apple), border-color 0.45s var(--ease-apple),
              gap 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.enter svg {
  width: 14px; height: 14px;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.enter::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid var(--accent);
  opacity: 0;
  animation: enter-breathe 3.2s var(--ease) infinite;
  pointer-events: none;
}
@keyframes enter-breathe {
  0%, 100% { opacity: 0; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.06); }
}
.enter:hover {
  color: var(--accent);
  border-color: var(--accent);
  gap: 19px;
  box-shadow: 0 0 34px rgba(255, 122, 47, 0.28);
}

@media (max-width: 900px) {
  .landing-inner { max-width: none; }
  .landing { align-content: end; padding-bottom: 22vh; }
}

/* ── boot ────────────────────────────────────────────────────────────────── */

.boot {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #000;
  display: grid;
  place-items: center;
}
.boot-inner { display: grid; justify-items: center; gap: 22px; }
.boot-mark {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #000;
  box-shadow: 0 0 0 1.5px var(--accent), 0 0 26px 2px var(--accent);
  animation: breathe 2.2s var(--ease) infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.68); opacity: 0.55; }
}
.boot-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--dim);
}
.boot-bar { width: 168px; height: 1px; background: rgba(244,241,238,0.16); overflow: hidden; }
.boot-fill {
  display: block; height: 100%; width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-apple);
}
.boot.is-gone { opacity: 0; pointer-events: none; transition: opacity 0.9s var(--ease-apple); }

/* ── no gpu ──────────────────────────────────────────────────────────────── */

.nogpu {
  position: fixed;
  inset: 0;
  z-index: 22;
  background:
    radial-gradient(120% 90% at 70% 10%, rgba(255,122,47,0.10), transparent 60%),
    #000;
  display: grid;
  align-content: center;
  padding: 0 var(--pad);
}
.nogpu[hidden] { display: none; }
.nogpu-inner { max-width: 54ch; }

/* ── responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .stage { max-width: none; }
  .panel { padding-right: var(--pad); }
  .rail { gap: 13px; }
  .rail-item b { display: none; }
  .fx-scrim {
    background:
      linear-gradient(to top, rgba(0,0,0,0.86) 0%, rgba(0,0,0,0.30) 46%, rgba(0,0,0,0.55) 100%);
  }
  .panel { align-content: end; padding-bottom: 16vh; }
  .stage-hero { align-content: end; }
}

@media (max-width: 640px) {
  .hud { display: none; }
  .chapter { height: 200vh; }
  #sc0 { height: 260vh; }
  .specs > div { grid-template-columns: 1fr; gap: 4px; }
  /* the rail would sit on top of full-bleed copy — keep only the progress line */
  .rail { padding-right: 0; gap: 0; }
  .rail-item { display: none; }
  .rail-line { top: -22vh; bottom: -22vh; }
  .outro { justify-content: flex-start; }
  .foot { margin-top: clamp(56px, 10vh, 96px); }
}

@media (prefers-reduced-motion: reduce) {
  .dot, .boot-mark, .cue-line::after, .marquee-track, .marquee-track i { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* ── scenery below the singularity ───────────────────────────────────────── */

.scroll-cue {
  position: absolute;
  left: var(--pad);
  bottom: clamp(22px, 3.4vw, 42px);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--dim);
  opacity: 0;
  transition: opacity 1.2s var(--ease-apple);
  pointer-events: none;
}
body.is-live .scroll-cue { opacity: 1; }
body.scrolled .scroll-cue { opacity: 0; }
.scroll-cue .cue-line {
  width: 52px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  position: relative;
  overflow: hidden;
  display: inline-block;
}
.scroll-cue .cue-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9), transparent);
  transform: translateX(-100%);
  animation: cue-sweep 2.6s var(--ease) infinite;
}
@keyframes cue-sweep { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }

.scene {
  position: relative;
  z-index: 4;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding: 0 var(--pad);
  overflow: hidden;
}
.scene-inner { max-width: min(52ch, 60vw); position: relative; z-index: 2; }

/* scene 1: starfield — its top edge fades in over the fixed black hole */
.scene-stars {
  background: linear-gradient(to bottom,
    rgba(0,0,0,0) 0%, rgba(2,4,9,0.92) 14%,
    #04060d 38%, #060a16 100%);
}
.scene-sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }

/* scene 2: aurora */
.scene-aurora { background: linear-gradient(to bottom, #060a16 0%, #020409 100%); }
.aurora-bands {
  position: absolute;
  inset: -10% -25%;
  z-index: 1;
  filter: blur(70px);
  opacity: 0.55;
}
.aurora-bands span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 30%;
  border-radius: 50%;
}
.aurora-bands span:nth-child(1) {
  top: 6%;
  background: radial-gradient(60% 100% at 40% 50%, rgba(46, 220, 170, 0.34), transparent 70%);
  animation: aurora-a 17s ease-in-out infinite alternate;
}
.aurora-bands span:nth-child(2) {
  top: 30%;
  background: radial-gradient(55% 100% at 62% 50%, rgba(96, 120, 255, 0.26), transparent 70%);
  animation: aurora-b 22s ease-in-out infinite alternate;
}
.aurora-bands span:nth-child(3) {
  top: 54%;
  background: radial-gradient(50% 100% at 45% 50%, rgba(255, 122, 47, 0.16), transparent 70%);
  animation: aurora-a 26s ease-in-out infinite alternate-reverse;
}
@keyframes aurora-a {
  from { transform: translateX(-7%) translateY(0) skewX(-6deg); }
  to   { transform: translateX(7%) translateY(9%) skewX(5deg); }
}
@keyframes aurora-b {
  from { transform: translateX(6%) translateY(6%) skewX(4deg); }
  to   { transform: translateX(-8%) translateY(-5%) skewX(-7deg); }
}

.scene-title {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin: clamp(12px, 1.6vw, 20px) 0 clamp(14px, 1.8vw, 22px);
}
.scene-title .ln { display: block; overflow: hidden; padding-bottom: 0.08em; }
.scene-title .ln > span {
  display: inline-block;
  transform: translateY(120%);
  transition: transform 1.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.scene-title.is-in .ln > span { transform: none; }

.scene [data-rise] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1.5s var(--ease), transform 1.5s var(--ease);
}
.scene [data-rise].is-in { opacity: 1; transform: none; }

/* big inline door at the end of the scenery */
.enter-inline {
  position: static;
  margin-top: clamp(30px, 5vh, 52px);
  display: inline-flex;
}
.enter-inline::after { animation-duration: 4s; }

@media (max-width: 900px) {
  .scene-inner { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .aurora-bands span { animation: none; }
  .scroll-cue .cue-line::after { animation: none; }
  .scene [data-rise], .scene-title .ln > span { transition: none; transform: none; opacity: 1; }
}

/* the compat-mode pill on the WebGPU fallback page sits in the text flow */
.nogpu .enter.nogpu-lite {
  position: static;
  margin-top: clamp(26px, 4.5vh, 40px);
}

/* ── chrome download button (top right) ──────────────────────────────────── */
.chrome-dl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 100px;
  border: 1px solid rgba(255, 122, 47, 0.45);
  color: var(--accent);
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  white-space: nowrap;
  transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.chrome-dl svg {
  width: 13px; height: 13px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.chrome-dl:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a0a00;
}
@media (max-width: 800px) {
  .chrome-dl span { display: none; }
  .chrome-dl { padding: 10px; }
}

/* 中等宽度：右侧按钮紧凑化，避免与导航胶囊重叠 */
@media (max-width: 1120px) and (min-width: 801px) {
  .chrome { padding: clamp(14px, 2vw, 24px) clamp(14px, 2.4vw, 24px); }
  .chrome-nav { gap: 2px; padding: 4px 6px; }
  .chrome-nav a {
    padding: 7px 6.5px;
    font-size: 9px;
    letter-spacing: 0.04em;
  }
  .chrome-nav a.is-on { transform: scale(1.06); }
  .chrome-dl { padding: 7px 9px; }
  .chrome-dl span { display: none; }
  .auth-btn { padding: 7px 10px; }
  .chrome-back { padding: 7px 9px; }
  .chrome-back span { display: none; }
  .chrome-right { gap: 6px; }
}
