/* ---------------------------------------------------------
   门户首页：整屏滚动的落地页
   只挂在 body[data-view="home"] 上，登录页 / 我的空间不受影响
   --------------------------------------------------------- */

html {
  scroll-behavior: smooth;
}

/* 接管翻页时关掉原生吸附与平滑，交给 JS 的缓动滚动 */
html.js-pager {
  scroll-snap-type: none;
  scroll-behavior: auto;
}

body[data-view="home"] {
  position: relative;
  display: block;
}

body[data-view="home"]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(880px 520px at 76% -10%, var(--accent-soft), transparent 62%),
    radial-gradient(720px 480px at 2% 104%, var(--accent-soft), transparent 60%);
}

body[data-view="home"] main {
  position: relative;
  z-index: 1;
  padding: 0;
}

/* ---------- 顶栏：滚过首屏才浮出底色 ---------- */

body[data-view="home"] .topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  background: transparent;
  border-bottom-color: transparent;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease);
}

body[data-view="home"] .topbar.is-scrolled {
  background: var(--surface);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: saturate(1.2) blur(14px);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  border-bottom-color: var(--line);
}

body[data-view="home"] .topbar-inner {
  max-width: 1120px;
  height: var(--topbar-h);
}

body[data-view="home"] .topnav {
  gap: 2px;
}

body[data-view="home"] .topnav a {
  font-size: 13.5px;
  padding: 7px 11px;
}

.land-cta {
  margin-left: 10px;
  padding: 8px 16px;
  font-size: 13.5px;
}

/* ---------- 分屏 ---------- */

.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 112px 0 72px;
}

.screen .shell {
  max-width: 1120px;
}

.screen-inner {
  width: 100%;
}

