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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --muted: #3a3a3a;
  --hair: rgba(0, 0, 0, 0.14);
  --hair2: rgba(0, 0, 0, 0.32);
  --r: 28px;
  --pad: 1.25rem;
  --rail: 272px;
  --sans: "Nunito Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --head: "Rubik", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  overflow-x: hidden;
}

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

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

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

section[id] { scroll-margin-top: 84px; }

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

.rail {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}

.brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.2rem;
  font-family: var(--head);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: -0.045em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.rail-list {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 0.1rem;
  margin: 0;
  padding: 0 0.2rem;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.rail-list::-webkit-scrollbar { height: 0; }

.rail-list a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.35rem 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.rail-list a::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  background: var(--ink);
  transition: transform 0.25s ease, border-radius 0.25s ease;
}

.rail-list a:hover::before,
.rail-list a:focus-visible::before {
  transform: rotate(45deg);
  border-radius: 2px;
}

.rail-contact {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.rail-contact:hover {
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

/* ---------- 主区 ---------- */

.sheet { display: block; }

.hero {
  display: grid;
  gap: 1.1rem;
  padding: var(--pad) var(--pad) 1.5rem;
  align-items: center;
}

.hero-fig {
  margin: 0;
  min-height: 116px;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  overflow: hidden;
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.12) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.12) 0 1px, transparent 1px 18px);
}

.hero-img {
  width: 100%;
  height: 100%;
  min-height: 116px;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
}

