/* 首页国庆开场 · 仪式感（红幕 / 金印 / 竖排）—— 刻意不同于调研页冲击风 */

html.nday-intro-lock,
html.nday-intro-lock body,
html.nday-intro-pending,
html.nday-intro-pending body {
  overflow: hidden !important;
}

html.nday-intro-pending {
  background: #3a0a10 !important;
}

.ndi {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: #3a0a10;
  color: #fff8e7;
  isolation: isolate;
  font-family: "Noto Serif SC", "Songti SC", "Source Han Serif SC", serif;
}

.ndi.is-out {
  animation: ndiOut 0.85s ease forwards;
  pointer-events: none;
}

/* 暗纱底 */
.ndi-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 40%, rgba(120, 16, 28, 0.2), transparent 70%),
    linear-gradient(180deg, rgba(40, 6, 10, 0.45) 0%, rgba(20, 4, 6, 0.68) 100%);
  z-index: 0;
}

/* 五星红旗背景图 */
.ndi-flag {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.1s ease 0.15s, transform 2.4s ease 0.15s;
  background: #8b1018;
}

.ndi.is-on .ndi-flag {
  opacity: 1;
  transform: scale(1);
}

.ndi-flag-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  animation: ndiFlagDrift 12s ease-in-out infinite alternate;
}

/* 旗面之上轻罩一层，保证前景文字可读 */
.ndi-flag::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 48% 40%, rgba(40, 6, 10, 0.18), rgba(20, 3, 6, 0.5) 78%),
    linear-gradient(180deg, rgba(20, 3, 6, 0.1), rgba(12, 2, 4, 0.48));
  pointer-events: none;
}

/* 中心金辉光晕 */
.ndi-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(ellipse 42% 38% at 50% 42%, rgba(255, 196, 80, 0.28), transparent 70%),
    radial-gradient(ellipse 70% 50% at 50% 55%, rgba(180, 30, 40, 0.22), transparent 72%);
  transition: opacity 1.2s ease 0.5s;
  animation: ndiGlowPulse 3.6s ease-in-out 1s infinite;
}

.ndi.is-on .ndi-glow {
  opacity: 1;
}

/* 横向光带扫过 */
.ndi-beam {
  position: absolute;
  top: 38%;
  left: -40%;
  width: 55%;
  height: 18%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 220, 140, 0.08) 30%,
    rgba(255, 240, 190, 0.28) 50%,
    rgba(255, 220, 140, 0.08) 70%,
    transparent 100%
  );
  filter: blur(18px);
  transform: skewX(-18deg);
}

.ndi.is-on .ndi-beam {
  animation: ndiBeam 2.8s ease-in-out 0.9s 1 forwards;
}

/* 左右红幕 */
.ndi-curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 52%;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.18), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.18)),
    repeating-linear-gradient(
      90deg,
      #9f1239 0 14px,
      #b91c3c 14px 28px
    );
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.35);
  transition: transform 1.35s cubic-bezier(0.65, 0.05, 0.2, 1);
}

.ndi-curtain--l {
  left: 0;
  transform: translateX(0);
  border-right: 2px solid rgba(255, 213, 106, 0.35);
}

.ndi-curtain--r {
  right: 0;
  transform: translateX(0);
  border-left: 2px solid rgba(255, 213, 106, 0.35);
}

.ndi.is-on .ndi-curtain--l {
  transform: translateX(-102%);
}

.ndi.is-on .ndi-curtain--r {
  transform: translateX(102%);
}

/* 金光粒子 */
.ndi-sparks {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.9s ease 0.55s;
}

.ndi.is-on .ndi-sparks {
  opacity: 1;
}

.ndi-spark {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffe08a;
  box-shadow:
    0 0 6px 2px rgba(255, 213, 106, 0.75),
    0 0 14px 4px rgba(255, 180, 60, 0.35);
  opacity: 0;
  animation: ndiSpark var(--d, 2.8s) ease-in-out var(--delay, 0s) infinite;
}

.ndi-spark:nth-child(3n) {
  width: 2px;
  height: 2px;
  background: #fff6d0;
}

.ndi-spark:nth-child(5n) {
  width: 4px;
  height: 4px;
}

/* 花瓣缓落 */
.ndi-petals {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.8s ease 0.6s;
}

.ndi.is-on .ndi-petals {
  opacity: 1;
}

.ndi-petal {
  position: absolute;
  top: -10%;
  left: var(--x, 10%);
  width: var(--s, 12px);
  height: var(--s, 12px);
  border-radius: 70% 0 70% 0;
  background: rgba(225, 29, 46, 0.7);
  box-shadow:
    0 0 0 1px rgba(255, 213, 106, 0.35),
    0 0 10px rgba(255, 80, 80, 0.35);
  animation: ndiPetal var(--d, 7s) linear var(--delay, 0s) infinite;
  opacity: 0;
}

.ndi.is-on .ndi-petal {
  opacity: 0.85;
}

.ndi-petal:nth-child(odd) {
  background: rgba(255, 213, 106, 0.55);
  border-radius: 60% 10% 60% 10%;
}

