/* ==========================================================================
   Kerstappen · 光室 / Lightroom — 夜间光室（Glass）
   一间夜里亮着灯的房间：深蓝黑的光场、两束缓慢游走的冷青与暖琥珀光、
   刻在玻璃上的中文衬线大字、以及面板顶部的一条 1px 光缝。
   纯 CSS + 现有 JS 钩子；无外站字体/图片；动效克制并可被系统关闭。
   ========================================================================== */

/* --- 1. Tokens ------------------------------------------------------------ */
:root {
  color-scheme: dark;

  --bg: #070b12;
  --bg-2: #0b1220;
  --surface: rgba(20, 31, 51, .58);
  --surface-soft: rgba(255, 255, 255, .06);
  --surface-hover: rgba(255, 255, 255, .10);
  --text: #e8f0ff;
  --text-warm: #f6e6d0;
  --muted: #9fb0ce;
  --soft: #c3cfe4;
  --primary: #8fe3dc;
  --on-primary: #04211f;
  --accent: #ffc48a;
  --on-accent: #2a1704;
  --danger: #ff9cae;
  --link: #9fd8ff;
  --line: rgba(160, 190, 255, .16);
  --border: rgba(160, 190, 255, .30);
  --scrim: rgba(3, 6, 12, .66);
  --seam: linear-gradient(90deg, transparent, rgba(143, 227, 220, .65), rgba(255, 196, 138, .55), transparent);
  --seam-soft: linear-gradient(90deg, transparent, rgba(143, 227, 220, .38), rgba(255, 196, 138, .30), transparent);

  --font-display: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --font-ui: "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;

  --radius-panel: 28px;
  --radius-card: 20px;
  --radius-control: 12px;
  --radius-pill: 999px;
  --shadow-panel:
    0 28px 70px -34px rgba(0, 0, 0, .85),
    inset 0 1px 0 rgba(255, 255, 255, .10);

  --max: 1180px;
  --pad: clamp(20px, 4vw, 44px);
  --ease: cubic-bezier(.22, .61, .24, 1);
}

/* --- 2. Base -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(52% 46% at 12% 4%, rgba(21, 116, 118, .20), transparent 72%),
    radial-gradient(48% 42% at 92% 18%, rgba(178, 102, 34, .14), transparent 70%),
    radial-gradient(120% 82% at 50% -8%, #0d1728 0%, transparent 62%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
a, button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
svg { display: block; }
::selection { background: rgba(143, 227, 220, .30); color: #fff; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 300;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: #0d1626;
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  transform: translate(-50%, -220%);
  transition: transform .22s var(--ease);
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
  border-radius: 8px;
  box-shadow: 0 0 0 8px rgba(143, 227, 220, .14);
}

/* --- 3. Night light field ------------------------------------------------- */
.aurora {
  position: fixed;
  inset: -18%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}
.blob {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(110px);
  will-change: transform;
}
/* 冷青：安静的一束光，落在左上 */
.blob-a {
  top: -12%;
  left: -8%;
  width: 62vmax;
  height: 62vmax;
  opacity: .46;
  background: radial-gradient(circle at 42% 42%, #1f9e94 0%, rgba(18, 76, 92, .55) 42%, transparent 68%);
  animation: drift-cyan 84s ease-in-out infinite;
}
/* 暖琥珀：房间另一头的灯，落在右下 */
.blob-b {
  right: -14%;
  bottom: -18%;
  width: 56vmax;
  height: 56vmax;
  opacity: .34;
  background: radial-gradient(circle at 52% 52%, #b96a22 0%, rgba(120, 62, 18, .42) 44%, transparent 68%);
  animation: drift-amber 96s ease-in-out infinite;
}
.blob-c {
  top: 30%;
  left: 44%;
  width: 40vmax;
  height: 40vmax;
  opacity: .16;
  background: radial-gradient(circle at 50% 50%, #2b4a7a, transparent 68%);
  animation: drift-mid 90s ease-in-out infinite;
}
.blob-d, .blob-e { display: none; }

@keyframes drift-cyan {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(4vmax, 3vmax, 0) scale(1.08); }
}
@keyframes drift-amber {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.04); }
  50% { transform: translate3d(-4vmax, -3vmax, 0) scale(.95); }
}
@keyframes drift-mid {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-3vmax, 2vmax, 0) scale(1.1); }
}

