/* SENTINEL — HUD layer. Self-hosted, no outside code. Turn off any time with the
   "effects off" command, and it switches itself off for people who ask their
   device to reduce motion. */
:root{--hud:#c8cdd4;--hud-dim:rgba(200,205,212,0.38);--hud-faint:rgba(200,205,212,0.09);--hud-bg:rgba(1,10,16,0.94);
  --hud-mono:'Share Tech Mono','DejaVu Sans Mono',monospace;--hud-head:'Orbitron','DejaVu Sans',sans-serif;}

/* ---------- always-on-top decorative layers (never block clicks) ---------- */
/* The animated background sits BEHIND the page (z-index -1), so it only shows in empty space.
   Boxes that contain text get a dark fill (.hud-solid, added by hud.js) and loose text gets a soft
   dark halo, so the network never runs through anything you're reading. */
#hud-canvas{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:-1;opacity:.55}
html body .hud-solid.hud-solid{background-color:var(--hud-solid,rgba(7,7,7,0.94))}   /* doubled class: outranks a page's own outline/transparent button styles, but :hover still wins */
html:not(.hud-fx-off) :is(h1,h2,h3,h4,h5,p,li,label,summary){text-shadow:0 0 10px rgba(0,0,0,.95),0 0 3px rgba(0,0,0,.9)}
#hud-progress{position:fixed;top:0;left:0;height:2px;width:0;z-index:301;pointer-events:none;background:linear-gradient(90deg,transparent,var(--hud));box-shadow:0 0 12px var(--hud)}

/* ---------- pointer glow on cards ---------- */
.hud-glow{position:relative}
.hud-glow::after{content:'';position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity .25s;
  background:radial-gradient(280px circle at var(--mx,50%) var(--my,50%),rgba(200,205,212,.13),transparent 62%)}
.hud-glow:hover::after{opacity:1}

/* ---------- hero centerpiece ---------- */
.hud-reactor{width:clamp(120px,24vw,172px);height:clamp(120px,24vw,172px);margin:0 auto 18px;position:relative;
  transform:translate(var(--px,0px),var(--py,0px));transition:transform .2s ease-out;filter:drop-shadow(0 0 14px rgba(200,205,212,.45))}