.ndi-petal:nth-child(4n) {
  background: rgba(255, 240, 200, 0.45);
  box-shadow: 0 0 12px rgba(255, 220, 140, 0.5);
}

/* 主舞台 */
.ndi-stage {
  position: relative;
  z-index: 4;
  width: min(94vw, 820px);
  text-align: center;
  padding: 1.5rem 1rem 2rem;
}

.ndi-eyebrow {
  margin: 0 0 1rem;
  font-size: clamp(15px, 2.2vw, 18px);
  letter-spacing: 0.42em;
  color: rgba(255, 213, 106, 0.92);
  text-shadow: 0 0 18px rgba(255, 200, 80, 0.35);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease 0.35s, transform 0.7s ease 0.35s;
}

.ndi.is-on .ndi-eyebrow {
  opacity: 1;
  transform: none;
}

/* 五星逐个亮 */
.ndi-stars {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
  color: #ffd56a;
  font-size: clamp(20px, 3vw, 28px);
  text-shadow:
    0 0 10px rgba(255, 213, 106, 0.85),
    0 0 28px rgba(255, 180, 50, 0.55);
}

.ndi-stars span {
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.2, 0.9, 0.2, 1);
  animation: ndiStarTwinkle 2.4s ease-in-out infinite;
}

.ndi.is-on .ndi-stars span:nth-child(1) { transition-delay: 0.45s; opacity: 1; transform: scale(1); animation-delay: 0s; }
.ndi.is-on .ndi-stars span:nth-child(2) { transition-delay: 0.55s; opacity: 1; transform: scale(1); animation-delay: 0.2s; }
.ndi.is-on .ndi-stars span:nth-child(3) { transition-delay: 0.65s; opacity: 1; transform: scale(1.22); animation-delay: 0.4s; }
.ndi.is-on .ndi-stars span:nth-child(4) { transition-delay: 0.75s; opacity: 1; transform: scale(1); animation-delay: 0.6s; }
.ndi.is-on .ndi-stars span:nth-child(5) { transition-delay: 0.85s; opacity: 1; transform: scale(1); animation-delay: 0.8s; }

/* 金印落印 */
.ndi-seal {
  position: absolute;
  top: 42%;
  left: 50%;
  width: 108px;
  height: 108px;
  margin: -54px 0 0 -54px;
  border: 3px solid rgba(255, 213, 106, 0.95);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff6a74, #9f1239 72%);
  box-shadow:
    0 0 0 8px rgba(159, 18, 57, 0.4),
    0 0 40px rgba(255, 180, 60, 0.45),
    0 14px 44px rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(1.6) rotate(-18deg);
  transition: opacity 0.35s ease, transform 0.55s cubic-bezier(0.2, 0.85, 0.25, 1);
  z-index: 5;
  pointer-events: none;
}

.ndi-seal em {
  font-style: normal;
  font-size: 44px;
  font-weight: 700;
  color: #fff6d6;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.ndi.is-seal .ndi-seal {
  opacity: 1;
  transform: scale(1) rotate(-8deg);
}

.ndi.is-copy .ndi-seal {
  opacity: 0.22;
  transform: scale(0.9) rotate(-8deg) translate(140px, -48px);
}

/* 竖排主文案 */
.ndi-vcopy {
  display: flex;
  justify-content: center;
  gap: 0.18em;
  writing-mode: vertical-rl;
  text-orientation: upright;
  margin: 0.35rem auto 1.5rem;
  min-height: min(48vh, 440px);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: 0.38em;
  color: #fffaf0;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.45),
    0 0 28px rgba(255, 220, 140, 0.35),
    0 8px 32px rgba(0, 0, 0, 0.4);
}

.ndi-vcopy span {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.4s ease, transform 0.45s ease;
}

.ndi.is-copy .ndi-vcopy span {
  opacity: 1;
  transform: none;
}

.ndi.is-copy .ndi-vcopy span:nth-child(1) { transition-delay: 0.05s; }
.ndi.is-copy .ndi-vcopy span:nth-child(2) { transition-delay: 0.1s; }
.ndi.is-copy .ndi-vcopy span:nth-child(3) { transition-delay: 0.15s; }
.ndi.is-copy .ndi-vcopy span:nth-child(4) { transition-delay: 0.2s; }
.ndi.is-copy .ndi-vcopy span:nth-child(5) { transition-delay: 0.25s; }
.ndi.is-copy .ndi-vcopy span:nth-child(6) { transition-delay: 0.3s; }
.ndi.is-copy .ndi-vcopy span:nth-child(7) { transition-delay: 0.35s; }
.ndi.is-copy .ndi-vcopy span:nth-child(8) { transition-delay: 0.4s; }
.ndi.is-copy .ndi-vcopy span:nth-child(9) { transition-delay: 0.45s; }
.ndi.is-copy .ndi-vcopy span:nth-child(10) { transition-delay: 0.5s; }
.ndi.is-copy .ndi-vcopy span:nth-child(11) { transition-delay: 0.55s; }

