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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --line: rgba(255, 255, 255, 0.18);
  --line-2: rgba(255, 255, 255, 0.34);
  --mute: rgba(255, 255, 255, 0.63);
  --glass: rgba(255, 255, 255, 0.055);
  --gutter: clamp(18px, 4.4vw, 64px);
  --u: 8px;
  --r: 28px;
  --dock-h: 64px;
  --mono: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: 'Fira Sans', Inter, Helvetica, Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.012em;
  padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom) + 56px);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--paper); color: var(--ink); }

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

a { color: inherit; }

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

/* ---------- 网格骨架 ---------- */

.shell {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.doc { display: block; }

.reveal { will-change: opacity, transform; }

html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--u);
  align-items: center;
  min-height: 70vh;
  padding: clamp(84px, 12vh, 132px) 0 clamp(44px, 7vh, 84px);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 24px;
  scroll-margin-bottom: calc(var(--dock-h) + 32px);
}

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

.hero-media { grid-column: 9 / span 4; }

.hero-media:empty { display: none; }

.hero-img {
  width: 100%;
  border-radius: var(--r);
  filter: grayscale(1) contrast(1.06);
  border: 1px solid var(--line);
}

h1 {
  margin: 0 0 26px;
  font-size: clamp(2.35rem, 7.2vw, 6.2rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
  font-weight: 600;
  text-wrap: balance;
}

.hero .subtitle {
  margin: 0;
  max-width: 40ch;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.85;
  color: var(--mute);
  font-weight: 300;
}

/* ---------- 版块说明 ---------- */

.brief {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--u);
  padding: clamp(34px, 6vh, 68px) 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 24px;
  scroll-margin-bottom: calc(var(--dock-h) + 32px);
}

.brief-h {
  grid-column: 1 / span 4;
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.7;
}

.brief-s {
  grid-column: 6 / span 6;
  margin: 0;
  color: var(--mute);
  font-size: 0.98rem;
  line-height: 1.85;
}

/* ---------- 正文容器 ---------- */

.body-copy {
  margin: clamp(34px, 6vh, 76px) 0 0;
  padding: clamp(22px, 4vw, 58px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(118%);
  backdrop-filter: blur(18px) saturate(118%);
  counter-reset: sec;
}

.body-copy > article {
  padding: 0 0 clamp(26px, 5vh, 52px);
  scroll-margin-top: 24px;
  scroll-margin-bottom: calc(var(--dock-h) + 32px);
}

.body-copy > article + article {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: clamp(22px, 4vh, 40px);
}

.body-copy > article::before {
  display: block;
  counter-increment: sec;
  content: counter(sec, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.42);
  margin-bottom: 10px;
}

.body-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(1.4rem, 2.6vw, 2.05rem);
  line-height: 1.28;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.body-copy h3 {
  margin: 30px 0 12px;
  font-size: 1.12rem;
  line-height: 1.5;
  font-weight: 600;
}

.body-copy p {
  margin: 0 0 18px;
  max-width: 64ch;
  color: rgba(255, 255, 255, 0.87);
}

.body-copy ul,
.body-copy ol {
  margin: 0 0 20px;
  padding-left: 1.25em;
  color: rgba(255, 255, 255, 0.87);
}

.body-copy li { margin-bottom: 8px; }

.body-copy strong { font-weight: 600; color: #fff; }

.body-copy a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: background 0.2s ease, color 0.2s ease;
}

.body-copy a:hover { background: #fff; color: #000; text-decoration: none; }

.body-copy img { border-radius: 18px; margin: 20px 0; }

.body-copy figure { margin: 22px 0; }

.body-copy figcaption {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--mute);
}

.body-copy table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 22px;
  font-size: 0.94rem;
}

.body-copy th,
.body-copy td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.body-copy blockquote {
  margin: 0 0 22px;
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--paper);
  color: var(--mute);
}

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

.site-foot {
  max-width: 1360px;
  margin: clamp(56px, 10vh, 116px) auto 0;
  padding: clamp(26px, 4vw, 46px) var(--gutter) 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
}

.site-foot p { margin: 0; }

.foot-mark {
  font-family: var(--mono);
  font-size: 0.86rem;
  letter-spacing: 0.22em;
}

.foot-copy {
  text-align: center;
  font-size: 0.84rem;
  color: var(--mute);
}

.foot-top { justify-self: end; font-size: 0.84rem; }

.foot-top a {
  display: inline-block;
  padding: 14px 2px;
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
  transition: border-color 0.25s ease, opacity 0.25s ease;
}

.foot-top a:hover { border-color: #fff; }

/* ---------- 固定底栏 + 全屏菜单 ---------- */

.chrome { position: fixed; inset: auto 0 0 0; z-index: 40; }

.dock {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 7px var(--gutter) calc(7px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
}

.dock-btn {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 15px;
  background: transparent;
  color: #fff;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.dock-btn::before {
  content: "";
  width: 14px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor, 0 -4px 0 currentColor;
}

.dock-btn:hover { background: #fff; color: #000; border-color: #fff; }

.dock-brand {
  justify-self: center;
  font-family: var(--mono);
  font-size: 0.84rem;
  letter-spacing: 0.26em;
  text-decoration: none;
  padding: 14px 4px;
  white-space: nowrap;
}

.dock-top {
  justify-self: end;
  font-size: 0.84rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  padding: 15px 4px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}

.dock-top:hover { border-color: #fff; }

html.menu-open { overflow: hidden; }

.menu-panel {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow-y: auto;
  padding: clamp(84px, 13vh, 150px) var(--gutter) calc(var(--dock-h) + 56px);
  background: rgba(0, 0, 0, 0.95);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s ease, visibility 0.32s ease;
}

html.menu-open .menu-panel { opacity: 1; visibility: visible; }

.menu-nav { max-width: 920px; margin: 0 auto; }

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(4, auto);
  grid-auto-flow: column;
  column-gap: clamp(24px, 6vw, 96px);
}

.menu-list a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-height: 44px;
  padding: 20px 0;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  font-size: clamp(1.1rem, 2.3vw, 1.65rem);
  font-weight: 400;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-list a:hover { transform: translateX(8px); }

.menu-no {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.4);
}

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

@media (max-width: 860px) {
  body { font-size: 16px; }

  .hero {
    grid-template-columns: repeat(6, 1fr);
    min-height: auto;
    padding: 86px 0 42px;
  }

  .hero-copy,
  .hero-media { grid-column: 1 / -1; }

  .hero-media { margin-top: 30px; }

  h1 { font-size: clamp(2.15rem, 10vw, 3.1rem); }

  .brief { grid-template-columns: repeat(6, 1fr); }

  .brief-h,
  .brief-s { grid-column: 1 / -1; }

  .brief-s { margin-top: 12px; }

  .body-copy { padding: 22px 18px; border-radius: 22px; }

  .menu-list {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-flow: row;
  }

  .site-foot {
    grid-template-columns: 1fr;
    gap: 6px;
    text-align: left;
  }

  .foot-copy { text-align: left; }
  .foot-top { justify-self: start; }
}

@media (max-width: 420px) {
  .dock { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .dock-brand { font-size: 0.74rem; letter-spacing: 0.16em; }
  .dock-btn { font-size: 0.8rem; padding: 0 12px; }
  .dock-top { font-size: 0.8rem; }
}

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

  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

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

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