/* ===== 首页首屏背景动效「奇点 Singularity」（2026-11-26）
   只新增背景层（画布、颗粒、扫描线、文字区压暗）与右下角控制器，不改首屏任何现有元素的样式与尺寸。
   层序：section 原有渐变底 → .hsg-bg（z 0：画布 / 颗粒 / 扫描线 / 压暗）→ 原有内容（.wrap，z 1）→ 控制器（z 3） */
.hero-v2{position:relative;isolation:isolate;overflow:hidden}
.hero-v2>.wrap{position:relative;z-index:1}
.hsg-bg{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden}
.hsg-fx{position:absolute;inset:0;width:100%;height:100%}
.hsg-grain{position:absolute;inset:-50%;opacity:.07;mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation:hsgGrain 1.2s steps(6) infinite}
@keyframes hsgGrain{0%{transform:translate(0,0)}33%{transform:translate(-3%,2%)}66%{transform:translate(2%,-3%)}100%{transform:translate(0,0)}}
.hsg-scan{position:absolute;inset:0;opacity:.35;background:repeating-linear-gradient(180deg,rgba(255,255,255,.025) 0 1px,transparent 1px 3px)}
/* 文字区压暗：位置由 JS 按左列实测写入 --tx/--ty/--tw/--th，保证光核辉光再亮，白字背后都有深色兜底 */
.hsg-shade{position:absolute;left:var(--tx,0);top:var(--ty,0);width:var(--tw,50%);height:var(--th,50%);
  background:radial-gradient(ellipse 62% 58% at 46% 52%,rgba(5,14,26,.6),rgba(5,14,26,.32) 58%,transparent 100%);filter:blur(22px);transform:scale(1.12)}
