@import url('https://fonts.googleapis.com/css2?family=Calistoga:ital@0;1&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --line: rgba(0, 0, 0, .14);
  --soft: rgba(0, 0, 0, .55);
  --glass: rgba(255, 255, 255, .62);
  --r: 18px;
  --pad: clamp(18px, 4vw, 56px);
  --maxw: 1240px;
  --head: 132px;
}

*, *::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: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.78;
  font-weight: 400;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

h1, h2, h3 {
  margin: 0;
  font-family: Calistoga, "PingFang SC", "Microsoft YaHei", serif;
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -.012em;
}

/* ---------- 页头：品牌行 + 菜单行 ---------- */
.masthead {
  position: relative;
  z-index: 30;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}

@media (min-width: 900px) {
  .masthead { position: sticky; top: 0; }
}

.brandline {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px var(--pad) 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  font-family: Calistoga, "PingFang SC", serif;
  font-size: clamp(21px, 2.8vw, 31px);
  letter-spacing: -.025em;
  line-height: 1;
}

.markimg {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--ink);
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

.cta:hover {
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
  transform: translateY(-1px);
}

.tabs {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad) 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tabs p {
  display: flex;
  gap: 6px;
  margin: 0;
  min-width: max-content;
}

.tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease;
}

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

.dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: currentColor;
  opacity: .5;
  transition: opacity .18s ease;
}
.tabs a:nth-child(3n+2) .dot { border-radius: 50%; }
.tabs a:nth-child(3n) .dot { transform: rotate(45deg); }
.tabs a:hover .dot { opacity: 1; }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  grid-template-areas: "sa copy" "sb copy";
  align-content: center;
  gap: 20px;
  padding: clamp(24px, 4vw, 60px) var(--pad);
  min-height: 62vh;
  overflow: hidden;
  background: #000;
  color: #fff;
  scroll-margin-top: var(--head);
}

@media (min-width: 900px) { .hero { min-height: 70vh; } }

.hero-copy {
  grid-area: copy;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
  text-align: right;
  animation: rise .75s cubic-bezier(.2, .7, .3, 1) both;
}

.hero-copy h1 {
  font-size: clamp(33px, 6.2vw, 74px);
  color: #fff;
}

.dek {
  max-width: 42ch;
  margin: 0;
  font-size: 17px;
  line-height: 1.72;
  color: rgba(255, 255, 255, .76);
}

.pin { margin: 0; }

.pin-txt {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .45);
  background: rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 16px;
  letter-spacing: .05em;
  transform: rotate(-2deg);
  transition: opacity .32s ease;
}

.shot {
  position: relative;
  margin: 0;
  border-radius: var(--r);
  overflow: hidden;
  min-height: 20vh;
  background: rgba(255, 255, 255, .08);
  box-shadow: 0 22px 48px rgba(0, 0, 0, .45);
  animation: rise .9s cubic-bezier(.2, .7, .3, 1) both;
}

.shot-a { grid-area: sa; width: 86%; animation-delay: .06s; }
.shot-b { grid-area: sb; width: 64%; justify-self: end; margin-top: -30px; animation-delay: .16s; }

.shotimg {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--r);
}

.shot figcaption {
  position: absolute;
  left: 12px;
  bottom: 10px;
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 13px;
  letter-spacing: .16em;
}

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

/* ---------- 主体 ---------- */
.spread {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(30px, 5vw, 66px) var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
}

@media (min-width: 900px) {
  .spread {
    grid-template-columns: 248px minmax(0, 1fr);
    gap: clamp(26px, 4vw, 56px);
    align-items: start;
  }
}

.rail { margin: 0; }

@media (min-width: 900px) {
  .rail { position: sticky; top: calc(var(--head) + 12px); }
}

.glass {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .07);
  padding: 18px 16px;
}

.rail small {
  display: block;
  margin-bottom: 6px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: .3em;
  color: #767676;
}

.rail h2 { font-size: 26px; margin-bottom: 12px; }

.toc {
  counter-reset: t;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}

.toc a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 2px 6px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  transition: background .18s ease, color .18s ease;
}

