/* =====================================================================
   login-intro.css — 登录页开场动画 + AI 神经网络背景
   仅被 templates/login.html 引用，纯 CSS 实现，无任何外部依赖
   ===================================================================== */

/* ===== AI 神经网络背景画布（贯穿开场动画与登录页） ===== */
#loginBgCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- 开场遮罩（透明，透出神经网络背景） ---------- */
.login-intro {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 退出态：整体淡出 + 轻微放大，制造“揭开”登录卡片的感觉 */
.login-intro.intro-done {
  opacity: 0;
  transform: scale(1.06);
  pointer-events: none;
}

/* 上下渐隐（保持品牌文字对比，中心透出神经网络） */
.login-intro::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 6, 15, 0.9) 0%, transparent 22%, transparent 78%, rgba(7, 6, 15, 0.9) 100%);
  pointer-events: none;
}

/* ---------- 中央品牌区 ---------- */
.intro-stage {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
}

.intro-logo {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: introLogoIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards;
}
.intro-logo img {
  width: 46px;
  height: 46px;
  position: relative;
  z-index: 2;
}
@keyframes introLogoIn {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

/* ---------- 财务共享网络：多系统小图标汇聚到中心 logo ---------- */
.net-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 250px;
  height: 250px;
  margin-left: -125px;
  margin-top: -125px;
  pointer-events: none;
}
.intro-share-network {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  animation: netIn 0.8s ease 1.0s forwards;
}
@keyframes netIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.net-links line {
  stroke: rgba(99, 102, 241, 0.28);
  stroke-width: 1;
  stroke-dasharray: 3 5;
  animation: netLinkFlow 1.6s linear infinite;
}
.net-links line:nth-child(2)  { animation-delay: -0.12s; }
.net-links line:nth-child(3)  { animation-delay: -0.24s; }
.net-links line:nth-child(4)  { animation-delay: -0.36s; }
.net-links line:nth-child(5)  { animation-delay: -0.48s; }
.net-links line:nth-child(6)  { animation-delay: -0.60s; }
.net-links line:nth-child(7)  { animation-delay: -0.72s; }
.net-links line:nth-child(8)  { animation-delay: -0.84s; }
.net-links line:nth-child(9)  { animation-delay: -0.96s; }
.net-links line:nth-child(10) { animation-delay: -1.08s; }
.net-links line:nth-child(11) { animation-delay: -1.20s; }
.net-links line:nth-child(12) { animation-delay: -1.32s; }
.net-links line:nth-child(13) { animation-delay: -1.44s; }
@keyframes netLinkFlow {
  to { stroke-dashoffset: -8; }
}
.net-flow {
  fill: #eaf9ff;
  filter: drop-shadow(0 0 4px #00e0ff);
}

/* 小图标芯片：从四周飞入中心 logo 并被吸收 */
.net-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  font-size: 21px;
  line-height: 1;
  color: var(--c, #00e0ff);
  background: rgba(15, 18, 40, 0.78);
  border: 1px solid rgba(99, 102, 241, 0.4);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.45);
  --from: 360px;
  z-index: 1;
  transform: rotate(var(--a)) translateX(var(--from)) rotate(calc(-1 * var(--a))) scale(0.5);
  opacity: 0;
  animation: chipFlyIn 1.1s cubic-bezier(0.5, 0, 0.15, 1) var(--d) forwards;
  pointer-events: none;
}
@keyframes chipFlyIn {
  0%   { transform: rotate(var(--a)) translateX(var(--from)) rotate(calc(-1 * var(--a))) scale(0.5); opacity: 0; }
  18%  { opacity: 1; }
  72%  { transform: rotate(var(--a)) translateX(14px) rotate(calc(-1 * var(--a))) scale(0.92); opacity: 1; }
  100% { transform: rotate(var(--a)) translateX(0) rotate(calc(-1 * var(--a))) scale(0.1); opacity: 0; }
}
.net-chip b {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 5px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #9aa0c8;
  white-space: nowrap;
  font-family: 'Consolas', 'Courier New', monospace;
  line-height: 1;
}

