@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600;700&family=Quicksand:wght@300;400;500;600;700&display=swap');

:root {
  --ink: #1f1f1f;
  --paper: #ffffff;
  --mist: #f5f5f7;
  --shell: #191919;
  --line: rgba(255, 255, 255, 0.12);
  --rail: 236px;
  --font: "Quicksand", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --hand: "Caveat", "Quicksand", print, cursive;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--mist);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.01em;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

/* ---------- 左侧固定竖排导航 ---------- */

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 18px 22px;
  background: var(--shell);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 6px 14px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--paper);
}

.brand .mark { font-size: 22px; }
.brand-name { letter-spacing: 0.02em; }

.rail-title {
  margin: 0;
  padding-left: 4px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: #8d8d8d;
}

.menu-wrap { display: block; }

.menu-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--paper);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background 0.25s ease;
}

.menu-btn::-webkit-details-marker { display: none; }

.menu-btn::after {
  content: "＋";
  font-size: 16px;
  line-height: 1;
  color: #bdbdbd;
}

.menu-wrap[open] > .menu-btn { background: rgba(255, 255, 255, 0.16); }
.menu-wrap[open] > .menu-btn::after { content: "－"; }

.menu {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.pill-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #ededed;
  font-size: 16px;
  line-height: 1.4;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.pill-link:hover,
.pill-link:focus-visible {
  background: var(--paper);
  color: var(--ink);
  transform: translateX(2px);
}

.cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  transition: background 0.25s ease, transform 0.25s ease;
}

.cta:hover,
.cta:focus-visible {
  background: var(--mist);
  transform: translateY(-2px);
}

/* ---------- 主体骨架 ---------- */

.main { margin-left: var(--rail); }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 32px 8px;
}

.stage { min-width: 0; }

.sheet {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  align-items: start;
  counter-reset: card;
}

/* ---------- 首屏 ---------- */

.hero {
  grid-column: 1 / -1;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: 46vh;
  padding: 30px 28px;
  border-radius: 4px;
  background: #121212;
}

.hero-img {
  position: absolute;
  inset: -8% 0;
  width: 100%;
  height: 116%;
  object-fit: cover;
  opacity: 0.62;
  z-index: -2;
  will-change: transform;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(96deg, rgba(18, 18, 18, 0.93) 0%, rgba(18, 18, 18, 0.58) 56%, rgba(18, 18, 18, 0.22) 100%);
  z-index: -1;
}

.hero-ghost {
  position: absolute;
  right: 10px;
  top: 6px;
  font-family: var(--hand);
  font-size: clamp(44px, 8.6vw, 132px);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.13);
  white-space: nowrap;
  pointer-events: none;
  z-index: -1;
}

.hero-copy { max-width: min(620px, 94%); }

h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.6vw, 44px);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.lede {
  margin: 0;
  max-width: 48ch;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
  line-height: 1.72;
}

/* ---------- Bento 卡片（正文分节） ---------- */

div > article {
  position: relative;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 26px 24px 22px;
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
  counter-increment: card;
}

div > article::before {
  content: counter(card, decimal-leading-zero);
  position: absolute;
  right: 16px;
  top: 12px;
  font-family: var(--hand);
  font-size: 22px;
  line-height: 1;
  color: #dcdcdc;
}

div > article:nth-of-type(1) { grid-column: 1 / -1; }
div > article:nth-of-type(2) { grid-column: span 2; }
div > article:nth-of-type(3) { grid-column: span 4; }
div > article:nth-of-type(4) { grid-column: span 3; }
div > article:nth-of-type(5) { grid-column: span 3; }
div > article:nth-of-type(6) { grid-column: span 2; }
div > article:nth-of-type(7) { grid-column: span 4; }

div > article h2 {
  margin: 0 0 12px;
  padding-right: 34px;
  font-size: 21px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.01em;
}

div > article h2 > span,
div > article h3 > span {
  box-shadow: inset 0 -0.42em 0 #ededed;
}

div > article h3 {
  margin: 18px 0 8px;
  font-size: 18px;
  line-height: 1.45;
}

div > article p { margin: 0 0 12px; }
div > article p:last-child { margin-bottom: 0; }

div > article ul,
div > article ol {
  margin: 0 0 12px;
  padding-left: 1.3em;
}

