/* ============================================================
   NEONFLUX — opening sequence (intro overlay)
   Injected by nf-intro.js. Never affects layout: fixed overlay.
   ============================================================ */
html.nfi-lock,html.nfi-lock body{overflow:hidden !important}

#nf-intro{
  --cy:#4DE8F4;
  --vi:#8B7BFF;
  --mg:#FF4D9D;
  position:fixed;
  inset:0;
  z-index:2147483000;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#030408;
  color:#EFF3F9;
  font-family:"Space Grotesk","PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  overflow:hidden;
  clip-path:inset(0 0 0 0);
  -webkit-clip-path:inset(0 0 0 0);
  transition:clip-path .84s cubic-bezier(.76,0,.24,1),-webkit-clip-path .84s cubic-bezier(.76,0,.24,1);
  will-change:clip-path;
  contain:layout paint style;
}
#nf-intro.nfi-go{
  clip-path:inset(0 0 100% 0);
  -webkit-clip-path:inset(0 0 100% 0);
}

/* --- ambient --- */
.nfi-amb{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.nfi-glow{
  position:absolute;left:50%;top:50%;width:1200px;height:1200px;margin:-600px 0 0 -600px;
  background:conic-gradient(from 200deg at 50% 50%,
    transparent 0deg,
    rgba(77,232,244,.16) 42deg,
    transparent 118deg,
    rgba(139,123,255,.18) 196deg,
    transparent 268deg,
    rgba(255,77,157,.10) 322deg,
    transparent 360deg);
  filter:blur(70px);
  opacity:.9;
  animation:nfi-spin 18s linear infinite;
}
@keyframes nfi-spin{to{transform:rotate(360deg)}}
.nfi-grid{
  position:absolute;inset:0;
  background-image:
    linear-gradient(rgba(77,232,244,.075) 1px,transparent 1px),
    linear-gradient(90deg,rgba(77,232,244,.075) 1px,transparent 1px);
  background-size:64px 64px;
  -webkit-mask-image:radial-gradient(circle at 50% 50%,#000 0%,rgba(0,0,0,.55) 46%,transparent 76%);
  mask-image:radial-gradient(circle at 50% 50%,#000 0%,rgba(0,0,0,.55) 46%,transparent 76%);
  opacity:.55;
}
.nfi-noise{
  position:absolute;inset:0;opacity:.045;mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
.nfi-vig{
  position:absolute;inset:0;
  background:radial-gradient(120% 90% at 50% 50%,transparent 40%,rgba(0,0,0,.72) 100%);
}

/* --- corner brackets --- */
.nfi-corner{position:absolute;width:26px;height:26px;border:0 solid rgba(77,232,244,.32);opacity:0}
.nfi-corner.tl{left:30px;top:30px;border-left-width:1px;border-top-width:1px}
.nfi-corner.tr{right:30px;top:30px;border-right-width:1px;border-top-width:1px}
.nfi-corner.bl{left:30px;bottom:30px;border-left-width:1px;border-bottom-width:1px}
.nfi-corner.br{right:30px;bottom:30px;border-right-width:1px;border-bottom-width:1px}
#nf-intro.nfi-stage-in .nfi-corner{opacity:1;transition:opacity .5s ease .15s}

.nfi-tag{
  position:absolute;
  font-family:"JetBrains Mono",ui-monospace,monospace;
  font-size:9.5px;letter-spacing:.26em;color:rgba(154,166,182,.6);
  text-transform:uppercase;opacity:0;
}
.nfi-tag.bl{left:32px;bottom:32px}
.nfi-tag.br{right:32px;bottom:32px}
#nf-intro.nfi-stage-in .nfi-tag{opacity:1;transition:opacity .6s ease .3s}

/* --- stage --- */
.nfi-stage{
  position:relative;z-index:2;
  display:flex;flex-direction:column;align-items:center;
  transform:translateZ(0);
  transition:opacity .42s cubic-bezier(.22,1,.36,1),transform .42s cubic-bezier(.22,1,.36,1);
}
#nf-intro.nfi-out .nfi-stage{opacity:0;transform:scale(1.035)}

.nfi-mark{width:64px;height:64px;margin:0 0 28px;display:block;overflow:visible}
.nfi-mark .nfi-ring{
  fill:none;stroke:rgba(77,232,244,.35);stroke-width:1;
  transform-origin:32px 32px;
  transform:scale(.4);opacity:0;
  transition:transform .9s cubic-bezier(.22,1,.36,1),opacity .7s ease;
}
#nf-intro.nfi-stage-in .nfi-mark .nfi-ring{transform:scale(1);opacity:1}
.nfi-mark .nfi-hex{
  fill:#070A11;stroke:url(#nfi-g);stroke-width:2;stroke-linejoin:round;
  stroke-dasharray:190;stroke-dashoffset:190;
  transition:stroke-dashoffset 1s cubic-bezier(.65,0,.35,1) .1s;
}
.nfi-mark .nfi-n{
  fill:none;stroke:url(#nfi-g);stroke-width:3.2;stroke-linecap:square;
  stroke-dasharray:80;stroke-dashoffset:80;
  transition:stroke-dashoffset .75s cubic-bezier(.65,0,.35,1) .55s;
}
#nf-intro.nfi-stage-in .nfi-mark .nfi-hex{stroke-dashoffset:0}
#nf-intro.nfi-stage-in .nfi-mark .nfi-n{stroke-dashoffset:0}
.nfi-mark .nfi-dot{
  fill:var(--cy);opacity:0;transform:scale(.2);transform-origin:32px 32px;
  transition:opacity .4s ease 1.1s,transform .5s cubic-bezier(.22,1,.36,1) 1.1s;
}
#nf-intro.nfi-stage-in .nfi-mark .nfi-dot{opacity:1;transform:scale(1)}

.nfi-word{
  font-size:30px;font-weight:500;line-height:1;
  letter-spacing:.34em;
  padding-left:.34em;
  color:#F4F8FF;
  opacity:0;
  filter:blur(8px);
  transition:opacity .9s cubic-bezier(.22,1,.36,1) .3s,letter-spacing 1.1s cubic-bezier(.22,1,.36,1) .3s,filter .9s cubic-bezier(.22,1,.36,1) .3s;
}
#nf-intro.nfi-stage-in .nfi-word{opacity:1;letter-spacing:.16em;padding-left:.16em;filter:blur(0)}

.nfi-sub{
  margin:13px 0 0;
  font-family:"JetBrains Mono",ui-monospace,monospace;
  font-size:9.5px;line-height:15px;letter-spacing:.32em;
  color:rgba(154,166,182,.72);text-transform:uppercase;
  opacity:0;transform:translateY(6px);
  transition:opacity .7s ease .55s,transform .7s cubic-bezier(.22,1,.36,1) .55s;
}
#nf-intro.nfi-stage-in .nfi-sub{opacity:1;transform:none}

.nfi-bar{
  position:relative;width:238px;height:1px;margin:32px 0 13px;
  background:rgba(255,255,255,.10);overflow:hidden;
  opacity:0;transition:opacity .5s ease .65s;
}
#nf-intro.nfi-stage-in .nfi-bar{opacity:1}
.nfi-bar i{
  position:absolute;left:0;top:0;height:100%;width:0%;
  background:linear-gradient(90deg,rgba(77,232,244,.2),#4DE8F4 72%,#C8FBFF);
  box-shadow:0 0 10px rgba(77,232,244,.9),0 0 22px rgba(77,232,244,.45);
  transition:width .28s linear;
}
.nfi-bar::after{
  content:"";position:absolute;right:0;top:-2px;width:26px;height:5px;
  background:linear-gradient(90deg,transparent,rgba(77,232,244,.55));
  filter:blur(2px);opacity:.9;
}

.nfi-meter{
  display:flex;align-items:center;justify-content:space-between;
  width:238px;
  font-family:"JetBrains Mono",ui-monospace,monospace;
  font-size:9px;letter-spacing:.22em;text-transform:uppercase;
  color:rgba(94,104,120,.95);
  opacity:0;transition:opacity .5s ease .7s;
}
#nf-intro.nfi-stage-in .nfi-meter{opacity:1}
.nfi-meter b{color:rgba(77,232,244,.9);font-weight:400;font-variant-numeric:tabular-nums}
.nfi-meter .nfi-st{color:rgba(154,166,182,.78);transition:color .3s ease}
#nf-intro.nfi-done .nfi-meter .nfi-st{color:#6BF1A0}

/* --- leading edge of the wipe --- */
.nfi-edge{
  position:absolute;left:0;right:0;bottom:-1px;height:1px;z-index:3;
  background:linear-gradient(90deg,transparent,rgba(77,232,244,.9) 22%,#D6FDFF 50%,rgba(77,232,244,.9) 78%,transparent);
  box-shadow:0 0 18px 2px rgba(77,232,244,.55),0 0 60px 10px rgba(77,232,244,.22);
  opacity:0;
}
#nf-intro.nfi-go .nfi-edge{opacity:1;transition:opacity .12s ease}

/* --- reduced motion / no-js fallback --- */
@media (prefers-reduced-motion:reduce){
  #nf-intro{display:none !important}
}
@media (max-width:560px){
  .nfi-word{font-size:20px}
  .nfi-bar,.nfi-meter{width:170px}
  .nfi-tag{font-size:8px;letter-spacing:.2em}
  .nfi-corner{width:18px;height:18px}
  .nfi-corner.tl,.nfi-corner.bl{left:18px}
  .nfi-corner.tr,.nfi-corner.br{right:18px}
  .nfi-corner.tl,.nfi-corner.tr{top:18px}
  .nfi-corner.bl,.nfi-corner.br{bottom:18px}
  .nfi-tag.bl{left:20px;bottom:46px}
  .nfi-tag.br{right:20px;bottom:46px}
}
