/* Home — 上松下紧 Hero + 幻影全屏特点 + 极简下滑光感 */

.home-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  /* 底部预留下滑箭头安全区，避免贴边被裁切 */
  padding: calc(var(--site-top-h) + clamp(36px, 7vh, 72px)) 0 clamp(88px, 12vh, 120px);
  /* 勿 clip：导语变长时否则裁掉下方四指标卡 */
  overflow: visible;
  border-bottom: 1px solid var(--line-subtle);
}

/* Hero 首屏不依赖 IO，避免首帧空白 */
.home-hero .reveal {
  opacity: 1;
  transform: none;
}

.home-hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
  padding: 0 var(--page-pad) 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* —— 上松 —— */
.home-hero__loose {
  max-width: 720px;
  padding-bottom: clamp(36px, 7vh, 72px);
}

.home-hero h1 {
  margin: 22px 0 18px;
  max-width: 12ch;
  font-size: clamp(42px, 6.5vw, 64px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--text);
}

.home-hero__lead {
  margin: 0 0 28px;
  max-width: 40ch;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-body);
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* —— 下紧：四卡高级指标 —— */
.home-hero__tight {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: var(--content-max);
  padding: 0;
}

.home-hero__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.home-stat {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 108px;
  padding: 18px 16px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.04), transparent 55%),
    rgba(18, 18, 18, 0.88);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-end;
  transition:
    transform var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.home-stat__glow {
  position: absolute;
  inset: -40% -20% auto auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(16, 163, 127, 0.12);
  filter: blur(28px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
  animation: stat-glow 5.5s var(--ease) infinite alternate;
  animation-delay: calc(var(--i, 0) * 0.35s);
}

.home-stat--accent {
  border-color: rgba(16, 163, 127, 0.42);
  background:
    linear-gradient(160deg, rgba(16, 163, 127, 0.18), transparent 62%),
    rgba(16, 18, 18, 0.92);
  box-shadow:
    0 0 0 1px rgba(16, 163, 127, 0.08),
    0 12px 32px rgba(0, 0, 0, 0.28);
}

.home-stat--accent .home-stat__glow {
  width: 160px;
  height: 160px;
  background: rgba(16, 163, 127, 0.28);
  opacity: 0.85;
}

.home-stat::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.06) 50%,
    transparent 60%
  );
  background-size: 220% 100%;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition: opacity var(--dur) var(--ease);
}

.home-stat:hover {
  transform: translateY(-3px);
  border-color: rgba(16, 163, 127, 0.35);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.home-stat:hover::after {
  opacity: 1;
  animation: stat-shimmer 1.4s var(--ease) 1;
}

.home-stat__val,
.home-stat__lbl {
  position: relative;
  z-index: 2;
}

.home-stat__val {
  display: block;
  font-family: var(--font-sans);
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.home-stat__val--num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(26px, 2.6vw, 32px);
  letter-spacing: -0.03em;
}

.home-stat--accent .home-stat__val {
  color: var(--accent-hover);
}

.home-stat__lbl {
  display: block;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-muted);
}

.home-stat--in {
  opacity: 0;
  transform: translateY(14px);
  animation: stat-rise 0.7s var(--ease) forwards;
  animation-delay: calc(0.35s + var(--i, 0) * 0.1s);
}

@keyframes stat-rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes stat-glow {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: 0.4; }
  to { transform: translate3d(-12%, 18%, 0) scale(1.15); opacity: 0.85; }
}

@keyframes stat-shimmer {
  from { background-position: 120% 0; }
  to { background-position: -40% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .home-stat--in,
  .home-stat__glow,
  .home-stat:hover::after {
    animation: none !important;
  }

  .home-stat--in {
    opacity: 1;
    transform: none;
  }

  .home-stat:hover {
    transform: none;
  }
}

/* —— 极简下滑光感（上移进安全区，呼吸更明显） —— */
.scroll-cue-wrap {
  position: absolute;
  left: 0;
  right: 0;
  /* 离开视口底边，避免被屏/任务栏裁切 */
  bottom: clamp(40px, 7vh, 72px);
  display: flex;
  justify-content: center;
  padding: 0;
  z-index: 3;
  pointer-events: none;
}

.scroll-cue {
  position: relative;
  width: 44px;
  height: 64px;
  display: grid;
  place-items: center;
  opacity: 1;
  pointer-events: auto;
  transition: opacity var(--dur) var(--ease);
  filter: drop-shadow(0 0 10px rgba(16, 163, 127, 0.35));
}

.scroll-cue:hover {
  opacity: 1;
  filter: drop-shadow(0 0 14px rgba(16, 163, 127, 0.55));
}

.scroll-cue.is-faded {
  opacity: 0;
  pointer-events: none;
}

.scroll-cue__beam {
  position: absolute;
  top: 2px;
  left: 50%;
  width: 2px;
  height: 40px;
  margin-left: -1px;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(16, 163, 127, 0.55) 30%,
    rgba(236, 236, 236, 0.95) 70%,
    transparent 100%
  );
  animation: scroll-beam 1.8s var(--ease) infinite;
}

