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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --mute: rgba(0, 0, 0, 0.58);
  --line: rgba(0, 0, 0, 0.16);
  --glass: rgba(0, 0, 0, 0.035);
  --shell: 1200px;
  --pad: clamp(1rem, 4vw, 2.75rem);
  --r: 10px;
  --head: "Space Grotesk", "DM Sans", system-ui, -apple-system, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

html:has(#nav-toggle:checked) {
  overflow: hidden;
}

body {
  margin: 0;
  padding-bottom: 118px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  font-family: var(--head);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
}

p {
  margin: 0 0 1.05em;
}

a {
  color: var(--ink);
}

hr {
  border: 0;
  border-top: 2px solid var(--ink);
  margin: 0.9rem 0 1.4rem;
}

#nav-toggle {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  z-index: 90;
}

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

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.5rem, 6vw, 4rem) var(--pad) clamp(3rem, 9vh, 6rem);
  overflow: hidden;
}

.hero-text {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: clamp(0.8rem, 2vw, 1.5rem);
  text-align: right;
  padding-top: clamp(1rem, 6vh, 3.5rem);
}

.hero-rule {
  display: block;
  width: clamp(2.5rem, 8vw, 5rem);
  height: 7px;
  background: var(--ink);
}

.hero h1 {
  font-size: clamp(2.5rem, 12vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  max-width: 18ch;
  overflow-wrap: anywhere;
}

.hero-band {
  position: absolute;
  z-index: 0;
  left: -8%;
  right: -8%;
  bottom: clamp(4rem, 16vh, 10rem);
  height: clamp(120px, 26vh, 280px);
  background: var(--ink);
  transform: skewY(-4deg);
}

.hero-fig {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  will-change: transform;
}

.hero-fig img,
.hero-shot {
  width: 100%;
  height: clamp(170px, 30vh, 330px);
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
}

/* ---------- 正文 ---------- */

main {
  padding: clamp(2.5rem, 7vw, 5rem) var(--pad) 0;
}

.doc {
  max-width: var(--shell);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.rail {
  grid-column: 1;
  grid-row: 1 / span 120;
  position: sticky;
  top: 1.5rem;
  padding: 1.1rem 1.15rem 1.3rem;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.rail h2 {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  font-weight: 600;
}

.rail hr {
  border-top: 2px solid var(--ink);
  margin: 0.55rem 0 0.9rem;
}

.rail ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0 0.9rem;
}

.rail li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0;
  font-size: 0.94rem;
  line-height: 1.35;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.rail li:last-child a {
  border-bottom: 0;
}

.rail li a:hover,
.rail li a:focus-visible {
  border-bottom-color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.doc > section {
  grid-column: 2;
  scroll-margin-top: 1.75rem;
  padding-top: clamp(1.6rem, 4vw, 2.6rem);
  border-top: 3px solid var(--ink);
}

.doc > section:first-of-type {
  border-top-width: 6px;
}

.doc > section h2 {
  font-size: clamp(1.55rem, 4.2vw, 2.6rem);
  max-width: 24ch;
}

.doc > section h2 + hr {
  border-top: 3px solid var(--ink);
  margin: 0.75rem 0 1.5rem;
}

.doc > section h3 {
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  margin: 1.6rem 0 0.5rem;
}

.doc > section p,
.doc > section ul,
.doc > section ol {
  max-width: 66ch;
}

.doc > section ul,
.doc > section ol {
  padding-left: 1.3rem;
}

.doc > section li {
  margin-bottom: 0.4rem;
}

.doc > section blockquote {
  margin: 1.4rem 0;
  padding: 0.2rem 0 0.2rem 1.1rem;
  border-left: 5px solid var(--ink);
  color: var(--mute);
}

.doc > section img {
  margin: 1.4rem 0;
  border-radius: var(--r);
  border: 1px solid var(--line);
}

.doc > section table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: 0.95rem;
}

.doc > section th,
.doc > section td {
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0.6rem;
  text-align: left;
}

.doc > section code {
  font-size: 0.92em;
  background: var(--glass);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

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

.foot {
  margin-top: clamp(3rem, 8vw, 6rem);
  padding: clamp(2.4rem, 6vw, 4rem) var(--pad) 2rem;
  background: var(--ink);
  color: #ffffff;
}

.foot a {
  color: #ffffff;
  text-decoration: none;
}

.foot a:hover,
.foot a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.foot-top {
  max-width: var(--shell);
  margin: 0 auto;
  display: grid;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.foot-brand {
  display: inline-block;
  padding: 0.35rem 0;
  font-family: var(--head);
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.foot-desc {
  margin: 0.6rem 0 0;
  max-width: 42ch;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
}

.form-h {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  font-weight: 600;
  margin-bottom: 0.85rem;
  color: #ffffff;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: stretch;
}

.form-row label {
  width: 100%;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.72);
}

.form-row input {
  flex: 1 1 10rem;
  min-height: 46px;
  padding: 0.4rem 0.2rem;
  font: inherit;
  font-size: 0.98rem;
  color: #ffffff;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 0;
}

.form-row input:focus-visible {
  outline: 0;
  border-bottom-color: #ffffff;
}

.form-row button {
  min-height: 46px;
  padding: 0 1.4rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #ffffff;
  border-radius: var(--r);
  cursor: pointer;
}

.form-row button:hover {
  background: transparent;
  color: #ffffff;
}

.foot-cols {
  max-width: var(--shell);
  margin: 2.2rem auto 0;
  display: grid;
  gap: 1.8rem;
  grid-template-columns: 1fr;
}

.foot-cols nav {
  min-width: 0;
}

.foot-cols dl {
  margin: 0;
  min-width: 0;
}

.foot-cols dt {
  font-family: var(--head);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.66);
}

.foot-cols dd {
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.foot-cols dd:last-child {
  border-bottom: 0;
}

.foot-cols dd a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.3rem 0;
  font-size: 0.95rem;
}

.foot-base {
  max-width: var(--shell);
  margin: 2.4rem auto 0;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  text-align: center;
}

.foot-base p {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

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

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: var(--ink);
  color: #ffffff;
  padding: 0.4rem var(--pad) calc(0.45rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.dock-brand {
  display: block;
  padding: 0.45rem 0;
  color: #ffffff;
  text-decoration: none;
  font-family: var(--head);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.dock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding-top: 0.45rem;
}

.dock-btn,
.dock-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.3rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--r);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dock-btn {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid #ffffff;
}

.dock-cta {
  background: transparent;
  color: #ffffff;
  border: 1px solid #ffffff;
}

.dock-cta:hover,
.dock-cta:focus-visible {
  background: #ffffff;
  color: var(--ink);
}

.dock-btn:hover,
.dock-btn:focus-visible {
  background: transparent;
  color: #ffffff;
}

#nav-toggle:focus-visible ~ .dock .dock-btn {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

#nav-toggle:checked ~ .dock .dock-btn {
  background: transparent;
  color: #ffffff;
}

/* ---------- 全屏遮罩菜单 ---------- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 1.2rem var(--pad) calc(130px + env(safe-area-inset-bottom));
  background: var(--ink);
  color: #ffffff;
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

#nav-toggle:checked ~ .sheet {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.sheet-brand {
  font-family: var(--head);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sheet-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.1rem;
  border: 1px solid #ffffff;
  border-radius: var(--r);
  font-size: 0.95rem;
  cursor: pointer;
}

.sheet-close:hover {
  background: #ffffff;
  color: var(--ink);
}

.sheet-nav ol {
  list-style: none;
  counter-reset: sheet;
  margin: 0;
  padding: 0;
}

.sheet-nav li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.sheet-nav li a {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  min-height: 52px;
  padding: 0.5rem 0;
  color: #ffffff;
  text-decoration: none;
  font-family: var(--head);
  font-size: clamp(1.35rem, 6vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.sheet-nav li a::before {
  counter-increment: sheet;
  content: counter(sheet, decimal-leading-zero);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  opacity: 0.6;
  min-width: 1.9rem;
}

.sheet-nav li a:hover,
.sheet-nav li a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* ---------- 断点 ---------- */

@media (min-width: 700px) {
  .foot-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
  }
}

@media (min-width: 820px) {
  .foot-top {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

@media (max-width: 900px) {
  .doc {
    display: block;
  }

  .rail {
    position: static;
    margin-bottom: 2rem;
  }

  .rail ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doc > section {
    padding-top: 1.8rem;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16.5px;
  }

  .hero-band {
    bottom: clamp(3rem, 12vh, 8rem);
  }

  .foot-cols {
    gap: 1.2rem;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .hero-fig {
    transform: none !important;
  }
}

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