@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@700&display=swap');

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

:root {
  --ink: #1f1f1f;
  --paper: #ffffff;
  --mist: #f5f5f5;
  --line: #e3e3e3;
  --r: 4px;
  --e1: 0 1px 2px rgba(31, 31, 31, .07);
  --e2: 0 6px 18px rgba(31, 31, 31, .10);
  --e3: 0 14px 36px rgba(31, 31, 31, .18);
  --e4: 0 30px 70px rgba(31, 31, 31, .30);
  --f: 'Space Grotesk', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--f);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--mist);
  padding-bottom: 84px;
}

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

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

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: 88px 22px 130px;
  background: var(--ink);
  color: var(--paper);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 22% 30%, rgba(255, 255, 255, .10), transparent 55%),
    radial-gradient(circle at 78% 74%, rgba(255, 255, 255, .08), transparent 55%);
  pointer-events: none;
}

.layer {
  position: absolute;
  width: min(36vw, 400px);
  aspect-ratio: 3 / 4;
  border: 6px solid var(--paper);
  border-radius: var(--r);
  background: #383838;
  box-shadow: var(--e4);
  overflow: hidden;
  filter: grayscale(1) contrast(1.04);
  transition: z-index .4s linear;
}

.layer .shot {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.layer-a {
  top: 6%;
  left: -5%;
  z-index: 1;
  transform: rotate(-6deg);
}

.layer-b {
  bottom: 5%;
  right: -5%;
  z-index: 2;
  transform: rotate(5deg);
}

.hero.is-flip .layer-a { z-index: 2; }
.hero.is-flip .layer-b { z-index: 1; }

.hero-inner {
  position: relative;
  z-index: 3;
  max-width: 660px;
  text-align: center;
}

.badge {
  display: inline-block;
  padding: 6px 15px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ink);
  background: var(--paper);
  border-radius: 999px;
  box-shadow: var(--e2);
}

.hero h1 {
  margin: 20px 0 14px;
  font-size: clamp(34px, 7.2vw, 70px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -.03em;
  text-shadow: 0 8px 34px rgba(0, 0, 0, .38);
  overflow-wrap: anywhere;
}

.hero-sub {
  margin: 0 auto 26px;
  max-width: 30em;
  font-size: 17px;
  color: #d9d9d9;
}

.drop {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 28px;
  font-weight: 700;
  text-decoration: none;
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--r);
  box-shadow: var(--e3);
}

.drop:hover { transform: translateY(-2px); box-shadow: var(--e4); }
.drop { transition: transform .2s ease, box-shadow .2s ease; }

/* ---------- 主体三层：侧栏 / 内容 ---------- */

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 60px 22px 40px;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.rail {
  position: sticky;
  top: 24px;
  z-index: 2;
}

.rail small {
  display: block;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: .22em;
  color: #8b8b8b;
}

.rail h2 {
  margin: 4px 0 18px;
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -.01em;
}

.rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.rail a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 13px;
  font-size: 16px;
  text-decoration: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--e1);
  transition: transform .18s ease, box-shadow .18s ease;
}

.rail a:hover {
  transform: translateX(3px);
  box-shadow: var(--e2);
}

.board { position: relative; z-index: 1; }

.prose {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--e3);
  padding: 34px 34px 40px;
  overflow-wrap: break-word;
}

.prose section { scroll-margin-top: 28px; }

.prose section + section {
  margin-top: 46px;
  padding-top: 44px;
  border-top: 1px solid var(--line);
}

.prose small {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: .16em;
  color: #8b8b8b;
}

.prose h2 {
  margin: 0 0 16px;
  font-size: clamp(23px, 3.4vw, 31px);
  line-height: 1.28;
  letter-spacing: -.015em;
}

.prose h3 {
  margin: 30px 0 10px;
  font-size: 20px;
  line-height: 1.4;
}

.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 1.25em; }
.prose li { margin: 0 0 7px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

.prose img {
  margin: 22px 0;
  border-radius: var(--r);
  box-shadow: var(--e2);
}

.prose blockquote {
  margin: 26px 0;
  padding: 16px 20px;
  background: var(--mist);
  border-left: 3px solid var(--ink);
  border-radius: 0 var(--r) var(--r) 0;
}

.prose blockquote p:last-child { margin-bottom: 0; }

.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 0 0 20px;
}