.scroll-cue__chev {
  position: absolute;
  bottom: 6px;
  width: 14px;
  height: 14px;
  border-right: 2px solid rgba(236, 236, 236, 0.95);
  border-bottom: 2px solid rgba(236, 236, 236, 0.95);
  transform: rotate(45deg);
  animation: scroll-chev 1.8s var(--ease) infinite;
}

@keyframes scroll-beam {
  0% { opacity: 0.15; transform: translateY(-10px) scaleY(0.55); }
  40% { opacity: 1; transform: translateY(0) scaleY(1); }
  100% { opacity: 0.1; transform: translateY(14px) scaleY(1.1); }
}

@keyframes scroll-chev {
  0%, 15% { opacity: 0.35; transform: translateY(-8px) rotate(45deg); }
  50% { opacity: 1; transform: translateY(2px) rotate(45deg); }
  100% { opacity: 0.25; transform: translateY(10px) rotate(45deg); }
}

/* —— 幻影全屏层 —— */
.phantom-screen {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.phantom {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  max-width: 100%;
}

.phantom__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.45;
  will-change: transform, opacity;
}

.phantom__orb--a {
  width: min(52vw, 520px);
  height: min(52vw, 520px);
  top: -12%;
  right: -8%;
  background: rgba(16, 163, 127, 0.22);
  animation: phantom-drift-a 18s var(--ease) infinite alternate;
}

.phantom__orb--b {
  width: min(44vw, 440px);
  height: min(44vw, 440px);
  bottom: -18%;
  left: -10%;
  background: rgba(99, 102, 241, 0.12);
  animation: phantom-drift-b 22s var(--ease) infinite alternate;
}

.phantom__orb--c {
  width: min(36vw, 360px);
  height: min(36vw, 360px);
  top: 40%;
  left: 42%;
  background: rgba(236, 236, 236, 0.04);
  animation: phantom-drift-c 16s var(--ease) infinite alternate;
}

.phantom__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, transparent 30%, rgba(10, 10, 10, 0.55) 100%),
    linear-gradient(180deg, rgba(10, 10, 10, 0.15), rgba(10, 10, 10, 0.55));
}

.phantom__word {
  position: absolute;
  right: 4%;
  bottom: 8%;
  max-width: 90%;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: clamp(64px, 14vw, 180px);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 0.85;
  color: rgba(255, 255, 255, 0.035);
  user-select: none;
  white-space: nowrap;
  animation: phantom-breathe 10s var(--ease) infinite alternate;
}

.phantom__word--sm {
  font-size: clamp(48px, 12vw, 140px);
  right: auto;
  left: 6%;
  bottom: auto;
  top: 12%;
}

.phantom--soft .phantom__orb {
  opacity: 0.28;
}

@keyframes phantom-drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-6%, 8%, 0) scale(1.08); }
}

@keyframes phantom-drift-b {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(8%, -6%, 0) scale(1.1); }
}

@keyframes phantom-drift-c {
  from { transform: translate3d(0, 0, 0); opacity: 0.25; }
  to { transform: translate3d(-4%, -4%, 0); opacity: 0.5; }
}

@keyframes phantom-breathe {
  from { opacity: 0.55; transform: translateY(0); }
  to { opacity: 1; transform: translateY(-2%); }
}

/* —— Token 专屏 —— */
.spotlight {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: clamp(72px, 12vh, 120px) var(--page-pad);
  border-bottom: 1px solid var(--line-subtle);
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(16, 163, 127, 0.12), transparent 60%),
    var(--bg);
}

.spotlight__inner {
  position: relative;
  z-index: 1;
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
}

