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

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

:root {
  --paper: #ffffff;
  --mist: #f5f5f5;
  --ink: #1f1f1f;
  --ink-soft: #4a4a4a;
  --line: rgba(31, 31, 31, 0.12);
  --hair: rgba(31, 31, 31, 0.07);
  --e1: 0 1px 2px rgba(31, 31, 31, 0.05), 0 3px 8px rgba(31, 31, 31, 0.05);
  --e2: 0 3px 8px rgba(31, 31, 31, 0.06), 0 12px 26px rgba(31, 31, 31, 0.07);
  --e3: 0 10px 22px rgba(31, 31, 31, 0.08), 0 26px 52px rgba(31, 31, 31, 0.11);
  --e4: 0 20px 44px rgba(31, 31, 31, 0.12), 0 52px 96px rgba(31, 31, 31, 0.15);
  --r: 28px;
  --pad: clamp(18px, 4vw, 48px);
  --dock: 152px;
}

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

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.78;
  color: var(--ink);
  letter-spacing: 0.01em;
  background:
    radial-gradient(120% 60% at 88% -6%, #ffffff 0%, rgba(255, 255, 255, 0) 56%),
    radial-gradient(90% 46% at 4% 30%, #ffffff 0%, rgba(255, 255, 255, 0) 62%),
    var(--mist);
  overflow-x: hidden;
}

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

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 8px;
}

::selection { background: var(--ink); color: #fff; }

/* —— 顶部堆叠层 —— */
.topstack {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--e1);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px var(--pad);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-txt { white-space: nowrap; }

.brand-mark {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--ink);
  box-shadow: var(--e2);
  flex: 0 0 auto;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 3px;
  background: #fff;
  transform: rotate(14deg);
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: var(--e2);
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--e2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cta:hover { transform: translateY(-2px); box-shadow: var(--e3); }

.navdock { border-top: 1px solid var(--hair); }

.navwrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

.navlist {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.navlist::-webkit-scrollbar { display: none; }
.navlist li { flex: 0 0 auto; }

.navlist a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 1rem;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.navlist a:hover {
  color: var(--ink);
  background: #fff;
  box-shadow: var(--e1);
}

.bar-i {
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--ink);
  transform: rotate(45deg);
  opacity: 0.45;
}

.navlist a:hover .bar-i { opacity: 1; }

/* —— 首屏 —— */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(18px, 4vw, 52px);
  max-width: 1240px;
  min-height: 45vh;
  margin: 0 auto;
  padding: clamp(22px, 4vh, 42px) var(--pad) clamp(36px, 6vh, 68px);
  text-align: right;
  scroll-margin-top: var(--dock);
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(30%, 120px);
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(31, 31, 31, 0.09), rgba(31, 31, 31, 0.01));
  clip-path: polygon(0 100%, 0 26%, 100% 0, 100% 100%);
}

.hero h1 {
  position: relative;
  z-index: 2;
  max-width: 21ch;
  margin: 0 0 0 auto;
  font-size: clamp(1.9rem, 5.2vw, 3.6rem);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.art {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: clamp(122px, 18vw, 198px);
  height: clamp(122px, 18vw, 198px);
  margin: 0;
}

.art-layer {
  position: absolute;
  border-radius: 24px;
  box-shadow: var(--e3);
}

.art-layer.a1 {
  inset: 0 20% 24% 0;
  background: #fff;
  border: 1px solid var(--line);
  transform: translateY(calc(var(--py, 0) * -0.05px)) rotate(-7deg);
}

.art-layer.a2 {
  inset: 15% 0 10% 24%;
  background: var(--ink);
  box-shadow: var(--e4);
  transform: translateY(calc(var(--py, 0) * 0.045px)) rotate(6deg);
}

.art-layer.a3 {
  inset: 36% 28% 0 12%;
  background: var(--mist);
  border: 1px solid var(--line);
  transform: translateY(calc(var(--py, 0) * -0.02px)) rotate(3deg);
}

.art-plate {
  position: absolute;
  inset: 24% 22% 28% 18%;
  z-index: 3;
  display: grid;
  place-items: center;
  transform: translateY(calc(var(--py, 0) * 0.075px));
}

.art-plate img { border-radius: 20px; box-shadow: var(--e4); }

/* —— 主区域 —— */
.stage {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 3vw, 44px);
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--pad) clamp(40px, 7vw, 84px);
}

.rail {
  position: sticky;
  top: calc(var(--dock) + 8px);
  align-self: start;
  z-index: 3;
}

.rail-title {
  margin: 0 0 10px;
  padding-left: 14px;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  counter-reset: rail;
}

.rail-list li { counter-increment: rail; }

.rail-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 1rem;
  color: var(--ink-soft);
  transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.rail-list a::before {
  content: counter(rail, decimal-leading-zero);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(31, 31, 31, 0.34);
}

