:root {
  --ink: #000000;
  --paper: #ffffff;
  --line: #e4e4e4;
  --soft: rgba(0, 0, 0, 0.08);
  --bar: 80px;
  --gutter: clamp(16px, 5vw, 72px);
  --mono: "Lexend Mega", "Public Sans", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --text: "Public Sans", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-bottom: calc(var(--bar) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.14) 1px, transparent 0);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.75;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: var(--mono);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

a {
  color: var(--ink);
  text-underline-offset: 4px;
}

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

.menu-layer :focus-visible {
  outline-color: var(--paper);
}

/* 底部固定条 */
.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 2px solid var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 20px;
  font-family: var(--text);
  font-size: 16px;
  font-weight: 700;
  color: var(--paper);
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 4px;
  cursor: pointer;
}

.menu-btn:hover {
  background: var(--paper);
  color: var(--ink);
}

.menu-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}

.menu-lines i {
  display: block;
  height: 2px;
  background: currentColor;
}

/* 主区域 */
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding-inline: var(--gutter);
}

.hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-rows: 46vh auto;
  min-height: 100svh;
  margin-inline: calc(-1 * var(--gutter));
  padding-bottom: 12px;
}

.hero-figure {
  position: relative;
  margin: 0;
  min-height: 200px;
  overflow: hidden;
  background-color: var(--ink);
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.28) 1px, transparent 0);
  background-size: 18px 18px;
}

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

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: clamp(28px, 6vw, 80px) clamp(18px, 4vw, 56px);
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(3rem, 9vw, 9rem);
  letter-spacing: -0.05em;
  line-height: 0.94;
}

.hero-desc {
  max-width: 34ch;
  margin: clamp(16px, 3vw, 28px) 0 0;
  font-size: 17px;
  line-height: 1.7;
}

/* 侧栏 */
.side {
  grid-column: 1;
  margin: clamp(24px, 5vw, 44px) 0;
  padding: 22px clamp(16px, 3vw, 26px);
  background: var(--ink);
  color: var(--paper);
  border-radius: 4px;
}

.side h2 {
  margin: 0 0 8px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: var(--paper);
}

.side hr {
  margin: 0 0 14px;
  border: 0;
  border-top: 2px solid var(--paper);
}

.side-list,
.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.side-list {
  display: grid;
  gap: 2px;
}

.side-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 0;
  color: var(--paper);
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.side-list a:hover {
  padding-left: 6px;
  background: var(--paper);
  color: var(--ink);
}

/* 正文卡片 */
main > section:not(.hero) {
  grid-column: 1;
  margin-block: clamp(20px, 4vw, 40px);
  padding: clamp(24px, 4vw, 56px);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 4px;
  box-shadow: 0 10px 34px var(--soft);
  scroll-margin-top: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

main > section:not(.hero) h2 {
  margin: 0 0 0.45em;
  font-size: clamp(1.9rem, 5vw, 3.4rem);
}

main > section:not(.hero) h3 {
  margin: 1.6em 0 0.45em;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
}

main > section:not(.hero) hr {
  margin: 0 0 1.5em;
  border: 0;
  border-top: 2px solid var(--ink);
}

main > section:not(.hero) p {
  margin: 0 0 1.1em;
}

main > section:not(.hero) ul,
main > section:not(.hero) ol {
  margin: 0 0 1.2em;
  padding-left: 1.3em;
}

main > section:not(.hero) li {
  margin-bottom: 0.5em;
}

main > section:not(.hero) img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

main > section:not(.hero) blockquote {
  margin: 1.4em 0;
  padding: 2px 0 2px 18px;
  border-left: 4px solid var(--ink);
  font-size: 1.05em;
}

@media (hover: hover) {
  main > section:not(.hero):hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.14);
  }
}

/* 页脚 */
.foot {
  margin-top: clamp(40px, 8vw, 96px);
  padding: clamp(32px, 6vw, 64px) var(--gutter) calc(var(--bar) + 40px);
  border-top: 2px solid var(--ink);
  background: var(--paper);
}

.foot-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.foot dl {
  margin: 0;
}

.foot dt {
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.foot dd {
  margin: 0;
}

.foot dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 0;
  font-size: 16px;
  text-decoration: none;
}

.foot dd a:hover {
  text-decoration: underline;
}

.foot-brand {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 800;
}

.foot-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 16px;
}

.foot-end p {
  margin: 0;
}

.foot-links {
  display: flex;
  gap: 20px;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 0;
  text-decoration: none;
}

/* 全屏遮罩菜单 */
.menu-layer {
  position: fixed;
  inset: 0;
  z-index: 70;
  padding: clamp(24px, 6vw, 64px) var(--gutter) calc(var(--bar) + 32px);
  overflow: auto;
  background: var(--ink);
  color: var(--paper);
  visibility: hidden;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s linear;
}

.menu-layer.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
}

.menu-inner {
  max-width: 900px;
}

.menu-list {
  display: grid;
  gap: 2px;
}

.menu-list a {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 0;
  color: var(--paper);
  font-family: var(--mono);
  font-weight: 800;
  font-size: clamp(1.5rem, 5vw, 2.6rem);
  letter-spacing: -0.04em;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  transition: padding 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.menu-list a:hover {
  padding-left: 14px;
  background: var(--paper);
  color: var(--ink);
}

/* 进场 */
.rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.25s ease;
}

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

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

@media (min-width: 820px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(0, 1fr);
  }
}

@media (min-width: 960px) {
  main {
    grid-template-columns: 220px minmax(0, 1fr);
    column-gap: clamp(24px, 4vw, 64px);
    align-items: start;
  }

  .hero {
    grid-column: 1 / -1;
  }

  .side {
    position: sticky;
    top: 24px;
    grid-column: 1;
    grid-row: 2 / span 200;
    align-self: start;
    margin-top: clamp(28px, 4vw, 52px);
  }

  main > section:not(.hero) {
    grid-column: 2;
  }
}

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

  .rv {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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