html, body.home {
  height: 100%;
  overflow: hidden;
}
body.home { background: #000; }
body.home.nav-leaving .cover-ui {
  animation: leaveFade 0.45s ease forwards;
  pointer-events: none;
}
body.home:not(.nav-leaving) .cover-ui {
  opacity: 1;
  filter: none;
  transform: none;
}
@keyframes leaveFade {
  to { opacity: 0; filter: blur(8px); transform: scale(1.035); }
}
.cover-ui a.hit-flash {
  animation: hitFlash 0.35s ease;
  box-shadow: 0 0 0 2px #fff, 0 0 28px rgba(210, 255, 40, 0.85);
}
@keyframes hitFlash {
  0% { filter: brightness(1); }
  40% { filter: brightness(2.2); }
  100% { filter: brightness(1.2); }
}

.cover {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  isolation: isolate;
}
#field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

/* 线上无特效：静态氛围底（本地 index.html 仍走 canvas） */
body.home-static .cover {
  background:
    radial-gradient(ellipse 90% 70% at 40% 30%, #0c1524 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 78% 42%, rgba(40, 70, 120, 0.22), transparent 60%),
    linear-gradient(180deg, #0a121c 0%, #070d16 45%, #03060c 100%);
}
body.home-static .veil {
  background:
    linear-gradient(180deg, rgba(3, 7, 13, 0.28) 0%, transparent 38%),
    radial-gradient(ellipse 80% 55% at 50% 100%, rgba(3, 7, 13, 0.55), transparent 70%);
}

.cover-ui {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0 0 1.5rem;
  pointer-events: none;
}
.cover-ui a,
.cover-ui button { pointer-events: auto; }

/* Same topbar chrome as inner pages; light fog so the bar shape matches */
.home .topbar {
  position: relative;
  z-index: 5;
  pointer-events: auto;
  background: rgba(7, 13, 20, 0.38);
  border-bottom-color: rgba(140, 190, 220, 0.12);
  backdrop-filter: blur(10px);
  color: #fff;
}
.home .topbar .brand { color: #fff; }
.home .topbar nav { color: rgba(143, 166, 187, 0.88); }
.home .topbar nav a:hover { color: rgba(255, 255, 255, 0.92); }
.home .topbar nav a.active {
  color: rgba(232, 241, 248, 0.78);
  font-weight: 500;
}
.home .topbar .menu-btn {
  border-color: rgba(140, 190, 220, 0.22);
  background: rgba(7, 13, 20, 0.4);
}
.home .topbar .menu-btn span { background: #e8f1f8; }

.cover-center {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  padding-top: clamp(1.2rem, 4vh, 2.4rem);
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
  animation: coverIn 1s ease both;
}
.cover-center .eyebrow {
  font-family: var(--font-display);
  letter-spacing: 0.28em;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 0.65rem;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.85);
}
.cover-center h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.9),
    0 8px 32px rgba(0, 0, 0, 0.75);
}
.cover-center .lead {
  margin: 0.75rem auto 0;
  max-width: 28rem;
  color: rgba(240, 248, 255, 0.95);
  font-size: 1.02rem;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.9);
}
.cover-cta {
  margin-top: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.cover-cta .btn-cta {
  min-width: 9.5rem;
  backdrop-filter: blur(6px);
  border-width: 1.5px;
  transition: box-shadow 0.2s ease, filter 0.2s ease;
}
.cover-cta .btn-cta-ai {
  background: rgba(40, 180, 230, 0.92);
  border-color: #7adfff;
  color: #041018;
}
.cover-cta .btn-cta-auto {
  background: rgba(40, 210, 140, 0.9);
  border-color: #7dffc0;
  color: #04140c;
}
.cover-cta .btn-cta-open {
  background: rgba(210, 70, 170, 0.88);
  border-color: #ff8ad8;
  color: #140410;
}
.cover-cta .btn-cta:hover {
  filter: brightness(1.08);
}
.cover-cta .btn.cta-catch {
  animation: ctaCatch 0.45s ease;
}
@keyframes ctaCatch {
  0% { filter: brightness(1); transform: scale(1); }
  35% { filter: brightness(1.4); transform: scale(1.04); box-shadow: 0 0 0 2px #fff, 0 0 28px rgba(255,255,255,0.35); }
  100% { filter: brightness(1); transform: scale(1); }
}
.cover-foot {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  color: rgba(143, 166, 187, 0.75);
  font-size: 0.82rem;
}
.cover-foot a:hover { color: var(--text); }

.veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* keep top readable; leave lower stage open for FX */
  background:
    linear-gradient(180deg, rgba(3, 7, 13, 0.35) 0%, rgba(3, 7, 13, 0.12) 22%, transparent 42%),
    radial-gradient(ellipse 70% 40% at 50% 18%, rgba(3, 7, 13, 0.2), transparent 70%);
}

@keyframes coverIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 860px) {
  body.home { overflow: auto; }
  .cover { min-height: 100vh; min-height: 100dvh; height: auto; }
  .home .topbar.open nav {
    background: rgba(5, 10, 16, 0.96);
  }
  .cover-center { padding: 3rem 1.25rem 2.5rem; }
  .cover-ui { pointer-events: auto; }
}