.rail-list a:hover {
  color: var(--ink);
  background: #fff;
  box-shadow: var(--e2);
  transform: translateX(3px);
}

.content-slot {
  position: relative;
  z-index: 2;
  min-width: 0;
  max-width: 820px;
}

.slot-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.subtitle {
  max-width: 58ch;
  margin: 0 0 clamp(20px, 3vw, 34px);
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.page-h1 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

/* —— 正文层叠卡片 —— */
.content-slot > article {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: var(--r);
  padding: clamp(20px, 3.4vw, 42px);
  box-shadow: var(--e2);
  margin: 0;
  scroll-margin-top: var(--dock);
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.content-slot > article + article { margin-top: -12px; }
.content-slot > article:last-child { margin-bottom: 6px; }

.content-slot > article:nth-of-type(1) { z-index: 9; }
.content-slot > article:nth-of-type(2) { z-index: 8; }
.content-slot > article:nth-of-type(3) { z-index: 7; }
.content-slot > article:nth-of-type(4) { z-index: 6; }
.content-slot > article:nth-of-type(5) { z-index: 5; }
.content-slot > article:nth-of-type(6) { z-index: 4; }
.content-slot > article:nth-of-type(7) { z-index: 3; }
.content-slot > article:nth-of-type(8) { z-index: 2; }
.content-slot > article:nth-of-type(n + 9) { z-index: 1; }

.content-slot > article:nth-of-type(odd) { margin-right: clamp(0px, 1.6vw, 18px); }
.content-slot > article:nth-of-type(even) { margin-left: clamp(0px, 1.6vw, 18px); }

.content-slot > article:hover { box-shadow: var(--e4); }

.content-slot article h2 {
  margin: 0 0 0.55em;
  font-size: clamp(1.28rem, 2.4vw, 1.62rem);
  line-height: 1.32;
  letter-spacing: -0.022em;
}

.content-slot article h3 {
  margin: 1.5em 0 0.5em;
  font-size: 1.14rem;
  line-height: 1.4;
}

.content-slot article p { margin: 0 0 1em; }
.content-slot article p:last-child { margin-bottom: 0; }

.content-slot article ul,
.content-slot article ol { margin: 0 0 1em; padding-left: 1.25em; }

.content-slot article li { margin: 0.34em 0; }

.content-slot article figure {
  position: relative;
  margin: 1.3em 0;
}

.content-slot article figure img { border-radius: 20px; box-shadow: var(--e2); }

.content-slot article img { border-radius: 20px; box-shadow: var(--e2); }

.content-slot article blockquote {
  margin: 1.3em 0;
  padding: 14px 20px;
  background: var(--mist);
  border-left: 3px solid var(--ink);
  border-radius: 0 18px 18px 0;
}

.content-slot article a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(31, 31, 31, 0.4);
}

.content-slot article a:hover { text-decoration-color: var(--ink); }

.content-slot article code,
.content-slot article pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.95rem;
}

.content-slot article pre {
  overflow-x: auto;
  padding: 16px;
  border-radius: 18px;
  background: var(--mist);
}

.content-slot article strong { font-weight: 600; }

/* —— 页脚 —— */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 26px var(--pad);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.foot p { margin: 0; font-size: 1rem; }
.foot small { font-size: 1rem; color: var(--ink-soft); }

.totop {
  position: fixed;
  right: clamp(12px, 3vw, 28px);
  bottom: clamp(12px, 3vw, 28px);
  z-index: 70;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
  box-shadow: var(--e3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.totop:hover { transform: translateY(-3px); box-shadow: var(--e4); }

/* —— 入场 —— */
html.js .hero,
html.js .stage,
html.js .content-slot > article {
  opacity: 0;
  transform: translateY(20px);
}

html.js .hero.in,
html.js .stage.in,
html.js .content-slot > article.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

html.js .content-slot > article.in:hover { transform: translateY(-5px); }

/* —— 断点 —— */
@media (max-width: 900px) {
  .stage { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .content-slot { max-width: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar { padding-top: 8px; padding-bottom: 8px; }
  .cta { padding: 0 16px; }
  .hero {
    flex-direction: column-reverse;
    align-items: flex-end;
    min-height: 0;
    padding-top: 22px;
    padding-bottom: 30px;
  }
  .hero h1 { max-width: none; font-size: clamp(1.72rem, 8vw, 2.4rem); }
  .art { width: 112px; height: 112px; }
  .content-slot > article:nth-of-type(odd) { margin-right: 0; }
  .content-slot > article:nth-of-type(even) { margin-left: 0; }
  .content-slot > article + article { margin-top: -8px; }
  .totop { min-height: 44px; padding: 0 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .hero,
  html.js .stage,
  html.js .content-slot > article { opacity: 1; transform: none; }
  html.js .content-slot > article.in:hover { transform: none; }
  .art-layer.a1,
  .art-layer.a2,
  .art-layer.a3,
  .art-plate { transform: none; }
  * { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}

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