.page-home {
  --home-shift-1: 24px;
  --home-shift-2: 40px;
  --home-shift-3: 56px;
  position: relative;
  background-color: var(--ink);
  color: var(--paper);
  padding-bottom: calc(var(--dock-h) + 56px);
  overflow-x: clip;
}

.page-home a {
  text-decoration: none;
}

.page-home a:focus-visible,
.page-home [data-toc-link]:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.page-home .h-section {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.page-home .eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--cyan);
  text-transform: uppercase;
}

/* ---------- 首屏 ---------- */
.page-home .home-start {
  position: relative;
  padding: calc(var(--header-h) + 44px) 0 48px;
  background:
    radial-gradient(120% 80% at 10% 0%, rgba(53, 242, 216, 0.10), transparent 58%),
    radial-gradient(90% 70% at 98% 20%, rgba(255, 138, 61, 0.10), transparent 62%),
    var(--ink);
}

.page-home .home-start__inner {
  display: grid;
  gap: 40px;
}

.page-home .home-start__lead {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.page-home .home-origin {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 16px 6px 8px;
  border: 1px solid var(--track);
  border-radius: var(--radius-chip);
  background: rgba(14, 29, 53, 0.78);
  color: var(--grey);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  transition: color 200ms var(--ease), border-color 200ms var(--ease);
}

.page-home .home-origin__node {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 5px rgba(255, 138, 61, 0.16);
}

.page-home .home-origin:hover {
  color: var(--mist);
  border-color: var(--cyan);
}

.page-home .home-start__title {
  margin: 24px 0 0;
  font-family: var(--font-head);
  font-size: clamp(42px, 12vw, 106px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 300;
  color: var(--paper);
  word-break: break-word;
}

.page-home .home-start__title .key {
  font-weight: 800;
  color: var(--cyan);
}

.page-home .home-start__lede {
  margin: 22px 0 0;
  max-width: 46ch;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  color: var(--grey);
}

.page-home .home-start__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.page-home .figure {
  margin: 0;
}

.page-home .figure__media {
  overflow: hidden;
  border: 1px solid var(--track);
}

.page-home .figure__media img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

.page-home .figure__caption {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--index);
}

.page-home .home-start__figure .figure__media {
  aspect-ratio: 4 / 5;
  border-radius: 6px 44px 8px 36px;
}

.page-home .home-start__figure .figure__media img {
  height: 100%;
  object-fit: cover;
}

/* ---------- 路径索引 ---------- */
.page-home .home-route {
  position: relative;
  padding: 56px 0 48px;
  background: linear-gradient(180deg, var(--ink) 0%, var(--night) 100%);
}

.page-home .home-route__intro,
.page-home .home-library__intro {
  margin: 12px 0 0;
  max-width: 58ch;
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--grey);
}

.page-home .home-route__list {
  position: relative;
  margin: 36px 0 0;
  padding: 0 0 0 26px;
  list-style: none;
}

.page-home .home-route__list::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(180deg, var(--cyan) 0%, rgba(53, 242, 216, 0.06) 100%);
}

.page-home .home-route__item {
  position: relative;
  padding: 16px 0;
  border-bottom: 1px solid rgba(23, 48, 79, 0.72);
}

.page-home .home-route__item:last-child {
  border-bottom: 0;
}

.page-home .home-route__item .rail-node {
  position: absolute;
  left: -26px;
  top: 28px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid var(--cyan);
  background: var(--night);
  transition: background 200ms var(--ease), border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}

.page-home .home-route__item:hover .rail-node,
.page-home .home-route__item:focus-within .rail-node {
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 0 6px rgba(255, 138, 61, 0.16);
}

.page-home .home-route__link {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 6px;
  min-height: 44px;
  color: inherit;
}

.page-home .home-route__link .index-num {
  grid-column: 1;
  grid-row: 1 / span 2;
  padding-top: 3px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  color: var(--index);
}

.page-home .home-route__name {
  grid-column: 2;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--paper);
  transition: color 200ms var(--ease);
}

.page-home .home-route__desc {
  grid-column: 2;
  margin: 0;
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--grey);
}

.page-home .home-route__link:hover .home-route__name,
.page-home .home-route__link[aria-current="true"] .home-route__name {
  color: var(--cyan);
}

.page-home .home-route__link[aria-current="true"] .index-num {
  color: var(--amber);
}

/* ---------- 底部栏 ---------- */
.page-home .home-dock {
  padding: 56px 0;
  background: var(--night);
}

.page-home .home-dock__inner {
  display: grid;
  gap: 34px;
  align-items: center;
}

.page-home .home-dock__text h2 {
  margin: 12px 0 0;
  font-size: clamp(26px, 5vw, 38px);
  line-height: 1.25;
}

.page-home .home-dock__text p {
  margin: 16px 0 0;
  max-width: 58ch;
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--grey);
}