.aurora-grain {
  position: absolute;
  inset: 0;
  opacity: .035;
  mix-blend-mode: overlay;
  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 type='saturate' values='0'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='0.6'/></svg>");
  background-size: 160px 160px;
}

.pointer-glow {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  width: 680px;
  height: 680px;
  margin: -340px 0 0 -340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 227, 220, .10), rgba(255, 196, 138, .04) 42%, transparent 64%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s var(--ease);
  will-change: transform;
}
.pointer-glow.is-on { opacity: 1; }

/* --- 4. Floating dock ----------------------------------------------------- */
.dock {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1120px, calc(100% - 32px));
  min-height: 62px;
  padding: 8px 12px 8px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, rgba(23, 36, 58, .74), rgba(9, 16, 29, .74));
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow:
    0 24px 60px -30px rgba(0, 0, 0, .92),
    inset 0 1px 0 rgba(255, 255, 255, .12);
  transform: translateX(-50%);
  transition: background .35s var(--ease), box-shadow .35s var(--ease);
}
.dock::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 14%;
  width: 72%;
  height: 1px;
  background: var(--seam);
  opacity: .62;
  pointer-events: none;
  transition: opacity .35s var(--ease);
}
.dock.is-scrolled {
  background: linear-gradient(180deg, rgba(19, 31, 51, .90), rgba(8, 14, 26, .90));
  box-shadow:
    0 30px 70px -32px rgba(0, 0, 0, .98),
    inset 0 1px 0 rgba(255, 255, 255, .16);
}
.dock.is-scrolled::before { opacity: .95; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding-left: 2px;
  text-decoration: none;
  white-space: nowrap;
}
/* 品牌记号：一条竖着的光缝，与面板顶部的光缝同源 */
.brand-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 26px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(143, 227, 220, .10), rgba(255, 196, 138, .06));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 6px 18px -10px rgba(143, 227, 220, .55);
}
.brand-orb i {
  width: 1px;
  height: 16px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  box-shadow: 0 0 8px rgba(143, 227, 220, .8);
}
.brand-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--text);
}
.brand-room {
  padding-left: 11px;
  margin-left: 1px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: .22em;
}

.segmented {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .035);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .30);
}
.segmented-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 2);
  border: 1px solid rgba(143, 227, 220, .28);
  border-radius: var(--radius-pill);
  background:
    linear-gradient(180deg, rgba(143, 227, 220, .17), rgba(255, 196, 138, .08)),
    rgba(255, 255, 255, .05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    0 8px 20px -12px rgba(0, 0, 0, .9);
  transform: translateX(calc(var(--seg, 0) * 100%));
  transition: transform .42s var(--ease);
  pointer-events: none;
}
.segmented a {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-decoration: none;
  white-space: nowrap;
  transition: color .3s var(--ease);
}
.segmented a[aria-current="page"] { color: var(--text); }

.dock-meta {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding-right: 8px;
  color: var(--muted);
  white-space: nowrap;
}
.dock-time-label { font-size: 10px; letter-spacing: .18em; }
#clock {
  display: inline-block;
  min-width: 3.4em;
  color: var(--soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
  text-align: right;
}

/* --- 5. Hero -------------------------------------------------------------- */
main { position: relative; z-index: 2; }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: clamp(128px, 15vh, 164px) var(--pad) clamp(56px, 8vh, 88px);
}
.hero::after {
  content: "";
  position: absolute;
  right: var(--pad);
  bottom: 0;
  left: var(--pad);
  height: 1px;
  background: var(--seam-soft);
  opacity: .55;
  pointer-events: none;
}

