:root {
  --ink: #000000;
  --paper: #ffffff;
  --shade: #efeeea;
  --r: 10px;
  --gut: clamp(16px, 4vw, 56px);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--shade);
  color: var(--ink);
  font-family: 'Raleway', 'Helvetica Neue', Helvetica, Arial, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.68;
  font-weight: 400;
  letter-spacing: 0.005em;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0 0 1em;
}

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

/* 跳转链接 */
.skip {
  position: absolute;
  top: -120px;
  left: 12px;
  z-index: 70;
  padding: 12px 18px;
  border-radius: var(--r);
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip:focus {
  top: 12px;
}

/* 页头：品牌独占一行，菜单行在下 */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--ink);
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

.head-top,
.head-bar {
  max-width: 1440px;
  margin: 0 auto;
  padding-left: var(--gut);
  padding-right: var(--gut);
}

.head-top {
  padding-top: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.22);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  line-height: 1;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: contain;
}

.brand-word {
  font-family: 'Lora', Georgia, serif;
  font-weight: 700;
  font-size: clamp(22px, 3.2vw, 32px);
  letter-spacing: -0.03em;
}

.head-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 12px;
}

.nav-pop > summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  list-style: none;
}

.nav-pop > summary::-webkit-details-marker {
  display: none;
}

.nav-pop > summary::after {
  content: "＋";
  font-weight: 400;
}

.nav-pop[open] > summary::after {
  content: "－";
}

.nav-pop menu {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 12px 0 4px;
  list-style: none;
}

.nav-pop menu li {
  margin: 0;
}

.nav-pop menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.55);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}

.nav-pop menu a:hover,
.nav-pop menu a:focus-visible {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--r);
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.cta:hover {
  background: #333333;
}

/* 首屏 */
.hero {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(16px, 3vw, 32px);
  align-items: center;
  min-height: 100vh;
  padding: clamp(32px, 7vw, 88px) var(--gut);
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
}

.hero-copy {
  grid-column: 1 / span 7;
  min-width: 0;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(40px, 8.4vw, 96px);
  line-height: 1;
  letter-spacing: -0.04em;
  overflow-wrap: break-word;
}

.hero-fig {
  grid-column: 8 / -1;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.hero-fig img {
  width: 100%;
  max-height: 72vh;
  object-fit: cover;
}

/* 主体栅格 */
.shell {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(20px, 3vw, 40px);
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 80px) var(--gut) clamp(52px, 8vw, 96px);
}

.doc {
  grid-column: 1 / span 8;
  min-width: 0;
}

.rail {
  grid-column: 10 / -1;
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
}

/* 正文排版 */
.doc > article {
  scroll-margin-top: 152px;
  padding: clamp(26px, 4vw, 44px) 0;
  border-top: 1px solid var(--ink);
}

.doc > article:first-child {
  padding-top: 0;
  border-top: 0;
}

.doc h2 {
  margin: 0 0 0.6em;
  font-size: clamp(24px, 3.2vw, 38px);
  overflow-wrap: break-word;
}

.doc h3 {
  margin-top: 1.4em;
  font-size: clamp(19px, 2.2vw, 25px);
}

.doc p {
  max-width: 64ch;
}

.doc ul,
.doc ol {
  max-width: 64ch;
  padding-left: 1.3em;
}

.doc li {
  margin: 0.35em 0;
}

.doc a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.doc blockquote {
  margin: 1.4em 0;
  padding: 0.2em 0 0.2em 18px;
  border-left: 3px solid var(--ink);
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 1.06em;
  max-width: 62ch;
}

.doc figure {
  margin: 1.2em 0;
}

.doc img {
  margin: 1.2em 0;
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: var(--r);
}

.doc table {
  width: 100%;
  margin: 1.2em 0;
  border-collapse: collapse;
  font-size: 16px;
}

.doc th,
.doc td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);
  text-align: left;
  vertical-align: top;
}

.doc code,
.doc pre {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 16px;
}

/* 侧栏玻璃卡 */
.rail-box {
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  backdrop-filter: blur(14px) saturate(130%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.rail-box h2 {
  margin: 0 0 10px;
  font-size: 17px;
  letter-spacing: 0.02em;
}

.rail-box h2 span {
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--ink);
}

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

.rail-list li + li {
  border-top: 1px solid rgba(0, 0, 0, 0.14);
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 2px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}

.rail-list a:hover,
.rail-list a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rail-go {
  margin: 0;
}

.rail-go a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 2px;
  font-weight: 600;
  text-decoration: none;
}

.rail-go a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 页脚 */
.site-foot {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 8px clamp(16px, 3vw, 40px);
  align-items: start;
  padding: clamp(32px, 6vw, 72px) var(--gut) 24px;
  background: var(--ink);
  color: var(--paper);
}

.foot-brand {
  grid-column: 1 / span 6;
  margin: 0;
  font-family: 'Lora', Georgia, serif;
  font-weight: 700;
  font-size: clamp(36px, 8vw, 88px);
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.foot-desc {
  grid-column: 1 / span 6;
  margin: 14px 0 0;
  max-width: 46ch;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.78);
}

.foot-links {
  grid-column: 8 / -1;
  margin: 0;
  font-size: 16px;
  line-height: 1.9;
}

.foot-links a {
  display: inline-block;
  min-height: 40px;
  margin-right: 4px;
  padding: 9px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  color: var(--paper);
  text-decoration: none;
}

.foot-links a:hover,
.foot-links a:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

.foot-copy {
  grid-column: 1 / -1;
  margin-top: clamp(24px, 4vw, 40px);
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 16px;
  color: rgba(255, 255, 255, 0.72);
}

/* 动效 */
html.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

html.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

html.js [data-stagger] > * {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

html.js [data-stagger].is-in > * {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  html.js [data-reveal],
  html.js [data-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* 窄屏 */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: auto;
    padding: 34px var(--gut) 40px;
  }
  .hero-copy,
  .hero-fig {
    grid-column: 1 / -1;
  }
  .hero-copy h1 {
    font-size: clamp(34px, 10vw, 58px);
  }
  .hero-fig img {
    max-height: none;
  }
  .shell {
    grid-template-columns: 1fr;
    padding: 36px var(--gut) 56px;
  }
  .doc,
  .rail {
    grid-column: 1 / -1;
  }
  .doc > article {
    scroll-margin-top: 168px;
    padding: 28px 0;
  }
  .doc p,
  .doc ul,
  .doc ol,
  .doc blockquote {
    max-width: none;
  }
  .site-foot {
    grid-template-columns: 1fr;
  }
  .foot-brand,
  .foot-desc,
  .foot-links,
  .foot-copy {
    grid-column: 1 / -1;
  }
  .foot-brand {
    margin-bottom: 8px;
  }
  .foot-desc {
    margin-bottom: 16px;
  }
  .foot-links a {
    padding: 10px 6px;
  }
}

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