.hud-reactor svg{width:100%;height:100%;overflow:visible}
.hud-spin-a{transform-origin:100px 100px;animation:hud-spin 46s linear infinite}
.hud-spin-b{transform-origin:100px 100px;animation:hud-spin 24s linear infinite reverse}
.hud-spin-c{transform-origin:100px 100px;animation:hud-spin 12s linear infinite}
.hud-core{transform-origin:100px 100px;animation:hud-pulse 2.6s ease-in-out infinite}
@keyframes hud-spin{to{transform:rotate(360deg)}}
@keyframes hud-pulse{0%,100%{opacity:.75;transform:scale(1)}50%{opacity:1;transform:scale(1.09)}}
#hero .hero-title{position:relative}
#hero .hero-title:hover{animation:hud-glitch .5s steps(2,end) 1}
@keyframes hud-glitch{0%{text-shadow:2px 0 #ff3d6b,-2px 0 #c8cdd4}25%{text-shadow:-3px 0 #ff3d6b,3px 0 #c8cdd4;transform:translateX(1px)}50%{text-shadow:2px 1px #ff3d6b,-2px -1px #c8cdd4}100%{text-shadow:none;transform:none}}

/* ---------- live system chips ---------- */
.hud-systems{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:26px auto 0;max-width:760px}
.hud-sys{display:inline-flex;align-items:center;gap:8px;font-family:var(--hud-mono);font-size:.64rem;letter-spacing:2px;color:#9fb8c2;border:1px solid var(--hud-faint);background:rgba(200,205,212,.04);padding:7px 12px}
.hud-sys i{width:7px;height:7px;border-radius:50%;background:#555;box-shadow:0 0 0 rgba(0,0,0,0)}
.hud-sys.ok i{background:#7dd88f;box-shadow:0 0 8px #7dd88f}
.hud-sys.warn i{background:#d4b45a;box-shadow:0 0 8px #d4b45a}
.hud-sys.bad i{background:#e06666;box-shadow:0 0 8px #e06666}
.hud-sys b{color:var(--hud);font-weight:400}

/* ---------- boot sequence ---------- */
#hud-boot{position:fixed;inset:0;z-index:1000;background:#00060a;display:flex;align-items:center;justify-content:center;padding:24px;transition:opacity .55s}
#hud-boot.out{opacity:0;pointer-events:none}
#hud-boot .boot-in{width:min(560px,100%);font-family:var(--hud-mono);color:var(--hud)}
#hud-boot .boot-r{width:120px;height:120px;margin:0 auto 22px;filter:drop-shadow(0 0 16px rgba(200,205,212,.6))}
#hud-boot .boot-t{font-family:var(--hud-head);font-weight:900;letter-spacing:6px;font-size:1.05rem;text-align:center;margin-bottom:20px}
#hud-boot .bl{display:flex;justify-content:space-between;gap:14px;font-size:.78rem;letter-spacing:1px;padding:5px 0;border-bottom:1px solid rgba(200,205,212,.1);animation:hud-line .25s both}
#hud-boot .bl .v{color:#7dd88f}#hud-boot .bl .v.warn{color:#d4b45a}#hud-boot .bl .v.bad{color:#e06666}
#hud-boot .skip{margin-top:18px;text-align:center;font-size:.62rem;letter-spacing:3px;color:#4b6a75}
@keyframes hud-line{from{opacity:0;transform:translateX(-8px)}to{opacity:1;transform:none}}

/* ---------- command interface ---------- */
#hud-launch{position:fixed;left:18px;bottom:18px;z-index:320;display:flex;align-items:center;gap:10px;background:var(--hud-bg);border:1px solid var(--hud-dim);color:var(--hud);font-family:var(--hud-mono);font-size:.68rem;letter-spacing:2px;padding:11px 15px;cursor:pointer;backdrop-filter:blur(6px);box-shadow:0 0 18px rgba(200,205,212,.12)}
#hud-launch:hover,#hud-launch:focus-visible{border-color:var(--hud);box-shadow:0 0 24px rgba(200,205,212,.3);outline:none}
#hud-launch kbd{font-family:inherit;font-size:.6rem;border:1px solid var(--hud-dim);padding:1px 6px;color:#9fb8c2}
#hud-launch .dot{width:7px;height:7px;border-radius:50%;background:var(--hud);box-shadow:0 0 8px var(--hud);animation:hud-pulse 2.6s ease-in-out infinite}
@media(max-width:700px){#hud-launch{left:12px;bottom:12px;padding:10px 12px}#hud-launch kbd{display:none}}
#hud-cmd{position:fixed;inset:0;z-index:400;display:none;align-items:flex-start;justify-content:center;padding:11vh 14px 14px;background:rgba(0,6,10,.8);backdrop-filter:blur(5px)}
#hud-cmd.open{display:flex}
#hud-cmd .panel{position:relative;width:min(740px,100%);background:var(--hud-bg);border:1px solid var(--hud-dim);box-shadow:0 0 40px rgba(200,205,212,.16),inset 0 0 40px rgba(200,205,212,.04);font-family:var(--hud-mono);color:#d6edf5}
#hud-cmd .panel::before,#hud-cmd .panel::after{content:'';position:absolute;width:16px;height:16px;border:2px solid var(--hud);pointer-events:none}
#hud-cmd .panel::before{top:-1px;left:-1px;border-right:none;border-bottom:none}
#hud-cmd .panel::after{bottom:-1px;right:-1px;border-left:none;border-top:none}
#hud-cmd .hd{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid var(--hud-faint);font-size:.62rem;letter-spacing:3px;color:var(--hud)}
#hud-cmd .hd button{background:none;border:1px solid var(--hud-faint);color:#9fb8c2;font-family:inherit;font-size:.6rem;padding:3px 9px;cursor:pointer;letter-spacing:1px}
#hud-cmd .log{max-height:44vh;min-height:90px;overflow-y:auto;padding:14px 16px;font-size:.8rem;line-height:1.65}
#hud-cmd .ln{white-space:pre-wrap;word-break:break-word;margin-bottom:6px}
#hud-cmd .ln.you{color:#8fa9b3}#hud-cmd .ln.you::before{content:'› ';color:var(--hud)}
#hud-cmd .ln.sys{color:var(--hud)}#hud-cmd .ln.ok{color:#7dd88f}#hud-cmd .ln.warn{color:#d4b45a}#hud-cmd .ln.bad{color:#e06666}
#hud-cmd .ln a{color:var(--hud)}
#hud-cmd .chips{display:flex;flex-wrap:wrap;gap:6px;padding:0 16px 12px}
#hud-cmd .chips button{background:rgba(200,205,212,.05);border:1px solid var(--hud-faint);color:#9fb8c2;font-family:inherit;font-size:.66rem;letter-spacing:1px;padding:5px 10px;cursor:pointer}
#hud-cmd .chips button:hover{border-color:var(--hud);color:var(--hud)}
#hud-cmd .in{display:flex;align-items:center;gap:10px;border-top:1px solid var(--hud-faint);padding:12px 16px}
#hud-cmd .in span{color:var(--hud)}
#hud-cmd input{flex:1;min-width:0;background:transparent;border:none;outline:none;color:#fff;font-family:inherit;font-size:.9rem;letter-spacing:1px}

/* ---------- scanner: diagnostics gauges + scanning radar + staggered reveal ---------- */
#hud-gauges{display:none;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 0 14px}
#hud-gauges.show{display:grid}
.hud-gauge{position:relative;border:1px solid var(--hud-faint);background:linear-gradient(180deg,rgba(200,205,212,.05),rgba(0,0,0,0));padding:16px 14px 14px;text-align:center}
.hud-gauge::before{content:'';position:absolute;top:-1px;left:-1px;width:12px;height:12px;border-top:2px solid var(--hud);border-left:2px solid var(--hud)}
.hud-gauge::after{content:'';position:absolute;bottom:-1px;right:-1px;width:12px;height:12px;border-bottom:2px solid var(--hud);border-right:2px solid var(--hud)}
.hud-gauge svg{width:132px;height:132px;display:block;margin:0 auto 8px}
.hud-gauge .gv{font-family:var(--hud-head);font-weight:900;font-size:1.5rem;fill:#fff}
.hud-gauge .gk{font-family:var(--hud-mono);font-size:.6rem;letter-spacing:3px;color:#8fa9b3}
.hud-gauge .gb{font-family:var(--hud-mono);font-size:.66rem;letter-spacing:2px;margin-top:4px}
@media(max-width:560px){#hud-gauges{grid-template-columns:1fr 1fr}.hud-gauge svg{width:104px;height:104px}}
#scanning-state{position:relative}
#scanning-state .hud-radar{display:none;position:relative;width:150px;height:150px;margin:0 auto 10px}
#scanning-state.active .hud-radar{display:block}
.hud-radar i{position:absolute;inset:0;border:1px solid var(--hud-dim);border-radius:50%}
.hud-radar i:nth-child(2){inset:22px}.hud-radar i:nth-child(3){inset:44px}
.hud-radar::before{content:'';position:absolute;inset:0;border-radius:50%;background:conic-gradient(from 0deg,rgba(200,205,212,0) 0deg,rgba(200,205,212,.5) 70deg,rgba(200,205,212,0) 71deg);animation:hud-spin 1.6s linear infinite}
.hud-radar::after{content:'';position:absolute;left:50%;top:50%;width:7px;height:7px;margin:-3.5px;border-radius:50%;background:var(--hud);box-shadow:0 0 12px var(--hud)}
@keyframes hud-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
#report.show>*{animation:hud-in .5s both}
#report.show>*:nth-child(1){animation-delay:.02s}#report.show>*:nth-child(2){animation-delay:.07s}#report.show>*:nth-child(3){animation-delay:.12s}
#report.show>*:nth-child(4){animation-delay:.17s}#report.show>*:nth-child(5){animation-delay:.22s}#report.show>*:nth-child(6){animation-delay:.27s}
#report.show>*:nth-child(7){animation-delay:.32s}#report.show>*:nth-child(8){animation-delay:.37s}#report.show>*:nth-child(n+9){animation-delay:.42s}

/* ---------- off switches ---------- */
html.hud-fx-off #hud-canvas,html.hud-fx-off #hud-progress{display:none!important}
html.hud-fx-off .hud-glow::after{display:none}
html.hud-fx-off #report.show>*{animation:none}
@media (prefers-reduced-motion: reduce){
  .hud-spin-a,.hud-spin-b,.hud-spin-c,.hud-core,#hero .hero-title:hover,#report.show>*,.hud-radar::before,#hud-launch .dot{animation:none!important}
  #hud-canvas{display:none!important}
}

/* ---------- extra motion: homepage rise-in + card hover (no layout shifts, no transforms that fight the parallax) ---------- */
@keyframes hud-rise{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}
html:not(.hud-fx-off) #hero>*{animation:hud-rise .75s backwards}
#hero>*:nth-child(1){animation-delay:.05s}#hero>*:nth-child(2){animation-delay:.15s}#hero>*:nth-child(3){animation-delay:.25s}
#hero>*:nth-child(4){animation-delay:.35s}#hero>*:nth-child(5){animation-delay:.45s}#hero>*:nth-child(6){animation-delay:.55s}#hero>*:nth-child(n+7){animation-delay:.65s}
.hud-glow{transition:border-color .25s}
.hud-glow:hover{border-color:rgba(255,255,255,.28)}
@media (prefers-reduced-motion: reduce){html:not(.hud-fx-off) #hero>*{animation:none!important}.hud-glow{transition:none}}
