/**
 * 入口两屏 · 科技感（Hero + Why）
 * 白天：cosmos 淡紫青粉 aurora + 深墨字
 * 夜晚：深蓝星空网格（不改动月历/核心锁定区）
 */

.entry-cosmos__fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.entry-cosmos__aurora,
.entry-cosmos__grid,
.entry-cosmos__scan {
  position: absolute;
  inset: 0;
}

/* ── Night tech base ── */
.entry-cosmos__aurora {
  background:
    radial-gradient(ellipse 55% 50% at 78% 18%, rgba(120, 90, 255, 0.28), transparent 58%),
    radial-gradient(ellipse 50% 45% at 14% 72%, rgba(40, 180, 220, 0.2), transparent 55%),
    radial-gradient(ellipse 40% 36% at 50% 40%, rgba(80, 140, 255, 0.12), transparent 60%),
    linear-gradient(165deg, #040a18 0%, #071428 45%, #0a1024 100%);
}

.entry-cosmos__grid {
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(120, 180, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 180, 255, 0.1) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000 20%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000 20%, transparent 85%);
}

.entry-cosmos__scan {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(120, 200, 255, 0.04) 48%,
    transparent 52%
  );
  background-size: 100% 220%;
  animation: entry-scan 9s linear infinite;
  opacity: 0.55;
}

@keyframes entry-scan {
  0% { background-position: 0 0%; }
  100% { background-position: 0 100%; }
}

@keyframes entry-pulse {
  0%, 100% { opacity: 0.55; box-shadow: 0 0 0 0 rgba(100, 200, 255, 0.35); }
  50% { opacity: 1; box-shadow: 0 0 0 6px rgba(100, 200, 255, 0); }
}

@keyframes entry-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Hero ── */
.hero--tech {
  position: relative;
  isolation: isolate;
}

.hero--tech .hero__content {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  gap: 0;
  animation: entry-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero--tech .hero__title {
  font-family: "SF Pro Display", "Segoe UI", "PingFang SC", "Helvetica Neue", sans-serif;
  font-size: clamp(2.85rem, 8vw, 4.75rem);
  font-weight: 650;
  letter-spacing: -0.045em;
  /* 须 >1：gradient clip + 紧行高会裁掉 g / y 字脚 */
  line-height: 1.12;
  padding: 0.08em 0.04em 0.18em;
  margin: 0 0 0.75rem;
  overflow: visible;
  background: linear-gradient(180deg, #f7fbff 0%, #c8ddff 55%, #9ec4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 28px rgba(100, 160, 255, 0.28));
}

.hero--tech .hero__tagline {
  margin: 0 0 1.5rem;
  max-width: 24rem;
  font-size: clamp(1.05rem, 2.1vw, 1.35rem);
  color: rgba(210, 225, 255, 0.78);
}

.hero__signals {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin: 0 0 2rem;
  padding: 0;
}

.hero__signals li {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: rgba(200, 220, 255, 0.82);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(140, 180, 255, 0.22);
}

.hero__cta,
.why__cta {
  min-width: 10.5rem;
  letter-spacing: 0.04em;
}

.hero--tech .hero__cta {
  box-shadow:
    0 0 0 1px rgba(140, 200, 255, 0.25),
    0 8px 28px rgba(40, 100, 220, 0.35);
}

/* ── Why ── */
.why--tech {
  isolation: isolate;
}

.why--tech .why__inner,
.why--tech .why__panel {
  position: relative;
  z-index: 1;
  max-width: min(34rem, 92vw);
  padding: clamp(1.5rem, 4vw, 2.4rem) clamp(1.25rem, 4vw, 2rem);
  border-radius: 1.25rem;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 50%, rgba(120, 160, 255, 0.06)),
    rgba(8, 18, 40, 0.55);
  border: 1px solid rgba(140, 180, 255, 0.22);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 20px 50px rgba(0, 10, 40, 0.45);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  animation: entry-rise 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.why--tech .why__eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-bottom: 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: rgba(160, 200, 255, 0.75);
  text-transform: none;
}

.why__eyebrow-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 0.35rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #9ee7ff;
  background: rgba(40, 100, 180, 0.35);
  border: 1px solid rgba(120, 200, 255, 0.35);
}

.why--tech .why__body p {
  font-size: clamp(1.15rem, 2.3vw, 1.55rem);
  line-height: 1.5;
  color: rgba(240, 246, 255, 0.94);
}