.hero-h1 {
  margin: 0;
  font-family: var(--head);
  font-weight: 900;
  font-size: clamp(2.6rem, 13vw, 4.2rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
  overflow-wrap: anywhere;
}

.hero-desc {
  margin: 0;
  max-width: 32ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* ---------- 目录 + 正文 ---------- */

.stage {
  display: grid;
  gap: 1.5rem;
  padding: 1.4rem var(--pad) 3rem;
}

.toc {
  border: 1px solid var(--ink);
  border-bottom-width: 6px;
  border-radius: var(--r);
  padding: 1rem 1.1rem 0.9rem;
  background: var(--paper);
}

.toc-h {
  margin: 0 0 0.45rem;
  font-family: var(--head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.toc-h > span { display: inline-block; }

.toc-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-list a {
  display: block;
  min-height: 40px;
  padding: 0.45rem 0.1rem;
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--hair);
}

.toc-list a:hover { border-bottom-color: var(--ink); }

.stage-main { min-width: 0; }

.stage-main > section {
  position: relative;
  margin: 0 0 1.5rem;
  padding: 1.5rem 1.15rem 1.7rem;
  border: 1px solid var(--ink);
  border-bottom-width: 6px;
  border-radius: var(--r);
  background: var(--paper);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stage-main > section:last-child { margin-bottom: 0; }

.stage-main h2,
.stage-main h3 {
  font-family: var(--head);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin: 0 0 0.85rem;
  overflow-wrap: anywhere;
}

.stage-main h2 { font-size: clamp(1.5rem, 6.4vw, 2.5rem); }
.stage-main h3 { font-size: clamp(1.18rem, 4.6vw, 1.5rem); }

.stage-main h2 > span,
.stage-main h3 > span {
  display: inline-block;
  padding-bottom: 0.08em;
  border-bottom: 4px solid var(--ink);
}

.stage-main p { margin: 0 0 1rem; }
.stage-main p:last-child { margin-bottom: 0; }

.stage-main ul,
.stage-main ol { margin: 0 0 1rem; padding-left: 1.3rem; }
.stage-main li { margin: 0.25rem 0; }

.stage-main a {
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: background 0.2s ease;
}

.stage-main a:hover { background: var(--ink); color: var(--paper); }

.stage-main blockquote {
  margin: 0 0 1rem;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 6px solid var(--ink);
  font-size: 1.05rem;
}

.stage-main strong { font-weight: 700; }

.stage-main figure { margin: 0 0 1rem; }
.stage-main figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 0.4rem; }

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

.foot {
  border-top: 2px solid var(--ink);
  padding: 2rem var(--pad) 1.4rem;
  background: var(--paper);
}

.foot-cols {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.foot-brand {
  margin: 0 0 0.35rem;
  font-family: var(--head);
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.045em;
}

.foot-addr {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.foot-host { letter-spacing: 0.02em; }

.foot-addr a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--ink);
  font-weight: 700;
  text-underline-offset: 3px;
}

.foot-h {
  margin: 0 0 0.4rem;
  font-family: var(--head);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.foot-h > span { display: inline-block; }

.foot-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.25rem 0;
  font-size: 0.94rem;
  text-decoration: none;
  border-bottom: 1px solid var(--hair);
}

.foot-list a:hover { border-bottom-color: var(--ink); }

.sub { display: flex; flex-direction: column; gap: 0.5rem; }

.sub-field {
  min-height: 44px;
  padding: 0.45rem 1rem;
  font: inherit;
  font-size: 0.94rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 999px;
}

.sub-field::placeholder { color: var(--muted); }

.sub-btn {
  min-height: 44px;
  padding: 0.45rem 1rem;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.sub-btn:hover:not(:disabled) { background: var(--paper); color: var(--ink); }
.sub-btn:disabled { cursor: default; opacity: 0.75; }

.foot-base {
  margin-top: 1.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hair);
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.foot-base p { margin: 0; }

/* ---------- 桌面 ---------- */

@media (min-width: 900px) {
  body { padding-left: var(--rail); }

  section[id] { scroll-margin-top: 2rem; }

  .rail {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--rail);
    flex-direction: column;
    align-items: stretch;
    gap: 1.1rem;
    padding: 2rem 1.35rem 1.6rem;
    border-bottom: 0;
    border-right: 1px solid var(--ink);
    overflow-y: auto;
  }

  .brand {
    min-height: 0;
    padding: 0;
    font-size: 1.7rem;
    line-height: 1.02;
    letter-spacing: -0.055em;
    white-space: normal;
  }

  .rail-list {
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0;
    padding: 0;
    overflow: visible;
  }

  .rail-list li { border-bottom: 1px solid var(--hair); }
  .rail-list li:first-child { border-top: 1px solid var(--hair); }

  .rail-list a {
    min-height: 50px;
    padding: 0.5rem 0.2rem;
    font-size: 1rem;
    border-radius: 0;
  }

  .rail-list a:hover { padding-left: 0.5rem; }

  .rail-contact {
    justify-content: center;
    min-height: 48px;
  }

  .hero {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    min-height: 45vh;
    padding: clamp(2rem, 4vw, 3.4rem) clamp(1.6rem, 4vw, 3.4rem) 2rem;
  }

  .hero-fig { min-height: 300px; }

  .hero-img { min-height: 300px; }

  .hero-h1 { font-size: clamp(3rem, 6.4vw, 6rem); }

  .hero-copy { align-items: center; text-align: center; }

  .hero-desc { font-size: 1.06rem; }

  .stage {
    grid-template-columns: 196px minmax(0, 1fr);
    gap: clamp(1.5rem, 3vw, 3rem);
    padding: 2rem clamp(1.6rem, 4vw, 3.4rem) 4.5rem;
    align-items: start;
  }

  .toc {
    position: sticky;
    top: 2rem;
    padding: 1.1rem 1.1rem 1rem;
  }

  .toc-list { flex-direction: column; flex-wrap: nowrap; }

  .stage-main { max-width: 74ch; }

  .stage-main > section { padding: 2.4rem 2.2rem 2.6rem; margin-bottom: 2.2rem; }

  .stage-main > section:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 0 -10px rgba(0, 0, 0, 0.55);
  }

  .foot { padding: 3rem clamp(1.6rem, 4vw, 3.4rem) 1.8rem; }

  .foot-cols { grid-template-columns: 1.35fr 1fr 1fr 1.2fr; gap: 2rem; }
}

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

@media (prefers-reduced-motion: no-preference) {
  .rail-list li {
    animation: rise 0.45s ease both;
  }

  .rail-list li:nth-child(1) { animation-delay: 0.03s; }
  .rail-list li:nth-child(2) { animation-delay: 0.06s; }
  .rail-list li:nth-child(3) { animation-delay: 0.09s; }
  .rail-list li:nth-child(4) { animation-delay: 0.12s; }
  .rail-list li:nth-child(5) { animation-delay: 0.15s; }
  .rail-list li:nth-child(6) { animation-delay: 0.18s; }
  .rail-list li:nth-child(7) { animation-delay: 0.21s; }

  .hero-h1 { animation: pop 0.6s cubic-bezier(0.22, 0.8, 0.3, 1) both; }

  .hero-fig { animation: fade 0.7s ease both; }

  .toc-list li {
    animation: rise 0.4s ease both;
  }

  .toc-list li:nth-child(2n) { animation-delay: 0.05s; }
  .toc-list li:nth-child(3n) { animation-delay: 0.1s; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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