.hero-copy {
  --copy-light-x: 38%;
  --copy-light-y: 24%;
  --copy-shine-angle: 112deg;
  --copy-edge: .45;
  position: relative;
  min-width: 0;
  perspective: 1100px;
  perspective-origin: 50% 44%;
}
.hero-text {
  position: relative;
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
  transform: translate3d(var(--copy-x, 0px), var(--copy-y, 0px), 0)
    rotateX(var(--copy-rx, 0deg)) rotateY(var(--copy-ry, 0deg)) rotateZ(var(--copy-rz, 0deg));
}

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 clamp(20px, 3vh, 30px);
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .26em;
}
.kicker-dot {
  width: 1px;
  height: 14px;
  border-radius: 1px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  box-shadow: 0 0 10px rgba(143, 227, 220, .55);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(52px, 6.6vw, 92px);
  line-height: 1.07;
  letter-spacing: .005em;
}
.hero h1 .line { display: block; white-space: nowrap; }
.hero h1 .line:first-child { color: var(--text); }
/* The two lines retain their cool / warm identity under the same room light. */
.hero h1 .shimmer { color: var(--text-warm); }
.hero-text h1 {
  transform: translate3d(calc(var(--copy-x, 0px) * .25), calc(var(--copy-y, 0px) * .2), 0);
  text-shadow:
    0 1px 1px rgba(242, 255, 255, .12),
    0 8px 24px rgba(0, 6, 16, .25);
}
.hero-text .kicker { text-shadow: 0 1px 1px rgba(170, 239, 239, .12); }
.hero-text .lede { text-shadow: 0 4px 12px rgba(0, 6, 15, .28); }

/* Polished glass lettering: the specular lobe follows the shared surface normal.
   Opaque light base colors keep every stroke legible between highlights. */
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  :where(.js) .hero-text h1 .line {
    background-image:
      radial-gradient(ellipse 34% 165% at var(--copy-light-x) var(--copy-light-y), #ffffff 0%, rgba(241, 255, 255, .62) 28%, transparent 68%),
      linear-gradient(var(--copy-shine-angle), #e2f7fb 4%, #b7d3de 37%, #f0fcff 49%, #c5dce4 62%, #deedf5 96%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: .35px rgba(230, 252, 255, .24);
  }
  :where(.js) .hero-text h1 .shimmer {
    background-image:
      radial-gradient(ellipse 34% 165% at var(--copy-light-x) var(--copy-light-y), #fffdf2 0%, rgba(255, 249, 231, .66) 28%, transparent 68%),
      linear-gradient(var(--copy-shine-angle), #fff0d9 4%, #d8c3a7 37%, #fff4df 49%, #ddc5a8 62%, #f1dfc4 96%);
    -webkit-text-stroke-color: rgba(255, 240, 211, .28);
  }
  :where(.js) .hero-text .lede {
    background-image:
      radial-gradient(ellipse 50% 160% at var(--copy-light-x) var(--copy-light-y), #f2fdff, transparent 76%),
      linear-gradient(var(--copy-shine-angle), #c4dbe6, #b7cbd9 54%, #e5dfd3);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

.lede {
  max-width: 30em;
  margin: clamp(22px, 3.2vh, 30px) 0 0;
  color: var(--soft);
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.9;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(28px, 4.2vh, 40px);
}
.glass-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  letter-spacing: .04em;
  text-decoration: none;
  transition: border-color .28s var(--ease), background .28s var(--ease), color .28s var(--ease);
}
.glass-btn > span { font-size: 16px; line-height: 1; color: var(--muted); transition: color .28s var(--ease); }
.glass-btn-primary {
  border-color: rgba(143, 227, 220, .48);
  background:
    linear-gradient(180deg, rgba(143, 227, 220, .18), rgba(143, 227, 220, .07)),
    rgba(255, 255, 255, .04);
  color: #ecfffc;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .22),
    0 18px 40px -26px rgba(143, 227, 220, .55);
}
.glass-btn-primary > span { color: var(--primary); }
@media (hover: hover) and (pointer: fine) {
  .glass-btn:hover { border-color: rgba(160, 190, 255, .55); background: var(--surface-hover); }
  .glass-btn-primary:hover { border-color: var(--primary); background: linear-gradient(180deg, rgba(143, 227, 220, .26), rgba(143, 227, 220, .10)); }
  .glass-btn:hover > span { color: var(--text); }
}
.glass-btn:active { transform: translateY(1px); }
.hero-actions .glass-btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.hero-actions .glass-btn::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 55% 160% at var(--copy-light-x) var(--copy-light-y), rgba(229, 255, 255, .13), transparent 78%);
  opacity: calc(.45 + var(--copy-edge) * .45);
  pointer-events: none;
}

/* --- 6. Cast glass: transmitted light, reflected softbox and polished bevel -- */
.lens-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 480px;
  perspective: 1050px;
  perspective-origin: 50% 44%;
  isolation: isolate;
}
.lens-wrap::before {
  content: "";
  position: absolute;
  inset: -6% 0 -2%;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 20% 18%, rgba(143, 227, 220, .22), transparent 52%),
    radial-gradient(ellipse at 84% 86%, rgba(255, 196, 138, .20), transparent 48%);
  filter: blur(36px);
  pointer-events: none;
}
.lens-wrap::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 84%;
  height: 13%;
  bottom: 0;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 35% 50%, rgba(143, 227, 220, .22), transparent 56%),
    radial-gradient(ellipse at 70% 50%, rgba(255, 196, 138, .19), transparent 58%);
  filter: blur(14px);
  transform: rotate(-7deg);
  pointer-events: none;
}