.toc a::before {
  counter-increment: t;
  content: "0" counter(t);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  color: #8d8d8d;
}

.toc a:hover { background: var(--ink); color: var(--paper); border-radius: 8px; }
.toc a:hover::before { color: rgba(255, 255, 255, .7); }

/* ---------- 正文 ---------- */
.flow { min-width: 0; counter-reset: sec; }

.flow > article {
  position: relative;
  padding: clamp(26px, 4vw, 54px) 26px clamp(26px, 4vw, 54px) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: var(--head);
}

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

.flow > article::after {
  counter-increment: sec;
  content: counter(sec, decimal-leading-zero);
  position: absolute;
  top: clamp(26px, 4vw, 54px);
  right: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: .12em;
  color: #b0b0b0;
}

.flow > article:first-child::after { top: 0; }

.flow small {
  display: block;
  margin-bottom: 8px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: .26em;
  color: #767676;
}

.flow h2 {
  margin: 0 0 14px;
  max-width: 22ch;
  font-size: clamp(26px, 3.4vw, 40px);
}

.flow h3 {
  margin: 26px 0 8px;
  font-family: Inter, "PingFang SC", sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.45;
  letter-spacing: 0;
}

.flow p { margin: 0 0 16px; max-width: 66ch; }

.flow > article > p:first-of-type::first-letter {
  float: left;
  padding: 6px 10px 0 0;
  font-family: Calistoga, serif;
  font-size: 3.2em;
  line-height: .84;
}

.flow ul, .flow ol { margin: 0 0 16px; padding-left: 22px; max-width: 66ch; }
.flow li { margin-bottom: 8px; }
.flow a { text-underline-offset: 3px; }

.flow blockquote {
  margin: 26px 0;
  padding: 6px 0 6px 22px;
  border-left: 3px solid var(--ink);
  font-family: Calistoga, "PingFang SC", serif;
  font-size: 23px;
  line-height: 1.5;
}

.flow blockquote p { max-width: 34ch; }

.flow figure, .flow aside {
  margin: 26px 0;
  border-radius: var(--r);
  overflow: hidden;
}

.flow figure img { border-radius: var(--r); }

.flow figcaption {
  padding: 8px 2px;
  font-size: 14px;
  color: var(--soft);
}

/* ---------- 页脚 ---------- */
.colophon {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
  align-items: end;
  margin-top: 24px;
  padding: clamp(30px, 5vw, 62px) var(--pad) 74px;
  overflow: hidden;
  background: #000;
  color: #fff;
}

.colophon article { margin: 0; padding: 0; }

.bigmark {
  grid-column: 1 / -1;
  margin: 0 0 20px;
  font-family: Calistoga, "PingFang SC", serif;
  font-size: clamp(38px, 11vw, 150px);
  line-height: .86;
  letter-spacing: -.035em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.col-copy { grid-column: 1; }
.col-copy p {
  margin: 0;
  font-size: 15px;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .6);
}

.col-links {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 16px;
}

.col-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  text-decoration: none;
  color: rgba(255, 255, 255, .85);
  border-bottom: 1px solid transparent;
}

.col-links a:hover { color: #fff; border-bottom-color: #fff; }

.up {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .28);
}

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

/* ---------- 小屏 ---------- */
@media (max-width: 899px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "sa" "sb";
    min-height: 0;
    gap: 16px;
  }
  .hero-copy { align-items: flex-end; }
  .shot-a, .shot-b { width: 100%; margin-top: 0; }
  .shotimg { aspect-ratio: 16 / 10; }
  .flow > article { padding-right: 22px; }
  .colophon { grid-template-columns: minmax(0, 1fr); }
  .col-copy, .col-links { grid-column: 1; }
  .col-links { justify-content: flex-start; margin-top: 6px; }
}

/* ---------- 进场 ---------- */
.will { opacity: 0; transform: translateY(16px); }
.will.in {
  opacity: 1;
  transform: none;
  transition: opacity .6s ease, transform .6s ease;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy, .shot { animation: none; }
  .will { opacity: 1; transform: none; }
  .will.in { transition: none; }
  .up { transition: none; }
}

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