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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --wash: #f4f4f4;
  --line: #e2e2e2;
  --mute: #6d6d6d;
  --u: 8px;
  --r: 28px;
  --max: 1180px;
}

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

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Outfit', 'Rubik', Helvetica, Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: -0.005em;
}

a { color: inherit; }

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

img { max-width: 100%; }

/* ---------- 顶部细条 ---------- */

.strip {
  background: var(--ink);
  color: var(--paper);
  padding: 7px 20px;
}

.strip span {
  display: block;
  max-width: var(--max);
  margin: 0 auto;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.34em;
  line-height: 1.6;
}

/* ---------- 页头 ---------- */

.masthead {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 20px 0;
}

.brandrow {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  text-decoration: none;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.mark {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 8px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

.menu ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
}

.menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.menu a:hover,
.menu a:focus-visible {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}

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

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 20px 8px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 70vh;
}

.hero-media {
  grid-column: 1 / span 6;
  position: relative;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--ink);
  aspect-ratio: 5 / 4;
  box-shadow: 0 34px 60px -34px rgba(0, 0, 0, 0.6);
}

.hero-media img,
.hero-media .hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media.is-blank { background: var(--ink); }

.hero-text {
  grid-column: 7 / span 6;
  text-align: right;
}

.hero-text h1 {
  margin: 0 0 24px;
  font-size: clamp(2rem, 5.4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 13px 28px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cta:hover,
.cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px -16px rgba(0, 0, 0, 0.75);
}

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 20px 0;
}

.doc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 36px;
  align-items: start;
}

.prose { min-width: 0; }

.prose section {
  margin: 0 0 24px;
  padding: 30px 28px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
  box-shadow: 0 24px 48px -38px rgba(0, 0, 0, 0.65);
  scroll-margin-top: 140px;
}

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

.prose h2 {
  margin: 0 0 16px;
  font-size: clamp(1.4rem, 2.8vw, 1.95rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.prose h2 span {
  display: inline-block;
  padding-bottom: 5px;
  border-bottom: 3px solid var(--ink);
}

.prose h3 {
  margin: 26px 0 10px;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.prose h3 span { display: inline-block; }

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

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 1.3em;
}

.prose li { margin: 0 0 8px; }

.prose a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.prose a:hover { background: var(--wash); }

.prose img {
  display: block;
  width: auto;
  margin: 18px 0;
  border-radius: 16px;
}

.prose figure { margin: 18px 0; }

.prose figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: var(--mute);
}

.prose blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--ink);
  border-radius: 0 16px 16px 0;
  background: var(--wash);
}

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

.prose table {
  width: 100%;
  margin: 0 0 16px;
  border-collapse: collapse;
  font-size: 15px;
}

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

.prose th { font-weight: 600; }

.prose code {
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--wash);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.prose hr {
  margin: 24px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

/* ---------- 侧栏 ---------- */

.rail {
  position: sticky;
  top: 20px;
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--wash);
}

.rail-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  line-height: 1.6;
}

.rail-title span { display: inline-block; }

.rail-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.rail-list li { border-bottom: 1px solid var(--line); }
.rail-list li:last-child { border-bottom: 0; }

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 0;
  text-decoration: none;
  font-size: 15px;
  line-height: 1.4;
}

.rail-list a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.to-top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-bottom: 2px solid var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

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

footer {
  max-width: var(--max);
  margin: 64px auto 0;
  padding: 26px 20px 44px;
  border-top: 1px solid var(--ink);
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 20px;
  align-items: center;
  font-size: 14px;
}

footer p { margin: 0; }

.f-brand {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.f-link a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-bottom: 1px solid var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.f-copy { color: var(--mute); }

/* ---------- 滚动显影 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

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

@media (max-width: 900px) {
  .doc { grid-template-columns: 1fr; gap: 24px; }
  .rail { position: static; order: 2; }
  .wrap { padding-top: 36px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 22px 20px 0;
    gap: 20px;
  }
  .hero-text,
  .hero-media { grid-column: 1 / -1; }
  .hero-text { order: 1; }
  .hero-media { order: 2; aspect-ratio: 16 / 10; }
  .hero-text h1 { margin-bottom: 18px; }
  .prose section { padding: 22px 18px; border-radius: 22px; }
  .rail { border-radius: 22px; }
  footer {
    grid-template-columns: 1fr;
    gap: 4px;
    margin-top: 48px;
    text-align: left;
  }
  .menu a { font-size: 14px; padding: 10px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .menu a, .cta { transition: none; }
}

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