.lens {
  --light-x: 38%;
  --light-y: 24%;
  --shine-angle: 112deg;
  --edge-light: .45;
  --shadow-x: 0px;
  --shadow-y: 40px;
  position: relative;
  width: min(100%, 352px);
  aspect-ratio: .78;
  overflow: hidden;
  border: 1px solid rgba(210, 246, 248, .46);
  border-radius: 28px;
  background:
    radial-gradient(ellipse 85% 58% at var(--light-x) var(--light-y), rgba(208, 247, 250, .10), transparent 68%),
    linear-gradient(145deg, rgba(143, 227, 220, .10), rgba(155, 193, 224, .025) 35%, rgba(13, 23, 36, .12) 65%, rgba(255, 196, 138, .12));
  backdrop-filter: blur(12px) saturate(145%) brightness(1.08);
  -webkit-backdrop-filter: blur(12px) saturate(145%) brightness(1.08);
  box-shadow:
    var(--shadow-x) var(--shadow-y) 65px -24px rgba(0, 0, 0, .72),
    0 3px 4px rgba(0, 0, 0, .22),
    inset 0 1px 1px rgba(240, 255, 255, .76),
    inset 1px 0 1px rgba(210, 248, 252, .40),
    inset -1px -1px 1px rgba(255, 218, 178, .38),
    inset 0 0 18px rgba(194, 236, 246, .08);
  transform: translate3d(var(--lx, 0px), var(--ly, 0px), 0) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotateZ(var(--rz, 0deg));
  /* JS integrates the spring once per frame; a CSS transition would add lag. */
  transition: border-color .3s var(--ease);
}
/* Faint etched divisions remain behind the reflection, not painted on top. */
.lens::before {
  content: "";
  position: absolute;
  inset: 9px;
  z-index: 1;
  border-radius: 19px;
  background:
    linear-gradient(180deg, transparent calc(33.333% - .5px), rgba(198, 235, 244, .17) 33.333%, transparent calc(33.333% + 1px)),
    linear-gradient(180deg, transparent calc(66.666% - .5px), rgba(198, 235, 244, .13) 66.666%, transparent calc(66.666% + 1px));
  pointer-events: none;
}
/* A polished outer edge catches the cool source and the warm room fill. */
.lens::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--shine-angle) at 50% 50%,
    rgba(255, 225, 192, .12), rgba(231, 255, 255, .95) 22%,
    rgba(160, 218, 235, .14) 42%, rgba(255, 224, 187, .72) 65%,
    rgba(164, 215, 230, .12) 83%, rgba(255, 225, 192, .12));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: calc(.45 + var(--edge-light) * .45);
  pointer-events: none;
}
.lens-halo {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 85% 52% at 0% 0%, rgba(160, 239, 235, .16), transparent 64%),
    radial-gradient(ellipse 68% 50% at 108% 104%, rgba(255, 195, 132, .18), transparent 66%),
    linear-gradient(176deg, transparent 38%, rgba(5, 12, 22, .15) 60%, transparent 82%);
  pointer-events: none;
}