/* 品牌名 — FSSC 逐字描边浮现 */
.intro-brand {
  margin: 72px 0 0;
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  font-family: 'Segoe UI', 'Microsoft YaHei', 'Consolas', monospace;
  line-height: 1.1;
  user-select: none;
  white-space: nowrap;
}
.intro-letter {
  display: inline-block;
  opacity: 0;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(0, 224, 255, 0.95);
  text-shadow: none;
  animation: introLetter 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.35s + var(--i) * 0.13s);
}
.intro-brand-sub {
  display: inline-block;
  margin-left: 0.35em;
  font-weight: 700;
  font-size: 0.5em;
  letter-spacing: 0.06em;
  color: #a5b4fc;
  opacity: 0;
  transform: translateY(6px);
  animation: introSubIn 0.8s ease 1.15s forwards;
  text-shadow: 0 0 18px rgba(99, 102, 241, 0.45);
}
@keyframes introLetter {
  0%   { opacity: 0; transform: translateY(10px) scale(0.85); color: transparent; -webkit-text-stroke-color: rgba(0, 224, 255, 0.95); text-shadow: none; }
  35%  { opacity: 1; transform: translateY(0) scale(1); color: rgba(255, 255, 255, 0.1); }
  100% { opacity: 1; transform: translateY(0) scale(1); color: #f1f5fb; -webkit-text-stroke-color: rgba(0, 224, 255, 0.25); text-shadow: 0 0 16px rgba(0, 224, 255, 0.5), 0 0 36px rgba(99, 102, 241, 0.45); }
}
@keyframes introSubIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 副标题 */
.intro-subtitle {
  margin: 22px 0 0;
  color: #c7cbe6;
  font-size: 1rem;
  letter-spacing: 0.35em;
  opacity: 0;
  animation: introSubIn 0.8s ease 1.3s forwards;
}

/* 财务共享服务中心徽章 */
.intro-ai-badge {
  display: inline-block;
  margin-top: 14px;
  padding: 5px 18px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: none;
  color: #00e0ff;
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  border: 1px solid rgba(0, 224, 255, 0.4);
  border-radius: 99px;
  background: rgba(0, 224, 255, 0.06);
  box-shadow: 0 0 18px rgba(0, 224, 255, 0.18), inset 0 0 12px rgba(0, 224, 255, 0.08);
  text-shadow: 0 0 10px rgba(0, 224, 255, 0.7);
  opacity: 0;
  animation: introSubIn 0.8s ease 1.5s forwards, introAiBadgePulse 2.4s ease-in-out 1.9s infinite;
}
@keyframes introAiBadgePulse {
  0%, 100% { box-shadow: 0 0 18px rgba(0, 224, 255, 0.18), inset 0 0 12px rgba(0, 224, 255, 0.08); }
  50% { box-shadow: 0 0 28px rgba(0, 224, 255, 0.4), inset 0 0 18px rgba(0, 224, 255, 0.16); }
}

/* ---------- 底部进度区 ---------- */
.intro-footer {
  position: absolute;
  bottom: 56px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: min(360px, 72vw);
  z-index: 2;
  opacity: 0;
  animation: introSubIn 0.7s ease 0.9s forwards;
}
.intro-progress {
  height: 3px;
  background: rgba(99, 102, 241, 0.15);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}
.intro-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, #6366f1, #00e0ff);
  background-size: 200% 100%;
  animation: introBarFlow 1.6s linear infinite;
  position: relative;
}
@keyframes introBarFlow {
  to { background-position: -200% 0; }
}
.intro-status {
  margin-top: 14px;
  text-align: center;
  color: #8f94c0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  font-family: 'Consolas', 'Courier New', monospace;
}
.intro-status::before {
  content: '●';
  color: #00e0ff;
  margin-right: 8px;
  font-size: 0.6rem;
  vertical-align: 2px;
  animation: introBlink 1s ease-in-out infinite;
}
@keyframes introBlink {
  50% { opacity: 0.25; }
}

/* ---------- 跳过按钮 ---------- */
.intro-skip {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 3;
  padding: 7px 16px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: #9aa0c8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  cursor: pointer;
  opacity: 0;
  animation: introSubIn 0.7s ease 1.1s forwards;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.intro-skip:hover {
  color: #e6e9ff;
  border-color: rgba(0, 224, 255, 0.5);
  background: rgba(0, 224, 255, 0.08);
}

/* ---------- 登录卡片入场 ---------- */
.login-card-await {
  transform: translateY(28px) scale(0.96);
}
.login-card {
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s, box-shadow 0.3s;
}

/* ---------- 说明 ---------- */
/* 开屏动画不设置 prefers-reduced-motion 降级：各元素初态为 opacity:0，
   依赖 forwards 动画进入可见；且业务要求所有环境展示一致的完整开屏效果。
   若未来需要无障碍降级，必须同步给出元素终态（opacity:1 等），避免遮罩空转。
   注：Bootstrap 自带的 prefers-reduced-motion 规则仅作用于其自身组件（.btn/.modal 等），
   不影响开屏动画，无需反制。 */