.prose th, .prose td {
  border: 1px solid var(--line);
  padding: 9px 11px;
  text-align: left;
}

.prose th { background: var(--mist); }

.prose code {
  padding: 1px 5px;
  background: var(--mist);
  border-radius: 3px;
}

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

.base {
  position: relative;
  z-index: 2;
  margin-top: 76px;
  padding: 56px 22px 34px;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px 22px;
}

.mega {
  grid-column: 1 / -1;
  margin: 0 0 14px;
  font-size: clamp(46px, 13vw, 164px);
  line-height: .9;
  font-weight: 700;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}

.fcol { display: grid; align-content: start; }

.fcol a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  font-size: 16px;
  text-decoration: none;
  color: #e9e9e9;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
}

.fcol a:hover { color: #fff; border-color: #fff; }

.legal {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding-top: 22px;
  text-align: center;
  font-size: 16px;
  color: #b9b9b9;
  border-top: 1px solid rgba(255, 255, 255, .18);
}

.legal p { margin: 0; }

/* ---------- 底部固定条 ---------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: rgba(245, 245, 245, .84);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 34px rgba(31, 31, 31, .12);
}

.dock nav {
  grid-area: 1 / 1 / 2 / 4;
  z-index: 1;
  min-width: 0;
}

.dock ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dock ol li:nth-child(4) { margin-left: auto; }

.dock ol a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 11px;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--r);
  transition: background .16s ease, box-shadow .16s ease;
}

.dock ol a:hover {
  background: var(--paper);
  box-shadow: var(--e1);
}

.dock-mark {
  grid-area: 1 / 2 / 2 / 3;
  z-index: 3;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border-radius: var(--r);
  box-shadow: var(--e2);
}

.dock .find {
  grid-area: 1 / 3 / 2 / 4;
  z-index: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 5px;
}

.find input {
  width: 132px;
  min-height: 44px;
  padding: 0 11px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--e1);
}

.find button {
  min-height: 44px;
  min-width: 46px;
  font: inherit;
  font-weight: 700;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: var(--r);
  cursor: pointer;
}

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

@media (prefers-reduced-motion: no-preference) {
  .rail li {
    animation: lift .5s both;
  }
  .rail li:nth-child(1) { animation-delay: .02s; }
  .rail li:nth-child(2) { animation-delay: .06s; }
  .rail li:nth-child(3) { animation-delay: .10s; }
  .rail li:nth-child(4) { animation-delay: .14s; }
  .rail li:nth-child(5) { animation-delay: .18s; }
  .rail li:nth-child(6) { animation-delay: .22s; }
  .rail li:nth-child(7) { animation-delay: .26s; }
}

@keyframes lift {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 窄屏 ---------- */

@media (max-width: 900px) {
  .dock {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 6px 10px;
  }

  .dock nav {
    grid-area: 1 / 2 / 2 / 3;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .dock nav::-webkit-scrollbar { display: none; }

  .dock ol { gap: 2px; }
  .dock ol li:nth-child(4) { margin-left: 0; }
  .dock ol a { padding: 10px 9px; }

  .dock-mark {
    grid-area: 1 / 1 / 2 / 2;
    padding: 10px 12px;
    font-size: 17px;
  }

  .dock .find { grid-area: 1 / 3 / 2 / 4; }
  .find input { width: 82px; }

  .layer { width: 40vw; }
  .layer-a { left: -9%; top: 9%; }
  .layer-b { right: -9%; bottom: 8%; }

  .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 34px 16px 24px;
  }

  .rail { position: static; }

  .rail ol {
    display: flex;
    grid-auto-flow: column;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
  }

  .rail ol::-webkit-scrollbar { display: none; }
  .rail li { flex: 0 0 auto; }
  .rail a { white-space: nowrap; }

  .prose { padding: 24px 20px 30px; }

  .base {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 42px 16px 30px;
    gap: 22px 16px;
  }
}

@media (max-width: 520px) {
  .hero { padding: 76px 18px 130px; }
  .hero-sub { font-size: 16px; }
  .layer { width: 42vw; }
  .prose h2 { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

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