.lens-refraction {
  position: absolute;
  inset: 5px;
  z-index: 2;
  border: 1px solid rgba(214, 246, 250, .14);
  border-radius: 23px;
  box-shadow:
    inset 3px 5px 7px -5px rgba(225, 255, 255, .63),
    inset -4px -5px 9px -6px rgba(255, 219, 168, .58),
    0 0 0 3px rgba(176, 230, 236, .025),
    0 0 0 4px rgba(235, 252, 255, .035);
  background: linear-gradient(var(--shine-angle), rgba(222, 255, 255, .065), transparent 24% 76%, rgba(255, 218, 174, .055));
  pointer-events: none;
}

.lens-rim {
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  box-shadow:
    inset 0 8px 12px -7px rgba(232, 255, 255, .77),
    inset 7px 0 13px -10px rgba(186, 247, 251, .66),
    inset -7px 0 12px -9px rgba(170, 219, 238, .46),
    inset 0 -10px 15px -10px rgba(255, 214, 163, .74),
    inset 0 0 34px rgba(175, 220, 231, .045);
  opacity: calc(.56 + var(--edge-light) * .40);
  pointer-events: none;
}

.lens-reflection {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background:
    linear-gradient(var(--shine-angle), transparent 6%, rgba(232, 254, 255, .035) 13%, rgba(230, 253, 255, .17) 14%, rgba(219, 249, 255, .055) 20%, transparent 30% 61%, rgba(242, 250, 255, .025) 68%, transparent 74%),
    radial-gradient(ellipse 85% 45% at var(--light-x) 0%, rgba(221, 254, 255, .14), transparent 75%);
  opacity: calc(.5 + var(--edge-light) * .30);
  pointer-events: none;
}

.lens-sheen {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  background:
    radial-gradient(ellipse 50% 36% at var(--light-x) var(--light-y), rgba(238, 255, 255, .22), rgba(225, 251, 255, .055) 38%, transparent 74%),
    linear-gradient(var(--shine-angle), transparent 30%, rgba(240, 255, 255, .035) 42%, rgba(241, 255, 255, .16) 44%, rgba(231, 254, 255, .035) 48%, transparent 58%);
  opacity: calc(.45 + var(--edge-light) * .36);
  pointer-events: none;
}

.lens-core {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 12px;
  text-align: center;
  pointer-events: none;
}
.lens-core::before {
  content: "";
  justify-self: center;
  width: 1px;
  height: 28px;
  background: linear-gradient(180deg, transparent, var(--primary));
  opacity: .8;
  margin-bottom: 4px;
}
.lens-core b {
  font-family: var(--font-display);
  font-size: clamp(64px, 6.4vw, 88px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--text);
  text-shadow: 0 1px 1px rgba(255, 255, 255, .15), 0 -1px 1px rgba(0, 8, 16, .65), 0 8px 24px rgba(0, 8, 18, .35);
}
.lens-core i {
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 11px;
  letter-spacing: .30em;
  color: var(--muted);
}

.float-chip {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid rgba(160, 190, 255, .20);
  border-radius: var(--radius-pill);
  background: rgba(12, 20, 34, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10);
  color: var(--soft);
  font-size: 11.5px;
  letter-spacing: .11em;
  white-space: nowrap;
  pointer-events: none;
}
.float-chip i { width: 4px; height: 4px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 8px rgba(143, 227, 220, .8); }
.chip-b i { background: var(--accent); box-shadow: 0 0 8px rgba(255, 196, 138, .8); }
.chip-c i { background: var(--link); }
.chip-a { top: 7%; left: 6%; }
.chip-b { right: 6%; top: 41%; }
.chip-c { bottom: 7%; left: 7%; }
@media (hover: hover) and (pointer: fine) {
  .float-chip { animation: chip-float 11s ease-in-out infinite; }
  .chip-b { animation-delay: -3.5s; }
  .chip-c { animation-delay: -6.5s; }
}
@keyframes chip-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* --- 7. Bento slab -------------------------------------------------------- */
.modules {
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: 0 var(--pad) clamp(56px, 8vh, 96px);
}

.section-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(26px, 4vh, 38px);
  padding-top: clamp(22px, 3.4vh, 32px);
  border-top: 1px solid var(--line);
}
.section-head::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(380px, 46%);
  height: 1px;
  background: var(--seam);
  opacity: .6;
}
.section-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .24em;
}
.section-kicker::before {
  content: "";
  width: 14px;
  height: 1px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.2vw, 42px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: .01em;
}
.section-head > p {
  max-width: 17em;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  text-align: right;
}