@property --a{syntax:"<angle>";initial-value:0deg;inherits:false}
@keyframes hsgSpin{to{--a:360deg}}
/* ===== 奇点控制器：右下角流光光核 + 展开式轨道面板 ===== */
.hsg{--o:36px;position:absolute;right:32px;top:auto;bottom:0;z-index:3;width:var(--o);height:var(--o)}
.hsg-orb{all:unset;box-sizing:border-box;position:absolute;inset:0;border-radius:50%;cursor:pointer;z-index:3;
  background:radial-gradient(circle at 50% 50%,#FFF6EC 0 9%,#FFBA80 17%,rgba(255,115,30,.55) 32%,rgba(12,29,48,.9) 58%);
  box-shadow:0 0 0 1px rgba(255,255,255,.1),0 6px 22px rgba(2,8,18,.5),0 0 22px rgba(255,115,30,.25);
  transition:transform .35s cubic-bezier(.2,.8,.2,1),box-shadow .35s;animation:hsgBreath 7s ease-in-out infinite}
.hsg-orb::before{content:"";position:absolute;inset:-3px;border-radius:50%;padding:1.5px;
  background:conic-gradient(from var(--a,0deg),rgba(255,138,61,0) 0deg,rgba(255,138,61,.95) 50deg,rgba(89,225,255,.85) 110deg,rgba(255,255,255,.05) 170deg,rgba(255,255,255,.05) 360deg);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;animation:hsgSpin 16s linear infinite}
.hsg-orb::after{content:"";position:absolute;left:50%;top:50%;width:150%;height:34%;transform:translate(-50%,-50%) rotate(-18deg);border-radius:50%;border:1px solid rgba(255,210,170,.35);border-left-color:transparent;border-right-color:transparent}
@keyframes hsgBreath{0%,100%{box-shadow:0 0 0 1px rgba(255,255,255,.1),0 6px 22px rgba(2,8,18,.5),0 0 18px rgba(255,115,30,.18)}50%{box-shadow:0 0 0 1px rgba(255,255,255,.14),0 6px 22px rgba(2,8,18,.5),0 0 30px rgba(255,115,30,.38)}}
.hsg-orb:focus-visible{outline:2px solid #FFBA80;outline-offset:4px}
.hsg[data-open="true"] .hsg-orb{transform:scale(1.12)}
.hsg.is-paused .hsg-orb::before{animation-play-state:paused}
.hsg.is-off .hsg-orb{background:radial-gradient(circle,#6E8798 0 12%,rgba(110,135,152,.25) 30%,rgba(12,29,48,.9) 58%);animation:none}
.hsg.is-off .hsg-orb::before{animation:none;background:rgba(255,255,255,.18)}
.hsg.pulsing .hsg-orb{animation:hsgKick .9s ease-out}
@keyframes hsgKick{0%{box-shadow:0 0 0 0 rgba(255,186,128,.8),0 0 30px rgba(255,115,30,.6)}100%{box-shadow:0 0 0 40px rgba(255,186,128,0),0 0 22px rgba(255,115,30,.25)}}
/* 面板：以光核为圆心的四分之一圆，向左上展开 */
.hsg-panel{position:absolute;left:calc(var(--o)/2);top:calc(var(--o)/2);width:0;height:0;pointer-events:none}
.hsg[data-open="true"] .hsg-panel{pointer-events:auto}
.hsg-halo{position:absolute;left:calc(var(--S,215px)*-1);top:calc(var(--S,215px)*-1);width:calc(var(--S,215px)*2);height:calc(var(--S,215px)*2);border-radius:50%;pointer-events:none;
  background:radial-gradient(circle,rgba(8,20,34,.86) 0 34%,rgba(8,20,34,.62) 52%,rgba(8,20,34,0) 72%);
  -webkit-mask:conic-gradient(from 180deg,#000 0 90deg,transparent 90deg);mask:conic-gradient(from 180deg,#000 0 90deg,transparent 90deg);
  opacity:0;transform:scale(.4);transform-origin:50% 50%;transition:opacity .4s,transform .5s cubic-bezier(.2,.8,.2,1)}
.hsg[data-open="true"] .hsg-halo{opacity:1;transform:scale(1)}
.hsg-arcs{position:absolute;left:calc(var(--S,215px)*-1);top:calc(var(--S,215px)*-1);width:calc(var(--S,215px)*2);height:calc(var(--S,215px)*2);overflow:visible;opacity:0;transition:opacity .35s .05s}
.hsg[data-open="true"] .hsg-arcs{opacity:1}
.hsg-arcs .t{fill:none;stroke:rgba(214,238,250,.16);stroke-width:1;stroke-dasharray:2 6}
.hsg-arcs .t.o{stroke:rgba(214,238,250,.22);stroke-width:10;stroke-dasharray:none;stroke-linecap:round;cursor:pointer;pointer-events:stroke}
.hsg-arcs .p{fill:none;stroke:url(#sgGrad);stroke-width:2.4;stroke-linecap:round;pointer-events:none}
/* 节点：轨道上的小光点，图标即语义；进入时沿轨道从光核"甩出" */
.hsg-n,.hsg-sat{all:unset;box-sizing:border-box;position:absolute;left:0;top:0;width:32px;height:32px;margin:-16px 0 0 -16px;border-radius:50%;cursor:pointer;
  display:grid;place-items:center;color:#D6EEFA;background:radial-gradient(circle,rgba(16,36,58,.95) 55%,rgba(16,36,58,.6));
  box-shadow:0 0 0 1px rgba(214,238,250,.22);opacity:0;transform:translate(0,0) scale(.3);
  transition:transform .45s cubic-bezier(.2,.9,.25,1.15) var(--d,0ms),opacity .3s var(--d,0ms),box-shadow .2s,color .2s,background .2s}
.hsg[data-open="true"] .hsg-n,.hsg[data-open="true"] .hsg-sat{opacity:1;transform:translate(calc(var(--x)*1px),calc(var(--y)*1px)) scale(1)}
.hsg-n svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.hsg-n:hover,.hsg-n:focus-visible{box-shadow:0 0 0 1px rgba(255,186,128,.8),0 0 16px rgba(255,138,61,.45);color:#fff}
.hsg-n:focus-visible,.hsg-sat:focus-visible{outline:2px solid #FFBA80;outline-offset:2px}
.hsg-n[data-ring="mid"]{width:28px;height:28px;margin:-14px 0 0 -14px}
.hsg-n[data-ring="mid"][aria-pressed="true"]{color:#FFD2A6;box-shadow:0 0 0 1px rgba(255,138,61,.75),0 0 12px rgba(255,115,30,.35)}
.hsg-n[data-ring="mid"][aria-pressed="false"]{color:rgba(214,238,250,.38);box-shadow:0 0 0 1px rgba(214,238,250,.12);background:rgba(8,20,34,.7)}
.hsg-n[disabled]{opacity:.28!important;cursor:default}
#hsgPause .i-play{display:none}#hsgPause[aria-pressed="true"] .i-play{display:block}#hsgPause[aria-pressed="true"] .i-pause{display:none}
#hsgPower[aria-pressed="false"]{color:#FF9A5A;box-shadow:0 0 0 1px rgba(255,138,61,.6)}
.hsg-sat{width:18px;height:18px;margin:-9px 0 0 -9px;background:radial-gradient(circle,#fff 0 28%,#FFBA80 45%,rgba(255,115,30,.0) 75%);box-shadow:0 0 12px rgba(255,138,61,.8);cursor:grab;touch-action:none}
.hsg-sat:active{cursor:grabbing}
.hsg-cap{position:absolute;right:-6px;top:calc(var(--S,215px)*-1 - 7px);white-space:nowrap;font:500 11px/1 "Cascadia Mono",Consolas,monospace;letter-spacing:.12em;color:#FFD2A6;
  text-shadow:0 0 10px rgba(255,115,30,.6);opacity:0;transform:translateY(4px);transition:opacity .2s,transform .2s;pointer-events:none}
.hsg[data-open="true"] .hsg-cap:not(:empty){opacity:1;transform:none}
.hsg-bg .hsg-fx,.hsg-bg .hsg-grain,.hsg-bg .hsg-scan{transition:opacity .45s ease}
.hero-v2.hsg-off .hsg-fx,.hero-v2.hsg-off .hsg-grain,.hero-v2.hsg-off .hsg-scan{opacity:0;visibility:hidden;transition:opacity .45s ease,visibility 0s .45s}
.hsg .sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media (max-width:640px){.hsg{--o:30px}}
@media (hover:none){.hsg-n{width:36px;height:36px;margin:-18px 0 0 -18px}.hsg-n[data-ring="mid"]{width:32px;height:32px;margin:-16px 0 0 -16px}}
@media (prefers-reduced-motion:reduce){.hsg-grain,.hsg-orb,.hsg-orb::before{animation:none}}
/* 窄屏：说明文字最多两行，宽度不超过视口，右对齐控制器 */
@media (max-width:640px){.hsg-cap{white-space:normal;width:max-content;max-width:min(300px,calc(100vw - 40px));text-align:right;line-height:1.45;letter-spacing:.06em}}
@media print{.hsg-bg,.hsg{display:none}}