div > article li { margin: 0 0 6px; }
div > article li:last-child { margin-bottom: 0; }

div > article a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: #c9c9c9;
  text-underline-offset: 3px;
}

div > article a:hover { text-decoration-color: var(--ink); }

div > article strong { font-weight: 700; }

div > article blockquote {
  margin: 0 0 12px;
  padding: 12px 16px;
  border-radius: 4px;
  background: var(--mist);
  color: #3a3a3a;
}

div > article blockquote p:last-child { margin-bottom: 0; }

div > article code {
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--mist);
  font-size: 0.94em;
}

/* ---------- 动效 ---------- */

.js .hero,
.js div > article {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.35, 1);
  transition-delay: calc(var(--i, 0) * 55ms);
}

.js .hero.in,
.js div > article.in {
  opacity: 1;
  transform: none;
}

.js div > article.in:hover {
  transform: translateY(-3px);
  transition-delay: 0ms;
}

/* ---------- 页脚 ---------- */

.foot {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 34px 44px;
  max-width: 1244px;
  margin: 0 0 0 var(--rail);
  padding: 54px 32px 24px;
  border-top: 1px solid var(--line);
}

.foot-brand h2 {
  margin: 0 0 14px;
  font-family: var(--hand);
  font-size: clamp(32px, 6.4vw, 76px);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.foot-lede {
  margin: 0;
  max-width: 46ch;
  color: #a8a8a8;
  font-size: 16px;
  line-height: 1.7;
}

.foot-links h2 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: #8d8d8d;
}

.foot-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.foot-links .pill-link {
  min-height: 40px;
  padding: 8px 12px;
  background: transparent;
  color: #d8d8d8;
  font-size: 16px;
}

.foot-links .pill-link:hover,
.foot-links .pill-link:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: var(--paper);
  transform: none;
}

.foot-base {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: #949494;
  font-size: 16px;
}

.foot-base .copy { margin: 0; }

.top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dedede;
  font-size: 16px;
  transition: background 0.25s ease, color 0.25s ease;
}

.top:hover,
.top:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

/* ---------- 平板 ---------- */

@media (max-width: 1080px) {
  .sheet { grid-template-columns: repeat(2, 1fr); }
  div > article:nth-of-type(n) { grid-column: span 1; }
  div > article:nth-of-type(1) { grid-column: 1 / -1; }
  div > article:nth-of-type(3n) { grid-column: 1 / -1; }
  .foot { grid-template-columns: 1fr; }
}

/* ---------- 手机 ---------- */

@media (max-width: 760px) {
  .rail {
    position: sticky;
    top: 0;
    inset: auto;
    width: auto;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(25, 25, 25, 0.95);
    backdrop-filter: blur(10px);
  }

  .brand {
    flex: 0 0 auto;
    padding: 0;
    font-size: 16px;
    min-height: 44px;
  }

  .rail-title { display: none; }

  .menu-wrap {
    position: relative;
    margin-left: auto;
  }

  .menu-btn { min-height: 44px; padding: 9px 14px; }

  .menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 240px;
    padding: 10px;
    border-radius: 8px;
    background: #1c1c1c;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  }

  .cta {
    margin-top: 0;
    min-height: 44px;
    padding: 9px 14px;
    font-size: 16px;
  }

  .main { margin-left: 0; }

  .wrap { padding: 16px 14px 6px; }

  .sheet { grid-template-columns: 1fr; gap: 12px; }

  div > article:nth-of-type(n) { grid-column: 1 / -1; }
  div > article { padding: 22px 18px 18px; }
  div > article h2 { font-size: 20px; }

  .hero {
    min-height: 44vh;
    padding: 22px 18px;
  }

  .lede { font-size: 16px; }

  .foot {
    margin-left: 0;
    padding: 38px 14px 18px;
    gap: 26px;
  }

  .foot-links ul { grid-template-columns: 1fr; }
}

/* ---------- 低动效 ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js .hero,
  .js div > article,
  .js .hero.in,
  .js div > article.in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .js div > article.in:hover { transform: none; }
  .pill-link:hover, .cta:hover, .top:hover { transform: none; }
}

button[aria-expanded]{min-width:44px;min-height:44px}