/* 一整块玻璃台面：自动换行，末行均分补齐；DOM 与键盘顺序保持一致。 */
.bento {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 1px;
  padding: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  background:
    linear-gradient(135deg, rgba(143, 227, 220, .30), rgba(160, 190, 255, .14) 42%, rgba(255, 196, 138, .26));
  box-shadow:
    0 48px 100px -54px rgba(0, 0, 0, .95),
    inset 0 1px 0 rgba(255, 255, 255, .10);
}
.bento::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18%;
  z-index: 2;
  width: 64%;
  height: 1px;
  background: var(--seam);
  opacity: .8;
  pointer-events: none;
}

.tile {
  position: relative;
  isolation: isolate;
  display: flex;
  flex: 1 1 calc((100% - 2px) / 3);
  min-width: 0;
  flex-direction: column;
  justify-content: flex-start;
  gap: 20px;
  min-height: 168px;
  padding: 24px 24px 22px;
  background: rgba(8, 14, 25, .74);
  color: var(--text);
  text-decoration: none;
  transition: background .28s var(--ease);
}

/* 每格顶部一条可被点亮的光缝 */
.tile::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 1px;
  background: var(--seam);
  opacity: .26;
  transition: opacity .3s var(--ease);
  pointer-events: none;
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(143, 227, 220, .07), transparent 62%);
  opacity: 0;
  transition: opacity .3s var(--ease);
  pointer-events: none;
}
.tile:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -3px;
  border-radius: 0;
  box-shadow: inset 0 0 0 1px rgba(143, 227, 220, .35);
}
@media (hover: hover) and (pointer: fine) {
  .tile:hover { background: rgba(17, 27, 43, .82); }
  .tile:hover::before { opacity: 1; }
  .tile:hover::after { opacity: 1; }
  .tile:hover .tile-arrow { color: var(--text); opacity: 1; transform: translate(1px, -1px); }
  .tile:hover .tile-icon svg { opacity: 1; }
}
.tile:active { background: rgba(22, 34, 52, .9); }

.tile-glow { display: none; }

.tile-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, .035);
  color: var(--tint, var(--primary));
  transition: border-color .3s var(--ease);
}
.tile-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .82;
}
@media (hover: hover) and (pointer: fine) {
  .tile:hover .tile-icon { border-color: color-mix(in srgb, var(--tint, var(--primary)) 55%, transparent); }
}