.why--tech .why__closing {
  margin-top: 1.35rem !important;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(140, 180, 255, 0.18);
  color: rgba(190, 210, 240, 0.78) !important;
  font-size: clamp(0.95rem, 1.7vw, 1.15rem) !important;
}

/* ══════════════════════════════════════
   Day · cosmos entry（白天专用）
   ══════════════════════════════════════ */
body.theme-day.entry-cosmos {
  background: transparent !important;
  background-image: none !important;
}

body.theme-day .entry-cosmos__aurora {
  background:
    radial-gradient(ellipse 60% 70% at 88% 22%, rgba(180, 120, 255, 0.48), transparent 58%),
    radial-gradient(ellipse 55% 60% at 10% 78%, rgba(60, 220, 230, 0.36), transparent 55%),
    radial-gradient(ellipse 50% 48% at 48% 8%, rgba(255, 140, 200, 0.34), transparent 52%),
    radial-gradient(ellipse 40% 40% at 70% 85%, rgba(120, 170, 255, 0.24), transparent 50%),
    linear-gradient(165deg, #eef3ff 0%, #e4ecfb 40%, #f6eaf6 100%) !important;
}

body.theme-day .entry-cosmos__grid {
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(80, 60, 160, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 60, 160, 0.1) 1px, transparent 1px);
}

body.theme-day .entry-cosmos__scan {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(100, 140, 255, 0.06) 48%,
    transparent 52%
  );
  opacity: 0.7;
}

body.theme-day .hero--tech .hero__title {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: #0f2740 !important;
  -webkit-text-fill-color: #0f2740 !important;
  filter: none;
}

body.theme-day .hero--tech .hero__tagline {
  color: #15324f !important;
  -webkit-text-fill-color: #15324f !important;
  opacity: 1 !important;
}

body.theme-day .hero__signals li {
  color: #15324f;
  background: rgba(255, 255, 255, 0.45);
  border-color: rgba(100, 120, 200, 0.22);
}

body.theme-day .hero--tech .hero__cta,
body.theme-day .why--tech .why__cta {
  background: linear-gradient(180deg, #1f4a6e 0%, #1a3c5e 48%, #15324f 100%) !important;
  color: #fff !important;
  border-color: rgba(15, 39, 64, 0.22) !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35) inset,
    0 8px 24px rgba(40, 70, 140, 0.22) !important;
}

body.theme-day .why--tech .why__panel {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.1) 48%, rgba(200, 180, 255, 0.12)),
    rgba(255, 255, 255, 0.14) !important;
  border-color: transparent !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 18px 44px rgba(70, 50, 140, 0.12) !important;
  color: #0f2740;
}

body.theme-day .why--tech .why__eyebrow,
body.theme-day .why--tech .why__eyebrow .ui-locale-zh-only,
body.theme-day .why--tech .why__eyebrow .ui-locale-en-only {
  color: #3b2460 !important;
}

body.theme-day .why__eyebrow-mark {
  color: #1f4a6e;
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(80, 100, 180, 0.25);
}

body.theme-day .why--tech .why__body p,
body.theme-day .why--tech #why-body-1,
body.theme-day .why--tech #why-body-2,
body.theme-day .why--tech #why-body-3 {
  color: #0f2740 !important;
  -webkit-text-fill-color: #0f2740 !important;
  opacity: 1 !important;
}

body.theme-day .why--tech .why__closing,
body.theme-day .why--tech #why-closing {
  color: #15324f !important;
  -webkit-text-fill-color: #15324f !important;
  border-top-color: rgba(80, 100, 180, 0.18);
}

/* 进入仪表盘后隐藏入口特效层（Why 已 hidden；Hero 离开） */
body.is-dashboard .hero--tech .entry-cosmos__fx {
  display: none;
}

/* 仪表盘顶栏白天：与 cosmos 墨字对齐 */
body.theme-day.is-dashboard .dashboard-top__title-zh,
body.theme-day.is-dashboard .dashboard-top__title-en {
  color: #0f2740 !important;
}

body.theme-day.is-dashboard .dashboard-top__status--zh,
body.theme-day.is-dashboard .dashboard-top__status--en {
  color: #15324f !important;
  opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
  .entry-cosmos__scan,
  .hero--tech .hero__content,
  .why--tech .why__panel {
    animation: none !important;
  }
}