@media (min-width: 900px) and (min-height: 700px) {
  html:not(.js-pager) {
    scroll-snap-type: y mandatory;
  }

  .screen {
    min-height: 100svh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
}

/* ---------- 排版 ---------- */

.eyebrow {
  margin: 0 0 16px;
  font: 11px/1 var(--mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.screen h2 {
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.screen .lede {
  max-width: 56ch;
  font-size: clamp(14.5px, 1.15vw, 16.5px);
  color: var(--ink-soft);
}

.section-head {
  margin-bottom: clamp(28px, 4vh, 44px);
}

.note {
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- 首屏 ---------- */

.hero-screen {
  padding-top: 120px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-screen h1 {
  font-size: clamp(48px, 6.2vw, 84px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin: 0 0 18px;
}

.hero-screen .lede {
  font-size: clamp(15px, 1.25vw, 17px);
  max-width: 44ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.btn.lg {
  padding: 12px 22px;
  border-radius: 11px;
  font-size: 14.5px;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 26px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.facts span + span::before {
  content: "·";
  margin-right: 16px;
  color: var(--line-strong);
}

.facts b {
  color: var(--ink);
  font-weight: 600;
}

/* 产品样机：一块网盘窗口 */

.hero-visual {
  position: relative;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 10% -7% 16%;
  z-index: -1;
  border-radius: 50%;
  background: rgba(47, 106, 88, 0.16);
  filter: blur(48px);
}

@media (prefers-color-scheme: dark) {
  .hero-visual::before {
    background: rgba(127, 185, 164, 0.14);
  }
}

.drive-window {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 60px -32px rgba(20, 30, 24, 0.35);
  overflow: hidden;
}

.dw-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.dw-dots {
  display: inline-flex;
  gap: 5px;
}

.dw-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
}

.dw-title {
  margin-left: 4px;
  color: var(--ink-soft);
}

.dw-live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent-ink);
}

.dw-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.dw-body {
  padding: 6px 0;
}

.dw-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 18px;
  font-size: 13px;
}

.dw-row svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.dw-name {
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dw-meta {
  font-size: 11.5px;
  color: var(--muted);
}

.dw-row.is-ghost {
  opacity: 0.5;
}

.dw-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px 16px;
  border-top: 1px solid var(--line);
}

.dw-bar {
  flex: 1;
  height: 5px;
  border-radius: 99px;
  background: var(--hover);
  overflow: hidden;
}

.dw-bar span {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.dw-quota {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

.hero-caption {
  margin: 14px 2px 0;
  font-size: 12px;
  color: var(--muted);
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 11px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.75;
}

.scroll-hint i {
  font-style: normal;
  animation: hint-bob 2.4s var(--ease) infinite;
}

@keyframes hint-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ---------- 三步 ---------- */

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.step {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.step-no {
  display: block;
  font: 12px/1 var(--mono);
  letter-spacing: 0.1em;
  color: var(--accent-ink);
  margin-bottom: 14px;
}

.step h3 {
  font-size: 17px;
  margin: 0 0 8px;
}

.step p {
  font-size: 13.5px;
  color: var(--muted);
}

/* ---------- 连接 ---------- */

.endpoint-hero {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 26px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  max-width: 860px;
}

.endpoint-hero code {
  flex: 1;
  min-width: 0;
  background: none;
  padding: 0;
  font-size: 14px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 860px;
}

.client {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.client h3 {
  font-size: 14px;
  margin: 0 0 5px;
}

.client p {
  font-size: 12.5px;
  color: var(--muted);
}

.client code {
  font-size: 11.5px;
}

.screen#connect .note {
  margin-top: 18px;
}

/* ---------- 套餐 ---------- */

.screen#packages .pkg-cols {
  margin-top: 4px;
}

/* ---------- 额度 ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 900px;
}

.stat {
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.stat-value {
  display: block;
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.stat p {
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- 中间两屏：一句话主张 ---------- */

.statement {
  text-align: center;
}

.statement-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.statement h2 {
  font-size: clamp(34px, 4.6vw, 60px);
}

.statement .lede {
  max-width: 40ch;
  font-size: clamp(16px, 1.45vw, 20px);
  line-height: 1.75;
}

/* ---------- 收尾 ---------- */

.closing {
  text-align: center;
}

.closing-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.closing h2 {
  font-size: clamp(34px, 4.6vw, 60px);
}

.closing .lede {
  max-width: 40ch;
}

.closing .hero-actions {
  justify-content: center;
}

.landing-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin-top: clamp(48px, 9vh, 96px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  width: min(560px, 100%);
  font-size: 12px;
  color: var(--muted);
}

/* 友情链接：四站互链，按「个人网站 / 软件 / 服务」分三列、列内竖排；配色跟各站 token，深浅色自动适配 */
.friend-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 32px;
  width: 100%;
  margin-top: 12px;
  font-size: 12px;
  text-align: left;
}
.friend-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 72px;
}
.friend-group-title {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.friend-links a {
  color: var(--muted);
  text-decoration: none;
  line-height: 1.6;
}
.friend-links a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* ---------- 右侧进度点 ---------- */

.rail {
  position: fixed;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

@media (min-width: 1280px) {
  .rail {
    display: flex;
  }
}

.rail-dot {
  position: relative;
  width: 8px;
  height: 8px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: transparent;
  cursor: pointer;
  transition: height 0.3s var(--ease), background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.rail-dot:hover {
  border-color: var(--ink-soft);
}

.rail-dot.is-active {
  height: 24px;
  border-color: var(--accent);
  background: var(--accent);
}

.rail-dot span {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--ink-soft);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}

.rail-dot:hover span,
.rail-dot:focus-visible span {
  opacity: 1;
}

/* ---------- 进场 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.screen.is-active .reveal {
  opacity: 1;
  transform: none;
}

.screen.is-active .step:nth-child(2),
.screen.is-active .client:nth-child(2),
.screen.is-active .stat:nth-child(2) {
  transition-delay: 0.07s;
}

.screen.is-active .step:nth-child(3),
.screen.is-active .client:nth-child(3),
.screen.is-active .stat:nth-child(3) {
  transition-delay: 0.14s;
}

.screen.is-active .client:nth-child(4),
.screen.is-active .stat:nth-child(4) {
  transition-delay: 0.21s;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
    scroll-snap-type: none;
  }

  .reveal,
  .screen.is-active .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .scroll-hint i {
    animation: none;
  }
}

/* ---------- 窄屏：不锁整屏，正常往下滚 ---------- */

@media (max-width: 899px) {
  .screen {
    min-height: 0;
    padding: 88px 0 56px;
  }

  .hero-screen {
    padding-top: 96px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-screen h1 {
    font-size: clamp(40px, 11vw, 60px);
  }

  .step-grid,
  .stat-grid,
  .client-grid {
    grid-template-columns: 1fr;
  }

  .scroll-hint {
    display: none;
  }

  /* 顶栏只留「套餐 / 帮助」两个入口后，窄屏也放得下，不再整组隐藏 */
  body[data-view="home"] .topnav a {
    padding: 6px 8px;
  }
}

@media (max-width: 560px) {
  .endpoint-hero {
    padding: 12px 12px;
  }

  .endpoint-hero code {
    font-size: 12.5px;
  }

  .facts {
    gap: 4px 14px;
  }
}

/* 套餐页的说明文字离卡片留一口气 */
.screen#packages .note {
  margin-top: 16px;
}

@media (max-width: 560px) {
  .facts span + span::before {
    content: none;
  }
}