.ndi-year,
.ndi-wish,
.ndi-tag {
  margin: 0;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.ndi-year {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.55em;
  font-family: "Cinzel", "Playfair Display", "Times New Roman", serif;
  font-size: clamp(1.2rem, 3.4vw, 1.85rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  color: #ffe9b0;
  margin-bottom: 0.75rem;
  text-shadow:
    0 0 18px rgba(255, 213, 106, 0.45),
    0 2px 8px rgba(0, 0, 0, 0.4);
}

.ndi-num {
  display: inline-block;
  background: linear-gradient(180deg, #fff8e4 0%, #ffe08a 42%, #d4a017 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: lining-nums;
  letter-spacing: 0.18em;
  filter: drop-shadow(0 0 10px rgba(255, 210, 90, 0.45));
}

.ndi-year-arrow {
  font-style: normal;
  font-size: 0.72em;
  letter-spacing: 0;
  color: rgba(255, 213, 106, 0.88);
  -webkit-text-fill-color: rgba(255, 213, 106, 0.88);
  opacity: 0.9;
}

.ndi-wish {
  position: relative;
  display: inline-block;
  font-size: clamp(1.45rem, 4.2vw, 2.15rem);
  font-weight: 700;
  letter-spacing: 0.24em;
  color: #ffe28a;
  margin-bottom: 0.7rem;
  text-shadow:
    0 0 18px rgba(255, 213, 106, 0.55),
    0 0 40px rgba(255, 170, 50, 0.35),
    0 3px 10px rgba(0, 0, 0, 0.35);
  background: linear-gradient(90deg, #ffd56a 0%, #fff6d0 45%, #ffc94a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ndi-wish::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -0.35em;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 213, 106, 0.75), transparent);
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.ndi.is-wish .ndi-wish::after {
  opacity: 1;
  transform: scaleX(1);
}

.ndi-tag {
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: clamp(14px, 2vw, 16px);
  letter-spacing: 0.3em;
  color: rgba(255, 248, 231, 0.82);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.ndi.is-wish .ndi-year,
.ndi.is-wish .ndi-wish,
.ndi.is-wish .ndi-tag {
  opacity: 1;
  transform: none;
}

.ndi.is-wish .ndi-wish {
  transition-delay: 0.12s;
}

.ndi.is-wish .ndi-tag {
  transition-delay: 0.24s;
}

.ndi-skip {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 6;
  min-height: 36px;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(255, 213, 106, 0.35);
  background: rgba(0, 0, 0, 0.25);
  color: rgba(255, 248, 231, 0.88);
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.12em;
  font-family: "Noto Sans SC", sans-serif;
}

.ndi-skip:hover {
  border-color: #ffd56a;
  color: #fff;
}

@keyframes ndiPetal {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 0;
  }
  10% { opacity: 0.9; }
  100% {
    transform: translate3d(28px, 115vh, 0) rotate(260deg);
    opacity: 0;
  }
}

@keyframes ndiSpark {
  0%, 100% {
    opacity: 0;
    transform: scale(0.4);
  }
  40% {
    opacity: 1;
    transform: scale(1.2);
  }
  70% {
    opacity: 0.55;
    transform: scale(0.85);
  }
}

@keyframes ndiBeam {
  0% {
    opacity: 0;
    left: -45%;
  }
  25% { opacity: 0.9; }
  70% { opacity: 0.55; }
  100% {
    opacity: 0;
    left: 95%;
  }
}

@keyframes ndiGlowPulse {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes ndiStarTwinkle {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.35); }
}

@keyframes ndiFlagDrift {
  from { transform: scale(1.02) translate3d(-1.2%, 0, 0); }
  to { transform: scale(1.08) translate3d(1.2%, -1%, 0); }
}

@keyframes ndiOut {
  0% { opacity: 1; }
  100% {
    opacity: 0;
    filter: brightness(1.15);
  }
}

@media (max-width: 640px) {
  .ndi-vcopy {
    min-height: 40vh;
    font-size: 1.45rem;
    letter-spacing: 0.26em;
  }

  .ndi-seal {
    width: 84px;
    height: 84px;
    margin: -42px 0 0 -42px;
  }

  .ndi-seal em {
    font-size: 34px;
  }

  .ndi.is-copy .ndi-seal {
    transform: scale(0.85) rotate(-8deg) translate(78px, -34px);
  }

  .ndi-wish {
    letter-spacing: 0.12em;
    font-size: 1.35rem;
  }

  .ndi-year {
    letter-spacing: 0.08em;
    font-size: 1.15rem;
    gap: 0.4em;
  }

  .ndi-tag,
  .ndi-eyebrow {
    letter-spacing: 0.16em;
  }

  .ndi-stars {
    font-size: 20px;
    gap: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ndi {
    display: none !important;
  }

  .ndi-flag-img,
  .ndi-glow,
  .ndi-beam,
  .ndi-spark,
  .ndi-petal,
  .ndi-stars span {
    animation: none !important;
  }

  html.nday-intro-lock {
    overflow: auto !important;
  }
}