.tile-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.tile-body strong {
  min-block-size: 2.8em;
  font-family: var(--font-display);
  font-size: clamp(19px, 1.55vw, 22px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .01em;
  color: var(--text);
  white-space: normal;
  overflow-wrap: anywhere;
}
.tile-body small {
  display: -webkit-box;
  min-block-size: 3.3em;
  margin-top: auto;
  overflow: hidden;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tile-arrow {
  position: absolute;
  top: 22px;
  right: 22px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  opacity: .7;
  transition: opacity .3s var(--ease), color .3s var(--ease), transform .35s var(--ease);
}
.tile-arrow svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tile:focus-visible .tile-arrow { opacity: 1; color: var(--text); }

/* 模块色相只做很小的提示，不破坏夜的统一 */
.tile[data-module="files"] { --tint: #8fe3dc; }
.tile[data-module="apps"] { --tint: #9fd8ff; }
.tile[data-module="research"] { --tint: #8fe3dc; }
.tile[data-module="news"] { --tint: #a9dcc4; }
.tile[data-module="courses"] { --tint: #9fd8ff; }
.tile[data-module="charger"] { --tint: #ffc48a; }
.tile[data-module="player"] { --tint: #c9d7f2; }
.tile[data-module="codex-management"] { --tint: #b9e9e3; }
.tile[data-module="videotogether"] { --tint: #ffc48a; }
.tile[data-module="treehole"] { --tint: #a9dcc4; }
.tile[data-module="notes"] { --tint: #ffd9a8; }
.tile[data-module="deepseek-harness"] { --tint: #9fd8ff; }

/* --- 8. Footer ------------------------------------------------------------ */
.footer {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(18px, 4vw, 52px);
  width: min(var(--max), calc(100% - 2 * var(--pad)));
  margin: 0 auto clamp(28px, 5vh, 56px);
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: linear-gradient(160deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015));
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 10%;
  width: 80%;
  height: 1px;
  background: var(--seam-soft);
  opacity: .6;
}
.footer-main {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.footer-main b {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
}
.footer-orb {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(143, 227, 220, .12), rgba(255, 196, 138, .06));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.footer p { margin: 0; }
.footer-note { color: var(--muted); font-size: 12px; line-height: 1.7; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-size: 12px;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
  transition: color .25s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .footer-links a:hover, .segmented a:hover { color: var(--text); }
}

/* --- 9. Motion ------------------------------------------------------------ */
/* 只有首屏入场一次；模块与页脚不做逐段 fade-up。 */
.js .hero-copy.reveal,
.js .lens-wrap.reveal { opacity: 0; }
.js .hero-copy.reveal.is-visible,
.js .lens-wrap.reveal.is-visible {
  opacity: 1;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js .hero-copy.reveal { transform: translateY(8px); }
.js .lens-wrap.reveal { transform: translateY(8px); transition-delay: .08s; }
.js .hero-copy.reveal.is-visible,
.js .lens-wrap.reveal.is-visible { transform: none; }

@keyframes seam-flash {
  0% { opacity: .28; }
  30% { opacity: 1; }
  100% { opacity: .28; }
}
.tile.is-lit::before { animation: seam-flash .6s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .hero-copy.reveal, .js .lens-wrap.reveal { opacity: 1; transform: none; }
  .pointer-glow { display: none; }
  .lens { transform: none !important; }
  .hero-text, .hero-text h1, .hero-text .kicker, .hero-text .lede { transform: none !important; }
}

/* 系统要求降低透明度：换成实色玻璃，保证可读性 */
@media (prefers-reduced-transparency: reduce) {
  .dock, .segmented, .tile, .footer, .glass-btn, .float-chip, .lens {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .dock, .segmented { background: #101a2c; }
  .tile { background: #0e1727; }
  .tile:hover { background: #132035; }
  .footer { background: #0b1321; }
  .glass-btn, .float-chip { background: #17253d; }
  .lens { background: linear-gradient(180deg, #16243b, #0b1424); }
  .pointer-glow { display: none; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .dock { background: #0f1929; }
  .tile { background: #0e1727; }
  .footer { background: #0b1321; }
  .glass-btn, .float-chip { background: #16243a; }
  .lens { background: linear-gradient(180deg, #17263e, #0b1424); }
}

.is-background .blob,
.is-background .lens-sheen,
.is-background .float-chip { animation-play-state: paused; }
.is-lite .blob, .is-lite .lens-sheen, .is-lite .float-chip { animation: none; will-change: auto; }
.is-lite .pointer-glow, .is-lite .aurora-grain { display: none; }
.is-lite .hero-text, .is-lite .hero-text h1, .is-lite .hero-text .kicker, .is-lite .hero-text .lede { transform: none; }

/* 触屏设备：没有指针光晕可跟随，直接关掉，省合成开销 */
@media (hover: none), (pointer: coarse) {
  .pointer-glow { display: none; }
  .blob { animation: none; will-change: auto; filter: blur(80px); }
  .blob-c, .aurora-grain { display: none; }
  .lens-sheen, .float-chip { animation: none; }
  .tile { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .tile::after { display: none; }
  .hero-text, .hero-text h1, .hero-text .kicker, .hero-text .lede { transform: none; }
}

/* --- 10. Responsive ------------------------------------------------------- */
@media (max-width: 1120px) {
  .tile { flex-basis: calc((100% - 1px) / 2); }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(28px, 5vw, 44px);
    padding-top: 126px;
  }
  .hero-copy { max-width: 720px; }
  .lens-wrap { min-height: 0; }
  .lens { width: min(100%, 300px); aspect-ratio: .82; }
  .float-chip { display: none; }
  .section-head { gap: 18px; }
}

@media (max-width: 760px) {
  .dock {
    gap: 8px;
    min-height: 56px;
    padding: 6px 8px;
    width: calc(100% - 20px);
  }
  .brand { min-width: 44px; padding-left: 4px; }
  .brand-name, .brand-room { display: none; }
  .segmented { flex: 1; max-width: 330px; }
  .segmented a { min-height: 44px; padding: 9px 8px; font-size: 12px; letter-spacing: .04em; }
  .dock-meta { display: none; }
  .hero { padding-top: 106px; padding-bottom: 44px; }
  .lens { width: 240px; aspect-ratio: .86; margin-left: 2px; }
  .lens-core b { font-size: 60px; }
  .section-head { display: block; }
  .section-head > p { margin-top: 10px; text-align: left; max-width: 22em; }
}

@media (max-width: 700px) {
  .tile { min-height: 160px; padding: 20px 18px 18px; gap: 20px; }
  .tile::before { left: 14px; right: 14px; }
  .tile-body strong { font-size: 18px; }
  .tile-arrow { top: 18px; right: 16px; }
}

@media (max-width: 560px) {
  .hero h1 { font-size: clamp(46px, 13vw, 56px); }
  .lede { font-size: 15px; }
  .glass-btn { min-height: 48px; padding: 0 18px; }
  /* 手机上的窗变成一条窗台：数字与说明并排 */
  .lens-wrap { margin-top: 2px; }
  .lens {
    width: 100%;
    max-width: none;
    aspect-ratio: auto;
    height: 96px;
    border-radius: var(--radius-card);
  }
  .lens::before { display: none; }
  .lens-core {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 0 22px;
    text-align: left;
  }
  .lens-core::before { width: 26px; height: 1px; margin: 0; background: linear-gradient(90deg, transparent, var(--primary)); }
  .lens-core b { font-size: 40px; }
  .lens-core i { letter-spacing: .22em; }
  .bento { border-radius: 22px; }
  .tile {
    flex-basis: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    min-height: 96px;
    padding: 18px 52px 18px 18px;
  }
  .tile-body strong { min-block-size: 0; font-size: 18px; }
  .tile-body small { min-block-size: 0; margin-top: 0; font-size: 12px; }
  .tile-arrow { top: 50%; right: 16px; margin-top: -13px; }
  .tile-icon { width: 42px; height: 42px; }
  .footer { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 20px; border-radius: 22px; }
  .footer-links { gap: 14px; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 44px; }
  .segmented a { padding: 9px 6px; font-size: 11.5px; }
  .section-head h2 { font-size: 28px; }
}

@media (forced-colors: active) {
  .hero-text, .hero-text h1, .hero-text .kicker, .hero-text .lede { transform: none; text-shadow: none; }
  .hero-text h1 .line, .hero-text .lede {
    background: none;
    color: CanvasText;
    -webkit-text-fill-color: CanvasText;
    -webkit-text-stroke: 0;
  }
  .hero-actions .glass-btn::before { display: none; }
  .aurora, .pointer-glow, .lens::before, .lens::after, .lens-sheen, .segmented-thumb,
  .lens-wrap::before, .lens-wrap::after, .lens-halo, .lens-refraction, .lens-reflection, .lens-rim,
  .tile::before, .tile::after, .bento::before, .footer::before { display: none; }
  .dock, .tile, .footer, .glass-btn, .float-chip, .lens, .segmented, .tile-icon {
    background: Canvas;
    color: CanvasText;
    border: 1px solid CanvasText;
    box-shadow: none;
  }
  .segmented a[aria-current="page"] { outline: 2px solid Highlight; outline-offset: -3px; }
  :focus-visible { outline-color: Highlight; }
}

@media print {
  .aurora, .dock, .pointer-glow, .lens-sheen, .float-chip, .hero::after, .lens-rim { display: none !important; }
  body { background: #fff; color: #111; }
  .js .hero-copy.reveal, .js .lens-wrap.reveal { opacity: 1 !important; transform: none !important; }
  .tile, .tile[data-module], .footer { border: 1px solid #ccc; background: #fff; box-shadow: none; color: #111; }
  .tile-body small, .footer-main, .footer-note, .footer-links a, .section-kicker, .section-head > p, .lede, .kicker { color: #555; }
  .bento { border-color: #ccc; background: #ccc; }
  .tile-body strong, .hero h1 .line, .hero h1 .shimmer, .section-head h2 { color: #111; }
}