.page-home .home-dock__entries {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.page-home .home-dock__entry {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  font-size: 14px;
}

.page-home .home-dock__figure .figure__media {
  aspect-ratio: 1 / 1;
  border-radius: 36px 6px 30px 8px;
}

.page-home .home-dock__figure .figure__media img {
  height: 100%;
  object-fit: cover;
}

/* ---------- 换设备 ---------- */
.page-home .home-switch {
  padding: 56px 0;
  background: var(--ink);
}

.page-home .home-switch__inner {
  display: grid;
  gap: 34px;
  align-items: center;
}

.page-home .home-switch__text h2 {
  margin: 12px 0 0;
  font-size: clamp(26px, 5vw, 38px);
  line-height: 1.25;
}

.page-home .home-switch__text p {
  margin: 16px 0 0;
  max-width: 58ch;
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--grey);
}

.page-home .home-switch__text .btn {
  margin-top: 24px;
}

.page-home .home-switch__figure .figure__media {
  aspect-ratio: 3 / 2;
  border-radius: 8px 40px 6px 34px;
}

.page-home .home-switch__figure .figure__media img {
  height: 100%;
  object-fit: cover;
}

/* ---------- 资料库 ---------- */
.page-home .home-library {
  position: relative;
  padding: 56px 0;
  background: var(--night);
  overflow: hidden;
}

.page-home .home-library__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.18;
  pointer-events: none;
}

.page-home .home-library__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-home .home-library .container {
  position: relative;
  z-index: 1;
}

.page-home .home-library .section-head__title {
  margin: 12px 0 0;
  font-size: clamp(26px, 5vw, 38px);
  line-height: 1.25;
}

.page-home .home-cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 32px 0 0;
  padding: 1px;
  list-style: none;
  background: var(--track);
  border-radius: var(--radius-soft);
  overflow: hidden;
}

.page-home .home-cat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 94px;
  padding: 16px 14px 16px 20px;
  background: var(--night);
}

.page-home .home-cat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--cyan);
}

.page-home .home-cat:nth-child(3n + 2)::before {
  background: var(--amber);
}

.page-home .home-cat:nth-child(3n)::before {
  background: var(--index);
}

.page-home .home-cat .index-num {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--index);
}

.page-home .home-cat__name {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--paper);
}

.page-home .home-cat__hint {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.6;
  color: var(--grey);
}

.page-home .home-library__more {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 0;
}

/* ---------- 联系 ---------- */
.page-home .home-contact {
  padding: 56px 0 32px;
  background: var(--ink);
}

.page-home .home-contact .section-head__title {
  margin: 12px 0 0;
  font-size: clamp(26px, 5vw, 38px);
  line-height: 1.25;
}

.page-home .home-contact__grid {
  display: grid;
  gap: 16px;
  margin-top: 30px;
}

.page-home .home-contact__card {
  padding: 22px 20px;
  background: var(--night);
  border: 1px solid var(--track);
  border-radius: var(--radius-soft);
}

.page-home .home-contact__card h3 {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--cyan);
}

.page-home .home-contact__value {
  margin: 0 0 10px;
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--paper);
  overflow-wrap: anywhere;
}

.page-home .home-contact__note {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.78;
  color: var(--grey);
}

.page-home .home-contact__more {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 0;
}

/* ---------- 平板及以上 ---------- */
@media (min-width: 720px) {
  .page-home .home-start {
    padding: calc(var(--header-h) + 64px) 0 64px;
  }

  .page-home .home-route,
  .page-home .home-dock,
  .page-home .home-switch,
  .page-home .home-library,
  .page-home .home-contact {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .page-home .home-route__item:nth-child(2) .home-route__link {
    padding-left: var(--home-shift-1);
  }

  .page-home .home-route__item:nth-child(3) .home-route__link {
    padding-left: var(--home-shift-2);
  }

  .page-home .home-route__item:nth-child(4) .home-route__link {
    padding-left: var(--home-shift-3);
  }

  .page-home .home-route__item:nth-child(5) .home-route__link {
    padding-left: var(--home-shift-2);
  }

  .page-home .home-cats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-home .home-contact__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- 桌面 ---------- */
@media (min-width: 960px) {
  .page-home .home-start__inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 64px;
    align-items: center;
  }

  .page-home .home-start__lead {
    margin-left: 8%;
  }

  .page-home .home-dock__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.88fr);
    gap: 56px;
  }

  .page-home .home-switch__inner {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 56px;
  }

  .page-home .home-cats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .page-home .home-route__name {
    font-size: 19px;
  }
}

@media (min-width: 1200px) {
  .page-home .home-start__title {
    font-size: clamp(72px, 8.6vw, 112px);
  }

  .page-home .home-route__list {
    padding-left: 34px;
  }

  .page-home .home-route__item .rail-node {
    left: -34px;
  }

  .page-home .home-route__list::before {
    left: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