.spotlight__title {
  margin: 0 0 16px;
  max-width: 16ch;
  font-size: clamp(32px, 4.2vw, 44px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.spotlight__lead {
  margin: 0 0 36px;
  max-width: 52ch;
  font-size: 17px;
  color: var(--text-body);
}

.spotlight__metrics {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.metric-card {
  padding: 20px 18px;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  display: grid;
  gap: 4px;
  align-content: start;
}

.metric-card--hero {
  border-color: rgba(16, 163, 127, 0.4);
  background:
    linear-gradient(165deg, rgba(16, 163, 127, 0.14), transparent 55%),
    var(--bg-elevated);
}

/* 中文标题与正文统一 sans；仅数字类指标用 mono */
.metric-card__val {
  font-family: var(--font-sans);
  font-size: clamp(26px, 2.8vw, 32px);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.metric-card__val--num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.metric-card--hero .metric-card__val {
  font-size: clamp(40px, 5vw, 56px);
  color: var(--accent-hover);
}

.metric-card__lbl {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-body);
}

.metric-card__hint {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.route-bar {
  display: grid;
  grid-template-columns: 1.2fr 1.8fr;
  gap: 6px;
  height: 36px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  border: 1px solid var(--line-subtle);
}

.route-bar__seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.route-bar__seg--flagship {
  background: rgba(16, 163, 127, 0.28);
  color: var(--accent-hover);
}

.route-bar__seg--lite {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

/* —— 双特一屏 —— */
.feature-pair {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: clamp(64px, 10vh, 100px) var(--page-pad);
  border-bottom: 1px solid var(--line-subtle);
}

.feature-pair--alt {
  background: var(--bg-soft);
}

.feature-pair__inner {
  position: relative;
  z-index: 1;
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
}

.feature-pair__head {
  margin-bottom: clamp(28px, 4vh, 40px);
  max-width: 36ch;
}

.feature-pair__head h2 {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text);
}

.feature__eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.feature-pair__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2.5vw, 24px);
}

.pair-card {
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(165deg, rgba(16, 163, 127, 0.06), transparent 45%),
    var(--bg-elevated);
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.pair-card__num {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.pair-card h3 {
  margin: 0 0 12px;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.pair-card > p {
  margin: 0 0 18px;
  font-size: 15px;
  color: var(--text-body);
  flex: 1;
}

.pair-card__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.pair-card__list li {
  position: relative;
  padding: 8px 12px 8px 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-subtle);
  background: rgba(255, 255, 255, 0.02);
  font-size: 13px;
  color: var(--text-body);
}

.pair-card__list li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--accent);
}

/* —— 安全带 —— */
.security-band {
  padding: clamp(64px, 10vh, 96px) var(--page-pad);
  border-bottom: 1px solid var(--line-subtle);
  background: var(--bg);
}

.security-band__inner {
  position: relative;
  z-index: 1;
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}

.security-band__copy h2 {
  margin: 0 0 14px;
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.security-band__copy p:last-child {
  margin: 0;
  max-width: 42ch;
  font-size: 16px;
}

.security-band__nodes {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.security-band__nodes li {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

/* —— CTA —— */
.cta-band {
  padding: clamp(72px, 12vh, 120px) var(--page-pad);
  text-align: center;
  border-bottom: 1px solid var(--line-subtle);
}

.cta-band h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.4vw, 36px);
  font-weight: 600;
  color: var(--text);
}

.cta-band p {
  margin: 0 auto 28px;
  max-width: 42ch;
}

.cta-band__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* —— Login overlay panels (home-owned) —— */
.login-aside {
  padding: 40px 32px;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(16, 163, 127, 0.16), transparent 55%),
    var(--bg);
  border-right: 1px solid var(--line-subtle);
}

.login-aside h2 {
  margin: 12px 0 10px;
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.login-aside p {
  margin: 0;
  font-size: 14px;
  color: var(--text-body);
}

.login-form {
  padding: 28px 32px 32px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.login-form__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-subtle);
}

.auth-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  min-height: 36px;
}

.auth-tab.is-active {
  background: rgba(255, 255, 255, 0.9);
  color: #0a0a0a;
}

.auth-pane {
  display: none;
  grid-template-columns: 1fr;
  gap: 14px;
}

.auth-pane.is-active {
  display: grid;
}

.auth-pane[hidden] {
  display: none !important;
}

.field .req {
  color: var(--accent);
}

.field__hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.login-form__error {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  font-size: 13px;
}

.auth-thanks {
  display: none;
  grid-column: 1 / -1;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(16, 163, 127, 0.35);
  background: var(--accent-soft);
  gap: 8px;
}

.auth-thanks.is-show {
  display: grid;
  animation: auth-thanks-in var(--dur-slow) var(--ease) both;
}

@keyframes auth-thanks-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.auth-thanks__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-hover);
}

.auth-thanks__sub {
  margin: 0;
  font-size: 13px;
  color: var(--text-body);
}

input[data-invite-code] {
  letter-spacing: 0.28em;
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
}

.login-form__close {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  font-size: 20px;
}

.login-form__hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .spotlight__metrics {
    grid-template-columns: 1fr 1fr;
  }

  .metric-card--hero {
    grid-column: 1 / -1;
  }

  .feature-pair__grid,
  .security-band__inner {
    grid-template-columns: 1fr;
  }

  .feature-pair {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .home-hero__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .spotlight__metrics {
    grid-template-columns: 1fr;
  }

  .route-bar {
    grid-template-columns: 1fr;
    height: auto;
  }

  .route-bar__seg {
    padding: 10px;
  }

  .login-aside {
    border-right: 0;
    border-bottom: 1px solid var(--line-subtle);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue__beam,
  .scroll-cue__chev,
  .phantom__orb,
  .phantom__word {
    animation: none !important;
  }

  .scroll-cue__beam,
  .scroll-cue__chev {
    opacity: 0.55;
    transform: none;
  }

  .scroll-cue__chev {
    transform: rotate(45deg);
  }
}
